Commit graph

36267 commits

Author SHA1 Message Date
MarcoFalke
b168b71a5d
Merge bitcoin/bitcoin#26730: test: add coverage for purpose arg in listlabels
c467cfffce test: add coverage for `purpose` arg in `listlabels` (brunoerg)

Pull request description:

  This PR adds test coverage for `listlabels` command when specifying the `purpose` (send and receive).

  dcdfd72861/src/wallet/rpc/addresses.cpp (L698-L704)

ACKs for top commit:
  kristapsk:
    ACK c467cfffce

Tree-SHA512: 7e7143c1264692f7b22952e7c70dbe9ed3f5dcd2e3b69962a47be9f9c21b3f4a9089ca87962fbc8ff9116e7d2dbeb7f36d6a132c9ac13724a255cfe1b32373a8
2023-01-11 14:55:37 +01:00
glozow
26002570ab
Merge bitcoin/bitcoin#26646: validation, bugfix: provide more info in *MempoolAcceptResult
264f9ef17f [validation] return MempoolAcceptResult for every tx on PCKG_TX failure (glozow)
dae81e01e8 [refactor] rename variables in AcceptPackage for clarity (glozow)
da484bc738 [doc] release note effective-feerate and effective-includes RPC results (glozow)
5eab397b98 [validation] remove PackageMempoolAcceptResult::m_package_feerate (glozow)
601bac88cb [rpc] return effective-includes in testmempoolaccept and submitpackage (glozow)
1691eaa818 [rpc] return effective-feerate in testmempoolaccept and submitpackage (glozow)
d6c7b78ef2 [validation] return wtxids of other transactions whose fees were used (glozow)
1605886380 [validation] return effective feerate from mempool validation (glozow)
5d35b4a7de [test] package validation quits early due to non-policy, non-missing-inputs failure (glozow)
be2e4d94e5 [validation] when quitting early in AcceptPackage, set package_state and tx result (glozow)

Pull request description:

  This PR fixes a bug and improves the mempool accept interface to return information more predictably.

  Bug: In package validation, we first try the transactions individually (see doc/policy/packages.md for more explanation) and, if they all failed for missing inputs and policy-related (i.e. fee) reasons, we'll try package validation. Otherwise, we'll just "quit early" since, for example, if a transaction had an invalid signature, adding a child will not help make it valid. Currently, when we quit early, we're not setting the `package_state` to be invalid, so the caller might think it succeeded. Also, we're returning no results - it makes more sense to return the individual transaction failure. Thanks instagibbs for catching https://github.com/bitcoin/bitcoin/pull/25038#discussion_r1013293248!

  Also, make the package results interface generally more useful/predictable:
  - Always return the feerate at which a transaction was considered for `CheckFeeRate` in `MempoolAcceptResult::m_effective_feerate` when it was successful. This can replace the current `PackageMempoolAcceptResult::m_package_feerate`, which only sometimes exists.
  - Always provide an entry for every transaction in `PackageMempoolAcceptResult::m_tx_results` when the error is `PCKG_TX`.

ACKs for top commit:
  instagibbs:
    reACK 264f9ef17f
  achow101:
    ACK 264f9ef17f
  naumenkogs:
    reACK 264f9ef17f

Tree-SHA512: ce7fd9927a80030317cc6157822596e85a540feff5dbf5eea7c62da2eb50c917cdddc9da1e2ff62cc18b98b27d360151811546bd9d498859679a04bbee090837
2023-01-11 13:25:39 +00:00
MarcoFalke
dbca00ef76
Merge bitcoin/bitcoin#26838: doc: I2P documentation updates
3e1d2941e9 doc: remove recommended I2P router versions (jonatack)
295849abb5 doc: update/clarify/de-emphasize I2P transient address section (jonatack)
dffa319457 doc: update bandwidth section of I2P documentation (jonatack)
0ed9cc5892 doc: clarify -i2pacceptincoming help documentation (jonatack)

Pull request description:

  Address the documentation updates requested in issue #26754, clarify/simplify the -i2pacceptincoming help, and a few other fixups.

ACKs for top commit:
  willcl-ark:
    ACK 3e1d294
  1440000bytes:
    ACK 3e1d2941e9
  w0xlt:
    ACK 3e1d2941e9
  vasild:
    ACK 3e1d2941e9

Tree-SHA512: e647221884af34646b99150617f4d4cc8d5fce325a769294f49047b9d8c9c8ab2b365cfdd9f56b3bd0303da706233f03d24cececf6e161c53f04ed947751052a
2023-01-11 13:03:54 +01:00
Andrew Chow
4586ae2da1
Merge bitcoin/bitcoin#26679: wallet: Skip rescanning if wallet is more recent than tip
3784009534 wallet: Skip rescanning if wallet is more recent than tip (Andrew Chow)

Pull request description:

  If a wallet has key birthdates that are more recent than the currrent chain tip, or a bestblock height higher than the current tip, we should not attempt to rescan as there is nothing to scan for.

  Fixes #26655

ACKs for top commit:
  ishaanam:
    re-utACK 3784009534
  w0xlt:
    utACK 3784009534
  furszy:
    Code review ACK 37840095

