From 0be29321531e6461cf968b6382694b6d6220ab7b Mon Sep 17 00:00:00 2001 From: fanquake Date: Sun, 5 Feb 2023 13:19:08 +0000 Subject: [PATCH 01/16] Merge bitcoin/bitcoin#27009: validation: Skip VerifyDB checks of level >=3 if dbcache is too small MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fe683f352480245add0b27fe7efef5fef4c1e8c3 log: Log VerifyDB Progress over multiple lines (Martin Zumsande) 61431e3a57b5613d8715c93c6eae0058e0217eaa validation: Skip VerifyDB checks of level >=3 if dbcache is too small (Martin Zumsande) Pull request description: This is the first two commits from #25574, leaving out all changes to `-verifychain` error-handling : - The Problem of [25563](https://github.com/bitcoin/bitcoin/issues/25563) is that when we skip blocks at level 3 due to an insufficient dbcache (skipping some `DisconnectBlock()` calls), we would still attempt the level 4 checks, attempting to reconnect a block that was never disconnected, leading to an assert in `ConnectBlock()`. Fix this by not attempting level 4 checks in this case. - Logging of verification progress is now split over multiple lines. This is more verbose, but now each update has its own timestamp, and other threads logging concurrently will no longer lead to mangled output. This can be tested with a small `dbcache` value, for example: `bitcoind -signet -dbcache=10` `bitcoin-cli -signet verifychain 4 1000` Fixes #25563 ACKs for top commit: MarcoFalke: review ACK fe683f352480245add0b27fe7efef5fef4c1e8c3 🗄 john-moffett: ACK fe683f352480245add0b27fe7efef5fef4c1e8c3 Tree-SHA512: 3e2e0f8b73cbc518a0fa17912c1956da437787aab95001c110b01048472e0dfe4783c44df22bd903d198069dd2f6b02bfdf74e0b934c7a776f144c2e86cb818a --- src/validation.cpp | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index b0b4a6e2954f8..2eb9027653a53 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -4456,7 +4456,8 @@ bool CVerifyDB::VerifyDB( int nGoodTransactions = 0; BlockValidationState state; int reportDone = 0; - LogPrintf("[0%%]..."); /* Continued */ + bool skipped_l3_checks{false}; + LogPrintf("Verification progress: 0%%\n"); const bool is_snapshot_cs{chainstate.m_from_snapshot_blockhash}; @@ -4464,7 +4465,7 @@ bool CVerifyDB::VerifyDB( const int percentageDone = std::max(1, std::min(99, (int)(((double)(chainstate.m_chain.Height() - pindex->nHeight)) / (double)nCheckDepth * (nCheckLevel >= 4 ? 50 : 100)))); if (reportDone < percentageDone / 10) { // report every 10% step - LogPrintf("[%d%%]...", percentageDone); /* Continued */ + LogPrintf("Verification progress: %d%%\n", percentageDone); reportDone = percentageDone / 10; } uiInterface.ShowProgress(_("Verifying blocks…").translated, percentageDone, false); @@ -4499,17 +4500,21 @@ bool CVerifyDB::VerifyDB( // check level 3: check for inconsistencies during memory-only disconnect of tip blocks size_t curr_coins_usage = coins.DynamicMemoryUsage() + chainstate.CoinsTip().DynamicMemoryUsage(); - if (nCheckLevel >= 3 && curr_coins_usage <= chainstate.m_coinstip_cache_size_bytes) { - assert(coins.GetBestBlock() == pindex->GetBlockHash()); - DisconnectResult res = chainstate.DisconnectBlock(block, pindex, coins); - if (res == DISCONNECT_FAILED) { - return error("VerifyDB(): *** irrecoverable inconsistency in block data at %d, hash=%s", pindex->nHeight, pindex->GetBlockHash().ToString()); - } - if (res == DISCONNECT_UNCLEAN) { - nGoodTransactions = 0; - pindexFailure = pindex; + if (nCheckLevel >= 3) { + if (curr_coins_usage <= chainstate.m_coinstip_cache_size_bytes) { + assert(coins.GetBestBlock() == pindex->GetBlockHash()); + DisconnectResult res = chainstate.DisconnectBlock(block, pindex, coins); + if (res == DISCONNECT_FAILED) { + return error("VerifyDB(): *** irrecoverable inconsistency in block data at %d, hash=%s", pindex->nHeight, pindex->GetBlockHash().ToString()); + } + if (res == DISCONNECT_UNCLEAN) { + nGoodTransactions = 0; + pindexFailure = pindex; + } else { + nGoodTransactions += block.vtx.size(); + } } else { - nGoodTransactions += block.vtx.size(); + skipped_l3_checks = true; } } if (ShutdownRequested()) return true; @@ -4517,17 +4522,19 @@ bool CVerifyDB::VerifyDB( if (pindexFailure) { return error("VerifyDB(): *** coin database inconsistencies found (last %i blocks, %i good transactions before that)\n", chainstate.m_chain.Height() - pindexFailure->nHeight + 1, nGoodTransactions); } - + if (skipped_l3_checks) { + LogPrintf("Skipped verification of level >=3 (insufficient database cache size). Consider increasing -dbcache.\n"); + } // store block count as we move pindex at check level >= 4 int block_count = chainstate.m_chain.Height() - pindex->nHeight; // check level 4: try reconnecting blocks - if (nCheckLevel >= 4) { + if (nCheckLevel >= 4 && !skipped_l3_checks) { while (pindex != chainstate.m_chain.Tip()) { const int percentageDone = std::max(1, std::min(99, 100 - (int)(((double)(chainstate.m_chain.Height() - pindex->nHeight)) / (double)nCheckDepth * 50))); if (reportDone < percentageDone / 10) { // report every 10% step - LogPrintf("[%d%%]...", percentageDone); /* Continued */ + LogPrintf("Verification progress: %d%%\n", percentageDone); reportDone = percentageDone / 10; } uiInterface.ShowProgress(_("Verifying blocks…").translated, percentageDone, false); @@ -4541,8 +4548,7 @@ bool CVerifyDB::VerifyDB( } } - LogPrintf("[DONE].\n"); - LogPrintf("No coin database inconsistencies in last %i blocks (%i transactions)\n", block_count, nGoodTransactions); + LogPrintf("Verification: No coin database inconsistencies in last %i blocks (%i transactions)\n", block_count, nGoodTransactions); return true; } From f2caccd54574bd8119ef601e2f384bc0b054a51e Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 28 Feb 2023 15:43:46 +0000 Subject: [PATCH 02/16] Merge bitcoin/bitcoin#27174: ci: bump lint task to bookworm for git v2.38 a984beeca10e3ae1ceb3ea53e4dea778160e7079 [ci] change lint to bookworm for git v2.38 (glozow) Pull request description: Since 5497c14, verify-commits.py uses `git merge-tree` which requires git v2.38 or later. Fix the lint jobs on master (e.g. https://cirrus-ci.com/task/4971007513985024). ACKs for top commit: achow101: ACK a984beeca10e3ae1ceb3ea53e4dea778160e7079 hebasto: re-ACK a984beeca10e3ae1ceb3ea53e4dea778160e7079 Tree-SHA512: dd50598aefb6f9c86cf221dea27fcc521e335cb182f7a3abcb3215d3991794354085be3e07c133ab74ca8b957e3a6acc43722899165957b3d898867d6253ebdc --- .cirrus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index e9c39edca5180..0fe0a8b365d53 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -47,10 +47,10 @@ compute_credits_template: &CREDITS_TEMPLATE task: - name: 'lint [jammy]' + name: 'lint [bookworm]' << : *BASE_TEMPLATE container: - image: ubuntu:jammy + image: debian:bookworm cpu: 1 memory: 1G # For faster CI feedback, immediately schedule the linters From 536a2655fe86423dfc6a52ca380775095bd6cc02 Mon Sep 17 00:00:00 2001 From: glozow Date: Mon, 6 Mar 2023 14:00:14 +0000 Subject: [PATCH 03/16] Merge bitcoin/bitcoin#27209: ci: Remove unused EXPECTED_TESTS_DURATION_IN_SECONDS env var 3fffff50f625ed5e3c45139b3ae874f63f121a1e ci: Remove unused EXPECTED_TESTS_DURATION_IN_SECONDS env var (MarcoFalke) Pull request description: Remove long unused travis leftover ACKs for top commit: fanquake: ACK 3fffff50f625ed5e3c45139b3ae874f63f121a1e dergoegge: ACK 3fffff50f625ed5e3c45139b3ae874f63f121a1e Tree-SHA512: 34b85a18c0d34f54bbc6ff5c2454307318e4747145e11f52f08baddefef9e1b80d8f6c85efcad97e575380162fd193f2aa837e99b156ed7e3e95370b635ddf4e --- ci/test/00_setup_env.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/test/00_setup_env.sh b/ci/test/00_setup_env.sh index 10c5703453e2d..2e4f8a0a1d54b 100755 --- a/ci/test/00_setup_env.sh +++ b/ci/test/00_setup_env.sh @@ -44,7 +44,6 @@ export RUN_SECURITY_TESTS=${RUN_SECURITY_TESTS:-false} # might be slow or a reindex might be waiting on disk IO. export TEST_RUNNER_TIMEOUT_FACTOR=${TEST_RUNNER_TIMEOUT_FACTOR:-4} export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false} -export EXPECTED_TESTS_DURATION_IN_SECONDS=${EXPECTED_TESTS_DURATION_IN_SECONDS:-1000} export CONTAINER_NAME=${CONTAINER_NAME:-ci_unnamed} export DOCKER_NAME_TAG=${DOCKER_NAME_TAG:-ubuntu:20.04} From ba3aff76e3b3cfb42f8e43ea1009f376c7b064f2 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 17 May 2023 09:32:01 +0100 Subject: [PATCH 04/16] Merge bitcoin-core/gui#729: test: Add missed header 36e2d51b8f6bb0125911c831ba2b6fd022fca708 qt, test: Add missed header (Hennadii Stepanov) Pull request description: Should fix MSVC link errors like [that](https://api.cirrus-ci.com/v1/task/4870882892447744/logs/build.log): ``` addressbooktests.obj : error LNK2019: unresolved external symbol "void __cdecl ConfirmMessage(class QString *,class std::chrono::duration<__int64,struct std::ratio<1,1000> >)" (?ConfirmMessage@@YAXPEAVQString@@V?$duration@_JU?$ratio@$00$0DOI@@std@@@chrono@std@@@Z) referenced in function "void __cdecl `anonymous namespace'::EditAddressAndSubmit(class EditAddressDialog *,class QString const &,class QString const &,class QString)" (?EditAddressAndSubmit@?A0x2e52698e@@YAXPEAVEditAddressDialog@@AEBVQString@@1V3@@Z) [C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\build_msvc\test_bitcoin-qt\test_bitcoin-qt.vcxproj] wallettests.obj : error LNK2001: unresolved external symbol "void __cdecl ConfirmMessage(class QString *,class std::chrono::duration<__int64,struct std::ratio<1,1000> >)" (?ConfirmMessage@@YAXPEAVQString@@V?$duration@_JU?$ratio@$00$0DOI@@std@@@chrono@std@@@Z) [C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\build_msvc\test_bitcoin-qt\test_bitcoin-qt.vcxproj] C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\build_msvc\x64\Release\test_bitcoin-qt.exe : fatal error LNK1120: 1 unresolved externals [C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\build_msvc\test_bitcoin-qt\test_bitcoin-qt.vcxproj] ``` ACKs for top commit: fanquake: ACK 36e2d51b8f6bb0125911c831ba2b6fd022fca708 Tree-SHA512: 84685598fbf8857c0284ff660d953b93da3c2f47ba4ac0d3591b5009a6bcdb76898031fd70f289c4256ce389e485bd259ca145f9f862f085795e374dfa88705d --- src/qt/test/util.cpp | 2 ++ src/qt/test/util.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/qt/test/util.cpp b/src/qt/test/util.cpp index 635dbcd1c584e..7bbd353237b31 100644 --- a/src/qt/test/util.cpp +++ b/src/qt/test/util.cpp @@ -2,6 +2,8 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include + #include #include diff --git a/src/qt/test/util.h b/src/qt/test/util.h index f50a6b6c6178a..336be3091579f 100644 --- a/src/qt/test/util.h +++ b/src/qt/test/util.h @@ -7,6 +7,8 @@ #include +#include + QT_BEGIN_NAMESPACE class QString; QT_END_NAMESPACE From 1289d3273d4d5c749c0ad5202c1a8a5860b0dba2 Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 5 Jun 2023 10:35:48 +0100 Subject: [PATCH 05/16] Merge bitcoin/bitcoin#27801: wallet: Add tracing for sqlite statements ff9d961bf38b24f8f931dcf66799cbc468e473df wallet: Add tracing for sqlite statements (Ryan Ofsky) Pull request description: I found sqlite tracing was useful for debugging a test in #27790, and thought it might be helpful in other contexts too, so this PR adds an option to enable it. Tracing is still disabled by default and only shown with `-debug=walletdb -loglevel=walletdb:trace` options. ACKs for top commit: achow101: ACK ff9d961bf38b24f8f931dcf66799cbc468e473df kevkevinpal: ACK https://github.com/bitcoin/bitcoin/commit/ff9d961bf38b24f8f931dcf66799cbc468e473df theStack: ACK ff9d961bf38b24f8f931dcf66799cbc468e473df Tree-SHA512: 592fabfab3218cec36c2d00a21cd535fa840daa126ee8440c384952fbb3913180aa3796066c630087e933d6517f19089b867f158e0b737f25283a14799eefb05 --- src/wallet/sqlite.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/wallet/sqlite.cpp b/src/wallet/sqlite.cpp index f41b27d28f71b..04989cc572fd2 100644 --- a/src/wallet/sqlite.cpp +++ b/src/wallet/sqlite.cpp @@ -36,6 +36,21 @@ static void ErrorLogCallback(void* arg, int code, const char* msg) LogPrintf("SQLite Error. Code: %d. Message: %s\n", code, msg); } +static int TraceSqlCallback(unsigned code, void* context, void* param1, void* param2) +{ + auto* db = static_cast(context); + if (code == SQLITE_TRACE_STMT) { + auto* stmt = static_cast(param1); + // To be conservative and avoid leaking potentially secret information + // in the log file, only expand statements that query the database, not + // statements that update the database. + char* expanded{sqlite3_stmt_readonly(stmt) ? sqlite3_expanded_sql(stmt) : nullptr}; + LogPrintf("[%s] SQLite Statement: %s\n", db->Filename(), expanded ? expanded : sqlite3_sql(stmt)); + if (expanded) sqlite3_free(expanded); + } + return SQLITE_OK; +} + static bool BindBlobToStatement(sqlite3_stmt* stmt, int index, Span blob, @@ -232,6 +247,13 @@ void SQLiteDatabase::Open() if (ret != SQLITE_OK) { throw std::runtime_error(strprintf("SQLiteDatabase: Failed to enable extended result codes: %s\n", sqlite3_errstr(ret))); } + // Trace SQL statements if tracing is enabled with -debug=walletdb -loglevel=walletdb:trace + if (LogAcceptCategory(BCLog::WALLETDB, BCLog::Level::Trace)) { + ret = sqlite3_trace_v2(m_db, SQLITE_TRACE_STMT, TraceSqlCallback, this); + if (ret != SQLITE_OK) { + LogPrintf("Failed to enable SQL tracing for %s\n", Filename()); + } + } } if (sqlite3_db_readonly(m_db, "main") != 0) { From 15f8b74bbff1526a3623516217981443a086f132 Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 6 Jun 2023 10:39:24 +0100 Subject: [PATCH 06/16] Merge bitcoin/bitcoin#27779: guix: remove cURL from build env 641897a83dc9d40b618efbae67c3beb90a1f34f8 guix: remove cURL from build env (fanquake) Pull request description: Remove cURL & osslsigncode option. ACKs for top commit: hebasto: ACK 641897a83dc9d40b618efbae67c3beb90a1f34f8 TheCharlatan: ACK 641897a83dc9d40b618efbae67c3beb90a1f34f8 Tree-SHA512: f917afe5aaffa8436009c63ace4a78ed3bc8a13fffeb12db2c12204f603fbd05f975f798c1bccaefa22b6131c91415477c115921dfe89f8fa064aab82bcd4a6f --- contrib/guix/manifest.scm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm index 789792f554fab..40b7336838ea7 100644 --- a/contrib/guix/manifest.scm +++ b/contrib/guix/manifest.scm @@ -7,7 +7,6 @@ (gnu packages commencement) (gnu packages compression) (gnu packages cross-base) - (gnu packages curl) (gnu packages file) (gnu packages gawk) (gnu packages gcc) @@ -220,9 +219,6 @@ and abstract ELF, PE and MachO formats.") (build-system cmake-build-system) (inputs `(("openssl", openssl))) - (arguments - '(#:configure-flags - (list "-DCMAKE_DISABLE_FIND_PACKAGE_CURL=TRUE"))) (home-page "https://github.com/mtrojnar/osslsigncode") (synopsis "Authenticode signing and timestamping tool") (description "osslsigncode is a small tool that implements part of the From a12ad80c9035fbdfd750497d8b39ec316efb0279 Mon Sep 17 00:00:00 2001 From: fanquake Date: Thu, 24 Aug 2023 10:17:29 +0100 Subject: [PATCH 07/16] Merge bitcoin/bitcoin#28325: test: wallet_backup.py, fix intermittent failure in "restore using dumped wallet" c4929cfa50ddb12943198a7f45723eedbd087d8f test: wallet_backup.py, fix intermittent failure in "restore using dumped wallet" (furszy) Pull request description: Aiming to fix #25652. The failure arises because the test expects `init_wallet()` (the test framework function) to create a wallet with no keys. However, the function also imports the deterministic private key used to receive the coinbase coins. This causes a race within the "restore using dumped wallet" case, where we intend to have a new wallet (with no existing keys) to test the 'importwallet()' RPC result. The reason why this failure is intermittent is that it depends on other peers delivering the chain right after node2 startup and prior to the test 'node2.getbalance()' call and also the synchronization of the validation queue. ACKs for top commit: MarcoFalke: lgtm ACK c4929cfa50ddb12943198a7f45723eedbd087d8f Tree-SHA512: 80faa590439305576086a7d6e328f2550c97b218771fc5eba0567feff78732a2605d028a30a368d50944ae3d25fdbd6d321fb97321791a356416f2b790999613 --- test/functional/wallet_backup.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/functional/wallet_backup.py b/test/functional/wallet_backup.py index 5e188dce4ca5a..93c461d712521 100755 --- a/test/functional/wallet_backup.py +++ b/test/functional/wallet_backup.py @@ -134,11 +134,6 @@ def restore_wallet_existent_name(self): assert_raises_rpc_error(-36, error_message, node.restorewallet, wallet_name, backup_file) assert os.path.exists(wallet_file) - def init_three(self): - self.init_wallet(node=0) - self.init_wallet(node=1) - self.init_wallet(node=2) - def run_test(self): self.log.info("Generating initial blockchain") self.generate(self.nodes[0], 1) @@ -230,7 +225,10 @@ def run_test(self): shutil.rmtree(os.path.join(self.nodes[2].datadir, self.chain, 'llmq')) self.start_three(["-nowallet"]) - self.init_three() + # Create new wallets for the three nodes. + # We will use this empty wallets to test the 'importwallet()' RPC command below. + for node_num in range(3): + self.nodes[node_num].createwallet(wallet_name=self.default_wallet_name, descriptors=self.options.descriptors, load_on_startup=True) assert_equal(self.nodes[0].getbalance(), 0) assert_equal(self.nodes[1].getbalance(), 0) From 490b390e65f7955110bdf2caa1bf9c66a78f4e1e Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 15 Nov 2023 15:18:00 +0000 Subject: [PATCH 08/16] Merge bitcoin/bitcoin#28859: guix: update signapple (drop macho & altgraph) f718a74b124c723548f5d1961ef4e3aa15c33847 guix: remove python-macholib (fanquake) d3cbff16c2734f310ccc532a4ad8eaf8a21b010d guix: update signapple (fanquake) Pull request description: Update to the latest signapple, which includes https://github.com/achow101/signapple/pull/13. Drop python-macholib and python-altgraph. ACKs for top commit: Sjors: ACK f718a74b124c723548f5d1961ef4e3aa15c33847 Tree-SHA512: 199b2108f2f063b6b0fb5354ac79a30b46e848c923ebe7d02f7d7d3f08749817a1f6b4c14d21658fd2f2d68f8be1698e1999edf7e2366b1cae3bf2709a665e30 --- contrib/guix/manifest.scm | 56 +++------------------------------------ 1 file changed, 3 insertions(+), 53 deletions(-) diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm index 40b7336838ea7..ba0e944ec7919 100644 --- a/contrib/guix/manifest.scm +++ b/contrib/guix/manifest.scm @@ -19,7 +19,6 @@ ((gnu packages python) #:select (python-minimal)) ((gnu packages python-build) #:select (python-tomli)) ((gnu packages python-crypto) #:select (python-asn1crypto)) - ((gnu packages python-xyz) #:select (python-altgraph)) ((gnu packages tls) #:select (openssl)) ((gnu packages version-control) #:select (git-minimal)) (guix build-system cmake) @@ -391,56 +390,8 @@ certificates or paths. Supports various options, including: validation at a specific moment in time, whitelisting and revocation checks.") (license license:expat)))) -(define-public python-macholib - (package - (name "python-macholib") - (version "1.14") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/ronaldoussoren/macholib") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0aislnnfsza9wl4f0vp45ivzlc0pzhp9d4r08700slrypn5flg42")))) - (build-system python-build-system) - (propagated-inputs - `(("python-altgraph" ,python-altgraph))) - (arguments - '(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'disable-broken-tests - (lambda _ - ;; This test is broken as there is no keyboard interrupt. - (substitute* "macholib_tests/test_command_line.py" - (("^(.*)class TestCmdLine" line indent) - (string-append indent - "@unittest.skip(\"Disabled by Guix\")\n" - line))) - (substitute* "macholib_tests/test_dyld.py" - (("^(.*)def test_\\S+_find" line indent) - (string-append indent - "@unittest.skip(\"Disabled by Guix\")\n" - line)) - (("^(.*)def testBasic" line indent) - (string-append indent - "@unittest.skip(\"Disabled by Guix\")\n" - line)) - ) - #t))))) - (home-page "https://github.com/ronaldoussoren/macholib") - (synopsis "Python library for analyzing and editing Mach-O headers") - (description "macholib is a Macho-O header analyzer and editor. It's -typically used as a dependency analysis tool, and also to rewrite dylib -references in Mach-O headers to be @executable_path relative. Though this tool -targets a platform specific file format, it is pure python code that is platform -and endian independent.") - (license license:expat))) - (define-public python-signapple - (let ((commit "7a96b4171a360abf0f0f56e499f8f9ed2116280d")) + (let ((commit "62155712e7417aba07565c9780a80e452823ae6a")) (package (name "python-signapple") (version (git-version "0.1" "1" commit)) @@ -453,14 +404,13 @@ and endian independent.") (file-name (git-file-name name commit)) (sha256 (base32 - "0aa4k180jnpal15yhncnm3g3z9gzmi7qb25q5l0kaj444a1p2pm4")))) + "1nm6rm4h4m7kbq729si4cm8rzild62mk4ni8xr5zja7l33fhv3gb")))) (build-system python-build-system) (propagated-inputs `(("python-asn1crypto" ,python-asn1crypto) ("python-oscrypto" ,python-oscrypto) ("python-certvalidator" ,python-certvalidator) - ("python-elfesteem" ,python-elfesteem) - ("python-macholib" ,python-macholib))) + ("python-elfesteem" ,python-elfesteem))) ;; There are no tests, but attempting to run python setup.py test leads to ;; problems, just disable the test (arguments '(#:tests? #f)) From 34bbe6961006b01a053b98379d71138761cb7a00 Mon Sep 17 00:00:00 2001 From: fanquake Date: Thu, 30 Nov 2023 15:08:52 +0000 Subject: [PATCH 09/16] Merge bitcoin/bitcoin#28965: guix: remove input labels a4980da1ce5e1947fa73ef7057509a26d2c73cfb guix: remove input labels (fanquake) Pull request description: Migrate package definitions to use the newer format for propogated inputs. See https://guix.gnu.org/manual/en/html_node/package-Reference.html#index-inputs_002c-of-packages. This change remains compatible with Guix 1.2.0+. See also: https://guix.gnu.org/blog/2021/the-big-change/ Guix Build (aarch64 & x86_64): ```bash 4627c4eb83764f787f48b2aeab87b65bbaacb9ebfe33a5733d713165eec779af guix-build-a4980da1ce5e/output/aarch64-linux-gnu/SHA256SUMS.part ecdd6db7fe0ee45fee1bd91ceaf23c0d8154ed5ad73586b74d86ee36964e18d4 guix-build-a4980da1ce5e/output/aarch64-linux-gnu/bitcoin-a4980da1ce5e-aarch64-linux-gnu-debug.tar.gz 5f78980f95f3968248c27c4acd9993ec150ed3fa32802d89ccc6c6dc661a41bd guix-build-a4980da1ce5e/output/aarch64-linux-gnu/bitcoin-a4980da1ce5e-aarch64-linux-gnu.tar.gz 9af3dff2a8a4decf73048acea67d05f76d54ff84cecde833ea6860825bdaddc3 guix-build-a4980da1ce5e/output/arm-linux-gnueabihf/SHA256SUMS.part f53c6a5a229462a71f477db6f91112a2e9d31aafef294fca3c893916e904e2ed guix-build-a4980da1ce5e/output/arm-linux-gnueabihf/bitcoin-a4980da1ce5e-arm-linux-gnueabihf-debug.tar.gz 6ed01ecb71ed32098f70c8d667b1a48305b4b5b10f7bfc575eb8b5f787fe9534 guix-build-a4980da1ce5e/output/arm-linux-gnueabihf/bitcoin-a4980da1ce5e-arm-linux-gnueabihf.tar.gz 6ceaaa7dc2959626f280b1e1de28ac9ff9223216e1a3fa333cdd55c416ff550d guix-build-a4980da1ce5e/output/arm64-apple-darwin/SHA256SUMS.part 633df184701a21746ee56a5de6e3705c229eac8712b9a1563a82f4de52130d05 guix-build-a4980da1ce5e/output/arm64-apple-darwin/bitcoin-a4980da1ce5e-arm64-apple-darwin-unsigned.tar.gz 23b94cb4e870d71ae60bbb5a974362bbfabe901a73eeeb9d3bb5fbd70f5d649e guix-build-a4980da1ce5e/output/arm64-apple-darwin/bitcoin-a4980da1ce5e-arm64-apple-darwin-unsigned.zip f60b802b3e92fb9cf3b45b835f6cfb8988221cfdd39146ee3a11dbab977733bc guix-build-a4980da1ce5e/output/arm64-apple-darwin/bitcoin-a4980da1ce5e-arm64-apple-darwin.tar.gz 9df0a08896a2bc42f97193b34beb29536783eab04d3ae5fe5642258188fc6e55 guix-build-a4980da1ce5e/output/dist-archive/bitcoin-a4980da1ce5e.tar.gz 3fef561dd35dd4a4e9d0308591ebbdd5b1d26814ea48ff1f0c2732c62aef961b guix-build-a4980da1ce5e/output/powerpc64-linux-gnu/SHA256SUMS.part 187b8283f443bb29ed27546f983a5d098dfe49a059f52bc8ba0607242d37a5ae guix-build-a4980da1ce5e/output/powerpc64-linux-gnu/bitcoin-a4980da1ce5e-powerpc64-linux-gnu-debug.tar.gz 3f520b4bf1fbf955f9d25b5aa333f90989428cc9e417431998daa7c1041cb3bb guix-build-a4980da1ce5e/output/powerpc64-linux-gnu/bitcoin-a4980da1ce5e-powerpc64-linux-gnu.tar.gz 39abec9623d5086990a303c964a36e7f767bd6218e57261df95b616603eca0b8 guix-build-a4980da1ce5e/output/powerpc64le-linux-gnu/SHA256SUMS.part b71352ad4e8849937e42ad897d75f65866a529fd4d18059c5e6c39659a17f723 guix-build-a4980da1ce5e/output/powerpc64le-linux-gnu/bitcoin-a4980da1ce5e-powerpc64le-linux-gnu-debug.tar.gz 4fb92753e1baa253780088649bfe6816525e0ada7b17c5acc57ec804d9ab32f8 guix-build-a4980da1ce5e/output/powerpc64le-linux-gnu/bitcoin-a4980da1ce5e-powerpc64le-linux-gnu.tar.gz ed422d4365354a16b98ba7d4184a118ce98473e1b70ac8ba62a617aa3af3c784 guix-build-a4980da1ce5e/output/riscv64-linux-gnu/SHA256SUMS.part 9f002a8893748b0f6b581ab9d158a524e32140a3c271604b50cf1580b30b3000 guix-build-a4980da1ce5e/output/riscv64-linux-gnu/bitcoin-a4980da1ce5e-riscv64-linux-gnu-debug.tar.gz 6844df378ad2f4c209d323ffa3e77c6aa28f7f087b8755b2baa2a0d1119c365b guix-build-a4980da1ce5e/output/riscv64-linux-gnu/bitcoin-a4980da1ce5e-riscv64-linux-gnu.tar.gz ce0e27b6d831d5836ba3c5c8be377f08f4b92e9f390a7242aca5b68e67d1975e guix-build-a4980da1ce5e/output/x86_64-apple-darwin/SHA256SUMS.part 329c990fa71e694869bdcdd3e327a28eed2ad0b12f06d86e0957c6cb05e88910 guix-build-a4980da1ce5e/output/x86_64-apple-darwin/bitcoin-a4980da1ce5e-x86_64-apple-darwin-unsigned.tar.gz c44ec330e40285c1eba421f8d2e70a1538742fadbcc87f7f2f5a49bd83a72a7b guix-build-a4980da1ce5e/output/x86_64-apple-darwin/bitcoin-a4980da1ce5e-x86_64-apple-darwin-unsigned.zip e3626284d9bd61b67b170433d7bdb226b0f7f63d20dad4dd0482e55d7418ef64 guix-build-a4980da1ce5e/output/x86_64-apple-darwin/bitcoin-a4980da1ce5e-x86_64-apple-darwin.tar.gz 3e2a16e9dbb89d86e1e1884e0277160c3d1953c5ea5f88f29fe0a093a6f89599 guix-build-a4980da1ce5e/output/x86_64-linux-gnu/SHA256SUMS.part eb389467219c4af983f30e50e1f8d48601ed74690538bff76a55c0e585594a92 guix-build-a4980da1ce5e/output/x86_64-linux-gnu/bitcoin-a4980da1ce5e-x86_64-linux-gnu-debug.tar.gz d81fd209c03e74aebd7b28b42d3ea21f57957ede7fcb7baae721c8abb2885b6c guix-build-a4980da1ce5e/output/x86_64-linux-gnu/bitcoin-a4980da1ce5e-x86_64-linux-gnu.tar.gz 51de8a813459c1ce79bf9a2e39bf9f17b4771c6146ef55829f3ee0415d0ec9ec guix-build-a4980da1ce5e/output/x86_64-w64-mingw32/SHA256SUMS.part 63dc5386467d0fc7f3c7b621273d019a822551fc9ac00be94c7d4ee446201836 guix-build-a4980da1ce5e/output/x86_64-w64-mingw32/bitcoin-a4980da1ce5e-win64-debug.zip 3a4f2ef53165031648b1c3badc05698891d7c6541de3f67e9df513395c5c88c3 guix-build-a4980da1ce5e/output/x86_64-w64-mingw32/bitcoin-a4980da1ce5e-win64-setup-unsigned.exe 92f0d67fbb8b37b6026287073df95431c961ad1820d7f8b9cd3b1ffcf58d4188 guix-build-a4980da1ce5e/output/x86_64-w64-mingw32/bitcoin-a4980da1ce5e-win64-unsigned.tar.gz 3414b6c99d0bbd9ad88c0f88aafa70561dc107d1180fd42c90ad85033871c160 guix-build-a4980da1ce5e/output/x86_64-w64-mingw32/bitcoin-a4980da1ce5e-win64.zip ``` ACKs for top commit: TheCharlatan: lgtm ACK a4980da1ce5e1947fa73ef7057509a26d2c73cfb Tree-SHA512: cbb8ca9613125d4c443124b99a600b44533688f322c8535c9d82fb3bb8de66b46e63c6aafcf2917f169494181ece6efd02e2efaa32ef4f138a520731540d600c --- contrib/guix/manifest.scm | 40 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm index ba0e944ec7919..de2729b3b8610 100644 --- a/contrib/guix/manifest.scm +++ b/contrib/guix/manifest.scm @@ -81,11 +81,11 @@ FILE-NAME found in ./patches relative to the current file." (build-system trivial-build-system) (arguments '(#:builder (begin (mkdir %output) #t))) (propagated-inputs - `(("binutils" ,xbinutils) - ("libc" ,xlibc) - ("libc:static" ,xlibc "static") - ("gcc" ,xgcc) - ("gcc-lib" ,xgcc "lib"))) + (list xbinutils + xlibc + xgcc + `(,xlibc "static") + `(,xgcc "lib"))) (synopsis (string-append "Complete GCC tool chain for " target)) (description (string-append "This package provides a complete GCC tool chain for " target " development.")) @@ -148,10 +148,10 @@ desirable for building Dash Core release binaries." (build-system trivial-build-system) (arguments '(#:builder (begin (mkdir %output) #t))) (propagated-inputs - `(("binutils" ,xbinutils) - ("libc" ,pthreads-xlibc) - ("gcc" ,pthreads-xgcc) - ("gcc-lib" ,pthreads-xgcc "lib"))) + (list xbinutils + pthreads-xlibc + pthreads-xgcc + `(,pthreads-xgcc "lib"))) (synopsis (string-append "Complete GCC tool chain for " target)) (description (string-append "This package provides a complete GCC tool chain for " target " development.")) @@ -216,8 +216,7 @@ and abstract ELF, PE and MachO formats.") (base32 "1j47vwq4caxfv0xw68kw5yh00qcpbd56d7rq6c483ma3y7s96yyz")))) (build-system cmake-build-system) - (inputs - `(("openssl", openssl))) + (inputs (list openssl)) (home-page "https://github.com/mtrojnar/osslsigncode") (synopsis "Authenticode signing and timestamping tool") (description "osslsigncode is a small tool that implements part of the @@ -274,8 +273,7 @@ thus should be able to compile on most platforms where these exist.") (files '("etc/ssl/certs/ca-certificates.crt"))))) (propagated-inputs - `(("python-asn1crypto" ,python-asn1crypto) - ("openssl" ,openssl))) + (list python-asn1crypto openssl)) (arguments `(#:phases (modify-phases %standard-phases @@ -313,7 +311,7 @@ thus should be able to compile on most platforms where these exist.") (package (inherit python-oscrypto) (name "python-oscryptotests") (propagated-inputs - `(("python-oscrypto" ,python-oscrypto))) + (list python-oscrypto)) (arguments `(#:tests? #f #:phases @@ -340,9 +338,9 @@ thus should be able to compile on most platforms where these exist.") "1qw2k7xis53179lpqdqyylbcmp76lj7sagp883wmxg5i7chhc96k")))) (build-system python-build-system) (propagated-inputs - `(("python-asn1crypto" ,python-asn1crypto) - ("python-oscrypto" ,python-oscrypto) - ("python-oscryptotests", python-oscryptotests))) ;; certvalidator tests import oscryptotests + (list python-asn1crypto + python-oscrypto + python-oscryptotests)) ;; certvalidator tests import oscryptotests (arguments `(#:phases (modify-phases %standard-phases @@ -407,10 +405,10 @@ specific moment in time, whitelisting and revocation checks.") "1nm6rm4h4m7kbq729si4cm8rzild62mk4ni8xr5zja7l33fhv3gb")))) (build-system python-build-system) (propagated-inputs - `(("python-asn1crypto" ,python-asn1crypto) - ("python-oscrypto" ,python-oscrypto) - ("python-certvalidator" ,python-certvalidator) - ("python-elfesteem" ,python-elfesteem))) + (list python-asn1crypto + python-oscrypto + python-certvalidator + python-elfesteem)) ;; There are no tests, but attempting to run python setup.py test leads to ;; problems, just disable the test (arguments '(#:tests? #f)) From 62355900daa8681f29cfda1ba011b1760d650748 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Tue, 16 Jan 2024 13:29:17 -0500 Subject: [PATCH 10/16] Merge bitcoin/bitcoin#29213: doc, test: test and explain service flag handling 74ebd4d1359edce82a134dfcd3da9840f8d206e2 doc, test: Test and explain service flag handling (Martin Zumsande) Pull request description: Service flags received from the peer-to-peer network are handled differently, depending on how we receive them. If received directly from an outbound peer the flags belong to, they replace existing flags. If received via gossip relay (so that anyone could send them), new flags are added, but existing ones but cannot be overwritten. Document that and add test coverage for it. ACKs for top commit: achow101: ACK 74ebd4d1359edce82a134dfcd3da9840f8d206e2 furszy: ACK 74ebd4d1359edce82a134dfcd3da9840f8d206e2 brunoerg: utACK 74ebd4d1359edce82a134dfcd3da9840f8d206e2 Tree-SHA512: 604adc3304b8e3cb1a10dfd017025c10b029bebd3ef533f96bcb5856fee5d4396a9aed4949908b8e7ef267ad21320d1814dd80f88426330c5c9c2c529c497591 --- src/addrman.h | 5 ++++- src/net_processing.cpp | 3 +++ src/test/addrman_tests.cpp | 28 +++++++++++++++++++++++++++- 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/src/addrman.h b/src/addrman.h index d927232b2b9bd..bd8b0f5d6d0dc 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -121,13 +121,16 @@ class AddrMan /** * Attempt to add one or more addresses to addrman's new table. + * If an address already exists in addrman, the existing entry may be updated + * (e.g. adding additional service flags). If the existing entry is in the new table, + * it may be added to more buckets, improving the probability of selection. * * @param[in] vAddr Address records to attempt to add. * @param[in] source The address of the node that sent us these addr records. * @param[in] time_penalty A "time penalty" to apply to the address record's nTime. If a peer * sends us an address record with nTime=n, then we'll add it to our * addrman with nTime=(n - time_penalty). - * @return true if at least one address is successfully added. */ + * @return true if at least one address is successfully added, or added to an additional bucket. Unaffected by updates. */ bool Add(const std::vector& vAddr, const CNetAddr& source, std::chrono::seconds time_penalty = 0s); /** diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 05ee2b03eb51b..ad635035e38f8 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -3546,6 +3546,9 @@ void PeerManagerImpl::ProcessMessage( vRecv >> addrMe; if (!pfrom.IsInboundConn()) { + // Overwrites potentially existing services. In contrast to this, + // unvalidated services received via gossip relay in ADDR/ADDRV2 + // messages are only ever added but cannot replace existing ones. m_addrman.SetServices(pfrom.addr, nServices); } if (pfrom.ExpectServicesFromConn() && !HasAllDesirableServiceFlags(nServices)) diff --git a/src/test/addrman_tests.cpp b/src/test/addrman_tests.cpp index 33fefd9107943..370334e38266d 100644 --- a/src/test/addrman_tests.cpp +++ b/src/test/addrman_tests.cpp @@ -1048,7 +1048,7 @@ BOOST_AUTO_TEST_CASE(load_addrman_corrupted) BOOST_AUTO_TEST_CASE(addrman_update_address) { - // Tests updating nTime via Connected() and nServices via SetServices() + // Tests updating nTime via Connected() and nServices via SetServices() and Add() auto addrman = std::make_unique(EMPTY_NETGROUPMAN, DETERMINISTIC, GetCheckRatio(m_node)); CNetAddr source{ResolveIP("252.2.2.2")}; CAddress addr{CAddress(ResolveService("250.1.1.1", 8333), NODE_NONE)}; @@ -1075,6 +1075,32 @@ BOOST_AUTO_TEST_CASE(addrman_update_address) BOOST_CHECK_EQUAL(vAddr2.size(), 1U); BOOST_CHECK(vAddr2.at(0).nTime >= start_time + 10000s); BOOST_CHECK_EQUAL(vAddr2.at(0).nServices, NODE_NETWORK_LIMITED); + + // Updating an existing addr through Add() (used in gossip relay) can add additional services but can't remove existing ones. + CAddress addr_v2{CAddress(ResolveService("250.1.1.1", 8333), NODE_P2P_V2)}; + addr_v2.nTime = start_time; + BOOST_CHECK(!addrman->Add({addr_v2}, source)); + std::vector vAddr3{addrman->GetAddr(/*max_addresses=*/0, /*max_pct=*/0, /*network=*/std::nullopt)}; + BOOST_CHECK_EQUAL(vAddr3.size(), 1U); + BOOST_CHECK_EQUAL(vAddr3.at(0).nServices, NODE_P2P_V2 | NODE_NETWORK_LIMITED); + + // SetServices() (used when we connected to them) overwrites existing service flags + addrman->SetServices(addr, NODE_NETWORK); + std::vector vAddr4{addrman->GetAddr(/*max_addresses=*/0, /*max_pct=*/0, /*network=*/std::nullopt)}; + BOOST_CHECK_EQUAL(vAddr4.size(), 1U); + BOOST_CHECK_EQUAL(vAddr4.at(0).nServices, NODE_NETWORK); + + // Promoting to Tried does not affect the service flags + BOOST_CHECK(addrman->Good(addr)); // addr has NODE_NONE + std::vector vAddr5{addrman->GetAddr(/*max_addresses=*/0, /*max_pct=*/0, /*network=*/std::nullopt)}; + BOOST_CHECK_EQUAL(vAddr5.size(), 1U); + BOOST_CHECK_EQUAL(vAddr5.at(0).nServices, NODE_NETWORK); + + // Adding service flags even works when the addr is in Tried + BOOST_CHECK(!addrman->Add({addr_v2}, source)); + std::vector vAddr6{addrman->GetAddr(/*max_addresses=*/0, /*max_pct=*/0, /*network=*/std::nullopt)}; + BOOST_CHECK_EQUAL(vAddr6.size(), 1U); + BOOST_CHECK_EQUAL(vAddr6.at(0).nServices, NODE_NETWORK | NODE_P2P_V2); } BOOST_AUTO_TEST_CASE(addrman_size) From 6506f52fe5387c97e224eb7a242e920f46df36e9 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Tue, 6 Feb 2024 13:24:12 -0500 Subject: [PATCH 11/16] Merge bitcoin/bitcoin#28833: wallet: refactor: remove unused `SignatureData` instances in spkm's `FillPSBT` methods e2ad343f69af4f924b22dccf94a52b6431ef6e3c wallet: remove unused `SignatureData` instances in spkm's `FillPSBT` methods (Sebastian Falbesoner) Pull request description: These are filled with signature data from a PSBT input, but not used anywhere after, hence they can be removed. Note that the same code is in the `SignPSBTInput` function where the `sigdata` result is indeed used. ACKs for top commit: achow101: ACK e2ad343f69af4f924b22dccf94a52b6431ef6e3c brunoerg: crACK e2ad343f69af4f924b22dccf94a52b6431ef6e3c Tree-SHA512: f0cabcc000bcea6bc7d7ec9d3be2e2a8accbdbffbe35252250ea2305b65a5813fde2b8096fbdd2c7cccdf417ea285183dc325fc2d210d88bce62978ce642930e --- src/wallet/scriptpubkeyman.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp index 8b03952ac0c18..61f60d25865c1 100644 --- a/src/wallet/scriptpubkeyman.cpp +++ b/src/wallet/scriptpubkeyman.cpp @@ -760,8 +760,6 @@ TransactionError LegacyScriptPubKeyMan::FillPSBT(PartiallySignedTransaction& psb // There's no UTXO so we can just skip this now continue; } - SignatureData sigdata; - input.FillSignatureData(sigdata); SignPSBTInput(HidingSigningProvider(this, !sign, !bip32derivs), psbtx, i, &txdata, sighash_type, nullptr, finalize); bool signed_one = PSBTInputSigned(input); @@ -2258,8 +2256,6 @@ TransactionError DescriptorScriptPubKeyMan::FillPSBT(PartiallySignedTransaction& // There's no UTXO so we can just skip this now continue; } - SignatureData sigdata; - input.FillSignatureData(sigdata); std::unique_ptr keys = std::make_unique(); std::unique_ptr script_keys = GetSigningProvider(script, sign); From 2ea479f1ffcbc58c2772c90c4e849473ac164888 Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 15 Mar 2024 11:13:31 +0000 Subject: [PATCH 12/16] Merge bitcoin/bitcoin#29650: depends: drop 1 Qt determinism patch 76d6537698e46f52d6c45a76f7d99ba427d57dca depends: drop 1 qt determinism patch (fanquake) Pull request description: No-longer required now that we are building with GCC 12. Guix Build (x86_64 && aarch64): ```bash e1c5b2c1c1a184e9d6985f26d26c61ca049e4541c699c6c9ce334beb832ed8da guix-build-76d6537698e4/output/aarch64-linux-gnu/SHA256SUMS.part 22f5d39fd9eac2d1fdbf2794fd6272ce05a1dfda2aeb2280a5dbafe76d0eec3d guix-build-76d6537698e4/output/aarch64-linux-gnu/bitcoin-76d6537698e4-aarch64-linux-gnu-debug.tar.gz 1cc798fb30b9e85e3b94049a671e2881b6b8694e52ae5e6468805c8ea6ea637f guix-build-76d6537698e4/output/aarch64-linux-gnu/bitcoin-76d6537698e4-aarch64-linux-gnu.tar.gz a8c4ecc550aba01292885343ae9d53e31dfc0ef26f885fcf00493c754c5f9deb guix-build-76d6537698e4/output/arm-linux-gnueabihf/SHA256SUMS.part d037b87949640d441b1ea000fd3fb27a508a699c5a6d69b6647611325cb9b7f5 guix-build-76d6537698e4/output/arm-linux-gnueabihf/bitcoin-76d6537698e4-arm-linux-gnueabihf-debug.tar.gz a858a0bce444a9eaf2b36d188198e54cdc14d85e344863d9e176dca94e458537 guix-build-76d6537698e4/output/arm-linux-gnueabihf/bitcoin-76d6537698e4-arm-linux-gnueabihf.tar.gz a802412eb9f2bbe2c573052581c21c44281e78c65d6ebc243105d5004768f0f9 guix-build-76d6537698e4/output/arm64-apple-darwin/SHA256SUMS.part 20eeb2a28f096f53eeae61c64082c7eef0fb4d4e8dd7fb173a6cc19bf1960165 guix-build-76d6537698e4/output/arm64-apple-darwin/bitcoin-76d6537698e4-arm64-apple-darwin-unsigned.tar.gz 54fae4652f21772d4d861b1a9dd3dcb913f088e6b7049a566c748ccdf2acede3 guix-build-76d6537698e4/output/arm64-apple-darwin/bitcoin-76d6537698e4-arm64-apple-darwin-unsigned.zip e986f3d8311df3ab26860c8747e9634687617609a317fdf242365d408235f417 guix-build-76d6537698e4/output/arm64-apple-darwin/bitcoin-76d6537698e4-arm64-apple-darwin.tar.gz 3efced764d3b62362c906f1fbbdecf347be1aab877afb2d6ce8f39d24b3d7437 guix-build-76d6537698e4/output/dist-archive/bitcoin-76d6537698e4.tar.gz 6bd047bd080ae0d0a08a15e83a79dfd17bf29227599517d0bccae17a0224a741 guix-build-76d6537698e4/output/powerpc64-linux-gnu/SHA256SUMS.part 102909ef544962e08577464b3293c0013237391b7577d7abc26f1244d3d0157d guix-build-76d6537698e4/output/powerpc64-linux-gnu/bitcoin-76d6537698e4-powerpc64-linux-gnu-debug.tar.gz 01cf35c37093f768c953697c8d0102316e1e719befd2853a74266bcc2105c52c guix-build-76d6537698e4/output/powerpc64-linux-gnu/bitcoin-76d6537698e4-powerpc64-linux-gnu.tar.gz 467f858d1aba32ee290e6ba00feee632fcb56907f77e5b48f4de969d8ce78457 guix-build-76d6537698e4/output/riscv64-linux-gnu/SHA256SUMS.part 893cb65a79709c58ebafb003ce43b1cd51434d9c0a9175b7dfede6aa99fec3d2 guix-build-76d6537698e4/output/riscv64-linux-gnu/bitcoin-76d6537698e4-riscv64-linux-gnu-debug.tar.gz be3bd03cdef59928eb8a18bd59f48ad27ae38a6382bf94651774845adbd28308 guix-build-76d6537698e4/output/riscv64-linux-gnu/bitcoin-76d6537698e4-riscv64-linux-gnu.tar.gz 1ff2b04cccd44c4c6526387307fb381f52fbc36b31a51730435d6b99e0fa4610 guix-build-76d6537698e4/output/x86_64-apple-darwin/SHA256SUMS.part 9c84639c4b7e1e39c06da4c9430efe94993ce97fbc279b38502c1d4fc25ac801 guix-build-76d6537698e4/output/x86_64-apple-darwin/bitcoin-76d6537698e4-x86_64-apple-darwin-unsigned.tar.gz e65c009c728aa42f24b6970018336058adc78fba09b85aa76310de98fdabb8ad guix-build-76d6537698e4/output/x86_64-apple-darwin/bitcoin-76d6537698e4-x86_64-apple-darwin-unsigned.zip 1a85307eec81cc13e5d599db1bb7cddd3d4f6847f2bad7685e096c439b44489a guix-build-76d6537698e4/output/x86_64-apple-darwin/bitcoin-76d6537698e4-x86_64-apple-darwin.tar.gz 10189926b6ccef3ab1feee3edce34a80a30e60ee67c00519e344fefd6c9880d0 guix-build-76d6537698e4/output/x86_64-linux-gnu/SHA256SUMS.part 0094570197c0a91b7a903c1250bf899ea50d7452608da03f5dd825febd5e216b guix-build-76d6537698e4/output/x86_64-linux-gnu/bitcoin-76d6537698e4-x86_64-linux-gnu-debug.tar.gz 8375afd9ea4376b354548270323fa0f5f3244579b59dcdf9c26330337b5719ab guix-build-76d6537698e4/output/x86_64-linux-gnu/bitcoin-76d6537698e4-x86_64-linux-gnu.tar.gz 5a30053ee8db9eb2d083e8569a1a69b24acc84de1028f3f40d5e902a1174e49e guix-build-76d6537698e4/output/x86_64-w64-mingw32/SHA256SUMS.part 1d624077e027dd6f213c85d75fdbac12d61c45235946817c406132fbd222c939 guix-build-76d6537698e4/output/x86_64-w64-mingw32/bitcoin-76d6537698e4-win64-debug.zip e75107ce5608d83708b4e9b5a64d50e0282560ee2d8d915a20993fd383d2d456 guix-build-76d6537698e4/output/x86_64-w64-mingw32/bitcoin-76d6537698e4-win64-setup-unsigned.exe 7fb1f412fd71e0e8302add6bcc5679ad6990d87c16688a396769844f72ae7c82 guix-build-76d6537698e4/output/x86_64-w64-mingw32/bitcoin-76d6537698e4-win64-unsigned.tar.gz be24df85e0834823f0ad9611667100330972d3a18460099d7df5b4386fbd6403 guix-build-76d6537698e4/output/x86_64-w64-mingw32/bitcoin-76d6537698e4-win64.zip ``` ACKs for top commit: TheCharlatan: ACK 76d6537698e46f52d6c45a76f7d99ba427d57dca Tree-SHA512: 69e698e9b0036ecb1f89db82427c25d0368d2178c3dc2bc751181c19a1139929bf0da160af6f3e021ca3da59ea66f7b7330aa6295f5e65c6ef0bbcf369fcbc94 --- depends/packages/qt.mk | 2 -- .../qt/fast_fixed_dtoa_no_optimize.patch | 20 ------------------- 2 files changed, 22 deletions(-) delete mode 100644 depends/patches/qt/fast_fixed_dtoa_no_optimize.patch diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 18c01e7cf0631..0b9d88be371ba 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -19,7 +19,6 @@ $(package)_patches += no_warnings_for_symbols.patch $(package)_patches += rcc_hardcode_timestamp.patch $(package)_patches += duplicate_lcqpafonts.patch $(package)_patches += guix_cross_lib_path.patch -$(package)_patches += fast_fixed_dtoa_no_optimize.patch $(package)_patches += fix-macos-linker.patch $(package)_patches += memory_resource.patch $(package)_patches += clang_18_libpng.patch @@ -255,7 +254,6 @@ define $(package)_preprocess_cmds patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \ patch -p1 -i $($(package)_patch_dir)/duplicate_lcqpafonts.patch && \ patch -p1 -i $($(package)_patch_dir)/utc_from_string_no_optimize.patch && \ - patch -p1 -i $($(package)_patch_dir)/fast_fixed_dtoa_no_optimize.patch && \ patch -p1 -i $($(package)_patch_dir)/guix_cross_lib_path.patch && \ patch -p1 -i $($(package)_patch_dir)/windows_lto.patch && \ patch -p1 -i $($(package)_patch_dir)/zlib-timebits64.patch && \ diff --git a/depends/patches/qt/fast_fixed_dtoa_no_optimize.patch b/depends/patches/qt/fast_fixed_dtoa_no_optimize.patch deleted file mode 100644 index d4d6539f56dc4..0000000000000 --- a/depends/patches/qt/fast_fixed_dtoa_no_optimize.patch +++ /dev/null @@ -1,20 +0,0 @@ -Modify the optimisation flags for FastFixedDtoa. -This fixes a non-determinism issue in the asm produced for -this function when cross-compiling on x86_64 and aarch64 for -the arm-linux-gnueabihf HOST. - ---- a/qtbase/src/3rdparty/double-conversion/fixed-dtoa.h -+++ b/qtbase/src/3rdparty/double-conversion/fixed-dtoa.h -@@ -48,9 +48,12 @@ namespace double_conversion { - // - // This method only works for some parameters. If it can't handle the input it - // returns false. The output is null-terminated when the function succeeds. -+#pragma GCC push_options -+#pragma GCC optimize ("-O1") - bool FastFixedDtoa(double v, int fractional_count, - Vector buffer, int* length, int* decimal_point); - -+#pragma GCC pop_options - } // namespace double_conversion - - #endif // DOUBLE_CONVERSION_FIXED_DTOA_H_ From a74b1e22f6fcedcfd04d0a3c18b56f5bb01c2d62 Mon Sep 17 00:00:00 2001 From: merge-script Date: Mon, 10 Jun 2024 09:21:19 +0100 Subject: [PATCH 13/16] Merge bitcoin/bitcoin#30253: refactor: performance-for-range-copy in psbt.h fab01b5220c28a334b451ed9625bd3914c48e6af refactor: performance-for-range-copy in psbt.h (MarcoFalke) Pull request description: A copy of the partial signatures is not required before serializing them. For reference, this was found by switching the codebase to `std::span` (not sure why it wasn't found with `Span` though): ``` ./psbt.h:240:23: error: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy,-warnings-as-errors] 240 | for (auto sig_pair : partial_sigs) { | ^ | const & ACKs for top commit: tdb3: ACK fab01b5220c28a334b451ed9625bd3914c48e6af theStack: utACK fab01b5220c28a334b451ed9625bd3914c48e6af Tree-SHA512: b55513d8191118499716684190ee568d171b50ae9171d246ca6e047f0cfd3ec14c9453d721e88af55e47bb41fa66cbafdbfb47bc5f9b8d82789e0a9b634b371b --- src/psbt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/psbt.h b/src/psbt.h index eb38cf7458375..e326c3bbb82cd 100644 --- a/src/psbt.h +++ b/src/psbt.h @@ -192,7 +192,7 @@ struct PSBTInput if (final_script_sig.empty()) { // Write any partial signatures - for (auto sig_pair : partial_sigs) { + for (const auto& sig_pair : partial_sigs) { SerializeToVector(s, CompactSizeWriter(PSBT_IN_PARTIAL_SIG), Span{sig_pair.second.first}); s << sig_pair.second.second; } From 20bcee8d842f9004fdb576f50ace73f70bb37712 Mon Sep 17 00:00:00 2001 From: merge-script Date: Fri, 14 Jun 2024 11:26:02 +0100 Subject: [PATCH 14/16] Merge bitcoin/bitcoin#30281: Update leveldb subtree to latest upstream a37778d4d32b4ddeff96f68a130dc8da3a84b278 Squashed 'src/leveldb/' changes from e2f10b4e47..688561cba8 (fanquake) Pull request description: Includes https://github.com/bitcoin-core/leveldb-subtree/pull/41 which is used in #30234. ACKs for top commit: theuni: utACK 95812d912b6335caa7af2a084d84447fb4aad156 Tree-SHA512: 3d943695a3d33816cf5558b183f5629aa92a500a1544eecedf84952e93c8592a8cf0d554b88281fc0bad3c9e920ebcff1ed8edc12f8e73f36ed5335482beb829 --- src/leveldb/include/leveldb/status.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/leveldb/include/leveldb/status.h b/src/leveldb/include/leveldb/status.h index e3273144e4811..68efe3001a908 100644 --- a/src/leveldb/include/leveldb/status.h +++ b/src/leveldb/include/leveldb/status.h @@ -103,6 +103,8 @@ class LEVELDB_EXPORT Status { inline Status::Status(const Status& rhs) { state_ = (rhs.state_ == nullptr) ? nullptr : CopyState(rhs.state_); } + +// NOLINTBEGIN(bugprone-unhandled-self-assignment) inline Status& Status::operator=(const Status& rhs) { // The following condition catches both aliasing (when this == &rhs), // and the common case where both rhs and *this are ok. @@ -112,6 +114,8 @@ inline Status& Status::operator=(const Status& rhs) { } return *this; } +// NOLINTEND(bugprone-unhandled-self-assignment) + inline Status& Status::operator=(Status&& rhs) noexcept { std::swap(state_, rhs.state_); return *this; From da11d29986e12173da1fc8997d983ad52571dd15 Mon Sep 17 00:00:00 2001 From: merge-script Date: Tue, 18 Jun 2024 10:26:11 +0100 Subject: [PATCH 15/16] Merge bitcoin/bitcoin#30282: Revert "contrib: macdeploy: monkey-patch gen-sdk to be deterministic" b03a45b13e4e33b044cae6c97a6d608f6f3d43f3 Revert "contrib: macdeploy: monkey-patch gen-sdk to be deterministic" (fanquake) Pull request description: This reverts commit ba30a5407e065e9d6dd037351e83f56a43f38f19. We no-longer support Python 3.8, so remove the monkey patching. ACKs for top commit: hebasto: ACK b03a45b13e4e33b044cae6c97a6d608f6f3d43f3, I have reviewed the code and it looks OK. Tree-SHA512: 5bf68c2b332f18a620a8a6f77812ed93afa988016847bec1d3b7355670301dc957442ac47191a0cb7c3fe607d902914fb00c96345c8170f2a64429638c00b3c4 --- contrib/macdeploy/gen-sdk | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/contrib/macdeploy/gen-sdk b/contrib/macdeploy/gen-sdk index b73f5cba14c48..86a6262b5ce48 100755 --- a/contrib/macdeploy/gen-sdk +++ b/contrib/macdeploy/gen-sdk @@ -8,21 +8,6 @@ import gzip import os import contextlib -# monkey-patch Python 3.8 and older to fix wrong TAR header handling -# see https://github.com/bitcoin/bitcoin/pull/24534 -# and https://github.com/python/cpython/pull/18080 for more info -if sys.version_info < (3, 9): - _old_create_header = tarfile.TarInfo._create_header - def _create_header(info, format, encoding, errors): - buf = _old_create_header(info, format, encoding, errors) - # replace devmajor/devminor with binary zeroes - buf = buf[:329] + bytes(16) + buf[345:] - # recompute checksum - chksum = tarfile.calc_chksums(buf)[0] - buf = buf[:-364] + bytes("%06o\0" % chksum, "ascii") + buf[-357:] - return buf - tarfile.TarInfo._create_header = staticmethod(_create_header) - @contextlib.contextmanager def cd(path): """Context manager that restores PWD even if an exception was raised.""" From c34e7ab5345c714078e10483adba6a186b6a7f4a Mon Sep 17 00:00:00 2001 From: merge-script Date: Mon, 29 Jul 2024 10:08:07 +0100 Subject: [PATCH 16/16] Merge bitcoin/bitcoin#30534: guix: move bison from global scope, to Linux e6df3485ed2302712b7cf03bdb7e76aea197a1ea guix: move bison from global scope, to Linux (fanquake) Pull request description: This is only needed for the Qt build (libxkbcommon), on Linux, so does not need to be built/present for the macOS or Windows builds. ACKs for top commit: hebasto: ACK e6df3485ed2302712b7cf03bdb7e76aea197a1ea. TheCharlatan: ACK e6df3485ed2302712b7cf03bdb7e76aea197a1ea Tree-SHA512: b66111e398b4fce88f912adfd808d537e2d85e1f0078befd264bb700b201ca1bbe322810e80a212e0023657e9e3693a106761c43743d66aabd16e2afe7f599e6 --- contrib/guix/manifest.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm index de2729b3b8610..6a6339e8e8db0 100644 --- a/contrib/guix/manifest.scm +++ b/contrib/guix/manifest.scm @@ -528,7 +528,6 @@ inspecting signatures in Mach-O binaries.") autoconf-2.71 automake pkg-config - bison ;; Scripting python-minimal ;; (3.10) ;; Git @@ -543,7 +542,8 @@ inspecting signatures in Mach-O binaries.") nss-certs osslsigncode)) ((string-contains target "-linux-") - (list (list gcc-toolchain-12 "static") + (list bison + (list gcc-toolchain-12 "static") (make-bitcoin-cross-toolchain target))) ((string-contains target "darwin") (list clang-toolchain-18