Commit Graph

34487 Commits

Author SHA1 Message Date
MacroFake
a55606c3bd
Merge bitcoin/bitcoin#25356: test: Remove MiniWallet mempool_valid option
fa779de665 test: Remove MiniWallet mempool_valid option (MacroFake)

Pull request description:

  It seems an unnecessary burden to force MiniWallet call-sites to figure out for each tx whether it is mempool valid or not. The result will only be used for internal sanity checks. So remove the option:

  * Replace the vsize sanity check with a call to `get_vsize()`.
  * Drop the fee check. Hopefully any future bug here will be caught by code-review or otherwise.

ACKs for top commit:
  theStack:
    Code-review ACK fa779de665

Tree-SHA512: df44a0e116a0b6b15389c80038f9b45e17f186d0e3d7b0925e367fd2cbbcab9a7a6f7add41859ffb5603885f304233a5d28fbd57a4008ebdfe5edbe83bb1d7c3
2022-06-13 22:15:07 +02:00
MacroFake
b91055ea55
Merge bitcoin/bitcoin#25251: Consolidate Windows ASLR workarounds for upstream secp256k1 changes
c41bfd1070 Squashed 'src/secp256k1/' changes from 8746600ee..44c2452fd (fanquake)
fbae8c59a2 compat: Consolidate mingw-w64 ASLR workaround for upstream libsecp changes (fanquake)