Tree-SHA512: f0d90b62940d97d50f21e1e01fa6dcb54409fad819cea4283612825c4d93d733df323cd92787fed43956b0a8e386a5bf88218f1f5749c913398667a5c8f54470
2023-01-10 19:56:32 -05:00
Andrew Chow
68f88bc03f
Merge bitcoin/bitcoin#26186: rpc: Sanitize label name in various RPCs with tests
65e78bda7c test: Invalid label name coverage (Aurèle Oulès)
552b51e682 refactor: Add sanity checks in LabelFromValue (Aurèle Oulès)
67e7ba8e1a rpc: Sanitize label name in various RPCs (Aurèle Oulès)

Pull request description:

  The following RPCs did not sanitize the optional label name:
  - importprivkey
  - importaddress
  - importpubkey
  - importmulti
  - importdescriptors
  - listsinceblock

  Thus is was possible to import an address with a label `*` which should not be possible.
  The wildcard label is used for backwards compatibility in the `listtransactions` rpc.
  I added test coverage for these RPCs.

ACKs for top commit:
  ajtowns:
    ACK 65e78bda7c
  achow101:
    ACK 65e78bda7c
  furszy:
    diff ACK 65e78bd
  stickies-v:
    re-ACK 65e78bda7c
  theStack:
    re-ACK 65e78bda7c

Tree-SHA512: ad99f2824d4cfae352166b76da4ca0069b7c2eccf81aaa0654be25bbb3c6e5d6b005d93960f3f4154155f80e12be2d0cebd5529922ae3d2a36ee4eed82440b31
2023-01-10 17:31:19 -05:00
MarcoFalke
b264410e01
Merge bitcoin/bitcoin#26864: doc: net: fix link to onion address encoding scheme [ONIONADDRESS]
3076f1815d doc: net: fix link to onion address encoding scheme [ONIONADDRESS] (Sebastian Falbesoner)

Pull request description:

  Instead of referring to a fixed line number to a file in master (which is obviously always quickly outdated), use a permalink tied to the latest commit.

ACKs for top commit:
  vasild:
    ACK 3076f1815d

Tree-SHA512: 7070a7e47d683b1539f33daa4c67093a87d6121a84430a3b24afee139a7f2b3cab32fcdf0bc561f8e177b5ba864a98e4491e08dac90cdd4bd2e4e6b8fa7e4b14
2023-01-10 17:12:40 +01:00
Sebastian Falbesoner
3076f1815d doc: net: fix link to onion address encoding scheme [ONIONADDRESS]
Instead of referring to a fixed line number to a file in master (which
is obviously always quickly outdated), use a permalink tied to the
latest commit.
2023-01-10 14:23:27 +01:00
MarcoFalke
1c9457bc8b
Merge bitcoin/bitcoin#26856: ci: Run one task with all tests on credits
fae885b98f ci: Run one task with all tests on credits (MarcoFalke)

Pull request description:

  This should allow to detect any obvious issues in the tests within 10 minutes of opening a pull request, regardless of the current scheduling load on the Cirrus CI community cluster.

ACKs for top commit:
  fanquake:
    ACK fae885b98f

Tree-SHA512: 384651364648cd38a126f64a5cc650dd396735c05f7d8b5d5c9a8ee7b3b98e36f5dfb3b1c0563ba4d9f554b5e0e82e13aa38e78092f11856a82fc76270fe6f3e
2023-01-10 12:33:54 +01:00
glozow
264f9ef17f
[validation] return MempoolAcceptResult for every tx on PCKG_TX failure
This makes the interface more predictable and useful. The caller
understands one or more transactions failed, and can learn what happened
with each transaction. We already have this information, so we might as
well return it.

It doesn't make sense to do this for other PackageValidationResult
values because:
- PCKG_RESULT_UNSET: this means everything succeeded, so the individual
  failures are no longer accurate.
- PCKG_MEMPOOL_ERROR: something went wrong with the mempool logic;
  transaction failures might not be meaningful.
- PCKG_POLICY: this means something was wrong with the package as a
  whole. The caller should use the PackageValidationState to find the
  error, rather than looking at individual MempoolAcceptResults.
2023-01-10 11:10:50 +00:00
glozow
dae81e01e8 [refactor] rename variables in AcceptPackage for clarity 2023-01-10 11:09:03 +00:00
glozow
da484bc738 [doc] release note effective-feerate and effective-includes RPC results
No release note for submitpackage because it is regtest-only.
2023-01-10 11:09:03 +00:00
glozow
5eab397b98 [validation] remove PackageMempoolAcceptResult::m_package_feerate
This value creates an extremely confusing interface as its existence is
dependent upon implementation details (whether something was submitted
on its own, etc). MempoolAcceptResult::m_effective_feerate is much more
helpful, as it always exists for submitted transactions.
2023-01-10 11:09:03 +00:00
glozow
601bac88cb [rpc] return effective-includes in testmempoolaccept and submitpackage 2023-01-10 11:07:38 +00:00
glozow
1691eaa818 [rpc] return effective-feerate in testmempoolaccept and submitpackage 2023-01-10 11:06:10 +00:00
glozow
d6c7b78ef2 [validation] return wtxids of other transactions whose fees were used 2023-01-10 10:36:57 +00:00
MarcoFalke
0e81d119e0
Merge bitcoin/bitcoin#26851: ci: Remove unused busybox workaround
fadfae42f1 ci: Remove unused busybox workaround (MarcoFalke)
fac424fce7 ci: Create named symbol for BINS_SCRATCH_DIR (MarcoFalke)

