From 277766fcef2251c9d700e977ae2610a00fe740e7 Mon Sep 17 00:00:00 2001 From: fanquake Date: Sun, 14 May 2023 11:14:25 +0100 Subject: [PATCH 01/18] Merge bitcoin/bitcoin#27493: depends: no-longer nuke libc++abi.so* in native_clang package 9ae854da193f3c4bda38a75e96f9b989b289baab depends: no-longer nuke libc++abi.so* in native_clang package (fanquake) Pull request description: We weren't copying it over in any case. ACKs for top commit: hebasto: ACK 9ae854da193f3c4bda38a75e96f9b989b289baab theuni: Sure. utACK no-op 9ae854da193f3c4bda38a75e96f9b989b289baab. Tree-SHA512: 3cc7f18f27c1b498f930bc1a09283aa04ba673d3c1a5220d8462213f0a06b74bc34989f23404402850de518cba35ddab900a54f7f0fac112fc86664e4155f8cb --- depends/packages/native_clang.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/depends/packages/native_clang.mk b/depends/packages/native_clang.mk index f2712294ab..b11037b83e 100644 --- a/depends/packages/native_clang.mk +++ b/depends/packages/native_clang.mk @@ -9,10 +9,6 @@ $(package)_file_name=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-16 $(package)_sha256_hash=48b83ef827ac2c213d5b64f5ad7ed082c8bcb712b46644e0dc5045c6f462c231 endif -define $(package)_preprocess_cmds - rm -f $($(package)_extract_dir)/lib/libc++abi.so* -endef - define $(package)_stage_cmds mkdir -p $($(package)_staging_prefix_dir)/lib/clang/$($(package)_version)/include && \ mkdir -p $($(package)_staging_prefix_dir)/bin && \ From bef9631e99128eb509dac8bcb005d6c7937cba79 Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 15 May 2023 13:55:49 +0100 Subject: [PATCH 02/18] Merge bitcoin/bitcoin#27661: doc, test: Document steps to reproduce TSan warning for `libdb` f03a708c1190852862c2e3ade5ee01797f291dd4 doc, test: Document steps to reproduce TSan warning for `libdb` (Hennadii Stepanov) Pull request description: Requested [here](https://github.com/bitcoin/bitcoin/pull/27658#issuecomment-1547767101). ACKs for top commit: MarcoFalke: lgtm ACK f03a708c1190852862c2e3ade5ee01797f291dd4 Tree-SHA512: 0c61c05d75d074df0686502739341fdbef8dd5a2d2f6cdfdd85bd0014ac43efb6fab112ee66d8d0f33f8f4695aeffc12a05923181260d81511d4e4d53b7686f2 --- test/sanitizer_suppressions/tsan | 1 + 1 file changed, 1 insertion(+) diff --git a/test/sanitizer_suppressions/tsan b/test/sanitizer_suppressions/tsan index e967cd2242..5871983c45 100644 --- a/test/sanitizer_suppressions/tsan +++ b/test/sanitizer_suppressions/tsan @@ -32,6 +32,7 @@ race:src/qt/test/* deadlock:src/qt/test/* # External libraries +# https://github.com/bitcoin/bitcoin/pull/27658#issuecomment-1547639621 deadlock:libdb race:libzmq From 105442f8cbffaf435cd4b685f7da4ca8b2be4633 Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 16 May 2023 11:14:50 +0100 Subject: [PATCH 03/18] Merge bitcoin/bitcoin#26422: build: Use newest `config.{guess,sub}` available ea7b8528490d330f0f4e34e9b26ab00ba528f546 build: Use newest `config.{guess,sub}` available (Hennadii Stepanov) Pull request description: Fixes cross-compiling on old systems. See https://github.com/bitcoin/bitcoin/issues/26420#issuecomment-1295886891. Guix builds: ``` ab58f8db4fb50c2af08be646e4a57491ff853bf41319fe3e962bb928ace2c1be guix-build-ea7b8528490d/output/aarch64-linux-gnu/SHA256SUMS.part c4a42a7dbfb15aa910ce269c3f3158df758eba01dd855cf6529c960d9b8bd76b guix-build-ea7b8528490d/output/aarch64-linux-gnu/bitcoin-ea7b8528490d-aarch64-linux-gnu-debug.tar.gz add5f80b0c8ee216c1d8db31e13656c45f11fe5c967324b8fcedd64d0d408938 guix-build-ea7b8528490d/output/aarch64-linux-gnu/bitcoin-ea7b8528490d-aarch64-linux-gnu.tar.gz ba807ae5b29aca611a35700a968a4f9010528d6cdb6412f98c707aa0e9510e8b guix-build-ea7b8528490d/output/arm-linux-gnueabihf/SHA256SUMS.part fe127eff1fc8389ef00ae39d1446640512120d2f247a2ee64c06290116265729 guix-build-ea7b8528490d/output/arm-linux-gnueabihf/bitcoin-ea7b8528490d-arm-linux-gnueabihf-debug.tar.gz ac75f0aba2e0801fc6b59405bff09884837e0ff8b6fa9fc1225e8325a4ec78a4 guix-build-ea7b8528490d/output/arm-linux-gnueabihf/bitcoin-ea7b8528490d-arm-linux-gnueabihf.tar.gz dee402db94829bd5ce029ca02d75e008f8a18a44fd88e8ecd00b3ce586f223f4 guix-build-ea7b8528490d/output/arm64-apple-darwin/SHA256SUMS.part bbf985dbd1ca875fbb0a03c21698d4b6797c27be45e3a31a3229daee0ecbcbf4 guix-build-ea7b8528490d/output/arm64-apple-darwin/bitcoin-ea7b8528490d-arm64-apple-darwin-unsigned.dmg 3cca89e532a2b637185ca316168b0f6fac2fce8795b486d530ee966a844716f1 guix-build-ea7b8528490d/output/arm64-apple-darwin/bitcoin-ea7b8528490d-arm64-apple-darwin-unsigned.tar.gz 487c68e1a71f6254d48f8d322a46c94e671e00b5930fbfe689804cd8e379c8e9 guix-build-ea7b8528490d/output/arm64-apple-darwin/bitcoin-ea7b8528490d-arm64-apple-darwin.tar.gz db663cf3216871f4c87b687a839cb5cf18b5d9906b74d4c19e8ad422d904aa87 guix-build-ea7b8528490d/output/dist-archive/bitcoin-ea7b8528490d.tar.gz 09121bcd36d72ad26364182c678f2edaaf5b5e635ed43a6964ad7e4be1335075 guix-build-ea7b8528490d/output/powerpc64-linux-gnu/SHA256SUMS.part e8638959b501c3d70421dcdc6579c5d77c5786abed7ad3d6051c628fd8f17c6b guix-build-ea7b8528490d/output/powerpc64-linux-gnu/bitcoin-ea7b8528490d-powerpc64-linux-gnu-debug.tar.gz b1aee39067d5010b4e63dc916232eb1582299d7acb56afacf5c9a5b75dcd8b82 guix-build-ea7b8528490d/output/powerpc64-linux-gnu/bitcoin-ea7b8528490d-powerpc64-linux-gnu.tar.gz 9ed3d0e710847068cb2064e51e3f4c14166ad86f5c297adcf0a4d24cd4e2a723 guix-build-ea7b8528490d/output/powerpc64le-linux-gnu/SHA256SUMS.part 19f99e41f41d9525a412872e61687452ab5ac23c5c964ef34b8c31a9d71adabc guix-build-ea7b8528490d/output/powerpc64le-linux-gnu/bitcoin-ea7b8528490d-powerpc64le-linux-gnu-debug.tar.gz bd669150ce6830ffbd8523acf75b6daf894c9449c6ce3073a9ce89156d9268f9 guix-build-ea7b8528490d/output/powerpc64le-linux-gnu/bitcoin-ea7b8528490d-powerpc64le-linux-gnu.tar.gz 5e42cb1fee7b5b046da37f62674a1662a6135f9644f5ea0288876334c3e8d34a guix-build-ea7b8528490d/output/riscv64-linux-gnu/SHA256SUMS.part 8767a84e04e0cd27318305d31a5a897cdc5f56d8505416dd01753bb35c8980b0 guix-build-ea7b8528490d/output/riscv64-linux-gnu/bitcoin-ea7b8528490d-riscv64-linux-gnu-debug.tar.gz 00f1abcc64a7010f194dab847c04481e10991128b919b513aa9eb2911d03a243 guix-build-ea7b8528490d/output/riscv64-linux-gnu/bitcoin-ea7b8528490d-riscv64-linux-gnu.tar.gz ae7add2e3ea0663fdd9d2c61c737e4bb4155d42932a0a5ce8cbbbcee627f01f3 guix-build-ea7b8528490d/output/x86_64-apple-darwin/SHA256SUMS.part ba6b4a2f6a97e382a10ffec605f025d8724ac2dc0a441dbb42be79e915e98738 guix-build-ea7b8528490d/output/x86_64-apple-darwin/bitcoin-ea7b8528490d-x86_64-apple-darwin-unsigned.dmg 67914f29d9e81ee50b340c3ac05b336b98766b59b8cce153493786b04a51f18a guix-build-ea7b8528490d/output/x86_64-apple-darwin/bitcoin-ea7b8528490d-x86_64-apple-darwin-unsigned.tar.gz 1d813d0e905a324f48beb2ce1da980e372c529b0eadb521662063f283fbc9bf6 guix-build-ea7b8528490d/output/x86_64-apple-darwin/bitcoin-ea7b8528490d-x86_64-apple-darwin.tar.gz 4e3d176ad9059e59e9b21919001ced2710c74229536b27ef65acef514287f7e5 guix-build-ea7b8528490d/output/x86_64-linux-gnu/SHA256SUMS.part cbe31f4a60aac1a72bcdedccf39c18da21a5a4e257e77c0832ad93ce722923dd guix-build-ea7b8528490d/output/x86_64-linux-gnu/bitcoin-ea7b8528490d-x86_64-linux-gnu-debug.tar.gz d5f3cf53adf1d964cded3461b66199c4917715af0d84cac78c97acc92432b059 guix-build-ea7b8528490d/output/x86_64-linux-gnu/bitcoin-ea7b8528490d-x86_64-linux-gnu.tar.gz 9b1877d00fd447222839615cfeb089a8237f1d5d80cd2b819dd66621df8f2375 guix-build-ea7b8528490d/output/x86_64-w64-mingw32/SHA256SUMS.part 2fb88e40dd399a2dedb1a44c5bd1091899b00a6d3b8d99149f622a0069205560 guix-build-ea7b8528490d/output/x86_64-w64-mingw32/bitcoin-ea7b8528490d-win64-debug.zip 074ce203494dc15c916c151426438f09982a270f389cd139d3f28a75aea51af8 guix-build-ea7b8528490d/output/x86_64-w64-mingw32/bitcoin-ea7b8528490d-win64-setup-unsigned.exe 2aa8ff735ce96580fb915757ccce79dc2a19afb043a6c93d3749023ca647666d guix-build-ea7b8528490d/output/x86_64-w64-mingw32/bitcoin-ea7b8528490d-win64-unsigned.tar.gz 0ac19e1901506c47d5b20297d468dbaa93e8572232671a16d08355988df8e7c3 guix-build-ea7b8528490d/output/x86_64-w64-mingw32/bitcoin-ea7b8528490d-win64.zip ``` ACKs for top commit: fanquake: ACK ea7b8528490d330f0f4e34e9b26ab00ba528f546 Tree-SHA512: 75c154d2195e2e8cf2e2786c08bc5096b07027715f559fc81c1ce221ce74c2732e745b74809d7c4a9f909a1018399a07329abd993e50ecec91dd95518fce0b39 --- autogen.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/autogen.sh b/autogen.sh index de16260b56..d0ac7ef7ed 100755 --- a/autogen.sh +++ b/autogen.sh @@ -14,3 +14,12 @@ fi command -v autoreconf >/dev/null || \ (echo "configuration failed, please install autoconf first" && exit 1) autoreconf --install --force --warnings=all + +if expr "'$(build-aux/config.guess --timestamp)" \< "'$(depends/config.guess --timestamp)" > /dev/null; then + cp depends/config.guess build-aux + cp depends/config.guess src/secp256k1/build-aux +fi +if expr "'$(build-aux/config.sub --timestamp)" \< "'$(depends/config.sub --timestamp)" > /dev/null; then + cp depends/config.sub build-aux + cp depends/config.sub src/secp256k1/build-aux +fi From f27778abe75e8efb979e478fc1df04e4390d2f39 Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 22 May 2023 10:02:35 +0100 Subject: [PATCH 04/18] Merge bitcoin/bitcoin#27561: test: Explicitly specify directory where to search tests for MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit c44f3f231988dc05c4c7a8a96bc2e7b1a54da277 test: Explicitly specify directory where to search tests for (Hennadii Stepanov) Pull request description: For out-of-source builds, the `test/functional/test_runner.py` is supposed to be run from the build directory which allows it to pick the `test/config.ini` file generated by the build system. Currently, it works accidently for the following reasons: - on POSIX systems, when running a created by Autoconf symlink to the `test/functional/test_runner.py` in the source directory, it actually has the source directory location in the `sys.path`. - on Windows (the `build_msvc` directory) VS project puts and copies every build artifact into the source tree (which is wrong and ugly). This PR makes `test/functional/test_runner.py` work from a build directory in any form (a symbolic link, a hard link, a copy) on _all_ supported platforms, which is highly desirable in the upcoming [CMake-based build system](https://github.com/bitcoin/bitcoin/pull/25797). For the current master branch, this PR has no behaviour change. Required for https://github.com/hebasto/bitcoin/pull/15. --- **Steps to reproduce the issue** While the issue is mostly specific to Windows and CMake builds, it is still possible to reproduce it on the current master branch. 1. Make an out-of-source build: ``` $ ./autogen.sh $ mkdir ../build && cd ../build $ ../bitcoin/configure $ make ``` 2. Note that Autoconf created a symbolic link `test/functional/test_runner.py` in the `../build` directory: ``` $ ls -l test/functional/test_runner.py lrwxrwxrwx 1 hebasto hebasto 47 May 5 17:40 test/functional/test_runner.py -> ../../../bitcoin/test/functional/test_runner.py ``` which works flawlessly. 3. However, replacing this symbolic link with a hard link or a copy of `test/functional/test_runner.py` from the source tree will cause the following error: ``` $ cp ../bitcoin/test/functional/test_runner.py test/functional/test_runner.py $ ls -l test/functional/test_runner.py $ ./test/functional/test_runner.py Temporary test directory at /tmp/test_runner_₿_🏃_20230505_175104 Running Unit Tests for Test Framework Modules E ====================================================================== ERROR: test_framework (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: test_framework Traceback (most recent call last): File "/usr/lib/python3.10/unittest/loader.py", line 154, in loadTestsFromName module = __import__(module_name) ModuleNotFoundError: No module named 'test_framework' ---------------------------------------------------------------------- Ran 1 test in 0.000s FAILED (errors=1) Early exiting after failure in TestFramework unit tests ``` ACKs for top commit: stickies-v: re-ACK https://github.com/bitcoin/bitcoin/commit/c44f3f231988dc05c4c7a8a96bc2e7b1a54da277 MarcoFalke: lgtm ACK c44f3f231988dc05c4c7a8a96bc2e7b1a54da277 💸 Tree-SHA512: 622ff629080a55f76dd4c1dab6699de0e9f06b75da3315cd3b31b972ef4bde746458bf3e8a95e879b3c6a63be2368af70005a83f6a3c85c4f1ba5be51e91a61d --- test/functional/test_runner.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index 7573bd7df1..b3dafc7957 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -546,6 +546,12 @@ def run_tests(*, test_list, src_dir, build_dir, tmpdir, jobs=1, attempts=1, enab # Test Framework Tests print("Running Unit Tests for Test Framework Modules") + + tests_dir = src_dir + '/test/functional/' + # This allows `test_runner.py` to work from an out-of-source build directory using a symlink, + # a hard link or a copy on any platform. See https://github.com/bitcoin/bitcoin/pull/27561. + sys.path.append(tests_dir) + test_framework_tests = unittest.TestSuite() for module in TEST_FRAMEWORK_MODULES: test_framework_tests.addTest(unittest.TestLoader().loadTestsFromName("test_framework.{}".format(module))) @@ -554,8 +560,6 @@ def run_tests(*, test_list, src_dir, build_dir, tmpdir, jobs=1, attempts=1, enab logging.debug("Early exiting after failure in TestFramework unit tests") sys.exit(False) - tests_dir = src_dir + '/test/functional/' - flags = ['--cachedir={}'.format(cache_dir)] + args if enable_coverage: From ee6b7d66f102655b6ac0fdc1d60b5a04a3105803 Mon Sep 17 00:00:00 2001 From: fanquake Date: Thu, 25 May 2023 15:32:47 +0100 Subject: [PATCH 05/18] Merge bitcoin/bitcoin#27721: depends: remove redundant stdlib option 4fe5f3c4675263ea106e7ac6d336ec769392ebc3 depends: remove redundant stdlib option (Cory Fields) Pull request description: Like #27628, this is another dependency of #21778, though it doesn't become obvious until used with a newer clang. This should be a no-op. Use of -stdlib++-isystem gets rid of any system c++ header include paths and negates the need for this option. In newer versions of clangs the combo produces an annoying warning that actually causes problems during configure. ACKs for top commit: fanquake: ACK 4fe5f3c4675263ea106e7ac6d336ec769392ebc3 Tree-SHA512: 904072f2b13dffbbeab2bc9ff20a74969888502fa1ea35d9030784dd397c6751e31233e6ec7dc34e9fd42574950be733b25d6653c2a93e214cc5e4eef2e0133a --- depends/hosts/darwin.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk index 926cade63a..2a37cc2981 100644 --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -63,7 +63,7 @@ $(foreach TOOL,$(cctools_TOOLS),$(eval darwin_$(TOOL) = $$(build_prefix)/bin/$$( # Explicitly point to our binaries (e.g. cctools) so that they are # ensured to be found and preferred over other possibilities. # -# -stdlib=libc++ -stdlib++-isystem$(OSX_SDK)/usr/include/c++/v1 +# -stdlib++-isystem$(OSX_SDK)/usr/include/c++/v1 # # Forces clang to use the libc++ headers from our SDK and completely # forget about the libc++ headers from the standard directories @@ -107,7 +107,6 @@ darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \ $(clangxx_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \ -B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \ -isysroot$(OSX_SDK) \ - -stdlib=libc++ \ -stdlib++-isystem$(OSX_SDK)/usr/include/c++/v1 \ -Xclang -internal-externc-isystem$(clang_resource_dir)/include \ -Xclang -internal-externc-isystem$(OSX_SDK)/usr/include From a21b4b16f79d50bf013835ac3bc763a52d54f3de Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 2 Jun 2023 10:08:06 +0100 Subject: [PATCH 06/18] Merge bitcoin/bitcoin#27802: Update .style.yapf bc70072de1dd7d82d0ab95a10b507af94078065c Update .style.yapf (Ari) Pull request description: Corrected a minor typo ACKs for top commit: MarcoFalke: lgtm ACK bc70072de1dd7d82d0ab95a10b507af94078065c Tree-SHA512: 04146d17dc034a275be59d75d45977ff99a0c911a0b53df1c50bc874dc20268faa9bd93d62715a4f629e4cd9ce42d6a5ae1d4d99a2325143affbebccfb8e0602 --- .style.yapf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.style.yapf b/.style.yapf index 69d8c6aee4..350ac63855 100644 --- a/.style.yapf +++ b/.style.yapf @@ -107,7 +107,7 @@ each_dict_entry_on_separate_line=True i18n_comment= # The i18n function call names. The presence of this function stops -# reformattting on that line, because the string it has cannot be moved +# reformatting on that line, because the string it has cannot be moved # away from the i18n comment. i18n_function_call= From 324db8bb318a6b06b2c46e2dbf864a0a08964634 Mon Sep 17 00:00:00 2001 From: glozow Date: Fri, 2 Jun 2023 14:21:15 +0100 Subject: [PATCH 07/18] Merge bitcoin/bitcoin#27603: test: added coverage to mining_basic.py a7b46a1feae60e38fe4bdcacf5034f44cae49222 test: added coverage to mining_basic.py (kevkevin) Pull request description: Included a test that checks if we call submitblock with block.vtx.empty() then it throws an rpc deserialization error, currently we only test if !block.vtx->IsCoinBase() throws an rpc deserialization error I've tested to make sure this actually doing what I intended by breaking up this if block into two if blocks with different error messages and running the functional test https://github.com/bitcoin/bitcoin/blob/322ec63b01499c1ec52d3912ee382ebd59f2366b/src/rpc/mining.cpp#L963 This change should increase the test coverage for the `submitblock()` rpc in `./src/rpc/mining.cpp` ACKs for top commit: theStack: ACK a7b46a1feae60e38fe4bdcacf5034f44cae49222 Tree-SHA512: 4078cb1fa879cc9e34438319f73085b521b90a5a95348b23e494cf8e5ac792ec426bc0e1a63e949645e16afebe54c5f35a194f02e20b7273871163d89a5c44e6 --- test/functional/mining_basic.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/functional/mining_basic.py b/test/functional/mining_basic.py index 03097805c3..32b9f2725a 100755 --- a/test/functional/mining_basic.py +++ b/test/functional/mining_basic.py @@ -123,6 +123,7 @@ class MiningTest(BitcoinTestFramework): assert_template(node, bad_block, 'bad-cb-missing') self.log.info("submitblock: Test invalid coinbase transaction") + assert_raises_rpc_error(-22, "Block does not start with a coinbase", node.submitblock, CBlock().serialize().hex()) assert_raises_rpc_error(-22, "Block does not start with a coinbase", node.submitblock, bad_block.serialize().hex()) self.log.info("getblocktemplate: Test truncated final transaction") From e2fcd1d9477e9b8fde65dea0f0e9c690866b33b2 Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 2 Jun 2023 16:24:31 +0100 Subject: [PATCH 08/18] Merge bitcoin/bitcoin#27225: doc: document json rpc endpoints 65e3abcbf2b9e818f3b9f1ba35f3cfe7df5e3811 doc: document json rpc endpoints (willcl-ark) Pull request description: fixes #20246 This documents the two JSON-RPC endpoints available, details when they are active, specifies when they can or must be used, and outlines some known behaviour quirks. ACKs for top commit: fanquake: ACK 65e3abcbf2b9e818f3b9f1ba35f3cfe7df5e3811 - Seems fine. Can be improved if need be. Tree-SHA512: d557c2caf000a1bdd7b46c9da38afe63dc28446ba4a961526f1af3cec81d994a9da663e02c81ebdc4f609b794585349cfca77a582dc1e788c120de1d3b4c7db6 --- doc/JSON-RPC-interface.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/doc/JSON-RPC-interface.md b/doc/JSON-RPC-interface.md index 9b36ad5d56..118251cb90 100644 --- a/doc/JSON-RPC-interface.md +++ b/doc/JSON-RPC-interface.md @@ -5,6 +5,41 @@ The headless daemon `dashd` has the JSON-RPC API enabled by default, the GUI option. In the GUI it is possible to execute RPC methods in the Debug Console Dialog. +## Endpoints + +There are two JSON-RPC endpoints on the server: + +1. `/` +2. `/wallet//` + +### `/` endpoint + +This endpoint is always active. +It can always service non-wallet requests and can service wallet requests when +exactly one wallet is loaded. + +### `/wallet//` endpoint + +This endpoint is only activated when the wallet component has been compiled in. +It can service both wallet and non-wallet requests. +It MUST be used for wallet requests when two or more wallets are loaded. + +This is the endpoint used by bitcoin-cli when a `-rpcwallet=` parameter is passed in. + +Best practice would dictate using the `/wallet//` endpoint for ALL +requests when multiple wallets are in use. + +### Examples + +```sh +# Get block count from the / endpoint when rpcuser=alice and rpcport=38332 +$ curl --user alice --data-binary '{"jsonrpc": "1.0", "id": "0", "method": "getblockcount", "params": []}' -H 'content-type: text/plain;' localhost:38332/ + +# Get balance from the /wallet/walletname endpoint when rpcuser=alice, rpcport=38332 and rpcwallet=desc-wallet +$ curl --user alice --data-binary '{"jsonrpc": "1.0", "id": "0", "method": "getbalance", "params": []}' -H 'content-type: text/plain;' localhost:38332/wallet/desc-wallet + +``` + ## Parameter passing The JSON-RPC server supports both _by-position_ and _by-name_ [parameter From fbc6c6e64445ca91c36a247e139ea494f5f74f6a Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 16 Jun 2023 10:57:40 +0100 Subject: [PATCH 09/18] Merge bitcoin/bitcoin#27875: build: make sure we can overwrite config.{guess,sub} before doing so fc6c17b83887ef193f2b97264b1843c94dcb915d build: make sure we can overwrite config.{guess,sub} (0xb10c) Pull request description: Since ea7b8528 (#26422), `autogen.sh` overwrites the `build-aux/config.{guess, sub}` files (installed there by `autoreconf`) with the `depends/config.{guess, sub}` files if these are newer. The `autoreconf` tool copies them from it's `share/autoconf/build-aux/` directory. Specifically on NixOS, the `share/autoconf/build-aux/` files are located in the nix-store and are read-only. `autoreconf` preserves the read-only permissions when copying. Overwriting them with our `depends/config.{guess, sub}` files subsequently fails. To make sure we can overwrite the files, set write permissions to the current user and group before overwriting. This fixes the problem on NixOS. fixes #27873 ACKs for top commit: dergoegge: tACK fc6c17b83887ef193f2b97264b1843c94dcb915d fanquake: ACK fc6c17b83887ef193f2b97264b1843c94dcb915d Tree-SHA512: e8a31f739d5b598b2fe9fe6fc3d02303c117a6adccc49b8d0fea4980027a64f915a0e1e00e4788dce6113ef1b9ec9acf9e4164486f6e4904bad405f20b6746a0 --- autogen.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/autogen.sh b/autogen.sh index d0ac7ef7ed..69c892ffa0 100755 --- a/autogen.sh +++ b/autogen.sh @@ -16,10 +16,14 @@ command -v autoreconf >/dev/null || \ autoreconf --install --force --warnings=all if expr "'$(build-aux/config.guess --timestamp)" \< "'$(depends/config.guess --timestamp)" > /dev/null; then + chmod ug+w build-aux/config.guess + chmod ug+w src/secp256k1/build-aux/config.guess cp depends/config.guess build-aux cp depends/config.guess src/secp256k1/build-aux fi if expr "'$(build-aux/config.sub --timestamp)" \< "'$(depends/config.sub --timestamp)" > /dev/null; then + chmod ug+w build-aux/config.sub + chmod ug+w src/secp256k1/build-aux/config.sub cp depends/config.sub build-aux cp depends/config.sub src/secp256k1/build-aux fi From ba5f4c0332802ba904c73b8ba4ce9e6b40f7de31 Mon Sep 17 00:00:00 2001 From: fanquake Date: Sun, 18 Jun 2023 12:47:50 +0200 Subject: [PATCH 10/18] Merge bitcoin/bitcoin#27906: doc: test: update TestShell instructions 14405e8d4d259c18a21fc006d0a27550be3171f8 doc: test: update TestShell instructions (ismaelsadeeq) Pull request description: Fixes #27904 From #27904 and IRC. Update [Testshell instructions ](https://github.com/bitcoin/bitcoin/blob/master/test/functional/test-shell.md#2-importing-testshell-from-the-bitcoin-core-repository) E.g `TestShell.setup()` throws ``` AttributeError: type object 'TestShell' has no attribute 'setup' ``` Parentheses are missing, it should be `TestShell().setup()` ACKs for top commit: Sjors: utACK 14405e8d4d259c18a21fc006d0a27550be3171f8 brunoerg: crACK 14405e8d4d259c18a21fc006d0a27550be3171f8 hernanmarino: utACK 14405e8d4d259c18a21fc006d0a27550be3171f8 Tree-SHA512: ffe5fa1103a3b00ef0ee99879adae967b0da07cb8f8451c4c261b0a70b3b666af7aeaacd6f46f85a84ee5e9c7c7ed49700209b5b1f124d7a76efc420ad5c9cd9 --- test/functional/test-shell.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/functional/test-shell.md b/test/functional/test-shell.md index 78737509cb..e69d58d2ad 100644 --- a/test/functional/test-shell.md +++ b/test/functional/test-shell.md @@ -37,13 +37,13 @@ importing the `TestShell` class from the `test_shell` sub-package. The following `TestShell` methods manage the lifetime of the underlying bitcoind processes and logging utilities. -* `TestShell.setup()` -* `TestShell.shutdown()` +* `TestShell().setup()` +* `TestShell().shutdown()` The `TestShell` inherits all `BitcoinTestFramework` members and methods, such as: -* `TestShell.nodes[index].rpc_method()` -* `TestShell.log.info("Custom log message")` +* `TestShell().nodes[index].rpc_method()` +* `TestShell().log.info("Custom log message")` The following sections demonstrate how to initialize, run, and shut down a `TestShell` object. @@ -141,7 +141,7 @@ instances and remove all temporary data and logging directories. 20XX-XX-XXTXX:XX:XX.XXXXXXX TestFramework (INFO): Tests successful ``` To prevent the logs from being removed after a shutdown, simply set the -`TestShell.options.nocleanup` member to `True`. +`TestShell().options.nocleanup` member to `True`. ``` >>> test.options.nocleanup = True >>> test.shutdown() @@ -160,9 +160,9 @@ underlying `BitcoinTestFramework`: The `TestShell` object initializes with the default settings inherited from the `BitcoinTestFramework` class. The user can override these in -`TestShell.setup(key=value)`. +`TestShell().setup(key=value)`. -**Note:** `TestShell.reset()` will reset test parameters to default values and +**Note:** `TestShell().reset()` will reset test parameters to default values and can be called after the TestShell is shut down. | Test parameter key | Default Value | Description | @@ -179,7 +179,7 @@ can be called after the TestShell is shut down. | `perf` | False | Profiles running nodes with `perf` for the duration of the test if set to `True`. | | `rpc_timeout` | `60` | Sets the RPC server timeout for the underlying bitcoind processes. | | `setup_clean_chain` | `False` | A 200-block-long chain is initialized from cache by default. Instead, `setup_clean_chain` initializes an empty blockchain if set to `True`. | -| `randomseed` | Random Integer | `TestShell.options.randomseed` is a member of `TestShell` which can be accessed during a test to seed a random generator. User can override default with a constant value for reproducible test runs. | +| `randomseed` | Random Integer | `TestShell().options.randomseed` is a member of `TestShell` which can be accessed during a test to seed a random generator. User can override default with a constant value for reproducible test runs. | | `supports_cli` | `False` | Whether the bitcoin-cli utility is compiled and available for the test. | | `tmpdir` | `"/var/folders/.../"` | Sets directory for test logs. Will be deleted upon a successful test run unless `nocleanup` is set to `True` | | `trace_rpc` | `False` | Logs all RPC calls if set to `True`. | From ece625c754a4803658a9547251a7ac352260f96a Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 26 Jun 2023 09:38:34 +0100 Subject: [PATCH 11/18] Merge bitcoin/bitcoin#27914: feerate: For GetFeePerK() return nSatoshisPerK instead of round trip through GetFee 11d650060aed25273d860baa4e03168a778832bb feerate: For GetFeePerK() return nSatoshisPerK instead of round trip through GetFee (Andrew Chow) Pull request description: Returning the sats/kvb does not need to round trip through GetFee(1000) since the feerate is already stored as sats/kvb. Fixes #27913, although this does bring up a larger question of how we should handle such large feerates in fuzzing. ACKs for top commit: furszy: Code ACK 11d65006 Tree-SHA512: bec1a0d4b572a0c810cf7eb4e97d729d67e96835c2d576a909f755b053a9707c2f1b3df9adb8f08a9c4d310cdbb8b1e1b42b9c004bd1ade02a07d8ce9e902138 --- src/policy/feerate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/policy/feerate.h b/src/policy/feerate.h index 67b124d797..a51b540b05 100644 --- a/src/policy/feerate.h +++ b/src/policy/feerate.h @@ -53,7 +53,7 @@ public: /** * Return the fee in satoshis for a size of 1000 bytes */ - CAmount GetFeePerK() const { return GetFee(1000); } + CAmount GetFeePerK() const { return nSatoshisPerK; } friend bool operator<(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK < b.nSatoshisPerK; } friend bool operator>(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK > b.nSatoshisPerK; } friend bool operator==(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK == b.nSatoshisPerK; } From 79a20f96a565119a0a25dddfd7a1499962a4c800 Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 27 Jun 2023 12:49:29 +0100 Subject: [PATCH 12/18] Merge bitcoin/bitcoin#27929: Added static_assert to check that base_blob is using whole bytes. 5fc4939e17509534eb36727b27ac0afb941e44f7 Added static_assert to check that base_blob is using whole bytes. (Brotcrunsher) Pull request description: Prior to this commit it was possible to create base_blobs with any arbitrary amount of bits, like base_blob<9>. One could assume that this would be a valid way to create a bit field that guarantees to have at least 9 bits. However, in such a case, base_blob would not behave as expected because the WIDTH is rounded down to the closest whole byte (simple integer division by 8). This commit makes sure that this oddity is detected and blocked by the compiler. ACKs for top commit: MarcoFalke: lgtm ACK 5fc4939e17509534eb36727b27ac0afb941e44f7 theStack: ACK 5fc4939e17509534eb36727b27ac0afb941e44f7 stickies-v: ACK 5fc4939e17509534eb36727b27ac0afb941e44f7 Tree-SHA512: 6a06760f09d4a9e6f0b9338d4dddd4091f2ac59a843a443d9302959936d72c55f7cccd55a51ec3a5a799921f68be1b87968ef3c9c11d3389cbd369b5045bb50a --- src/uint256.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/uint256.h b/src/uint256.h index eb0e9836d6..0106cd5114 100644 --- a/src/uint256.h +++ b/src/uint256.h @@ -23,6 +23,7 @@ class base_blob { protected: static constexpr int WIDTH = BITS / 8; + static_assert(BITS % 8 == 0, "base_blob currently only supports whole bytes."); std::array m_data; static_assert(WIDTH == sizeof(m_data), "Sanity check"); From af944b7c8dbb743e526125b12850db6029e9331d Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 30 Jun 2023 11:37:38 +0100 Subject: [PATCH 13/18] Merge bitcoin/bitcoin#28013: doc: Fix verify-binaries link in contrib README ab8f6733577555d98668e7708638367a1bfeb023 doc: Fix verify-binaries link in contrib README (TheCharlatan) Pull request description: ACKs for top commit: Zero-1729: crACK ab8f6733577555d98668e7708638367a1bfeb023 theStack: ACK ab8f6733577555d98668e7708638367a1bfeb023 Tree-SHA512: 901d99b897d0b4b1af612e5650e84530252d96b5b49bc4f87c512af993abe32e6494e7248bb7ce3eb7c5ff7377a949980f143007446e3720450146367e346519 --- contrib/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/README.md b/contrib/README.md index f36c64d19c..221f57b26e 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -36,5 +36,5 @@ Test and Verify Tools ### [TestGen](/contrib/testgen) ### Utilities to generate test vectors for the data-driven Dash tests. -### [Verify Binaries](/contrib/verifybinaries) ### +### [Verify-Binaries](/contrib/verify-binaries) ### This script attempts to download and verify the signature file SHA256SUMS.asc from bitcoin.org. From 2767a1326847a1753866ca1c6a9b3694a2ea6023 Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 3 Jul 2023 11:44:44 +0100 Subject: [PATCH 14/18] Merge bitcoin/bitcoin#28021: docs: fixup honggfuzz fuzz patch c1247c3746d4b9ea88a0f9cfb7e71904267b3cd3 docs: fixup honggfuzz patch (fanquake) Pull request description: Closes #28019. ACKs for top commit: brunoerg: ACK c1247c3746d4b9ea88a0f9cfb7e71904267b3cd3 Tree-SHA512: 3f2d146d3d0c24fd25458f6a41e2d20bf6024fc0ea9942ee6254a1b6d0e3c017c55fe79dfbf90652cad64a4d6f026f463b0011dfab065b3d9754ca7047018084 --- doc/fuzzing.md | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/doc/fuzzing.md b/doc/fuzzing.md index 614f475d41..ccae9a1f8d 100644 --- a/doc/fuzzing.md +++ b/doc/fuzzing.md @@ -212,44 +212,45 @@ $ CC=$(pwd)/honggfuzz/hfuzz_cc/hfuzz-clang \ ./configure --disable-wallet --with-gui=no \ --with-sanitizers=address,undefined $ git apply << "EOF" -diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp -index 455a82e39..2faa3f80f 100644 ---- a/src/bitcoind.cpp -+++ b/src/bitcoind.cpp -@@ -158,7 +158,11 @@ static bool AppInit(int argc, char* argv[]) - return fRet; - } - +diff --git a/src/compat/compat.h b/src/compat/compat.h +index 8195bceaec..cce2b31ff0 100644 +--- a/src/compat/compat.h ++++ b/src/compat/compat.h +@@ -90,8 +90,12 @@ typedef char* sockopt_arg_type; + // building with a binutils < 2.36 is subject to this ld bug. + #define MAIN_FUNCTION __declspec(dllexport) int main(int argc, char* argv[]) + #else +#ifdef HFND_FUZZING_ENTRY_FUNCTION_CXX -+HFND_FUZZING_ENTRY_FUNCTION_CXX(int argc, char* argv[]) ++#define MAIN_FUNCTION HFND_FUZZING_ENTRY_FUNCTION_CXX(int argc, char* argv[]) +#else - int main(int argc, char* argv[]) + #define MAIN_FUNCTION int main(int argc, char* argv[]) + #endif +#endif - { - #ifdef WIN32 - util::WinCmdLineArgs winArgs; + + // Note these both should work with the current usage of poll, but best to be safe + // WIN32 poll is broken https://daniel.haxx.se/blog/2012/10/10/wsapoll-is-broken/ diff --git a/src/net.cpp b/src/net.cpp -index cf987b699..636a4176a 100644 +index 7601a6ea84..702d0f56ce 100644 --- a/src/net.cpp +++ b/src/net.cpp -@@ -709,7 +709,7 @@ int V1TransportDeserializer::readHeader(const char *pch, unsigned int nBytes) +@@ -727,7 +727,7 @@ int V1TransportDeserializer::readHeader(Span msg_bytes) } // Check start string, network magic - if (memcmp(hdr.pchMessageStart, m_chain_params.MessageStart(), CMessageHeader::MESSAGE_START_SIZE) != 0) { + if (false && memcmp(hdr.pchMessageStart, m_chain_params.MessageStart(), CMessageHeader::MESSAGE_START_SIZE) != 0) { // skip network magic checking - LogPrint(BCLog::NET, "HEADER ERROR - MESSAGESTART (%s, %u bytes), received %s, peer=%d\n", hdr.GetCommand(), hdr.nMessageSize, HexStr(hdr.pchMessageStart), m_node_id); + LogPrint(BCLog::NET, "Header error: Wrong MessageStart %s received, peer=%d\n", HexStr(hdr.pchMessageStart), m_node_id); return -1; } -@@ -768,7 +768,7 @@ Optional V1TransportDeserializer::GetMessage(const std::chrono::mic +@@ -788,7 +788,7 @@ CNetMessage V1TransportDeserializer::GetMessage(const std::chrono::microseconds RandAddEvent(ReadLE32(hash.begin())); - // Check checksum and header command string + // Check checksum and header message type string - if (memcmp(hash.begin(), hdr.pchChecksum, CMessageHeader::CHECKSUM_SIZE) != 0) { + if (false && memcmp(hash.begin(), hdr.pchChecksum, CMessageHeader::CHECKSUM_SIZE) != 0) { // skip checksum checking - LogPrint(BCLog::NET, "CHECKSUM ERROR (%s, %u bytes), expected %s was %s, peer=%d\n", - SanitizeString(msg->m_command), msg->m_message_size, - HexStr(Span(hash.begin(), hash.begin() + CMessageHeader::CHECKSUM_SIZE)), + LogPrint(BCLog::NET, "Header error: Wrong checksum (%s, %u bytes), expected %s was %s, peer=%d\n", + SanitizeString(msg.m_type), msg.m_message_size, + HexStr(Span{hash}.first(CMessageHeader::CHECKSUM_SIZE)), EOF $ make -C src/ dashd $ mkdir -p inputs/ From 551109105ac73d13feb45ecea7ae18cb0b21eac7 Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 7 Jul 2023 09:40:22 +0100 Subject: [PATCH 15/18] Merge bitcoin/bitcoin#28036: test: Restore unlimited timeout in IndexWaitSynced fabed7eb796637c02e3677ebbe183d90b258ba69 test: Restore unlimited timeout in IndexWaitSynced (MarcoFalke) Pull request description: The timeout was unlimited before, so just restore that value for now: https://github.com/bitcoin/bitcoin/pull/27988#issuecomment-1619218007 . (Strictly speaking, this is a behavior change for the blockfilterindex and txindex tests, because it only restores the coinstatsindex behavior.) ACKs for top commit: ajtowns: utACK fabed7eb796637c02e3677ebbe183d90b258ba69 mzumsande: ACK fabed7eb796637c02e3677ebbe183d90b258ba69 furszy: ACK fabed7eb Tree-SHA512: 66a878be58bbe53ad8e0c23f05569dd42df688be747551fbd202ada22d20a8285714e58fa2a71664deadb070ddf86cfad88c01042ff95ed26f6b40e4a10cec0a --- src/test/util/index.cpp | 5 +---- src/test/util/index.h | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/test/util/index.cpp b/src/test/util/index.cpp index 2bda7b1773..89bc35b731 100644 --- a/src/test/util/index.cpp +++ b/src/test/util/index.cpp @@ -5,14 +5,11 @@ #include #include -#include #include -void IndexWaitSynced(BaseIndex& index) +void IndexWaitSynced(const BaseIndex& index) { - const auto timeout{SteadyClock::now() + 120s}; while (!index.BlockUntilSyncedToCurrentChain()) { - Assert(timeout > SteadyClock::now()); UninterruptibleSleep(100ms); } } diff --git a/src/test/util/index.h b/src/test/util/index.h index 02030fd562..95309f6273 100644 --- a/src/test/util/index.h +++ b/src/test/util/index.h @@ -8,6 +8,6 @@ class BaseIndex; /** Block until the index is synced to the current chain */ -void IndexWaitSynced(BaseIndex& index); +void IndexWaitSynced(const BaseIndex& index); #endif // BITCOIN_TEST_UTIL_INDEX_H From 70cbd3f8a2c568670bb73e53f8ac7bb7f23bc6bc Mon Sep 17 00:00:00 2001 From: Ryan Ofsky Date: Tue, 11 Jul 2023 12:11:01 -0400 Subject: [PATCH 16/18] Merge bitcoin/bitcoin#28044: test: indexes, fix on error infinite loop 89ba8905f5c68ae29412f9c4010314c5a113c234 test: indexes, fix on error infinite loop (furszy) Pull request description: Coming from https://github.com/bitcoin/bitcoin/pull/28036#issuecomment-1623813703, I thought that we were going to fix it there but seems that got merged without it for some reason. As index sync failures trigger a shutdown request without notifying `BaseIndex::BlockUntilSyncedToCurrentChain` in any way, we also need to check whether a shutdown was requested or not inside 'IndexWaitSynced'. Otherwise, any error inside the index sync process will hang the test forever. ACKs for top commit: MarcoFalke: lgtm ACK 89ba8905f5c68ae29412f9c4010314c5a113c234 jamesob: ACK 89ba890 ryanofsky: Code review ACK 89ba8905f5c68ae29412f9c4010314c5a113c234. Just comment update since last review Tree-SHA512: 1f6daf34e51d3fbc802799bfa4ac0ef0d8f774db5f9e2f5d35df18a77679778475c94efc3da1fb723ebaf3583e4075e4a5cbe4a5104ad0c50e2b32076e247b29 --- src/test/util/index.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/test/util/index.cpp b/src/test/util/index.cpp index 89bc35b731..e653d5dbf0 100644 --- a/src/test/util/index.cpp +++ b/src/test/util/index.cpp @@ -5,11 +5,18 @@ #include #include +#include +#include #include void IndexWaitSynced(const BaseIndex& index) { while (!index.BlockUntilSyncedToCurrentChain()) { + // Assert shutdown was not requested to abort the test, instead of looping forever, in case + // there was an unexpected error in the index that caused it to stop syncing and request a shutdown. + Assert(!ShutdownRequested()); + UninterruptibleSleep(100ms); } + assert(index.GetSummary().synced); } From e3bbd1a46e6399b6c54e83e9a33288ef9d8b7642 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sun, 16 Jul 2023 19:34:28 +0100 Subject: [PATCH 17/18] Merge bitcoin-core/gui#740: Show own outputs on PSBT signing window 4da243ba023f2987e97fc62886c6ebc70d6ee50a qt: show own outputs on PSBT signing window (Hernan Marino) Pull request description: This fixes https://github.com/bitcoin-core/gui/issues/732 . It allows you to identify your own addresses in the outputs of a transaction in the PSBT signing window. This enables easy identification of change outputs, and prevents certain attacks where someone (co-signers of a multisig, or others ) might trick you into signing a transaction while they are stealing the change, since prior to this modification there was no easy way of knowing this. The identification of the output is similar to the way this is done in the transaction details window. A sample output is : ![image](https://github.com/bitcoin-core/gui/assets/87907936/48b8a652-7570-466b-9a34-cc0303c86d8c) ACKs for top commit: achow101: ACK 4da243ba023f2987e97fc62886c6ebc70d6ee50a jarolrod: ACK 4da243ba023f2987e97fc62886c6ebc70d6ee50a Tree-SHA512: fa9901d2acc84472c11afcd0a59a859db598cdf5cea755b492178d3e7434b70d9bd8f554928938a2ff9920c8f397fef814ce14b416556c30fba0c3c1f62cd722 --- src/qt/psbtoperationsdialog.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qt/psbtoperationsdialog.cpp b/src/qt/psbtoperationsdialog.cpp index 609f442bf2..25ac248e58 100644 --- a/src/qt/psbtoperationsdialog.cpp +++ b/src/qt/psbtoperationsdialog.cpp @@ -175,6 +175,8 @@ std::string PSBTOperationsDialog::renderTransaction(const PartiallySignedTransac tx_description.append(tr(" * Sends %1 to %2") .arg(BitcoinUnits::formatWithUnit(BitcoinUnits::DASH, out.nValue)) .arg(QString::fromStdString(EncodeDestination(address)))); + // Check if the address is one of ours + if (m_wallet_model != nullptr && m_wallet_model->wallet().txoutIsMine(out)) tx_description.append(" (" + tr("own address") + ")"); tx_description.append("
"); } From d573e4ff868a51f92b29edbd15e2f80c399866d1 Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 17 Jul 2023 13:14:23 +0100 Subject: [PATCH 18/18] Merge bitcoin/bitcoin#28084: doc: update windows `-fstack-clash-protection` doc 05ef059a333479e553382c2ae6ef6fde668ce3cb doc: update windows -fstack-clash-protection doc (fanquake) Pull request description: Now that changes have been made in GCC, to fix the build failures. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458. ACKs for top commit: TheCharlatan: ACK 05ef059a333479e553382c2ae6ef6fde668ce3cb hebasto: ACK 05ef059a333479e553382c2ae6ef6fde668ce3cb, I've verified that the fix commit is present in all branches starting from `gcc-11`. Tree-SHA512: 96b79d65b46e6b9d939c8e6079e984da86987503210106d5155dbe5a6fd82d56d9983694656e27156b01bab795c766b85fc60c799813bc676bba5f3b73f9be22 --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 929d264229..c23ad7948d 100644 --- a/configure.ac +++ b/configure.ac @@ -955,7 +955,8 @@ if test x$use_hardening != xno; then case $host in *mingw*) - dnl stack-clash-protection doesn't currently work, and likely should just be skipped for Windows. + dnl stack-clash-protection doesn't compile with GCC 10 and earlier. + dnl In any case, it is a no-op for Windows. dnl See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458 for more details. ;; *)