Pull request description:

  #18702 added a work around for `bitcoin-cli.exe`, to fix ASLR on Windows. ASLR was functioning for the rest of our binaries, mostly by accident, because:
  > [All other Windows binaries that we distribute (bitcoind, bitcoin-qt,
  bitcoin-wallet, bitcoin-tx and test_bitcoin) do not suffer this issue,
  and currently having working ASLR. This is due to them exporting
  (inadvertent or not) libsecp256k1 symbols, and, as a result, the .reloc
  section is not stripped by ld.](https://github.com/bitcoin/bitcoin/pull/18702)

  Upstream, libsecp256k1 has recently made a change to [no-longer export symbols in static libraries](https://github.com/bitcoin-core/secp256k1/pull/1105) (see related discussion in #25008). This would mean that on the next subtree update, anyone building using an older binutils (< 2.36) would be (silently) producing Windows binaries with non-functioning ASLR. Our release binaries would not be affected, as in our Guix environment we currently use binutils 2.37.

  To prevent users building with older binutils from silently losing ASLR on Windows, this PR applies our work around (export `main`) to the rest of our binaries, and updates the associated documentation to mention the affected binutils versions, so we know when it can be dropped.

  I've included both the libsecp256k1 subtree update, and the ASLR related changes in this PR. Happy to split the changes up if reviewers would prefer.

  Guix Build (x86_64):
  ```bash
  24fa1053fa3d310c4274f0700ac36f3c6e5b4486dc7f1aa7b2a5ded6937cf2b6  guix-build-913b1f2a5eb2/output/aarch64-linux-gnu/SHA256SUMS.part
  96c4150f93c1356dc02f3d383699bcd856da7f769344606324fdc111fbfa8031  guix-build-913b1f2a5eb2/output/aarch64-linux-gnu/bitcoin-913b1f2a5eb2-aarch64-linux-gnu-debug.tar.gz
  5e4adcaddf20a33cd4803e5a10f9a0653bcd40b1dfc7b680a741a17047103948  guix-build-913b1f2a5eb2/output/aarch64-linux-gnu/bitcoin-913b1f2a5eb2-aarch64-linux-gnu.tar.gz
  adfdac8fef797b13d845c13ab682611d0cc49a9772c2bd40f7aa6dbb1b4f11a8  guix-build-913b1f2a5eb2/output/arm-linux-gnueabihf/SHA256SUMS.part
  d51849bf907eecb168066a208b702314779fc12ae6fcaa8b5c2c3497e91820b9  guix-build-913b1f2a5eb2/output/arm-linux-gnueabihf/bitcoin-913b1f2a5eb2-arm-linux-gnueabihf-debug.tar.gz
  ca33ebed13316410d6d79e2db06f9bce8839fbc7216a5bc01a06745b2e470c2e  guix-build-913b1f2a5eb2/output/arm-linux-gnueabihf/bitcoin-913b1f2a5eb2-arm-linux-gnueabihf.tar.gz
  799fd15fa1e53d773a5ce391b7059920b54680591ee76bdc56bc7485a12d2af6  guix-build-913b1f2a5eb2/output/arm64-apple-darwin/SHA256SUMS.part
  0122eb5fdd4cce7077ee1a2bba8c5bd3557c1d3f12f2f2aad7216de33bea213e  guix-build-913b1f2a5eb2/output/arm64-apple-darwin/bitcoin-913b1f2a5eb2-arm64-apple-darwin-unsigned.dmg
  3a630cc96bf9a43cbb89976aabdddb7a9069f74320277a499f3bbb96526d9c5d  guix-build-913b1f2a5eb2/output/arm64-apple-darwin/bitcoin-913b1f2a5eb2-arm64-apple-darwin-unsigned.tar.gz
  e2530bab501750fd3d60776ba077bc4a8b145cc95e3a77105d86b388a1d961e1  guix-build-913b1f2a5eb2/output/arm64-apple-darwin/bitcoin-913b1f2a5eb2-arm64-apple-darwin.tar.gz
  f8fbc07221bd21f996dc29c65725740e9c2bfc9365367c806601f12b8e2d2691  guix-build-913b1f2a5eb2/output/dist-archive/bitcoin-913b1f2a5eb2.tar.gz
  fdbc8224d774f2428f037e65d9ac5728613cddee4ddcf6f1d144421cb1f37b3b  guix-build-913b1f2a5eb2/output/powerpc64-linux-gnu/SHA256SUMS.part
  c1098cba38aee264ee7de82be3d5f8c1ec2c915c30763292fa9b6dc37aba8de8  guix-build-913b1f2a5eb2/output/powerpc64-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64-linux-gnu-debug.tar.gz
  567b8bf896a79e2f1b4961ec4f6c3501e414822f84f6fb40c9e3546e67ab08ff  guix-build-913b1f2a5eb2/output/powerpc64-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64-linux-gnu.tar.gz
  cbd7713550c5922ee28e0915b0425dc702bb299ad6809ff60e389604f4da3a31  guix-build-913b1f2a5eb2/output/powerpc64le-linux-gnu/SHA256SUMS.part
  e50fa6e370602a956942703ab349808c01e7365a00faead941d9e6be3800c65c  guix-build-913b1f2a5eb2/output/powerpc64le-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64le-linux-gnu-debug.tar.gz
  2380fbdf6916769783a0e6c7848fb8d3b3cb5c44c26817009a8481e815098e3a  guix-build-913b1f2a5eb2/output/powerpc64le-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64le-linux-gnu.tar.gz
  a0fecb7b0d0a93aa15825572a0e1284f4776a5808f9f5eda7b2ddddaf2457fb2  guix-build-913b1f2a5eb2/output/riscv64-linux-gnu/SHA256SUMS.part
  14fe505f06de009b50c2b4ce0e0430ba09fa66385ff50aa90f9ed0b03a321e61  guix-build-913b1f2a5eb2/output/riscv64-linux-gnu/bitcoin-913b1f2a5eb2-riscv64-linux-gnu-debug.tar.gz
  98a70df9a6851d5221d8f8404f9656048ecf7cac2c9dffd2b6a55107783a60ad  guix-build-913b1f2a5eb2/output/riscv64-linux-gnu/bitcoin-913b1f2a5eb2-riscv64-linux-gnu.tar.gz
  decb20f8de61e3eeda7e8f6fefcbaf56593c37d989672c6e7e2cd5c8e982c342  guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/SHA256SUMS.part
  e14275e1bbbe54179fb68b50ed7c72de4c7ebc5b442c7793daf9974be523e8da  guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/bitcoin-913b1f2a5eb2-x86_64-apple-darwin-unsigned.dmg
  6bb2d9f6c8123156b0e11b73f67f4e4e780e6bccb739e600f4e9b06b29aa3832  guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/bitcoin-913b1f2a5eb2-x86_64-apple-darwin-unsigned.tar.gz
  1f0fab16e32e4c9892b272edf43beb8e5de60bf8a04f41744809dc2a31b4f1b9  guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/bitcoin-913b1f2a5eb2-x86_64-apple-darwin.tar.gz
  3d7e45c7189a8855ea8a0d498dcd4d3189aa01c528eac194300cdb59f79471f2  guix-build-913b1f2a5eb2/output/x86_64-linux-gnu/SHA256SUMS.part
  87b75a47a620dbd8ccf20768a3d82adf0b797ad86b7384cca62a7cf489b7a74c  guix-build-913b1f2a5eb2/output/x86_64-linux-gnu/bitcoin-913b1f2a5eb2-x86_64-linux-gnu-debug.tar.gz
  7e06af11bcef3ba6fd48501a09fbac86746537bad063f36caf39cd6bb857d3a8  guix-build-913b1f2a5eb2/output/x86_64-linux-gnu/bitcoin-913b1f2a5eb2-x86_64-linux-gnu.tar.gz
  c9ca794f7307df6f891008d92997719be95794f4670d018d0275f2a6c580d160  guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/SHA256SUMS.part
  7eb1551cdafc0a44e5b5fcea703c6eeb6fc0bca601b57ab52d1e5e62db3ccffc  guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64-debug.zip
  8ef87c85c520aef150f4c11a9082e8a0b1ac74c5b6f4fcdceb9e734eb8106bca  guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64-setup-unsigned.exe
  c5886ab3d6303bf8c946e4aafcfdfb5ee7dc9fbb50c34dfc5224db2f1f3b2a44  guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64-unsigned.tar.gz
  f473902cea9e763b98ad69c5dcfaa990430f9b0f777112af5f1d289492d8cefe  guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64.zip
  ```

  Guix Build (arm64):
  ```bash
  a175ce0055b206fe7b2752fa5ae33eed0f31236f7b37bbb530425532d88007c2  guix-build-913b1f2a5eb2/output/arm-linux-gnueabihf/SHA256SUMS.part
  1ab5d59685593eedbb59b5284d81cce568a6c9c900303f97c69e8194cb5bb7f5  guix-build-913b1f2a5eb2/output/arm-linux-gnueabihf/bitcoin-913b1f2a5eb2-arm-linux-gnueabihf-debug.tar.gz
  8d1b48d38b8af696b929ac077ba7e3dabb7c565862409b2f35db2217ab9bdb06  guix-build-913b1f2a5eb2/output/arm-linux-gnueabihf/bitcoin-913b1f2a5eb2-arm-linux-gnueabihf.tar.gz
  90230652cb39e2707ac79569899183dc1ff5d08c059e7a01d0c65144251679b5  guix-build-913b1f2a5eb2/output/arm64-apple-darwin/SHA256SUMS.part
  2b86da5e1ccebf348478ca69463d1be09c0f563ffa370ee5170c82ba706a7577  guix-build-913b1f2a5eb2/output/arm64-apple-darwin/bitcoin-913b1f2a5eb2-arm64-apple-darwin-unsigned.dmg
  648e968dbf3af3bf8a79d714f4395091058e2ff4294b202a0dc9b5e0092b4732  guix-build-913b1f2a5eb2/output/arm64-apple-darwin/bitcoin-913b1f2a5eb2-arm64-apple-darwin-unsigned.tar.gz
  bebe7ed21e4f74866ca99be31839beff01eac57afbaa2878f5c6637f0239c631  guix-build-913b1f2a5eb2/output/arm64-apple-darwin/bitcoin-913b1f2a5eb2-arm64-apple-darwin.tar.gz
  f8fbc07221bd21f996dc29c65725740e9c2bfc9365367c806601f12b8e2d2691  guix-build-913b1f2a5eb2/output/dist-archive/bitcoin-913b1f2a5eb2.tar.gz
  87156fe1fb397eaa1d1f15c36f2677b6aeb32eefac02202b2735f7d3165fceb1  guix-build-913b1f2a5eb2/output/powerpc64-linux-gnu/SHA256SUMS.part
  5f06e885564780d7dce78cc8cbb21b8dd5addba8b90bb2b8a7f03e946b6ed633  guix-build-913b1f2a5eb2/output/powerpc64-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64-linux-gnu-debug.tar.gz
  95b9c0a7d82e7055c99d013fa183abf654caf14539c5ec9cfe785838f45747fc  guix-build-913b1f2a5eb2/output/powerpc64-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64-linux-gnu.tar.gz
  8da6f0fb2bdc492f96ee70ca323787521e7fce7ebe2b9adb43b7b6ae56ff1916  guix-build-913b1f2a5eb2/output/powerpc64le-linux-gnu/SHA256SUMS.part
  a60623ac5bb76b3eae3129b4f32fe7287e526e043bd2e58f80ce5fccf91ef20c  guix-build-913b1f2a5eb2/output/powerpc64le-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64le-linux-gnu-debug.tar.gz
  c9bbdca3c41c3783d57734e0fda875a6353bbf8fec8c8e61f037259acaad28cd  guix-build-913b1f2a5eb2/output/powerpc64le-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64le-linux-gnu.tar.gz
  5f76aef2eed312153b60712450b4376b4965c2b0c86d2ddfc0b7f3d23fb31eee  guix-build-913b1f2a5eb2/output/riscv64-linux-gnu/SHA256SUMS.part
  40ad7ca605bb75e153a481a455b344f27d9c0b713f1312fc2a7703116508a127  guix-build-913b1f2a5eb2/output/riscv64-linux-gnu/bitcoin-913b1f2a5eb2-riscv64-linux-gnu-debug.tar.gz
  6031d28d6405f03b685884fdee6c2cc2126afffdc867ab743ca0c9cfcad81ac2  guix-build-913b1f2a5eb2/output/riscv64-linux-gnu/bitcoin-913b1f2a5eb2-riscv64-linux-gnu.tar.gz
  decb20f8de61e3eeda7e8f6fefcbaf56593c37d989672c6e7e2cd5c8e982c342  guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/SHA256SUMS.part
  e14275e1bbbe54179fb68b50ed7c72de4c7ebc5b442c7793daf9974be523e8da  guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/bitcoin-913b1f2a5eb2-x86_64-apple-darwin-unsigned.dmg
  6bb2d9f6c8123156b0e11b73f67f4e4e780e6bccb739e600f4e9b06b29aa3832  guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/bitcoin-913b1f2a5eb2-x86_64-apple-darwin-unsigned.tar.gz
  1f0fab16e32e4c9892b272edf43beb8e5de60bf8a04f41744809dc2a31b4f1b9  guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/bitcoin-913b1f2a5eb2-x86_64-apple-darwin.tar.gz
  b90d8c7252fd42809ac9bf8c7e5cf9c9207f7412314e9e6904ee2e51222bc8c5  guix-build-913b1f2a5eb2/output/x86_64-linux-gnu/SHA256SUMS.part
  b6cbcd305a9b6b8dcc6be71703745835c9e3e7652a3f3b18e7018f5ddb0fc26d  guix-build-913b1f2a5eb2/output/x86_64-linux-gnu/bitcoin-913b1f2a5eb2-x86_64-linux-gnu-debug.tar.gz
  6da0cf8fedd9c285926c132102d1e8f9d6fde7e0ecdac3ba159a3464fc2e98c0  guix-build-913b1f2a5eb2/output/x86_64-linux-gnu/bitcoin-913b1f2a5eb2-x86_64-linux-gnu.tar.gz
  30d2b25cdfce03edc2bfb8d39dcdcc6636ed3637cc0176f43f715dc795ab929e  guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/SHA256SUMS.part
  6028017fabcddac50857667d63da979b04a6dc331a26715f875e2db96b8935d7  guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64-debug.zip
  8ef87c85c520aef150f4c11a9082e8a0b1ac74c5b6f4fcdceb9e734eb8106bca  guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64-setup-unsigned.exe
  c5886ab3d6303bf8c946e4aafcfdfb5ee7dc9fbb50c34dfc5224db2f1f3b2a44  guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64-unsigned.tar.gz
  4af0477e156b9a0c6fa1754ba7446b8c6c021075531aa4051980e47fa586e196  guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64.zip
  ```

  Symbol exporting as of this PR (`bitcoind.exe`):
  ```bash
  Export Table:
   DLL name: bitcoind.exe
   Ordinal base: 1
   Ordinal      RVA  Name
         1 0xa09670  main
  ```

  Symbol exporting in the 23.0 bins (`bitcoind.exe`):
  ```bash
  Export Table:
   DLL name: bitcoind.exe
   Ordinal base: 1
   Ordinal      RVA  Name
         1 0x5569f0  secp256k1_context_clone
         2 0x556890  secp256k1_context_create
         3 0x556bd0  secp256k1_context_destroy
         4 0xa12710  secp256k1_context_no_precomp
         5 0x556900  secp256k1_context_preallocated_clone
         6 0x556740  secp256k1_context_preallocated_clone_size
         7 0x556750  secp256k1_context_preallocated_create
         8 0x556ae0  secp256k1_context_preallocated_destroy
         9 0x556710  secp256k1_context_preallocated_size
        10 0x5589c0  secp256k1_context_randomize
        11 0x556c80  secp256k1_context_set_error_callback
        12 0x556c20  secp256k1_context_set_illegal_callback
        13 0x558260  secp256k1_ec_privkey_negate
        14 0x5584e0  secp256k1_ec_privkey_tweak_add
        15 0x558730  secp256k1_ec_privkey_tweak_mul
        16 0x5572a0  secp256k1_ec_pubkey_cmp
        17 0x5589f0  secp256k1_ec_pubkey_combine
        18 0x557f40  secp256k1_ec_pubkey_create
        19 0x558270  secp256k1_ec_pubkey_negate
        20 0x556dc0  secp256k1_ec_pubkey_parse
        21 0x5570d0  secp256k1_ec_pubkey_serialize
        22 0x5584f0  secp256k1_ec_pubkey_tweak_add
        23 0x558740  secp256k1_ec_pubkey_tweak_mul
        24 0x558100  secp256k1_ec_seckey_negate
        25 0x5583a0  secp256k1_ec_seckey_tweak_add
        26 0x5585f0  secp256k1_ec_seckey_tweak_mul
        27 0x557ed0  secp256k1_ec_seckey_verify
        28 0x559120  secp256k1_ecdsa_recover
        29 0x558f50  secp256k1_ecdsa_recoverable_signature_convert
        30 0x558d00  secp256k1_ecdsa_recoverable_signature_parse_compact
        31 0x558e70  secp256k1_ecdsa_recoverable_signature_serialize_compact
        32 0x557da0  secp256k1_ecdsa_sign
        33 0x558fe0  secp256k1_ecdsa_sign_recoverable
        34 0x557ab0  secp256k1_ecdsa_signature_normalize
        35 0x557540  secp256k1_ecdsa_signature_parse_compact
        36 0x5573b0  secp256k1_ecdsa_signature_parse_der
        37 0x557a10  secp256k1_ecdsa_signature_serialize_compact
        38 0x557660  secp256k1_ecdsa_signature_serialize_der
        39 0x557bf0  secp256k1_ecdsa_verify
        40 0x5598a0  secp256k1_keypair_create
        41 0x559af0  secp256k1_keypair_pub
        42 0x559a60  secp256k1_keypair_sec
        43 0x559bc0  secp256k1_keypair_xonly_pub
        44 0x559d20  secp256k1_keypair_xonly_tweak_add
        45 0xa9e0c0  secp256k1_nonce_function_bip340
        46 0xa9e0e0  secp256k1_nonce_function_default
        47 0xa9e0e8  secp256k1_nonce_function_rfc6979
        48 0x559f00  secp256k1_schnorrsig_sign
        49 0x559f30  secp256k1_schnorrsig_sign_custom
        50 0x559fd0  secp256k1_schnorrsig_verify
        51 0x556ce0  secp256k1_scratch_space_create
        52 0x556d50  secp256k1_scratch_space_destroy
        53 0x558c20  secp256k1_tagged_sha256
        54 0x559470  secp256k1_xonly_pubkey_cmp
        55 0x559530  secp256k1_xonly_pubkey_from_pubkey
        56 0x559290  secp256k1_xonly_pubkey_parse
        57 0x5593a0  secp256k1_xonly_pubkey_serialize
        58 0x559650  secp256k1_xonly_pubkey_tweak_add
        59 0x559780  secp256k1_xonly_pubkey_tweak_add_check
  ```

ACKs for top commit:
  laanwj:
    Code review ACK 913b1f2a5e
  theuni:
    ACK 913b1f2a5e

Tree-SHA512: d3811c5731fab05bb68af72b7af231de8505b026bd1b2cd710e3e60386e793c2743412529142aa9893893f9d24c6e94dbac48ea59451bf55ae637d2e75e2b0a9
2022-06-13 21:43:39 +02:00
MacroFake
fa779de665
test: Remove MiniWallet mempool_valid option 2022-06-13 18:09:16 +02:00
MacroFake
506d9b25a3
Merge bitcoin/bitcoin#24839: test: use MiniWallet for mining_prioritisetransaction.py
b167e536d0 test: refactor: use `create_lots_of_big_transactions` to dedup where possible (Sebastian Falbesoner)
8973eeb412 test: use MiniWallet for mining_prioritisetransaction.py (Sebastian Falbesoner)

Pull request description:

  This PR enables one more of the non-wallet functional tests (mining_prioritisetransaction.py) to be run even with the Bitcoin Code wallet by using the MiniWallet instead, as proposed in #20078. Note that the adapted helper function `create_lots_of_big_transactions` is currently only used in this test, i.e. there was no need to change any others.

ACKs for top commit:
  ayush933:
    tACK b167e53
  danielabrozzoni:
    tACK b167e536d0
  kouloumos:
    ACK b167e536d0
  furszy:
    ACK b167e536

Tree-SHA512: ccae20d7d414a720efdeea9c2ae399aa53a3a0e7db72bff8d0cb75d90621a7ae7c019ba68d24f9d06f7b111f87ff33bb9d8e5aa08b763e606cf10268780e205c
2022-06-13 17:59:01 +02:00
Sjors Provoost
14093d5d24
doc: add distcc to productivity notes 2022-06-13 16:13:11 +02:00
Luke Dashjr
7862c4ac4e RPC/blockchain: Reorder result documentation for scantxoutset
start, abort, status (with result), and status (no result) makes more logical sense
2022-06-13 14:09:48 +00:00
Luke Dashjr
98718d03be scripted-diff: RPC/blockchain: Lowercase "when" in scantxoutset documentation
-BEGIN VERIFY SCRIPT-
sed -i -e 's/"When /"when /' $(git grep -l 'RPCResult{"When ')
-END VERIFY SCRIPT-
2022-06-13 14:08:30 +00:00
Luke Dashjr
b283e4d823 RPC/blockchain: Elaborate on scantxoutset documentation 2022-06-13 14:05:06 +00:00
fanquake
b8c146b877
build: systemtap 4.7
From 4.6, SystemTap now supports 64-bit RISC-V.

* What's new in version 4.6, 2021-11-15
- SystemTap has added support for the 64-bit RISC-V architecture.
2022-06-13 14:43:06 +01:00
MacroFake
3340d46cd3
Merge bitcoin/bitcoin#25352: test: Fix previous release binary download script for Apple ARM64
5733ae51ce test: Fix previous release binary download script for Apple ARM64 (Fabian Jahr)

Pull request description:

  The Apple M1 chip binaries at https://bitcoincore.org/bin/bitcoin-core-23.0/ are use `arm64` and not `aarch64` in the file name. This means on my M1 Macbook the v23 binary could not be downloaded: "Binary tag was not found".

  This changes the script to map the `aarch64` from the host detection to `arm64`.

ACKs for top commit:
  fanquake:
    ACK 5733ae51ce

Tree-SHA512: bd70c5361c8b549363b11be770ad285f885787ec8781f51a69c1ebbfd08f762ac6ec4d5a92c0d83ce3c8bfb7fc72750c25d42092666d00cc372e62de0f052171
2022-06-13 15:23:59 +02:00
brunoerg
216c9b00ec test: passing a value below 5 MB to -maxmempool should throw an error 2022-06-13 09:58:22 -03:00
laanwj
5174a139c9
Merge bitcoin/bitcoin#25313: guix: re-revert risc-v execstack workaround
2dcf3e153f guix: re-revert riscv execstack workaround (fanquake)

Pull request description:

  Now that we use GCC 10 for release builds, we no-longer need to
  pass `-Wl,-z,noexecstack` to get a non-executable stack in RISC-V binaries.

  This was originally removed in #21036, but then re-added in #21799, when
  we reverted to using GCC 8.

  Guix Build (arm64):
  ```bash
  0655a94f88e8e89b1e048ae96e99c7dd45aed32011fe4ed9d03d0d1dfa073650  guix-build-2dcf3e153fbc/output/arm-linux-gnueabihf/SHA256SUMS.part
  7c803347073839e2c7d8c1260e691964ab00b149da506edda4dc693df8e7f345  guix-build-2dcf3e153fbc/output/arm-linux-gnueabihf/bitcoin-2dcf3e153fbc-arm-linux-gnueabihf-debug.tar.gz
  3b9ce2f349b9a4a463f66c9a2838e8490d4990c5b8dea9ad458b0bafeba8d1ac  guix-build-2dcf3e153fbc/output/arm-linux-gnueabihf/bitcoin-2dcf3e153fbc-arm-linux-gnueabihf.tar.gz
  557c01453e3cedf6ef171715a02fe63abd7223f779a8c9b94ddc9ec17a4a45e4  guix-build-2dcf3e153fbc/output/arm64-apple-darwin/SHA256SUMS.part
  26fcdbd10ad372ef541f519cc4990bdb5d513b51b05252ce9bde6e84258157b9  guix-build-2dcf3e153fbc/output/arm64-apple-darwin/bitcoin-2dcf3e153fbc-arm64-apple-darwin-unsigned.dmg
  b145a9f6716f8e7f8c23d247fa82a02e4e7b76bebb17d55a1190448d0db5ab23  guix-build-2dcf3e153fbc/output/arm64-apple-darwin/bitcoin-2dcf3e153fbc-arm64-apple-darwin-unsigned.tar.gz
  f172cd4c799a7ab065a36829fb8d546e83ce6791d9cb326d7cef14ad74d63d7a  guix-build-2dcf3e153fbc/output/arm64-apple-darwin/bitcoin-2dcf3e153fbc-arm64-apple-darwin.tar.gz
  9a6c886a0bc81e729e3bb50dd972e10c8d4563bcbd917a9ba9c418a6fbe2de71  guix-build-2dcf3e153fbc/output/dist-archive/bitcoin-2dcf3e153fbc.tar.gz
  254a11143d61aeb98749cd405ed307cca77e80198d58b7bb669ef9490cc8eaf6  guix-build-2dcf3e153fbc/output/powerpc64-linux-gnu/SHA256SUMS.part
  83d7dc51404e328f6965f4d2da0b76fbe0a712d48465d6713348e0c4eb314a0a  guix-build-2dcf3e153fbc/output/powerpc64-linux-gnu/bitcoin-2dcf3e153fbc-powerpc64-linux-gnu-debug.tar.gz
  522b98c63ab76dac6083a17f6b8f8173e9683f7d79e6f46b0a2e56c48e841a02  guix-build-2dcf3e153fbc/output/powerpc64-linux-gnu/bitcoin-2dcf3e153fbc-powerpc64-linux-gnu.tar.gz
  96053b629ba60446f499d19400a25913932a02920bad963aaa12f1b6337b9f6e  guix-build-2dcf3e153fbc/output/powerpc64le-linux-gnu/SHA256SUMS.part
  147f0b1d07b986879a859e6d6186c339085bcfcac4c5fe30586f94e0ab09ce77  guix-build-2dcf3e153fbc/output/powerpc64le-linux-gnu/bitcoin-2dcf3e153fbc-powerpc64le-linux-gnu-debug.tar.gz
  c916680e75fb265e4099244cb876c2535c45981fbba9cfef9ad47c3aa58bc60b  guix-build-2dcf3e153fbc/output/powerpc64le-linux-gnu/bitcoin-2dcf3e153fbc-powerpc64le-linux-gnu.tar.gz
  b90329d8531afb450678ec3d0981d3b1542f7b17d2feb0f2630216d0479630ad  guix-build-2dcf3e153fbc/output/riscv64-linux-gnu/SHA256SUMS.part
  c77f02947d57ad2b841d594dca55271c9aecc1ef03f55371e0109ccaa5782aba  guix-build-2dcf3e153fbc/output/riscv64-linux-gnu/bitcoin-2dcf3e153fbc-riscv64-linux-gnu-debug.tar.gz
  234f54da9df09ef2f330be016d58ab11e81e49644db01b6093050b5fcd5c5c82  guix-build-2dcf3e153fbc/output/riscv64-linux-gnu/bitcoin-2dcf3e153fbc-riscv64-linux-gnu.tar.gz
  637f4a77d17493b319fb404e91c949373e0105caff61200f2a62729ca515f6de  guix-build-2dcf3e153fbc/output/x86_64-apple-darwin/SHA256SUMS.part
  6cbe6c91e0a35df9f92af461f68f823c7d12c37237c33e0169825ba56eb9a7c3  guix-build-2dcf3e153fbc/output/x86_64-apple-darwin/bitcoin-2dcf3e153fbc-x86_64-apple-darwin-unsigned.dmg
  b9b8cc7317e62a34f2286e07f743d4274b7ad00e93653e281257fc3bc068f30c  guix-build-2dcf3e153fbc/output/x86_64-apple-darwin/bitcoin-2dcf3e153fbc-x86_64-apple-darwin-unsigned.tar.gz
  b846df40c5a956ca02a017fbd2b97bc39caba876f7b6ad080ba1962b9092cb0d  guix-build-2dcf3e153fbc/output/x86_64-apple-darwin/bitcoin-2dcf3e153fbc-x86_64-apple-darwin.tar.gz
  5260fe7678567af5e73d296bfb115e09cc352e039fa6ae41007a6a93a5d1d6fd  guix-build-2dcf3e153fbc/output/x86_64-linux-gnu/SHA256SUMS.part
  2ddbf9afe86ff3bcde44a6beb8e1fa2a8b9a35ceae33aa1633878d8c7f611939  guix-build-2dcf3e153fbc/output/x86_64-linux-gnu/bitcoin-2dcf3e153fbc-x86_64-linux-gnu-debug.tar.gz
  a21eb3ad0671d3f09ce3b1e5263ba6cd9ea56f2c51d849bc39010b9c2b273ebf  guix-build-2dcf3e153fbc/output/x86_64-linux-gnu/bitcoin-2dcf3e153fbc-x86_64-linux-gnu.tar.gz
  0043277076a16b2baf5dc1957c2e176d5c5d95abe693b3d6bd6dec7ccb9f5481  guix-build-2dcf3e153fbc/output/x86_64-w64-mingw32/SHA256SUMS.part
  c7271c7ee7361c2f3349a00fd444fcfd42b07dbe77905a5570366312ba413fbc  guix-build-2dcf3e153fbc/output/x86_64-w64-mingw32/bitcoin-2dcf3e153fbc-win64-debug.zip
  19197d3abd2f422ad860a888578369da453509be3f8cab04cbf80055263b83c9  guix-build-2dcf3e153fbc/output/x86_64-w64-mingw32/bitcoin-2dcf3e153fbc-win64-setup-unsigned.exe
  21bfae266d684e95ebe8bcf40102c3ee8468e3d7364f6d6c5c6dd9dfc06b376a  guix-build-2dcf3e153fbc/output/x86_64-w64-mingw32/bitcoin-2dcf3e153fbc-win64-unsigned.tar.gz
  2feb16aab1fb0007670f816b1e25bff031acca01f68e3b5a8b20d13b60542b48  guix-build-2dcf3e153fbc/output/x86_64-w64-mingw32/bitcoin-2dcf3e153fbc-win64.zip
  ```

ACKs for top commit:
  laanwj:
    ACK 2dcf3e153f
  hebasto:
    ACK 2dcf3e153f

Tree-SHA512: 04dd2fcd731c6370a903bdc4bff493ed3f4b2c853be47da1a1f8838a6f6b69333464181ea945d513247a81fab1c798b3d2ad61aa8b23314890d9bd83b2f55873
2022-06-13 09:26:43 +02:00
Fabian Jahr
5733ae51ce
test: Fix previous release binary download script for Apple ARM64 2022-06-12 19:19:36 +02:00
Hennadii Stepanov
37633d2f61
Merge bitcoin-core/gui#602: Unify bitcoin-qt and bitcoind persistent settings
e47c6c7656 Reset settings.json when GUI options are reset (Ryan Ofsky)
99ccc02b65 Add release notes about unified bitcoin-qt and bitcoind persistent settings (Ryan Ofsky)
504b06b1de Migrate -lang setting from QSettings to settings.json (Ryan Ofsky)
9a016a3c07 Migrate -prune setting from QSettings to settings.json (Ryan Ofsky)
f067e19433 Migrate -proxy and -onion settings from QSettings to settings.json (Ryan Ofsky)
a09e3b7cf2 Migrate -listen and -server settings from QSettings to settings.json (Ryan Ofsky)
d2ada6e635 Migrate -upnp and -natpmp settings from QSettings to settings.json (Ryan Ofsky)
1dc4fc29c1 Migrate -spendzeroconfchange and -signer settings from QSettings to settings.json (Ryan Ofsky)
a7ef6d5975 Migrate -par setting from QSettings to settings.json (Ryan Ofsky)
284f339de6 Migrate -dbcache setting from QSettings to settings.json (Ryan Ofsky)

Pull request description:

  If a setting like pruning, port mapping, or a network proxy is enabled in the GUI, it will now be stored in the bitcoin persistent setting file in the datadir and shared with bitcoind, instead of being stored as Qt settings which end up in the the windows registry or platform specific config files and are ignored by bitcoind.

  This PR has been split off from bitcoin/bitcoin#15936 so some review of these commits previously took place in that PR.

ACKs for top commit:
  furszy:
    Code review ACK e47c6c76
  hebasto:
    ACK e47c6c7656

Tree-SHA512: 076ea7c7efe67805b4a357113bfe1643dce364d0032774106de59566a0ed5771d57a5923920085e03d686beb34b98114bd278555dfdf8bb7af0b778b0f35b7d2
2022-06-12 14:59:14 +02:00
Hennadii Stepanov
7ab72b9d2a
qt: Fix BitcoinAmountField's base widget 2022-06-12 13:40:48 +02:00
Hennadii Stepanov
3262542104
qt, refactor: Fix sendcoinsentry.ui indentation 2022-06-12 13:40:48 +02:00
Hennadii Stepanov
f3c7603329
qt, refactor: Convert SendCoinsEntry to a sub-QWidget
It is no longer needed to derive the `SendCoinsEntry` class from the
`QStackedWidget` one.
2022-06-12 13:40:46 +02:00
Hennadii Stepanov
9ef180a0ab
Merge bitcoin-core/gui#608: wallet, refactor: Make WalletModel::sendCoins() return void
1f653dc262 qt, wallet, refactor: Make `WalletModel::sendCoins()` return `void` (Hennadii Stepanov)

Pull request description:

  Currently, the `WalletModel::sendCoins()` function always returns the same value.

  Also dead and noop (calling `processSendCoinsReturn(OK)`) code has been removed.

  The other `return` statements have been removed from the `WalletModel::sendCoins()` function in bitcoin/bitcoin#17154 and bitcoin/bitcoin#17165.

ACKs for top commit:
  kristapsk:
    cr ACK 1f653dc262
  furszy:
    Code review ACK 1f653dc2
  shaavan:
    Code Review ACK 1f653dc262
  w0xlt:
    Code Review ACK 1f653dc262

Tree-SHA512: 2b59495a7fc10b4de30fcc63fc3af92d50406e16031112eb72494736dce193ac1fbac0802623496cf81edcd16766e1647d9c4f3a607b3eb84cc50e273b999c04
2022-06-12 13:33:55 +02:00
fanquake
913b1f2a5e
Update secp256k1 subtree to latest upstream master 2022-06-11 14:55:18 +01:00
fanquake
c41bfd1070 Squashed 'src/secp256k1/' changes from 8746600ee..44c2452fd
44c2452fd Merge bitcoin-core/secp256k1#1105: Don't export symbols in static libraries
6f6cab998 abi: Don't export symbols in static Windows libraries
485f608fa Merge bitcoin-core/secp256k1#1104: Fix the false positive of `SECP_64BIT_ASM_CHECK`
8b013fce5 Merge bitcoin-core/secp256k1#1056: Save negations in var-time group addition
7efc9835a Fix the false positive of `SECP_64BIT_ASM_CHECK`
2f984ffc4 Save negations in var-time group addition

git-subtree-dir: src/secp256k1
git-subtree-split: 44c2452fd387f7ca604ab42d73746e7d3a44d8a2
2022-06-11 14:55:18 +01:00
fanquake
fbae8c59a2
compat: Consolidate mingw-w64 ASLR workaround for upstream libsecp changes
Achieve this by adding a MAIN_FUNCTION macro, consolidating the docs, and
introducing the macro across our distributed binaries.

Also update the docs to explain that anyone using binutils < 2.36 is
effected by this issue. Release builds are not, because they use binutils
2.37. Currently LTS Linux distros, like Ubuntu Focal, ship with 2.34.

https://packages.ubuntu.com/focal/binutils
2022-06-11 14:55:13 +01:00
MacroFake
b71d37da2c
Merge bitcoin/bitcoin#25333: test: Fix out-of-range port collisions
fa7a711a30 test: Fix out-of-range port collisions (MacroFake)

Pull request description:

  Otherwise the test will fail if two tests running in parallel use the same port. See https://github.com/bitcoin/bitcoin/pull/25096#discussion_r892558783 and https://github.com/bitcoin/bitcoin/pull/25312

ACKs for top commit:
  dergoegge:
    ACK fa7a711a30 - This gets rid of some rather arbitrary choices for ports in some of our functional tests that can cause port collisions across test runs, resulting in intermittent failures.

Tree-SHA512: ac73da8a498230b992ab12e1ee3c4ff3d868cd63c00d2c71537d156cb7c8f8be8598ec574646b17c5a44ae3ac5bb54bf29d300f054a36cec6f6ce8054a0da0a4
2022-06-10 17:17:31 +02:00
Martin Zumsande
99b9e5f3a9 p2p: always set nTime for self-advertisements
If we self-advertised to an inbound peer with the address they gave us,
nTime was left default-initialized, so that our peer wouldn't relay it
any further along.
2022-06-10 10:50:07 -04:00
MacroFake
8f3ab9a1b1
Merge bitcoin/bitcoin#24931: Strengthen thread safety assertions
ce893c0497 doc: Update developer notes (Anthony Towns)
d2852917ee sync.h: Imply negative assertions when calling LOCK (Anthony Towns)
bba87c0553 scripted-diff: Convert global Mutexes to GlobalMutexes (Anthony Towns)
a559509a0b sync.h: Add GlobalMutex type (Anthony Towns)
be6aa72f9f qt/clientmodel: thread safety annotation for m_cached_tip_mutex (Anthony Towns)
f24bd45b37 net_processing: thread safety annotation for m_tx_relay_mutex (Anthony Towns)

Pull request description:

  This changes `LOCK(mutex)` for non-global, non-recursive mutexes to be annotated with the negative capability for the mutex it refers to, to prevent . clang applies negative capabilities recursively, so this helps avoid forgetting to annotate functions.

  This can't reasonably be used for globals, because clang would require every function to be annotated with `EXCLUSIVE_LOCKS_REQUIRED(!g_mutex)` for each global mutex; so this introduces a trivial `GlobalMutex` subclass of `Mutex`, and reduces the annotations for both `GlobalMutex`  to `LOCKS_EXCLUDED` which only catches trivial errors (eg (`LOCK(x); LOCK(x);`).

ACKs for top commit:
  MarcoFalke:
    review ACK ce893c0497 🐦
  hebasto:
    ACK ce893c0497

Tree-SHA512: 5c35e8c7677ce3d994a7e3774f4344adad496223a51b3a1d1d3b5f20684b2e1d5cff688eb3fbc8d33e1b9940dfa76e515f9434e21de6f3ce3c935e29a319f529
2022-06-10 16:42:53 +02:00
MacroFake
fa7a711a30
test: Fix out-of-range port collisions 2022-06-10 15:56:07 +02:00
Oskar Mendel
1cb42aeda3
util: modify Win32LockedPageAllocator to query windows for limit 2022-06-10 14:44:23 +02:00
fanquake
491bb14c0c
build: test for timingsafe_bcmp
Code introduced in #15649 added usage of `timingsafe_bcmp()`, if
available, otherwise falling back to our own implementation. However
the relevant build system check was never added, so currently, we'll
always just use our implementation, as HAVE_TIMINGSAFE_BCMP will never
be defined.

Add the check for timingsafe_bcmp. Note that as far as I'm aware, it's
only available on OpenBSD.
2022-06-10 12:39:08 +01:00
MacroFake
c3daa321f9
Merge bitcoin/bitcoin#25312: test: Fix port collisions caused by p2p_getaddr_caching.py
ea54ba2f42 [test] Fix port collisions caused by p2p_getaddr_caching.py (dergoegge)
f9682e75ac [test_framework] Set PortSeed.n directly after initialising params (dergoegge)

Pull request description:

  This PR fixes the issue mentioned [here](https://github.com/bitcoin/bitcoin/pull/25096#discussion_r892558783), to avoid port collisions between nodes spun up by the test framework.

Top commit has no ACKs.

Tree-SHA512: ec9159f0af90db636f7889d664c24e1430cf2bcb3c02a9ab2dcfe531b2a4d18f6e3a0f8ba73071bdf2f7db518df9d5d86a9cd06695e67644d20fe4515fac32b7
2022-06-10 12:37:27 +02:00
Vasil Dimov
6e68ccbefe
net: use Sock::WaitMany() instead of CConnman::SocketEvents()
Rename `GenerateSelectSet()` to `GenerateWaitSockets()` and adapt it to
generate a wait data suitable for `Sock::WaitMany()`. Then call it from
`CConnman::SocketHandler()` and feed the generated data to
`Sock::WaitMany()`.

This way `CConnman::SocketHandler()` can be unit tested because
`Sock::WaitMany()` is mockable, so the usage of real sockets can be
avoided.

Resolves https://github.com/bitcoin/bitcoin/issues/21744
2022-06-09 16:20:24 +02:00
fanquake
e3c08eb620
Merge bitcoin/bitcoin#25307: doc: fix typo in kernel/context.h and add desig to ignore-words
d575413fb8 doc: add `desig` to ignore-words (brunoerg)
c06cc41ddb doc: fix typo in kernel/context.h (brunoerg)

Pull request description:

  This PR fixes a typo in `kernel/context.h` (libary => library) and add `desig` to ignore-words since it's a valid word, see:
  b9416c3847/src/net.cpp (L1105-L1117)

ACKs for top commit:
  fanquake:
    ACK d575413fb8

Tree-SHA512: 2d548c737b8184d0243445c7503f3f68256ecb0970bd834d52de099de3cd8c8b9c140e2b77d55e2542fbd45b1d21cbdee639f5b2ef8138c37b8b72e5211029c3
2022-06-09 13:24:00 +01:00
Vasil Dimov
ae263460ba
net: introduce Sock::WaitMany()
It allows waiting concurrently on more than one socket. Being a
`virtual` `Sock` method it can be overriden by tests.

Will be used to replace `CConnman::SocketEvents()`.
2022-06-09 14:20:18 +02:00
brunoerg
d575413fb8 doc: add desig to ignore-words 2022-06-09 09:16:34 -03:00
Vasil Dimov
cc74459768
net: also wait for exceptional events in Sock::Wait()
This mimics closely `CConnman::SocketEvents()` and the underlying
`poll(2)`.
2022-06-09 13:34:27 +02:00
fanquake
9edc5133d4
Merge bitcoin/bitcoin#25303: refactor: Remove redundant addrman time checks
8888bd43c1 Remove redundant nLastTry check (MarcoFalke)
00001e57fe Remove redundant nTime checks (MarcoFalke)

Pull request description:

  Split out from https://github.com/bitcoin/bitcoin/pull/24697 because it makes sense on its own.

ACKs for top commit:
  dergoegge:
    re-ACK 8888bd43c1
  naumenkogs:
    utACK 8888bd43c1

Tree-SHA512: 32c6cde1c71e943c76b7991c2c24caf29ae467ab4ea2d758483a0cee64625190d1a833b468e8eab1f834beeb2c365af96552c14b05270f08cf63790e0707581d
2022-06-09 12:28:25 +01:00
dergoegge
ea54ba2f42 [test] Fix port collisions caused by p2p_getaddr_caching.py 2022-06-08 21:00:45 +02:00
dergoegge
f9682e75ac [test_framework] Set PortSeed.n directly after initialising params
This allows us to use `p2p_port()` with `set_test_params()`.
2022-06-08 21:00:18 +02:00
MacroFake
455780b1ae
Merge bitcoin/bitcoin#25294: test: Fix wait_for_debug_log UnicodeDecodeError
fa74b63c01 test: Fix wait_for_debug_log UnicodeDecodeError (MacroFake)

Pull request description:

  Fix the intermittent `UnicodeDecodeError` when the debug log is truncated on an (multi-byte) unicode character by treating everything as bytes.

  Also, remove the `ignore_case` option and the`re.search+re.escape` wrap. All of this is unused and doesn't exist on raw byte strings.

  Fixes https://github.com/bitcoin/bitcoin/issues/24575

ACKs for top commit:
  jonatack:
    ACK fa74b63c01
  brunoerg:
    ACK fa74b63c01

Tree-SHA512: c67c9355073e784fa8d9d48b8e79ff0c98f5ae9cd4d704ad12a76d2604733946054bc74b8ab346aa2184db23d740b85c8c13eb892d76cba92e42ebfd73f2f1bf
2022-06-08 17:53:06 +02:00
MacroFake
2e079c86ae
Merge bitcoin/bitcoin#24395: build: use BOOST_MULTI_INDEX_ENABLE_SAFE_MODE when debugging
06e18e0b53 build: use BOOST_MULTI_INDEX_ENABLE_SAFE_MODE when debugging (fanquake)

Pull request description:

  Use of this macro enables precondition checks for iterators and functions of the library. It's use is recommended in debug builds. See https://www.boost.org/doc/libs/1_78_0/libs/multi_index/doc/tutorial/debug.html for more info.

  There is also a `BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING` macro:
  > When this mode is in effect, all public functions of Boost.MultiIndex will perform post-execution tests aimed at ensuring that the basic internal invariants of the data structures managed are preserved.

ACKs for top commit:
  laanwj:
    Concept and code review ACK 06e18e0b53

Tree-SHA512: 7ee489eccda81c7dbca9210af6d3007d5b2c704b645139d2714c077af157789dd9478c29d0d212e210e96686ea83713aaf3d458e879122b3cde64f3e3e3789d2
2022-06-08 17:20:15 +02:00
furszy
fd5c996d16
wallet: GetAvailableBalance, remove double walk-through every available coin
Filtering `AvailableCoins` by spendable outputs only and using the retrieved total_amount.
2022-06-08 11:30:26 -03:00
furszy
162d4ad10f
wallet: add 'only_spendable' filter to AvailableCoins
We are skipping the non-spendable coins that appear in vCoins ('AvailableCoins' result) later, in several parts of the CreateTransaction and GetBalance flows:

GetAvailableBalance (1) gets all the available coins calling AvailableCoins and, right away, walk through the entire vector, skipping the non-spendable coins, to calculate the total balance.

Inside CreateTransactionInternal —> SelectCoins(vCoins,...), we have several calls to AttemptSelection which, on each of them internally, we call twice to GroupOutputs which internally has two for-loops over the entire vCoins vector that skip the non-spendable coins.

So, Purpose is not add the non-spendable coins into the AvailableCoins result (vCoins) in the first place for the processes that aren’t using them at all, so we don’t waste resources skipping them later so many times.

Note: this speedup is for all the processes that call to CreateTransaction and GetBalance* internally.
2022-06-08 11:30:25 -03:00
furszy
cdf185ccfb
wallet: remove unused IsSpentKey(hash, index) method 2022-06-08 11:22:40 -03:00
furszy
4b83bf8dbc
wallet: avoid extra IsSpentKey -> GetWalletTx lookups 2022-06-08 11:22:40 -03:00
furszy
3d8a282257
wallet: decouple IsSpentKey(scriptPubKey) from IsSpentKey(hash, n)
This will be used in a follow-up commit to prevent extra 'GetWalletTx' lookups if the function caller already have the wtx and can just provide the scriptPubKey directly.
2022-06-08 11:22:39 -03:00
furszy
a06fa94ff8
wallet: IsSpent, 'COutPoint' arg instead of (hash, index) 2022-06-08 11:22:39 -03:00
furszy
91902b7720
wallet: IsLockedCoin, 'COutPoint' arg instead of (hash, index) 2022-06-08 10:26:48 -03:00
furszy
9472ca0a65
wallet: AvailableCoins, don't call 'wtx.tx->vout[i]' multiple times 2022-06-08 10:25:51 -03:00
furszy
4ce235ef8f
wallet: return 'CoinsResult' struct in AvailableCoins
Instead of accepting a `vCoins` reference that is cleared at the beginning of the method.

Note:
This new struct, down the commits line, will contain other `AvailableCoins` useful results.
2022-06-08 10:25:16 -03:00
brunoerg
c06cc41ddb doc: fix typo in kernel/context.h 2022-06-08 10:03:43 -03:00
Jon Atack
ecff20db28 logging: use LogPrintfCategory rather than a manual category
Here we update only the log messages that manually print a category.

In upcoming commits, LogPrintCategory will likely be used in many
other cases, such as to replace `LogPrintf` where it makes sense.
2022-06-08 14:02:54 +02:00
Jon Atack
eb8aab759f logging: add LogPrintfCategory to log unconditionally with category
prefixing the output with the passed category name.

- add documentation
- add a unit test
- update lint-logs.py
- update lint-format-strings.py
2022-06-08 14:02:54 +02:00