Pull request description:

  It can be re-added when it is needed again. But it may be more likely that the other workarounds can be removed as well, in a follow-up.

ACKs for top commit:
  fanquake:
    ACK fadfae42f1

Tree-SHA512: 39984d02ddcba907a5b780fd9cb4dab7f1abbc32468968b4862d226de2e4f95c71708c7361db97347e1ac65196dc40d379e68f34bef37d42b5464d343e7466d8
2023-01-10 09:54:32 +01:00
Andrew Chow
1aedc3b6c8
Merge bitcoin/bitcoin#26618: rpc: Prevent unloading a wallet when rescanning
109cbb819d doc: Add release notes for #26618 (Aurèle Oulès)
b13902d2e4 rpc: Prevent unloading a wallet when rescanning (Aurèle Oulès)

Pull request description:

  Fixes #26463.

  This PR prevents a user from unloading a wallet if it is currently rescanning.

  To test:

  ```bash
  ./src/bitcoin-cli -testnet -named createwallet wallet_name=wo disable_private_keys=true
  ./src/bitcoin-cli -testnet -rpcwallet=wo importdescriptors '[{
    "desc": "addr(mmcuW74MyJUZuLnWXGQLoNXPrS9RbFz6gD)#tpnrahgc",
        "timestamp": 0,
        "active": false,
        "internal": false,
        "next": 0
  }]'
  ./src/bitcoin-cli -testnet unloadwallet wo
  error code: -4
  error message:
  Wallet is currently rescanning. Abort existing rescan or wait.

ACKs for top commit:
  achow101:
    ACK 109cbb819d
  w0xlt:
    ACK 109cbb819d
  kouloumos:
    ACK 109cbb819d
  promag:
    ACK 109cbb819d

Tree-SHA512: 15fdddf4cf9f3fa08f52069fe4a25a76e04a55bb2586b031bfb0393dce7f175dcdb52823e132a7dff6a894539beeb980a1aad2a792790be036be6977628149b2
2023-01-09 16:56:40 -05:00
jonatack
3e1d2941e9 doc: remove recommended I2P router versions
as these go stale and users will generally install the current versions available.
2023-01-09 08:18:58 -08:00
jonatack
295849abb5 doc: update/clarify/de-emphasize I2P transient address section 2023-01-09 08:18:58 -08:00
jonatack
dffa319457 doc: update bandwidth section of I2P documentation 2023-01-09 08:18:58 -08:00
jonatack
0ed9cc5892 doc: clarify -i2pacceptincoming help documentation
and also hoist the default setting to a constexpr and
remove unused f-string operators in a related functional test.
2023-01-09 08:18:47 -08:00
MarcoFalke
fae885b98f
ci: Run one task with all tests on credits 2023-01-09 16:31:14 +01:00
MarcoFalke
39363a4b94
Merge bitcoin/bitcoin#26822: p2p, rpc: don't allow past absolute timestamp in setban
abccb27466 test: add coverage for absolute timestamp in `setban` (brunoerg)
b99f1f20f7 p2p, rpc: don't allow past absolute timestamp in `setban` (brunoerg)

Pull request description:

  We shouldn't allow call `setban` with past absolute timestamp. First, because doesn't make sense to ban a node until ~ past ~. Besides that, it could make an unnecessary write to the DB since `BanMan::Ban` calls `DumpBanlist` and it calls `SweepBanned` which will remove this new ban (because of the timestamp) of the array.

ACKs for top commit:
  1440000bytes:
    ACK abccb27466

Tree-SHA512: 6d0cadf99fc4f78d77d3bafd6f5c85ac56e243ebc376210fdb2bee751e7b139ec7d6f5f346317fd0b10051b685f2d0ee1d8e40f4bc10f4dbdbbddd5e1ee84de5
2023-01-09 13:00:42 +01:00
MarcoFalke
fadfae42f1
ci: Remove unused busybox workaround
The find workaround is no longer needed after commit
d3d547c545
2023-01-09 12:40:45 +01:00
MarcoFalke
fac424fce7
ci: Create named symbol for BINS_SCRATCH_DIR
Also, create the dir a bit earlier, right after it was put in the PATH.
2023-01-09 11:53:20 +01:00
MarcoFalke
49aefc2c2e
Merge bitcoin/bitcoin#26843: ci: Fix ci_native_fuzz_msan CONTAINER_NAME
fa4e98c77f ci: Fix ci_native_fuzz_msan CONTAINER_NAME (MarcoFalke)

Pull request description:

  This avoids a duplicate name with the other msan task, which will lead to errors when running locally:

  > Error: creating container storage: the container name "ci_native_msan" is already in use by 77350e26f9c36abbb601140cd0b485ead093ff118803c720ca8b10f6bdfa37d2. You have to remove that container to be able to reuse that name: that name is already in use

ACKs for top commit:
  fanquake:
    ACK fa4e98c77f
  hebasto:
    ACK fa4e98c77f, I've verified that there are no other duplicated `CONTAINER_NAME`'s values.

Tree-SHA512: f1b28b21302c0947912d642c12c2ccad236af6824fd27e68341baddedec24087af738f3226028a0eeb6e0fc7e9f90713fc680855eeb07adc113c4f6e8b03a545
2023-01-09 09:46:17 +01:00
MarcoFalke
fa4e98c77f
ci: Fix ci_native_fuzz_msan CONTAINER_NAME 2023-01-07 11:47:38 +01:00
glozow
1605886380 [validation] return effective feerate from mempool validation 2023-01-06 17:37:01 +00:00
glozow
5d35b4a7de [test] package validation quits early due to non-policy, non-missing-inputs failure 2023-01-06 17:37:01 +00:00
glozow
be2e4d94e5 [validation] when quitting early in AcceptPackage, set package_state and tx result
Bug: not setting package_state means package_state.IsValid() == true and
the caller does not know that this failed.

We won't be validating this transaction again, so it makes sense to return this
failure to the caller.

Rename package_state to package_state_quit_early to make it more clear
what this variable is used for and what its scope is.

Co-authored-by: Greg Sanders <gsanders87@gmail.com>
2023-01-06 17:37:01 +00:00
brunoerg
abccb27466 test: add coverage for absolute timestamp in setban 2023-01-06 13:33:38 -03:00
brunoerg
b99f1f20f7 p2p, rpc: don't allow past absolute timestamp in setban 2023-01-06 13:33:38 -03:00
MarcoFalke
adc41cf3b2
Merge bitcoin/bitcoin#26805: tests: Use unique port for ZMQ tests to allow for multiple test instances
c6119f4788 tests: Use unique port for ZMQ tests (Andrew Chow)

Pull request description:

  The ZMQ interface tests should use unique ports as we do for the p2p and rpc ports so that multiple instances of the test can be run at the same time.

  Without this, the test may hang until killed, or fail.

ACKs for top commit:
  MarcoFalke:
    ACK c6119f4788

Tree-SHA512: 2ca3ed2f35e5a83d7ab83740674fed362a8d146dc751156cfe100133a591347cd1ac9d164046f1744d65451a57c52cb22d3bb2161105f421f8f655c4a2512c59
2023-01-06 16:31:34 +01:00
fanquake
911a40ead2
Merge bitcoin/bitcoin#26557: build: Update Boost to 1.81.0 in depends
2427468f27 doc: Update Boost version in doc/dependencies.md (Hennadii Stepanov)
e8b4201ba2 build: Update Boost to 1.81.0 in depends (Hennadii Stepanov)

Pull request description:

  Required for https://github.com/bitcoin/bitcoin/pull/25696, also see https://github.com/bitcoin/bitcoin/pull/25696#discussion_r1005600540.

  Guix build:
  ```
  0aade9c6a91d8550dea6cb07d4657c299a78d4434c1e78ef487e30e53239da64  guix-build-e8b4201ba2fd/output/aarch64-linux-gnu/SHA256SUMS.part
  f21964d25f96bca46ced3286b00e7e605d6517a6de7b00aa7ebf3bb6ee63d0d2  guix-build-e8b4201ba2fd/output/aarch64-linux-gnu/bitcoin-e8b4201ba2fd-aarch64-linux-gnu-debug.tar.gz
  65e991407232714455a4bb5fb072b3b7f58f8f4696ca78b6756aae6e6497540b  guix-build-e8b4201ba2fd/output/aarch64-linux-gnu/bitcoin-e8b4201ba2fd-aarch64-linux-gnu.tar.gz
  92535c8b7ead8f3319858e55c7d076b3db174efd10b4b8dce8efbbd5e5b98819  guix-build-e8b4201ba2fd/output/arm-linux-gnueabihf/SHA256SUMS.part
  9cd199415fbfe6ee6fdf5c57def2591327c97e7e31c4c7b323a738761fe6a285  guix-build-e8b4201ba2fd/output/arm-linux-gnueabihf/bitcoin-e8b4201ba2fd-arm-linux-gnueabihf-debug.tar.gz
  e13dacef38e68bb30283fda82bbf73864e5977b4cc6f82be41476246c7f51e90  guix-build-e8b4201ba2fd/output/arm-linux-gnueabihf/bitcoin-e8b4201ba2fd-arm-linux-gnueabihf.tar.gz
  e4c57c126927c2b40a3bd7c697e8b524140f989094c2a9ff216e1c03e90810da  guix-build-e8b4201ba2fd/output/arm64-apple-darwin/SHA256SUMS.part
  90b15bd6e8eab3c541a2a057402cf41630e5c72d07bf62b3d2d4d54698b3f03b  guix-build-e8b4201ba2fd/output/arm64-apple-darwin/bitcoin-e8b4201ba2fd-arm64-apple-darwin-unsigned.dmg
  848c7928d633f19912f340fa6df8b77756d291991dbd849b3d95761bcd445bad  guix-build-e8b4201ba2fd/output/arm64-apple-darwin/bitcoin-e8b4201ba2fd-arm64-apple-darwin-unsigned.tar.gz
  9880bfc57770372478c56b22b513d91d25a799591a345069e04c3f3a88bfc9ec  guix-build-e8b4201ba2fd/output/arm64-apple-darwin/bitcoin-e8b4201ba2fd-arm64-apple-darwin.tar.gz
  e61cb6337dc1480292300fcd45e9b128c567222911cac3a9209955433e1f413b  guix-build-e8b4201ba2fd/output/dist-archive/bitcoin-e8b4201ba2fd.tar.gz
  fd685ffcd1c5e32c25a84638fd47c5e14d0247dcf7d51e5317fea356f8c8347a  guix-build-e8b4201ba2fd/output/powerpc64-linux-gnu/SHA256SUMS.part
  b710e9123684e459732553b1d6df2912257ac43b315db7f2e9288d95c76ce2b6  guix-build-e8b4201ba2fd/output/powerpc64-linux-gnu/bitcoin-e8b4201ba2fd-powerpc64-linux-gnu-debug.tar.gz
  ea7878ea044dbfaf9c022de5bf7532bf00b028c8582d24ce67bec917f34869e9  guix-build-e8b4201ba2fd/output/powerpc64-linux-gnu/bitcoin-e8b4201ba2fd-powerpc64-linux-gnu.tar.gz
  737d9e054356ea50c7efe964a7b223eb81a7fcc10b235647ffcb588784e7e212  guix-build-e8b4201ba2fd/output/powerpc64le-linux-gnu/SHA256SUMS.part
  46de2537ea90ddaced620a7dbfa1379b2d0cc80ae87d6225fef94a7196ff5166  guix-build-e8b4201ba2fd/output/powerpc64le-linux-gnu/bitcoin-e8b4201ba2fd-powerpc64le-linux-gnu-debug.tar.gz
  7e10be7f494bd4635477919ca9b9968b62054e0448f2963d1c25f0215361feae  guix-build-e8b4201ba2fd/output/powerpc64le-linux-gnu/bitcoin-e8b4201ba2fd-powerpc64le-linux-gnu.tar.gz
  cfb90022ea23526d8ca26259a06d2ec06a278e8fbcb05d6ba37fa3ef33ba1f77  guix-build-e8b4201ba2fd/output/riscv64-linux-gnu/SHA256SUMS.part
  ba45d57e19758682991fc51cc04c0e13e7e586b74ae1adae0273cd15bdd5cdb2  guix-build-e8b4201ba2fd/output/riscv64-linux-gnu/bitcoin-e8b4201ba2fd-riscv64-linux-gnu-debug.tar.gz
  970941bee4c342b7b23065ce515d5e340b3aed989210a569faa33f638a3575f9  guix-build-e8b4201ba2fd/output/riscv64-linux-gnu/bitcoin-e8b4201ba2fd-riscv64-linux-gnu.tar.gz
  3943c224a3fa0554ca75292f301ae02514c7ec100d9e13e185ed6ad4db932194  guix-build-e8b4201ba2fd/output/x86_64-apple-darwin/SHA256SUMS.part
  4c5f14af1961e33336423a2021b5da76b550ae1bc2284003d6009b1ced940eea  guix-build-e8b4201ba2fd/output/x86_64-apple-darwin/bitcoin-e8b4201ba2fd-x86_64-apple-darwin-unsigned.dmg
  3ab7fd5623b414c4e0504c2943b84048524374150e9626b3a0b6931adc46109a  guix-build-e8b4201ba2fd/output/x86_64-apple-darwin/bitcoin-e8b4201ba2fd-x86_64-apple-darwin-unsigned.tar.gz
  00c4c2da392eaee439984ab2bd614d2df6b48ba775350b2c6d48c3061e7667c5  guix-build-e8b4201ba2fd/output/x86_64-apple-darwin/bitcoin-e8b4201ba2fd-x86_64-apple-darwin.tar.gz
  df20f8a3c8836ca5b7bac4c5104a31f4be76da75a67846d69cc8cbdf42339743  guix-build-e8b4201ba2fd/output/x86_64-linux-gnu/SHA256SUMS.part
  68f72876397bfbf6cde73b8303bd081235407211d684cdb78fc932ffb0752942  guix-build-e8b4201ba2fd/output/x86_64-linux-gnu/bitcoin-e8b4201ba2fd-x86_64-linux-gnu-debug.tar.gz
  769556d6a4a8baed5dfb81ab63afd1c0999101a5afeb2f7a1bab9b94ce6635bc  guix-build-e8b4201ba2fd/output/x86_64-linux-gnu/bitcoin-e8b4201ba2fd-x86_64-linux-gnu.tar.gz
  4b8487e9b16e0ec6645cb63ddd25149011797af14d596ed31a23130f201d8f57  guix-build-e8b4201ba2fd/output/x86_64-w64-mingw32/SHA256SUMS.part
  6fbad9caf9da6041f0d119be293d0895b50535604f86dda45a7b8345fb581a39  guix-build-e8b4201ba2fd/output/x86_64-w64-mingw32/bitcoin-e8b4201ba2fd-win64-debug.zip
  42e84737cac5ec2d2052e5632f68bc6d211d5f02a171cb7347c067025edce13f  guix-build-e8b4201ba2fd/output/x86_64-w64-mingw32/bitcoin-e8b4201ba2fd-win64-setup-unsigned.exe
  9205f92b1ecfcfa649552e27bb0942611dfac2a5f99c326b7de89bbeb46ad564  guix-build-e8b4201ba2fd/output/x86_64-w64-mingw32/bitcoin-e8b4201ba2fd-win64-unsigned.tar.gz
  098d98161393e663da794cc336de8a4676fd2c8bc14dbc8b1cac1aaf6b4098f5  guix-build-e8b4201ba2fd/output/x86_64-w64-mingw32/bitcoin-e8b4201ba2fd-win64.zip
  ```

ACKs for top commit:
  fanquake:
    ACK 2427468f27

Tree-SHA512: 31d268e4608ab75f843c0cb1874d060cea762ebbd09b220a7f84054fb837f60b41b8452c181a4de7aa3f8aa27fd584d0a84e770209e02adfb978d2b5f625d7a6
2023-01-06 10:37:10 +00:00
Hennadii Stepanov
2427468f27
doc: Update Boost version in doc/dependencies.md 2023-01-06 08:48:48 +00:00
MarcoFalke
2cfe379623
Merge bitcoin/bitcoin#26823: refactor: Work around Werror=free-nonheap-object in AssumeCalculateMemPoolAncestors
faa86eeb41 refactor: Work around Werror=free-nonheap-object in AssumeCalculateMemPoolAncestors (MarcoFalke)

Pull request description:

  This works around the s390x gcc bug mentioned in https://github.com/bitcoin/bitcoin/issues/26820

ACKs for top commit:
  achow101:
    ACK faa86eeb41

Tree-SHA512: 041d5daa157ea1856b0a8027181085d70624f5f8822049ace9963e90c653bbb8c91d1f16b8a5bf460687eb4ed13f1db72e3885a511aadbad6dede93d9f9ccd6d
2023-01-06 08:04:44 +01:00
MarcoFalke
faa86eeb41
refactor: Work around Werror=free-nonheap-object in AssumeCalculateMemPoolAncestors 2023-01-05 19:48:14 +01:00
Andrew Chow
b4fb0a3255
Merge bitcoin/bitcoin#26761: wallet: fully migrate address book entries for watchonly/solvable wallets
730e14a317 test: wallet: check that labels are migrated to watchonly wallet (Sebastian Falbesoner)
d5f4ae7fac wallet: fully migrate address book entries for watchonly/solvable wallets (Sebastian Falbesoner)

Pull request description:

  Currently `migratewallet` migrates the address book (i.e. labels and purposes) for watchonly and solvable wallets only in RAM, but doesn't persist them on disk. Fix this by adding another loop for both of the special wallet types after which writes the corresponding NAME and PURPOSE entries to the database in a single batch. Also adds a corresponding test that checks if labels were migrated correctly for a watchonly wallet.

ACKs for top commit:
  achow101:
    ACK 730e14a317
  furszy:
    code ACK 730e14a3, left a non-blocking nit.
  aureleoules:
    ACK 730e14a317

Tree-SHA512: 159487e11e858924ef762e0190ccaea185bdff239e3d2280c8d63c4ac2649ec71714dc4d53dec644f03488f91c3b4bbbbf3434dad23bc0fcecb6657f353ea766
2023-01-05 12:22:51 -05:00
MarcoFalke
3212d104f4
Merge bitcoin/bitcoin#23829: refactor: use braced init for integer literals instead of c style casts
f2fc03ec85 refactor: use braced init for integer constants instead of c style casts (Pasta)

Pull request description:

  See https://github.com/bitcoin/bitcoin/pull/23810 for more context. This is broken out from that PR, as it is less breaking, and should be trivial to review and merge.

  EDIT: Long term, the intention is to remove all C-style casts, as they can dangerously introduce reinterpret_casts. This is one step which removes a number of trivially removable C-style casts

ACKs for top commit:
  aureleoules:
    ACK f2fc03ec85

Tree-SHA512: 2fd11b92c9147e3f970ec3e130e3b3dce70e707ff02950a8c697d4b111ddcbbfa16915393db20cfc8f384bc76f13241c9b994a187987fcecd16a61f8cc0af14c
2023-01-05 17:30:52 +01:00
MarcoFalke
61f35159ff
Merge bitcoin/bitcoin#26818: test: Fix feature_startupnotify intermittent issue
fac810bb0a test: Fix feature_startupnotify intermittent issue (MarcoFalke)

Pull request description:

  Might fix #25644

ACKs for top commit:
  aureleoules:
    ACK fac810bb0a
  brunoerg:
    ACK fac810bb0a

Tree-SHA512: 870bf65da8120b6897d02e3bb70eea018d4761396abe64c3533bbc5237e65be9f77d35f62cd5d08cf7132dd53b504bf58229c33e18833c191495ad229c84d7c2
2023-01-05 17:22:28 +01:00
MarcoFalke
fac810bb0a
test: Fix feature_startupnotify intermittent issue 2023-01-05 14:10:07 +01:00
MarcoFalke
296e882250
Merge bitcoin/bitcoin#26598: contrib: remove builder keys
e6864fa157 contrib: remove builder keys (fanquake)

Pull request description:

  This has been superseded by adding a builder-keys/ directory in
  guix.sigs, where the presence of keys, and validity of signatures
  is checked. Preventing issues like missing keys or invalid signatures.

  New (or exisiting) Guix builders can add their key in the next PR
  they open adding attestations.

  Related to issues like #26566, #26563.

  Also follows up with the comment here: https://github.com/bitcoin/bitcoin/pull/26565#issuecomment-1326053939.

ACKs for top commit:
  hebasto:
    ACK e6864fa157, modulo s/update/remove/ in the PR tittle.

Tree-SHA512: 095b4cf12ed0baeaf0ee7b8edcb3e2647e9c0f812e8fd63915ddb454f81dacc9c2d2b409de2773b7adb5ff643893d614d8aad1bc44c26da648e1bbbe19e11e05
2023-01-05 09:18:16 +01:00
Andrew Chow
360e047a71
Merge bitcoin/bitcoin#26747: wallet: fix confusing error / GUI crash on cross-chain legacy wallet restore
21ad4e26ec test: add coverage for cross-chain wallet restore (Sebastian Falbesoner)
8c7222bda3 wallet: fix GUI crash on cross-chain legacy wallet restore (Sebastian Falbesoner)

Pull request description:

  Restoring a wallet backup from another chain should result in a dedicated error message (we have _"Wallet files should not be reused across chains. Restart bitcoind with -walletcrosschain to override."_ for that). Unfortunately this is currently not the case for legacy wallet restores, as in the course of cleaning up the newly created wallet directory a `filesystem_error` exception is thrown due to the directory not being empty; the wallet database did indeed load successfully (otherwise we wouldn't know that the chain doesn't match) and hence BDB-related files and directories are already created in the wallet directory.

  For bitcoind, this leads to a very confusing error message:
  ```
  $ ./src/bitcoin-cli restorewallet test123 ~/.bitcoin/regtest/wallets/regtest_wallet/wallet.dat
  error code: -1
  error message: filesystem error: in remove: Directory not empty ["/home/thestack/.bitcoin/wallets/test123"]
  ```

  Even worse, the GUI crashes in such a scenario:
  ```
  libc++abi: terminating with uncaught exception of type std::__1::__fs::filesystem::filesystem_error: filesystem error: in remove: Directory not empty ["/home/thestack/.bitcoin/wallets/foobar"]
  Abort trap (core dumped)
  ```

  Fix this by simply deleting the whole folder via `fs::remove_all`. With this, the expected error message appears both for the `restorewallet` RPC call and in the GUI (as a message-box):

  ```
  $ ./src/bitcoin-cli restorewallet test123 ~/.bitcoin/regtest/wallets/regtest_wallet/wallet.dat
  error code: -4
  error message:
  Wallet loading failed. Wallet files should not be reused across chains. Restart bitcoind with -walletcrosschain to override.
  ```

ACKs for top commit:
  achow101:
    ACK 21ad4e26ec
  aureleoules:
    ACK 21ad4e26ec
  furszy:
    utACK 21ad4e26

Tree-SHA512: 313f6494c2fbe823bff9b975cb2d9410bb518977a1e59a5159ee9836bc012947fa50b56be0e41b1a2f50d9c0c7f4fddfdf4fbe479d8a59a6ee44bb389c804abc
2023-01-04 17:46:37 -05:00
Andrew Chow
cabeae43ea
Merge bitcoin/bitcoin#26809: compat: use STDIN_FILENO over 0
585c672212 compat: use STDIN_FILENO over 0 (fanquake)

Pull request description:

  This is already used throughout this file, and is self-documenting.

ACKs for top commit:
  john-moffett:
    ACK 585c672212
  achow101:
    ACK 585c672212
  hebasto:
    ACK 585c672212, I have reviewed the code and it looks OK, I agree it can be merged.
  kristapsk:
    utACK 585c672212
  aureleoules:
    ACK 585c672212

Tree-SHA512: c0114ae896ba5404be70b804ee9f454d213f1d789c8f5a578c422dd15a308a214e6851fee76c0ec736a212bc86fb33ec17af1b22e5d23422c375ca4458251356
2023-01-04 17:30:47 -05:00
glozow
196a43eddb
Merge bitcoin/bitcoin#26603: doc: CalculateSequenceLocks: prevHeights entries are set to 0, not removed
f537127271 doc: fix: prevHeights entries are set to 0, not removed (stickies-v)

Pull request description:

  In [`CalculateSequenceLocks`](a035b6a0c4/src/consensus/tx_verify.h (L69)) no items are removed from `prevHeights`, they are just set to 0:

  a035b6a0c4/src/consensus/tx_verify.cpp (L69-L73)

  This PR updates the docs to reflect the actual implementation. Seems to have been wrongly documented since introduction in #7184 already ([implementation](https://github.com/bitcoin/bitcoin/pull/7184/files#diff-34d21af3c614ea3cee120df276c9c4ae95053830d7f1d3deaf009a4625409ad2R742-R749) and [documentation](https://github.com/bitcoin/bitcoin/pull/7184/files#diff-34d21af3c614ea3cee120df276c9c4ae95053830d7f1d3deaf009a4625409ad2R712-R713))

ACKs for top commit:
  hebasto:
    ACK f537127271

Tree-SHA512: 3661501660f6832b2116fd83466ffe95a60b341c14cb09a37489e2a587bea3290b0528690120a0f644c3eea02177aa1fb8968258482fa43b0303e016abb17418
2023-01-04 18:07:31 +00:00
glozow
65ecf24b5c
Merge bitcoin/bitcoin#26752: wallet: Remove mempool_sequence from interface methods
55696a0ac3 wallet: remove `mempool_sequence` from `transactionRemovedFromMempool` (w0xlt)
bf19069c53 wallet: remove `mempool_sequence` from `transactionAddedToMempool` (w0xlt)

Pull request description:

  This PR removes `mempool_sequence` from `transactionRemovedFromMempool` and `transactionAddedToMempool`.

  `mempool_sequence` is  not used in these methods, only in ZMQ notifications.

ACKs for top commit:
  instagibbs:
    ACK 55696a0ac3

Tree-SHA512: 621e89230bcb6edfed83e2758601a2b093822fc2dc4e9bfb00487e340f2bc4c5ac3bf6df3ca00b7fe55bb3df15858820f2bf698f403d2e48b915dd9eb47b63e0
2023-01-04 17:53:58 +00:00
Andrew Chow
a273241480
Merge bitcoin/bitcoin#26020: test: Change coinselection parameter location to make tests independent
b942c94d15 test: Change coinselection parameter location to make tests independent (yancy)

Pull request description:

  the `subtract_fee_outputs` param is expected to be `true` for all subsequent tests.  It should be defined outside of a single test so that if it's removed or changed, all subsequent tests won't fail.  Currently if you remove this [test](https://github.com/bitcoin/bitcoin/blob/master/src/wallet/test/coinselector_tests.cpp#L304:L325) the following [test](https://github.com/bitcoin/bitcoin/blob/master/src/wallet/test/coinselector_tests.cpp#L327:L345) fails.  This change makes the tests independent.

ACKs for top commit:
  achow101:
    ACK b942c94d15
  aureleoules:
    ACK b942c94d15.
  rajarshimaitra:
    tACK b942c94d15
  theStack:
    ACK b942c94d15

Tree-SHA512: 461e19d15351318102ef9f96c68442365d8ca238c48ad7aefe23e8532b33b91dadf6c7840c7894574bccede6da162a55ad7a6f6a330d61a11ce804e68ddc5e9c
2023-01-04 12:41:47 -05:00
Andrew Chow
139ba2bf12
Merge bitcoin/bitcoin#25234: bench: add benchmark for wallet 'AvailableCoins' function.
3a4f8bc242 bench: add benchmark for wallet 'AvailableCoins' function. (furszy)

Pull request description:

  #### Rationale

  `AvailableCoins` is part of several important flows for the wallet; from RPC commands that create transactions like `fundrawtransaction`, `send`, `walletcreatefundedpsbt`, get the available balance, list the available coins with `listunspent` etc. to GUI connected processes that perform the same or similar actions: tx creation, available balance calculation, present the spendable coins in the coin control dialog.

  As we are improving this process in #24699, #25005 and there are more structural changes coming on the way. This benchmark aims to ensure us that, at least, there are no regressions (obviously performance improvements are great but, at least for me, this heads into the direction of having a base metric to compare future structural changes).

  #### Implementation Notes

  There are 5 new benchmarks, one per wallet supported output type (LEGACY, P2SH_SEGWIT, BECH32, BECH32M), plus a multi-output-type wallet benchmark which contains outputs from all the descriptor types.

  The test, by default, fills-up the wallet with 1k transactions, 2k outputs. Mainly to not consume much time if the user just want to verify that no substantial regressions were introduced. But, my expectation for those who are focused on this process is to use a much higher number locally to really note the differences across commits.

ACKs for top commit:
  achow101:
    ACK 3a4f8bc242
  hernanmarino:
    ACK 3a4f8bc242
  aureleoules:
    ACK 3a4f8bc242

Tree-SHA512: d0bb4c165f1efa181b47cb31561e6217eff9135bcd1b6761a7292f9018e456d13d18a1b886c2e2268d35c52f9e1fd8e0f252972424e5c5f00c280620b79c5a1b
2023-01-04 12:11:44 -05:00
MarcoFalke
bf3b589413
Merge bitcoin/bitcoin#26791: ci: Properly set COMMIT_RANGE in lint task
fa5cbf2290 ci: Properly set COMMIT_RANGE in lint task (MarcoFalke)

Pull request description:

  Currently the variable holds (apart from the commits in the pull request) all commits to master since the pull was opened.

  This is problematic, because already merged commits are linted in unrelated pulls, leading to:

  * Wasted resources. For example, currently the lint task may take 9 minutes, when it should take 1. See https://cirrus-ci.com/task/6032782770569216?logs=lint#L1449
  * False failures. For example, when a "wrong" commit is in master it can lead to some pulls failing unrelatedly, and others not.

  Now that the CI has the `/merge` commit (since commit fad7281d78), `COMMIT_RANGE` can simply be set to `HEAD~..HEAD` to only hold the changes in the pull.

ACKs for top commit:
  fanquake:
    ACK fa5cbf2290

Tree-SHA512: e85fca4ca9d2615ddd2544403485e06885769a3f70bca297e23eefda2a1d28f47c5271f6adfa6ce0e5e972335c78098b76e0db4b109f59d0986bf508cef7528f
2023-01-04 13:56:45 +01:00
MarcoFalke
4bb840a453
Merge bitcoin/bitcoin#26802: test: Use same Python executable for subprocesses as for all-lint.py
f6eadaa413 Use same Python executable for subprocesses as for all-lint.py (Kristaps Kaupe)

Pull request description:

  Before this all linters were ran by `/usr/bin/env python3`, no matter what was used to run `test/lint/all-lint.py`. This change allows to use non-default Python executable for `test/lint/all-lint.py` and then all subprocesses will also use same Python interpreter (for example, `python3.10 ./test/lint/all-lint.py`). See https://github.com/bitcoin/bitcoin/issues/26792#issuecomment-1369558866 as use case.

ACKs for top commit:
  fanquake:
    ACK f6eadaa413 - did not test

Tree-SHA512: 4da3b5581a0dd8ab9a6387829495019091a93a7ceaf2135d65d40a1983fd11a0b92b20891ef30d2a132abb0a690cd9b2f7eb5fcc38df06a340394ef449d640af
2023-01-04 13:53:27 +01:00