From adb4478152eb4a786a73ea148c592eca0d034f48 Mon Sep 17 00:00:00 2001 From: Pablo Greco Date: Mon, 18 Nov 2024 04:19:32 -0800 Subject: [PATCH] Revert "Merge ElementsProject/elements#1219: Simplicity" This reverts commit 2534141e19b27ee9d25993360ed02dc1eec5a690, reversing changes made to fbc01d56d7b880dcdcf1dc0a6c43cc0f13ba8bd1. --- Makefile.am | 1 - build_msvc/bitcoin.sln | 6 - build_msvc/common.init.vcxproj | 5 +- .../libelementssimplicity.vcxproj | 38 - build_msvc/test_bitcoin/test_bitcoin.vcxproj | 3 - ci/lint/06_script.sh | 1 - configure.ac | 2 +- src/Makefile.am | 18 +- src/Makefile.bench.include | 1 - src/Makefile.elementssimplicity.include | 6 - src/Makefile.qt.include | 2 +- src/Makefile.qttest.include | 2 +- src/Makefile.test.include | 3 +- src/chainparams.cpp | 30 - src/consensus/params.h | 3 +- src/deploymentinfo.cpp | 4 - src/script/interpreter.cpp | 136 +- src/script/interpreter.h | 19 - src/script/script_error.cpp | 51 - src/script/script_error.h | 27 - src/simplicity/Makefile | 43 - src/simplicity/bitstream.c | 233 - src/simplicity/bitstream.h | 80 - src/simplicity/bitstring.h | 54 - src/simplicity/bounded.h | 34 - src/simplicity/cmr.c | 42 - src/simplicity/ctx8Pruned.c | 284 - src/simplicity/ctx8Pruned.h | 30 - src/simplicity/ctx8Unpruned.c | 274 - src/simplicity/ctx8Unpruned.h | 30 - src/simplicity/dag.c | 592 - src/simplicity/dag.h | 393 - src/simplicity/deserialize.c | 217 - src/simplicity/deserialize.h | 33 - src/simplicity/elements-sources.mk | 97 - src/simplicity/eval.c | 844 - src/simplicity/eval.h | 82 - src/simplicity/frame.c | 267 - src/simplicity/frame.h | 209 - src/simplicity/hashBlock.c | 194 - src/simplicity/hashBlock.h | 28 - src/simplicity/include/simplicity/cmr.h | 23 - .../include/simplicity/elements/env.h | 117 - .../include/simplicity/elements/exec.h | 41 - .../include/simplicity/errorCodes.h | 110 - src/simplicity/jets-secp256k1.c | 751 - src/simplicity/jets.c | 1425 -- src/simplicity/jets.h | 400 - src/simplicity/limitations.h | 15 - src/simplicity/precomputed.h | 407 - src/simplicity/primitive.h | 41 - .../primitive/elements/checkSigHashAllTx1.c | 42 - .../primitive/elements/checkSigHashAllTx1.h | 32 - .../primitive/elements/elementsJets.c | 1348 -- .../primitive/elements/elementsJets.h | 113 - src/simplicity/primitive/elements/env.c | 665 - src/simplicity/primitive/elements/exec.c | 132 - src/simplicity/primitive/elements/ops.c | 180 - src/simplicity/primitive/elements/ops.h | 78 - src/simplicity/primitive/elements/primitive.c | 1201 -- src/simplicity/primitive/elements/primitive.h | 276 - .../primitive/elements/primitiveEnumJet.inc | 472 - .../primitive/elements/primitiveEnumTy.inc | 149 - .../primitive/elements/primitiveInitTy.inc | 149 - .../primitive/elements/primitiveJetNode.inc | 3769 ---- src/simplicity/regression4.c | 9183 --------- src/simplicity/regression4.h | 19 - src/simplicity/rsort.c | 288 - src/simplicity/rsort.h | 37 - src/simplicity/schnorr0.c | 43 - src/simplicity/schnorr0.h | 32 - src/simplicity/schnorr6.c | 43 - src/simplicity/schnorr6.h | 32 - src/simplicity/secp256k1/README.md | 52 - src/simplicity/secp256k1/assumptions.h | 83 - src/simplicity/secp256k1/eckey.h | 29 - src/simplicity/secp256k1/eckey_impl.h | 100 - src/simplicity/secp256k1/ecmult.h | 38 - src/simplicity/secp256k1/ecmult_impl.h | 867 - src/simplicity/secp256k1/extrakeys.h | 87 - src/simplicity/secp256k1/extrakeys_impl.h | 103 - src/simplicity/secp256k1/field.h | 157 - src/simplicity/secp256k1/field_5x52.h | 55 - .../secp256k1/field_5x52_asm_impl.h | 502 - src/simplicity/secp256k1/field_5x52_impl.h | 720 - .../secp256k1/field_5x52_int128_impl.h | 278 - src/simplicity/secp256k1/field_impl.h | 134 - src/simplicity/secp256k1/generator.h | 37 - src/simplicity/secp256k1/generator_impl.h | 470 - src/simplicity/secp256k1/group.h | 180 - src/simplicity/secp256k1/group_impl.h | 714 - src/simplicity/secp256k1/int128.h | 90 - src/simplicity/secp256k1/int128_impl.h | 18 - src/simplicity/secp256k1/int128_native.h | 19 - src/simplicity/secp256k1/int128_native_impl.h | 93 - src/simplicity/secp256k1/int128_struct.h | 14 - src/simplicity/secp256k1/int128_struct_impl.h | 201 - src/simplicity/secp256k1/modinv64.h | 49 - src/simplicity/secp256k1/modinv64_impl.h | 801 - src/simplicity/secp256k1/precomputed_ecmult.h | 16463 ---------------- src/simplicity/secp256k1/scalar.h | 108 - src/simplicity/secp256k1/scalar_4x64.h | 19 - src/simplicity/secp256k1/scalar_4x64_impl.h | 908 - src/simplicity/secp256k1/scalar_impl.h | 270 - src/simplicity/secp256k1/schnorrsig.h | 28 - src/simplicity/secp256k1/schnorrsig_impl.h | 93 - src/simplicity/secp256k1/secp256k1.h | 61 - src/simplicity/secp256k1/secp256k1_impl.h | 78 - src/simplicity/secp256k1/util.h | 157 - src/simplicity/sha256.c | 209 - src/simplicity/sha256.h | 335 - src/simplicity/sha256_x86.inc | 175 - src/simplicity/simplicity_alloc.h | 15 - src/simplicity/simplicity_assert.h | 37 - src/simplicity/taptweak.h | 15 - src/simplicity/test.c | 685 - src/simplicity/type.c | 67 - src/simplicity/type.h | 101 - src/simplicity/typeInference.c | 603 - src/simplicity/typeInference.h | 96 - src/simplicity/typeSkipTest.c | 62 - src/simplicity/typeSkipTest.h | 50 - src/simplicity/uword.h | 54 - src/test/script_tests.cpp | 58 +- src/test/transaction_tests.cpp | 1 - src/validation.cpp | 8 - test/functional/feature_taproot.py | 20 +- test/functional/test_framework/script.py | 1 - test/lint/lint-files.py | 2 +- test/lint/lint-include-guards.sh | 2 +- test/lint/lint-includes.sh | 2 +- test/lint/lint-locale-dependence.sh | 2 +- 132 files changed, 24 insertions(+), 52683 deletions(-) delete mode 100644 build_msvc/libelementssimplicity/libelementssimplicity.vcxproj delete mode 100644 src/Makefile.elementssimplicity.include delete mode 100644 src/simplicity/Makefile delete mode 100644 src/simplicity/bitstream.c delete mode 100644 src/simplicity/bitstream.h delete mode 100644 src/simplicity/bitstring.h delete mode 100644 src/simplicity/bounded.h delete mode 100644 src/simplicity/cmr.c delete mode 100644 src/simplicity/ctx8Pruned.c delete mode 100644 src/simplicity/ctx8Pruned.h delete mode 100644 src/simplicity/ctx8Unpruned.c delete mode 100644 src/simplicity/ctx8Unpruned.h delete mode 100644 src/simplicity/dag.c delete mode 100644 src/simplicity/dag.h delete mode 100644 src/simplicity/deserialize.c delete mode 100644 src/simplicity/deserialize.h delete mode 100644 src/simplicity/elements-sources.mk delete mode 100644 src/simplicity/eval.c delete mode 100644 src/simplicity/eval.h delete mode 100644 src/simplicity/frame.c delete mode 100644 src/simplicity/frame.h delete mode 100644 src/simplicity/hashBlock.c delete mode 100644 src/simplicity/hashBlock.h delete mode 100644 src/simplicity/include/simplicity/cmr.h delete mode 100644 src/simplicity/include/simplicity/elements/env.h delete mode 100644 src/simplicity/include/simplicity/elements/exec.h delete mode 100644 src/simplicity/include/simplicity/errorCodes.h delete mode 100644 src/simplicity/jets-secp256k1.c delete mode 100644 src/simplicity/jets.c delete mode 100644 src/simplicity/jets.h delete mode 100644 src/simplicity/limitations.h delete mode 100644 src/simplicity/precomputed.h delete mode 100644 src/simplicity/primitive.h delete mode 100644 src/simplicity/primitive/elements/checkSigHashAllTx1.c delete mode 100644 src/simplicity/primitive/elements/checkSigHashAllTx1.h delete mode 100644 src/simplicity/primitive/elements/elementsJets.c delete mode 100644 src/simplicity/primitive/elements/elementsJets.h delete mode 100644 src/simplicity/primitive/elements/env.c delete mode 100644 src/simplicity/primitive/elements/exec.c delete mode 100644 src/simplicity/primitive/elements/ops.c delete mode 100644 src/simplicity/primitive/elements/ops.h delete mode 100644 src/simplicity/primitive/elements/primitive.c delete mode 100644 src/simplicity/primitive/elements/primitive.h delete mode 100644 src/simplicity/primitive/elements/primitiveEnumJet.inc delete mode 100644 src/simplicity/primitive/elements/primitiveEnumTy.inc delete mode 100644 src/simplicity/primitive/elements/primitiveInitTy.inc delete mode 100644 src/simplicity/primitive/elements/primitiveJetNode.inc delete mode 100644 src/simplicity/regression4.c delete mode 100644 src/simplicity/regression4.h delete mode 100644 src/simplicity/rsort.c delete mode 100644 src/simplicity/rsort.h delete mode 100644 src/simplicity/schnorr0.c delete mode 100644 src/simplicity/schnorr0.h delete mode 100644 src/simplicity/schnorr6.c delete mode 100644 src/simplicity/schnorr6.h delete mode 100644 src/simplicity/secp256k1/README.md delete mode 100644 src/simplicity/secp256k1/assumptions.h delete mode 100644 src/simplicity/secp256k1/eckey.h delete mode 100644 src/simplicity/secp256k1/eckey_impl.h delete mode 100644 src/simplicity/secp256k1/ecmult.h delete mode 100644 src/simplicity/secp256k1/ecmult_impl.h delete mode 100644 src/simplicity/secp256k1/extrakeys.h delete mode 100644 src/simplicity/secp256k1/extrakeys_impl.h delete mode 100644 src/simplicity/secp256k1/field.h delete mode 100644 src/simplicity/secp256k1/field_5x52.h delete mode 100644 src/simplicity/secp256k1/field_5x52_asm_impl.h delete mode 100644 src/simplicity/secp256k1/field_5x52_impl.h delete mode 100644 src/simplicity/secp256k1/field_5x52_int128_impl.h delete mode 100644 src/simplicity/secp256k1/field_impl.h delete mode 100644 src/simplicity/secp256k1/generator.h delete mode 100644 src/simplicity/secp256k1/generator_impl.h delete mode 100644 src/simplicity/secp256k1/group.h delete mode 100644 src/simplicity/secp256k1/group_impl.h delete mode 100644 src/simplicity/secp256k1/int128.h delete mode 100644 src/simplicity/secp256k1/int128_impl.h delete mode 100644 src/simplicity/secp256k1/int128_native.h delete mode 100644 src/simplicity/secp256k1/int128_native_impl.h delete mode 100644 src/simplicity/secp256k1/int128_struct.h delete mode 100644 src/simplicity/secp256k1/int128_struct_impl.h delete mode 100644 src/simplicity/secp256k1/modinv64.h delete mode 100644 src/simplicity/secp256k1/modinv64_impl.h delete mode 100644 src/simplicity/secp256k1/precomputed_ecmult.h delete mode 100644 src/simplicity/secp256k1/scalar.h delete mode 100644 src/simplicity/secp256k1/scalar_4x64.h delete mode 100644 src/simplicity/secp256k1/scalar_4x64_impl.h delete mode 100644 src/simplicity/secp256k1/scalar_impl.h delete mode 100644 src/simplicity/secp256k1/schnorrsig.h delete mode 100644 src/simplicity/secp256k1/schnorrsig_impl.h delete mode 100644 src/simplicity/secp256k1/secp256k1.h delete mode 100644 src/simplicity/secp256k1/secp256k1_impl.h delete mode 100644 src/simplicity/secp256k1/util.h delete mode 100644 src/simplicity/sha256.c delete mode 100644 src/simplicity/sha256.h delete mode 100644 src/simplicity/sha256_x86.inc delete mode 100644 src/simplicity/simplicity_alloc.h delete mode 100644 src/simplicity/simplicity_assert.h delete mode 100644 src/simplicity/taptweak.h delete mode 100644 src/simplicity/test.c delete mode 100644 src/simplicity/type.c delete mode 100644 src/simplicity/type.h delete mode 100644 src/simplicity/typeInference.c delete mode 100644 src/simplicity/typeInference.h delete mode 100644 src/simplicity/typeSkipTest.c delete mode 100644 src/simplicity/typeSkipTest.h delete mode 100644 src/simplicity/uword.h diff --git a/Makefile.am b/Makefile.am index c76e7dd55e..59fb949699 100644 --- a/Makefile.am +++ b/Makefile.am @@ -195,7 +195,6 @@ LCOV_FILTER_PATTERN = \ -p "src/crypto/ctaes" \ -p "src/minisketch" \ -p "src/secp256k1" \ - -p "src/simplicity/secp256k1" \ -p "depends" DIR_FUZZ_SEED_CORPUS ?= qa-assets/fuzz_seed_corpus diff --git a/build_msvc/bitcoin.sln b/build_msvc/bitcoin.sln index 4a1747e4ff..2a1ccf58fe 100644 --- a/build_msvc/bitcoin.sln +++ b/build_msvc/bitcoin.sln @@ -38,8 +38,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoin_wallet_tool", "l EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsecp256k1", "libsecp256k1\libsecp256k1.vcxproj", "{BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libelementssimplicity", "libelementssimplicity\libelementssimplicity.vcxproj", "{ABAE25F0-D700-46E1-9EF6-5D6DDFCF8B26}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libleveldb", "libleveldb\libleveldb.vcxproj", "{18430FEF-6B61-4C53-B396-718E02850F1B}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbitcoin_qt", "libbitcoin_qt\libbitcoin_qt.vcxproj", "{2B4ABFF8-D1FD-4845-88C9-1F3C0A6512BF}" @@ -130,10 +128,6 @@ Global {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}.Debug|x64.Build.0 = Debug|x64 {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}.Release|x64.ActiveCfg = Release|x64 {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}.Release|x64.Build.0 = Release|x64 - {ABAE25F0-D700-46E1-9EF6-5D6DDFCF8B26}.Debug|x64.ActiveCfg = Debug|x64 - {ABAE25F0-D700-46E1-9EF6-5D6DDFCF8B26}.Debug|x64.Build.0 = Debug|x64 - {ABAE25F0-D700-46E1-9EF6-5D6DDFCF8B26}.Release|x64.ActiveCfg = Release|x64 - {ABAE25F0-D700-46E1-9EF6-5D6DDFCF8B26}.Release|x64.Build.0 = Release|x64 {18430FEF-6B61-4C53-B396-718E02850F1B}.Debug|x64.ActiveCfg = Debug|x64 {18430FEF-6B61-4C53-B396-718E02850F1B}.Debug|x64.Build.0 = Debug|x64 {18430FEF-6B61-4C53-B396-718E02850F1B}.Release|x64.ActiveCfg = Release|x64 diff --git a/build_msvc/common.init.vcxproj b/build_msvc/common.init.vcxproj index c5e76b1759..48baefd84f 100644 --- a/build_msvc/common.init.vcxproj +++ b/build_msvc/common.init.vcxproj @@ -87,12 +87,11 @@ Level3 NotUsing - stdcpp17 - /utf-8 /Zc:__cplusplus %(AdditionalOptions) + /utf-8 /Zc:__cplusplus /std:c++17 %(AdditionalOptions) 4018;4244;4267;4334;4715;4805;4834 true _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;SECP256K1_STATIC;_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING;ZMQ_STATIC;NOMINMAX;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) - ..\..\src;..\..\src\minisketch\include;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\simplicity\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;%(AdditionalIncludeDirectories) + ..\..\src;..\..\src\minisketch\include;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;%(AdditionalIncludeDirectories) Console diff --git a/build_msvc/libelementssimplicity/libelementssimplicity.vcxproj b/build_msvc/libelementssimplicity/libelementssimplicity.vcxproj deleted file mode 100644 index f975f8316d..0000000000 --- a/build_msvc/libelementssimplicity/libelementssimplicity.vcxproj +++ /dev/null @@ -1,38 +0,0 @@ - - - - - {ABAE25F0-D700-46E1-9EF6-5D6DDFCF8B26} - - - StaticLibrary - - - - - - - - - - - - - - - - - - - - - - - stdc11 - 4090;4146;4244;4715 - - - - - - diff --git a/build_msvc/test_bitcoin/test_bitcoin.vcxproj b/build_msvc/test_bitcoin/test_bitcoin.vcxproj index 3fa2e16bf1..9414b30273 100644 --- a/build_msvc/test_bitcoin/test_bitcoin.vcxproj +++ b/build_msvc/test_bitcoin/test_bitcoin.vcxproj @@ -56,9 +56,6 @@ {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6} - - {abae25f0-d700-46e1-9ef6-5d6ddfcf8b26} - {18430fef-6b61-4c53-b396-718e02850f1b} diff --git a/ci/lint/06_script.sh b/ci/lint/06_script.sh index 52d434afef..6761c0c86f 100755 --- a/ci/lint/06_script.sh +++ b/ci/lint/06_script.sh @@ -17,7 +17,6 @@ export COMMIT_RANGE # check with -r to not have to fetch all the remotes. test/lint/git-subtree-check.sh src/crypto/ctaes test/lint/git-subtree-check.sh src/secp256k1 -test/lint/git-subtree-check.sh src/simplicity test/lint/git-subtree-check.sh src/minisketch test/lint/git-subtree-check.sh src/univalue test/lint/git-subtree-check.sh src/leveldb diff --git a/configure.ac b/configure.ac index bb407ad850..689d81df3a 100644 --- a/configure.ac +++ b/configure.ac @@ -862,7 +862,7 @@ if test "$use_lcov" = "yes"; then AX_CHECK_LINK_FLAG([--coverage], [LDFLAGS="$LDFLAGS --coverage"], [AC_MSG_ERROR([lcov testing requested but --coverage linker flag does not work])]) - AX_CHECK_COMPILE_FLAG([--coverage],[CXXFLAGS="$CXXFLAGS --coverage";CFLAGS="$CFLAGS --coverage"], + AX_CHECK_COMPILE_FLAG([--coverage],[CXXFLAGS="$CXXFLAGS --coverage"], [AC_MSG_ERROR([lcov testing requested but --coverage flag does not work])]) CXXFLAGS="$CXXFLAGS -Og" fi diff --git a/src/Makefile.am b/src/Makefile.am index 803074c663..c84454e189 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,7 +15,7 @@ AM_LIBTOOLFLAGS = --preserve-dup-deps PTHREAD_FLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) EXTRA_LIBRARIES = -BITCOIN_INCLUDES=-I$(builddir) -I$(srcdir)/$(MINISKETCH_INCLUDE_DIR_INT) -I$(srcdir)/secp256k1/include -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) -I$(srcdir)/$(ELEMENTS_SIMPLICITY_INCLUDE_DIR_INT) $(BDB_CPPFLAGS) $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) +BITCOIN_INCLUDES=-I$(builddir) -I$(srcdir)/$(MINISKETCH_INCLUDE_DIR_INT) -I$(srcdir)/secp256k1/include -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) $(BDB_CPPFLAGS) $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) LIBBITCOIN_NODE=libbitcoin_node.a LIBBITCOIN_COMMON=libbitcoin_common.a @@ -721,8 +721,7 @@ elements_bin_ldadd = \ $(LIBLEVELDB) \ $(LIBLEVELDB_SSE42) \ $(LIBMEMENV) \ - $(LIBSECP256K1) \ - $(LIBELEMENTSSIMPLICITY) + $(LIBSECP256K1) elements_bin_ldadd += $(BDB_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(ZMQ_LIBS) $(SQLITE_LIBS) @@ -773,8 +772,7 @@ elements_tx_LDADD = \ $(LIBBITCOIN_UTIL) \ $(LIBBITCOIN_CONSENSUS) \ $(LIBBITCOIN_CRYPTO) \ - $(LIBSECP256K1) \ - $(LIBELEMENTSSIMPLICITY) + $(LIBSECP256K1) # # bitcoin-wallet binary # @@ -792,7 +790,6 @@ elements_wallet_LDADD = \ $(LIBBITCOIN_CONSENSUS) \ $(LIBBITCOIN_CRYPTO) \ $(LIBSECP256K1) \ - $(LIBELEMENTSSIMPLICITY) \ $(BDB_LIBS) \ $(EVENT_LIBS) \ $(LIBLEVELDB) \ @@ -821,8 +818,7 @@ elements_util_LDADD = \ $(LIBUNIVALUE) \ $(LIBBITCOIN_CONSENSUS) \ $(LIBBITCOIN_CRYPTO) \ - $(LIBSECP256K1) \ - $(LIBELEMENTSSIMPLICITY) + $(LIBSECP256K1) # # bitcoin-chainstate binary # @@ -957,8 +953,8 @@ include_HEADERS = script/bitcoinconsensus.h libelementsconsensus_la_SOURCES = support/cleanse.cpp $(crypto_libbitcoin_crypto_base_a_SOURCES) $(libelements_consensus_a_SOURCES) libelementsconsensus_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS) -libelementsconsensus_la_LIBADD = $(LIBSECP256K1) $(LIBELEMENTSSIMPLICITY) -libelementsconsensus_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include -I$(srcdir)/$(ELEMENTS_SIMPLICITY_INCLUDE_DIR_INT) -DBUILD_BITCOIN_INTERNAL +libelementsconsensus_la_LIBADD = $(LIBSECP256K1) +libelementsconsensus_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include -DBUILD_BITCOIN_INTERNAL libelementsconsensus_la_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) endif @@ -1083,5 +1079,3 @@ include Makefile.qttest.include endif include Makefile.univalue.include - -include Makefile.elementssimplicity.include diff --git a/src/Makefile.bench.include b/src/Makefile.bench.include index 49efbac3d7..0bcce6ebe1 100644 --- a/src/Makefile.bench.include +++ b/src/Makefile.bench.include @@ -62,7 +62,6 @@ bench_bench_bitcoin_LDADD = \ $(LIBLEVELDB_SSE42) \ $(LIBMEMENV) \ $(LIBSECP256K1) \ - $(LIBELEMENTSSIMPLICITY) \ $(LIBUNIVALUE) \ $(EVENT_PTHREADS_LIBS) \ $(EVENT_LIBS) diff --git a/src/Makefile.elementssimplicity.include b/src/Makefile.elementssimplicity.include deleted file mode 100644 index 2a6c06fc49..0000000000 --- a/src/Makefile.elementssimplicity.include +++ /dev/null @@ -1,6 +0,0 @@ -include simplicity/elements-sources.mk - -LIBELEMENTSSIMPLICITY = libelementssimplicity.la -noinst_LTLIBRARIES += $(LIBELEMENTSSIMPLICITY) -libelementssimplicity_la_SOURCES = $(ELEMENTS_SIMPLICITY_LIB_SOURCES_INT) $(ELEMENTS_SIMPLICITY_DIST_HEADERS_INT) $(ELEMENTS_SIMPLICITY_LIB_HEADERS_INT) -libelementssimplicity_la_CPPFLAGS = $(AM_CPPFLAGS) $(SHANI_CXXFLAGS) -I$(srcdir)/$(ELEMENTS_SIMPLICITY_INCLUDE_DIR_INT) diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index 962d82b71a..4487ff13a0 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -330,7 +330,7 @@ elements_qt_ldadd += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS) endif elements_qt_ldadd += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) $(LIBLEVELDB_SSE42) $(LIBMEMENV) \ $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(BDB_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(LIBSECP256K1) \ - $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(SQLITE_LIBS) $(LIBELEMENTSSIMPLICITY) + $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(SQLITE_LIBS) elements_qt_ldflags = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) elements_qt_libtoolflags = $(AM_LIBTOOLFLAGS) --tag CXX diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include index 0a71dc6743..7ddb4f36e4 100644 --- a/src/Makefile.qttest.include +++ b/src/Makefile.qttest.include @@ -53,7 +53,7 @@ qt_test_test_elements_qt_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS) endif qt_test_test_elements_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) \ $(LIBLEVELDB_SSE42) $(LIBMEMENV) $(QT_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) \ - $(QR_LIBS) $(BDB_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(LIBSECP256K1) $(LIBELEMENTSSIMPLICITY) \ + $(QR_LIBS) $(BDB_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(LIBSECP256K1) \ $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(SQLITE_LIBS) qt_test_test_elements_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) qt_test_test_elements_qt_CXXFLAGS = $(AM_CXXFLAGS) $(QT_PIE_FLAGS) diff --git a/src/Makefile.test.include b/src/Makefile.test.include index 943eedba57..9dd760525a 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -50,7 +50,6 @@ FUZZ_SUITE_LD_COMMON = \ $(LIBLEVELDB_SSE42) \ $(LIBMEMENV) \ $(LIBSECP256K1) \ - $(LIBELEMENTSSIMPLICITY) \ $(MINISKETCH_LIBS) \ $(EVENT_LIBS) \ $(EVENT_PTHREADS_LIBS) @@ -205,7 +204,7 @@ test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET) endif test_test_bitcoin_LDADD += $(LIBBITCOIN_NODE) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) \ - $(LIBLEVELDB) $(LIBLEVELDB_SSE42) $(LIBMEMENV) $(LIBSECP256K1) $(LIBELEMENTSSIMPLICITY) $(EVENT_LIBS) $(EVENT_PTHREADS_LIBS) $(MINISKETCH_LIBS) + $(LIBLEVELDB) $(LIBLEVELDB_SSE42) $(LIBMEMENV) $(LIBSECP256K1) $(EVENT_LIBS) $(EVENT_PTHREADS_LIBS) $(MINISKETCH_LIBS) test_test_bitcoin_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) test_test_bitcoin_LDADD += $(BDB_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(SQLITE_LIBS) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 10f122424b..e5c1735fb6 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -214,12 +214,6 @@ public: consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nTimeout = 1628640000; // August 11th, 2021 consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].min_activation_height = 709632; // Approximately November 12th, 2021 - // Simplicity - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 24; - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE; - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT; - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].min_activation_height = 0; // No activation delay - consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000002927cdceccbd5209e81e80db"); consensus.defaultAssumeValid = uint256S("0x000000000000000000052d314a259755ca65944e68df6b12a067ea8f1f5a7091"); // 724466 @@ -360,12 +354,6 @@ public: consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nTimeout = 1628640000; // August 11th, 2021 consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].min_activation_height = 0; // No activation delay - // Simplicity - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 24; - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE; - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT; - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].min_activation_height = 0; // No activation delay - consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000064728c7be6fe4b2f961"); consensus.defaultAssumeValid = uint256S("0x00000000000163cfb1f97c4e4098a3692c8053ad9cab5ad9c86b338b5c00b8b7"); // 2143398 @@ -526,12 +514,6 @@ public: consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT; consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].min_activation_height = 0; // No activation delay - // Simplicity - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 24; - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE; - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT; - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].min_activation_height = 0; // No activation delay - // ELEMENTS: copied from Main consensus.genesis_subsidy = 50*COIN; consensus.connect_genesis_outputs = false; @@ -625,12 +607,6 @@ public: consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nPeriod = 128; // test ability to change from default consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nThreshold = 128; - // Simplicity - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 24; - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nStartTime = Consensus::BIP9Deployment::ALWAYS_ACTIVE; - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT; - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].min_activation_height = 0; // No activation delay - consensus.nMinimumChainWork = uint256{}; consensus.defaultAssumeValid = uint256{}; @@ -1281,12 +1257,6 @@ public: consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nPeriod = 10080; // one week... consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nThreshold = 10080; // ...of 100% signalling - // Simplicity - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 24; - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE; - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT; - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].min_activation_height = 0; // No activation delay - // Activated from block 1,000,000. consensus.vDeployments[Consensus::DEPLOYMENT_DYNA_FED].bit = 25; // Allow blocksigners to delay activation. diff --git a/src/consensus/params.h b/src/consensus/params.h index 0162247285..fd852b4c02 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -34,11 +34,10 @@ enum DeploymentPos : uint16_t { DEPLOYMENT_TESTDUMMY, DEPLOYMENT_TAPROOT, // Deployment of Schnorr/Taproot (BIPs 340-342) DEPLOYMENT_DYNA_FED, // Deployment of dynamic federation - DEPLOYMENT_SIMPLICITY, // Deployment of Simplicity // NOTE: Also add new deployments to VersionBitsDeploymentInfo in deploymentinfo.cpp MAX_VERSION_BITS_DEPLOYMENTS }; -constexpr bool ValidDeployment(DeploymentPos dep) { return DEPLOYMENT_TESTDUMMY <= dep && dep < MAX_VERSION_BITS_DEPLOYMENTS; } +constexpr bool ValidDeployment(DeploymentPos dep) { return DEPLOYMENT_TESTDUMMY <= dep && dep <= DEPLOYMENT_DYNA_FED; } /** * Struct for each individual consensus rule change using BIP9. diff --git a/src/deploymentinfo.cpp b/src/deploymentinfo.cpp index 874606acf3..ddb4d82acb 100644 --- a/src/deploymentinfo.cpp +++ b/src/deploymentinfo.cpp @@ -19,10 +19,6 @@ const struct VBDeploymentInfo VersionBitsDeploymentInfo[Consensus::MAX_VERSION_B /*.name =*/ "dynafed", /*.gbt_force =*/ true, }, - { - /*.name =*/ "simplicity", - /*.gbt_force =*/ true, - }, }; std::string DeploymentName(Consensus::BuriedDeployment dep) diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 5945356439..638fbd95b9 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -12,10 +12,6 @@ #include #include