Skip to content

Commit 948ecf1

Browse files
committed
Merge bitcoin/bitcoin#29648: Remove libbitcoinconsensus
80f8b92 remove libbitcoinconsensus (fanquake) Pull request description: This was deprecated in `v27.0`, for removal in `v28.0`. See discussion in PR #29189. ACKs for top commit: theuni: Concept ACK and light review ACK 80f8b92. My only hesitation here is that (afaics?) there's now nothing keeping undesired features like threading or globals from working their way into the interpreter in future commits. m3dwards: Concept ACK bitcoin/bitcoin@80f8b92 TheCharlatan: ACK 80f8b92 hebasto: ACK 80f8b92, I have reviewed the code and it looks OK. Tree-SHA512: 17a62118aeb088f2695c892bb32794dfea3061e3cb7d9e8e9f1c06c3ff6f63a7587fa532e37edbb91fbc5a19b12c9a0f8e05fa9e8864aa07f92665375d847e80
2 parents 90224fb + 80f8b92 commit 948ecf1

17 files changed

+10
-694
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ test/lint/test_runner/target/
136136

137137
/doc/doxygen/
138138

139-
libbitcoinconsensus.pc
140139
contrib/devtools/split-debug.sh
141140

142141
# Output from running db4 installation

Makefile.am

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ endif
1414
.PHONY: deploy FORCE
1515
.INTERMEDIATE: $(COVERAGE_INFO)
1616

17-
if BUILD_BITCOIN_LIBS
18-
pkgconfigdir = $(libdir)/pkgconfig
19-
pkgconfig_DATA = libbitcoinconsensus.pc
20-
endif
21-
2217
BITCOIND_BIN=$(top_builddir)/src/$(BITCOIN_DAEMON_NAME)$(EXEEXT)
2318
BITCOIN_QT_BIN=$(top_builddir)/src/qt/$(BITCOIN_GUI_NAME)$(EXEEXT)
2419
BITCOIN_TEST_BIN=$(top_builddir)/src/test/$(BITCOIN_TEST_NAME)$(EXEEXT)

build_msvc/libbitcoin_consensus/libbitcoin_consensus.vcxproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<ClCompile Include="..\..\src\primitives\block.cpp" />
1616
<ClCompile Include="..\..\src\primitives\transaction.cpp" />
1717
<ClCompile Include="..\..\src\pubkey.cpp" />
18-
<ClCompile Include="..\..\src\script\bitcoinconsensus.cpp" />
1918
<ClCompile Include="..\..\src\script\interpreter.cpp" />
2019
<ClCompile Include="..\..\src\script\script.cpp" />
2120
<ClCompile Include="..\..\src\script\script_error.cpp" />

ci/test/00_setup_env_native_previous_releases.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ export RUN_UNIT_TESTS_SEQUENTIAL="true"
1616
export RUN_UNIT_TESTS="false"
1717
export GOAL="install"
1818
export DOWNLOAD_PREVIOUS_RELEASES="true"
19-
export BITCOIN_CONFIG="--enable-zmq --with-libs=no --with-gui=qt5 --enable-reduce-exports --enable-debug \
19+
export BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-reduce-exports --enable-debug \
2020
CFLAGS=\"-g0 -O2 -funsigned-char\" CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' CXXFLAGS=\"-g0 -O2 -funsigned-char\""

configure.ac

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -626,15 +626,9 @@ AC_ARG_ENABLE([experimental-util-chainstate],
626626
[build_bitcoin_chainstate=$enableval],
627627
[build_bitcoin_chainstate=no])
628628

629-
AC_ARG_WITH([libs],
630-
[AS_HELP_STRING([--with-libs],
631-
[build libraries (default=yes)])],
632-
[build_bitcoin_libs=$withval],
633-
[build_bitcoin_libs=yes])
634-
635629
AC_ARG_WITH([experimental-kernel-lib],
636630
[AS_HELP_STRING([--with-experimental-kernel-lib],
637-
[build experimental bitcoinkernel library (default is to build if we're building libraries and the experimental build-chainstate executable)])],
631+
[build experimental bitcoinkernel library (default is to build if we're building the experimental build-chainstate executable)])],
638632
[build_experimental_kernel_lib=$withval],
639633
[build_experimental_kernel_lib=auto])
640634

@@ -1262,7 +1256,6 @@ if test "$enable_fuzz" = "yes"; then
12621256
build_bitcoin_chainstate=no
12631257
build_bitcoin_wallet=no
12641258
build_bitcoind=no
1265-
build_bitcoin_libs=no
12661259
bitcoin_enable_qt=no
12671260
bitcoin_enable_qt_test=no
12681261
bitcoin_enable_qt_dbus=no
@@ -1421,7 +1414,7 @@ if test "$use_boost" = "yes"; then
14211414
dnl Check for Boost headers
14221415
AX_BOOST_BASE([1.73.0],[],[AC_MSG_ERROR([Boost is not available!])])
14231416
if test "$want_boost" = "no"; then
1424-
AC_MSG_ERROR([only libbitcoinconsensus can be built without Boost])
1417+
AC_MSG_ERROR([Boost is required])
14251418
fi
14261419

14271420
dnl we don't use multi_index serialization
@@ -1635,18 +1628,8 @@ fi
16351628
AM_CONDITIONAL([BUILD_BITCOIN_CHAINSTATE], [test $build_bitcoin_chainstate = "yes"])
16361629
AC_MSG_RESULT($build_bitcoin_chainstate)
16371630

1638-
AC_MSG_CHECKING([whether to build libraries])
1639-
AM_CONDITIONAL([BUILD_BITCOIN_LIBS], [test $build_bitcoin_libs = "yes"])
1640-
1641-
if test "$build_bitcoin_libs" = "yes"; then
1642-
AC_DEFINE([HAVE_CONSENSUS_LIB], [1], [Define this symbol if the consensus lib has been built])
1643-
AC_CONFIG_FILES([libbitcoinconsensus.pc:libbitcoinconsensus.pc.in])
1644-
fi
1645-
16461631
AM_CONDITIONAL([BUILD_BITCOIN_KERNEL_LIB], [test "$build_experimental_kernel_lib" != "no" && ( test "$build_experimental_kernel_lib" = "yes" || test "$build_bitcoin_chainstate" = "yes" )])
16471632

1648-
AC_MSG_RESULT($build_bitcoin_libs)
1649-
16501633
AC_LANG_POP
16511634

16521635
if test "$use_ccache" != "no"; then
@@ -1780,8 +1763,8 @@ else
17801763
AC_MSG_RESULT([no])
17811764
fi
17821765

1783-
if test "$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_util$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$enable_fuzz_binary$use_bench$use_tests" = "nononononononononono"; then
1784-
AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui --enable-fuzz(-binary) --enable-bench or --enable-tests])
1766+
if test "$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_util$build_bitcoind$bitcoin_enable_qt$enable_fuzz_binary$use_bench$use_tests" = "nonononononononono"; then
1767+
AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-daemon --with-gui --enable-fuzz(-binary) --enable-bench or --enable-tests])
17851768
fi
17861769

17871770
AM_CONDITIONAL([TARGET_DARWIN], [test "$TARGET_OS" = "darwin"])
@@ -1941,7 +1924,6 @@ echo
19411924
echo "Options used to compile and link:"
19421925
echo " external signer = $use_external_signer"
19431926
echo " multiprocess = $build_multiprocess"
1944-
echo " with libs = $build_bitcoin_libs"
19451927
echo " with wallet = $enable_wallet"
19461928
if test "$enable_wallet" != "no"; then
19471929
echo " with sqlite = $use_sqlite"

doc/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ The Bitcoin repo's [root README](/README.md) contains relevant information on th
5959
- [Translation Strings Policy](translation_strings_policy.md)
6060
- [JSON-RPC Interface](JSON-RPC-interface.md)
6161
- [Unauthenticated REST Interface](REST-interface.md)
62-
- [Shared Libraries](shared-libraries.md)
6362
- [BIPS](bips.md)
6463
- [Dnsseed Policy](dnsseed-policy.md)
6564
- [Benchmarking](benchmarking.md)

doc/design/libraries.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
|--------------------------|-------------|
55
| *libbitcoin_cli* | RPC client functionality used by *bitcoin-cli* executable |
66
| *libbitcoin_common* | Home for common functionality shared by different executables and libraries. Similar to *libbitcoin_util*, but higher-level (see [Dependencies](#dependencies)). |
7-
| *libbitcoin_consensus* | Stable, backwards-compatible consensus functionality used by *libbitcoin_node* and *libbitcoin_wallet* and also exposed as a [shared library](../shared-libraries.md). |
8-
| *libbitcoinconsensus* | Shared library build of static *libbitcoin_consensus* library |
9-
| *libbitcoin_kernel* | Consensus engine and support library used for validation by *libbitcoin_node* and also exposed as a [shared library](../shared-libraries.md). |
10-
| *libbitcoinqt* | GUI functionality used by *bitcoin-qt* and *bitcoin-gui* executables |
7+
| *libbitcoin_consensus* | Stable, backwards-compatible consensus functionality used by *libbitcoin_node* and *libbitcoin_wallet*. |
8+
| *libbitcoin_kernel* | Consensus engine and support library used for validation by *libbitcoin_node*. |
9+
| *libbitcoinqt* | GUI functionality used by *bitcoin-qt* and *bitcoin-gui* executables. |
1110
| *libbitcoin_ipc* | IPC functionality used by *bitcoin-node*, *bitcoin-wallet*, *bitcoin-gui* executables to communicate when [`--enable-multiprocess`](multiprocess.md) is used. |
1211
| *libbitcoin_node* | P2P and RPC server functionality used by *bitcoind* and *bitcoin-qt* executables. |
1312
| *libbitcoin_util* | Home for common functionality shared by different executables and libraries. Similar to *libbitcoin_common*, but lower-level (see [Dependencies](#dependencies)). |
@@ -17,7 +16,7 @@
1716

1817
## Conventions
1918

20-
- Most libraries are internal libraries and have APIs which are completely unstable! There are few or no restrictions on backwards compatibility or rules about external dependencies. Exceptions are *libbitcoin_consensus* and *libbitcoin_kernel* which have external interfaces documented at [../shared-libraries.md](../shared-libraries.md).
19+
- Most libraries are internal libraries and have APIs which are completely unstable! There are few or no restrictions on backwards compatibility or rules about external dependencies. An exception is *libbitcoin_kernel*, which, at some future point, will have a documented external interface.
2120

2221
- Generally each library should have a corresponding source directory and namespace. Source code organization is a work in progress, so it is true that some namespaces are applied inconsistently, and if you look at [`libbitcoin_*_SOURCES`](../../src/Makefile.am) lists you can see that many libraries pull in files from outside their source directory. But when working with libraries, it is good to follow a consistent pattern like:
2322

doc/shared-libraries.md

Lines changed: 0 additions & 78 deletions
This file was deleted.

libbitcoinconsensus.pc.in

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/Makefile.am

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ LIBSECP256K1=secp256k1/libsecp256k1.la
3939
if ENABLE_ZMQ
4040
LIBBITCOIN_ZMQ=libbitcoin_zmq.a
4141
endif
42-
if BUILD_BITCOIN_LIBS
43-
LIBBITCOINCONSENSUS=libbitcoinconsensus.la
44-
endif
4542
if BUILD_BITCOIN_KERNEL_LIB
4643
LIBBITCOINKERNEL=libbitcoinkernel.la
4744
endif
@@ -649,7 +646,6 @@ libbitcoin_consensus_a_SOURCES = \
649646
primitives/transaction.h \
650647
pubkey.cpp \
651648
pubkey.h \
652-
script/bitcoinconsensus.cpp \
653649
script/interpreter.cpp \
654650
script/interpreter.h \
655651
script/script.cpp \
@@ -1010,21 +1006,6 @@ libbitcoinkernel_la-clientversion.l$(OBJEXT): obj/build.h
10101006
endif # BUILD_BITCOIN_KERNEL_LIB
10111007
#
10121008

1013-
# bitcoinconsensus library #
1014-
if BUILD_BITCOIN_LIBS
1015-
lib_LTLIBRARIES += $(LIBBITCOINCONSENSUS)
1016-
1017-
include_HEADERS = script/bitcoinconsensus.h
1018-
libbitcoinconsensus_la_SOURCES = support/cleanse.cpp $(crypto_libbitcoin_crypto_base_la_SOURCES) $(libbitcoin_consensus_a_SOURCES)
1019-
1020-
libbitcoinconsensus_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS)
1021-
libbitcoinconsensus_la_LIBADD = $(LIBSECP256K1)
1022-
libbitcoinconsensus_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include -DBUILD_BITCOIN_INTERNAL -DDISABLE_OPTIMIZED_SHA256
1023-
libbitcoinconsensus_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
1024-
1025-
endif
1026-
#
1027-
10281009
CTAES_DIST = crypto/ctaes/bench.c
10291010
CTAES_DIST += crypto/ctaes/ctaes.c
10301011
CTAES_DIST += crypto/ctaes/ctaes.h

0 commit comments

Comments
 (0)