Commit graph

29366 commits

Author SHA1 Message Date
fanquake
ef8bb0473b
test: remove BasicTestingSetup from sync unit tests 2021-05-28 19:14:09 +08:00
fanquake
1aee83421f
test: remove BasicTestingSetup from reverse_lock unit tests 2021-05-28 19:14:09 +08:00
fanquake
57ba949ef5
test: remove BasicTestingSetup from policy_fee unit tests 2021-05-28 19:14:09 +08:00
fanquake
3974c962b6
test: remove BasicTestingSetup from merkleblock tests 2021-05-28 19:14:08 +08:00
fanquake
cd5bc4b470
test: remove BasicTestingSetup from hash unit tests 2021-05-28 19:14:08 +08:00
fanquake
39cec22935
test: remove BasicTestingSetup from compilerbug unit tests 2021-05-28 19:14:08 +08:00
fanquake
6d3b78c0e2
test: remove BasicTestingSetup from bswap unit tests 2021-05-28 19:14:08 +08:00
fanquake
a13dc24831
test: remove BasicTestingSetup from bech32 unit tests 2021-05-28 19:14:08 +08:00
fanquake
f4dcbe4498
test: remove BasicTestingSetup from base64 unit tests 2021-05-28 19:14:08 +08:00
fanquake
fd144f6426
test: remove BasicTestingSetup from base32 unit tests 2021-05-28 19:14:07 +08:00
fanquake
4c389ba04b
test: remove BasicTestingSetup from arith_uint256 unit tests 2021-05-28 19:14:07 +08:00
fanquake
05590651a0
test: remove BasicTestingSetup from amount unit tests 2021-05-28 19:14:07 +08:00
fanquake
883a5c7d02
test: remove BasicTestingSetup from allocator unit tests 2021-05-28 19:14:07 +08:00
fanquake
8115c2ad7d
Merge bitcoin/bitcoin#22078: Add src/qt/android/.gitignore
7d07192dde Add src/qt/android/.gitignore (Hennadii Stepanov)

Pull request description:

  This PR makes `git` ignore files created by `make apk`.

ACKs for top commit:
  icota:
    ACK 7d07192dde

Tree-SHA512: 4be20bd84830217a10d8ea7634799e71ed50be73f4f60c91c56311a2c95b22ff1f28d3b7bc077f1417318bb75e446e3fc3bdbf9dbc037b4cbc8428f0875f2c77
2021-05-28 14:14:34 +08:00
fanquake
a6d984c08c
Merge bitcoin/bitcoin#22071: depends: latest config.guess and config.sub
7e2a9890e5 depends: latest config.sub (2021-04-30) (fanquake)
f16d4cd8c5 depends: latest config.guess (2021-05-24) (fanquake)

Pull request description:

  This is split out of #21851. Updating these files should be mechanical, and shouldn't have to wait for that PR. Also, having support in depends for the new `arm-apple-darwin` target (added in [2593751ef276497e312d7c4ce7fd049614c7bf80](https://git.savannah.gnu.org/cgit/config.git/commit/?id=2593751ef276497e312d7c4ce7fd049614c7bf80)) is useful when debugging. i.e #22070.

  If you try and compile depends for a `arm-apple-darwin` target using master, on a x86_64 darwin machine, currently you'll get:
  ```bash
  gmake -C depends -j9 HOST=arm64-apple-darwin
  Invalid configuration `arm64-apple-darwin': machine `arm64-apple' not recognized
  shasum: hosts/.mk: No such file or directory
  <omitted>
  Makefile:111: hosts/.mk: No such file or directory
  gmake: *** No rule to make target 'hosts/.mk'.  Stop.
  ```

ACKs for top commit:
  laanwj:
    ACK 7e2a9890e5

Tree-SHA512: 8ed99b5d486c6cbca8929a752460338b6ee17f6bf93013c76589605678853c3a01ebd631b4d3f5d6aaeb6e5c21b7bbe39afc4454d3a697fafb27678f6d2c021e
2021-05-28 14:10:19 +08:00
Jon Atack
7d1769bc45
p2p: remove torv2 from SetNetFromBIP155Network() 2021-05-28 01:46:29 +02:00
Jon Atack
eba9a94b9f
fuzz: rename CNetAddr/CService deserialize targets
as the changes that follow are incompatible with the inputs.
2021-05-28 01:46:18 +02:00
Jon Atack
c56a1c9b18
p2p: drop onions from IsAddrV1Compatible(), no longer relay torv2 2021-05-28 01:42:21 +02:00
Jarol Rodriguez
dafab2b1b3 doc: improve note on choosing posix mingw32 2021-05-27 19:00:34 -04:00
Jon Atack
f8e94002fc
p2p: remove torv2/ADDR_TORV2_SIZE from SetTor() 2021-05-27 22:54:39 +02:00
W. J. van der Laan
7257e50dba
Merge bitcoin/bitcoin#20833: rpc/validation: enable packages through testmempoolaccept
13650fe2e5 [policy] detect unsorted packages (glozow)
9ef643e21b [doc] add release note for package testmempoolaccept (glozow)
c4259f4b7e [test] functional test for packages in RPCs (glozow)
9ede34a6f2 [rpc] allow multiple txns in testmempoolaccept (glozow)
ae8e6df709 [policy] limit package sizes (glozow)
c9e1a26d1f [fuzz] add ProcessNewPackage call in tx_pool fuzzer (glozow)
363e3d916c [test] unit tests for ProcessNewPackage (glozow)
cd9a11ac96 [test] make submit optional in CreateValidMempoolTransaction (glozow)
2ef187941d [validation] package validation for test accepts (glozow)
578148ded6 [validation] explicit Success/Failure ctors for MempoolAcceptResult (glozow)
b88d77aec5 [policy] Define packages (glozow)
249f43f3cc [refactor] add option to disable RBF (glozow)
897e348f59 [coins/mempool] extend CCoinsViewMemPool to track temporary coins (glozow)
42cf8b25df [validation] make CheckSequenceLocks context-free (glozow)

Pull request description:

  This PR enables validation dry-runs of packages through the `testmempoolaccept` RPC. The expectation is that the results returned from `testmempoolaccept` are what you'd get from test-then-submitting each transaction individually, in that order (this means the package is expected to be sorted in topological order, for now at least). The validation is also atomic: in the case of failure, it immediately halts and may return "unfinished" `MempoolAcceptResult`s for transactions that weren't fully validated. The API for 1 transaction stays the same.

  **Motivation:**
  - This allows you to test validity for transaction chains (e.g. with multiple spending paths and where you don't want to broadcast yet); closes #18480.
  - It's also a first step towards package validation in a minimally invasive way.
  - The RPC commit happens to close #21074 by clarifying the "allowed" key.

  There are a few added restrictions on the packages, mostly to simplify the logic for areas that aren't critical to main package use cases:
  - No package can have conflicts, i.e. none of them can spend the same inputs, even if it would be a valid BIP125 replacement.
  - The package cannot conflict with the mempool, i.e. RBF is disabled.
  - The total count of the package cannot exceed 25 (the default descendant count limit), and total size cannot exceed 101KvB (the default descendant size limit).

  If you're looking for review comments and github isn't loading them, I have a gist compiling some topics of discussion [here](https://gist.github.com/glozow/c3acaf161c95bba491fce31585b2aaf7)

ACKs for top commit:
  laanwj:
    Code review re-ACK 13650fe2e5
  jnewbery:
    Code review ACK 13650fe2e5
  ariard:
    ACK 13650fe

Tree-SHA512: 8c5cbfa91a6c714e1c8710bb281d5ff1c5af36741872a7c5df6b24874d6272b4a09f816cb8a4c7de33ef8e1c2a2c252c0df5105b7802f70bc6ff821ed7cc1a2f
2021-05-27 22:40:24 +02:00
W. J. van der Laan
2e8f3928f1
Merge bitcoin/bitcoin#22017: Update Windows code signing certificate
167fb1fc72 Update Windows code signing certificate (Andrew Chow)

Pull request description:

  Updates the Windows code signing certificate to a new one issued by Digicert. This certificate has been issued to Bitcoin Core Code Signing LLC registered in Delaware, US. Note that this is different from the previous Bitcoin Core Code Signing Association registered in Zurich, Switzerland as it was unable to meet the validation requirements in time.

ACKs for top commit:
  Sjors:
    utACK 167fb1f
  laanwj:
    ACK 167fb1fc72

Tree-SHA512: 8d5308c710ef94330417955b9bc82c5894d282798cebece82b84b425e3354e566aa6a68693ec359391ea40ddd7e2032d35ce28d104683d75ec3010ddf00be209
2021-05-27 21:51:58 +02:00
Carl Dong
7a799c9c2b index: refactor-only: Reuse CChain ref 2021-05-27 13:50:11 -04:00
Carl Dong
db33cde80f index: Add chainstate member to BaseIndex 2021-05-27 13:50:11 -04:00
Carl Dong
f4a47a1feb bench: Use existing chainman in AssembleBlock 2021-05-27 13:50:11 -04:00
Carl Dong
91226eb917 bench: Use existing NodeContext in DuplicateInputs 2021-05-27 13:50:11 -04:00
Carl Dong
e6b4aa6eb5 miner: Pass in chainman to RegenerateCommitments
Pass in chainman instead of prev_block so that we can enforce the
block.hashPrevBlock refers to prev_block invariant in the function
itself.

We should probably rethink BlockAssembler's API and somehow include
commitment regeneration functionality in there. Something like a variant
of CreateNewBlock that takes in a std::vector<TxRef> and return a CBlock
instead of CBlockTemplate. That could avoid reaching for
LookupBlockIndex at all.
2021-05-27 13:50:11 -04:00
Carl Dong
9ecade1425 rest: Add GetChainman function and use it
This is not the cleanest change but:

1. It fixes the erroneous use of RPC's Ensure*() in rest.cpp, which
   cause crashes in REST contexts.

   RPC code wraps all calls in a try/except, REST code does not.
   Ensure*(), being part of RPC, expects that its throw's will get
   caught by a try/except. But if you use Ensure*() in REST code, since
   it doesn't have a try/except wrap, a crash will happen.

2. It is consistent with other functions like GetMemPool.

Someone can probably make this a bit prettier.
2021-05-27 13:49:09 -04:00
Jon Atack
0f1c58ae87
test: update feature_proxy to torv3 2021-05-27 19:47:52 +02:00
W. J. van der Laan
ea1e5c2c71
Merge bitcoin/bitcoin#22025: refactor: Group and re-order CAddrMan members by access type
8caf60dbbe move-only: Group and re-order CAddrMan members by access type (Hennadii Stepanov)
5cd7f8abe3 refactor: Do not expose CAddrMan members as protected without need (Hennadii Stepanov)

Pull request description:

  This PR is split from #19238 as all of its commits are trivial to review.
  The last commit is easy to review with `git diff --color-moved=dimmed-zebra`.

  Addressed the following comments from #19238:
  - 130b82ff35 (r550865131)
  > Can you consolidate all the private members and protected members to be next to each other? Multiple private and protected access specifiers make this harder to read than is necessary.

  - 130b82ff35 (r557271783)
  > Yeah, class declaration is easier to read if there is just one instance of `public:`, `protected:` and `private:` (in that order).

ACKs for top commit:
  jnewbery:
    ACK 8caf60dbbe
  laanwj:
    Code review ACK 8caf60dbbe
  jarolrod:
    ACK 8caf60dbbe
  vasild:
    ACK 8caf60dbbe

Tree-SHA512: e6127fc658da7876e36f22e2fae162dc19502ed7f8e931fdebc827dabd627e5346c6fbe6f6d0cd27fd3e5c96690ff35022ff6b48f2747b748ebd66a45c851c2b
2021-05-27 15:52:38 +02:00
W. J. van der Laan
e20745c1bd
Merge bitcoin/bitcoin#22029: [fuzz] Improve transport deserialization fuzz test coverage
e337145577 [fuzz] Occasional valid magic bytes for transport serialization test (Dhruv Mehta)
35571d8d9e [fuzz] Occasional valid checksum for transport serialization fuzz test (Dhruv Mehta)
654472a461 [fuzz] Add serialization to deserialization test (Dhruv Mehta)

Pull request description:

  This PR has 3 commits that increase the fuzz test coverage:

  Before commit 1:
  ```
  #306853 REDUCE cov: 798 ft: 5820 corp: 150/375Kb lim: 68333 exec/s: 1382 rss: 461Mb L: 254/63171 MS: 1 EraseBytes-
  #1453105 REDUCE cov: 798 ft: 5820 corp: 150/369Kb lim: 79613 exec/s: 1467 rss: 461Mb L: 6027/60873 MS: 1 EraseBytes-
  ```

  After commit 1 (adds serialization to de-serialization test):
  ```
  #303389 NEW cov: 1202 ft: 8382 corp: 157/382Kb lim: 68189 exec/s: 1451 rss: 447Mb L: 1386/65459 MS: 1 CopyPart-
  #1428759 REDUCE cov: 1202 ft: 8512 corp: 169/389Kb lim: 78749 exec/s: 1528 rss: 463Mb L: 1627/60488 MS: 1 EraseBytes-
  ```

  After commit 2 (provides an occasional checksum assist to the fuzzer inputs):
  ```
  #304820 NEW cov: 1440 ft: 4452 corp: 92/12551b lim: 2237 exec/s: 3386 rss: 486Mb L: 47/1111 MS: 1 ChangeByte-
  #1416181 REDUCE cov: 1442 ft: 5681 corp: 125/59Kb lim: 4096 exec/s: 3522 rss: 535Mb L: 2164/4049 MS: 1 EraseBytes-
  ```

  After commit 3 (provides an occasional magic bytes assist to the fuzzer inputs):
  ```
  #302684 NEW cov: 1454 ft: 3936 corp: 84/7056b lim: 2424 exec/s: 4146 rss: 477Mb L: 65/1108 MS: 3 CopyPart-CrossOver-CMP- DE: "\x0e\x00\x00\x00"-
  #1383925 REDUCE cov: 1454 ft: 4828 corp: 102/14573b lim: 4096 exec/s: 3954 rss: 534Mb L: 116/4050 MS: 2 EraseBytes-ChangeByte-
  ```

  If reviewers only accept the first commit, the seeds are not invalidated and new seeds are at: https://github.com/bitcoin-core/qa-assets/pull/61. In this case, we can also revert the test name change.

  If reviewers accept all three commits, the existing seeds are invalidated.

ACKs for top commit:
  practicalswift:
    Tested ACK e337145577

Tree-SHA512: d37f06eea0249322b00a99c4827359eb53aeb711751e5571f4681eeca06dc257e0c4cd4887150fc37cc2f689e26986112d768066ad274361615ba9b6a522c61a
2021-05-27 15:02:57 +02:00
Hennadii Stepanov
7076bba841
Merge bitcoin-core/gui#346: English translations update
df4c81fda4 English translations update (Hennadii Stepanov)
bfb53ddda9 scripted-diff: Fix ellipsis after pr20773 (Hennadii Stepanov)

Pull request description:

  Update for Transifex.

  After changing translator comments in #332 this update will show if Transifex triggers strings to be re-translated.

ACKs for top commit:
  laanwj:
    ACK df4c81fda4
  jarolrod:
    ACK df4c81fda4

Tree-SHA512: 1e54812bc04db6ae39e0b4d735b220ed8730a9941b17a0a2d09e21bcdd08e829adba86c35cf43c9be5e492ccb13e53a90149fcd7d6c0f5fdd022b978a1ff785c
2021-05-27 15:31:42 +03:00
Hennadii Stepanov
fa416cea84
depends: Bump Qt version to 5.12.11 2021-05-27 14:53:18 +03:00
W. J. van der Laan
22b845291c
Merge bitcoin/bitcoin#22063: build: Use Qt archive of the same version as the compiled binaries
cb7eba2a57 build: Use Qt archive of the same version as the compiled binaries (Hennadii Stepanov)

Pull request description:

  This PR fixes broken Android APK build when the `depends/sources` directory contains Qt source archives of different versions (e.g., Qt version update [pull request](https://github.com/bitcoin/bitcoin/pull/22054) in CI with the cached `depends/sources` directory).

  This is an alternative to #22058.

ACKs for top commit:
  MarcoFalke:
    review ACK cb7eba2a57
  laanwj:
    Code review ACK cb7eba2a57

Tree-SHA512: cf63a9809fba5cb13719d7e7bb5afc718a2cff5233b0670d30d30a0018d91278fcfc2a1b9ae8b84e8e3a52c95157bc465603cc754bb8a9d1a3d62415f01ad70f
2021-05-27 13:48:56 +02:00
Hennadii Stepanov
df4c81fda4
English translations update 2021-05-27 13:47:26 +03:00
Hennadii Stepanov
bfb53ddda9
scripted-diff: Fix ellipsis after pr20773
-BEGIN VERIFY SCRIPT-
sed -i 's|_("Loading wallet...")|_("Loading wallet…")|' src/wallet/*.cpp
-END VERIFY SCRIPT-
2021-05-27 13:46:36 +03:00
Hennadii Stepanov
b789914f17
Merge bitcoin-core/gui#332: Replace disambiguation strings with translator comments
8b77133651 qt: Replace disambiguation strings with translator comments (Hennadii Stepanov)

Pull request description:

  Since https://github.com/bitcoin/bitcoin/pull/21694 is merged, translator comments is the right way to pass context to translators.

  This PR fixes changes were made:
  - in #220 before https://github.com/bitcoin/bitcoin/pull/21694
  - in https://github.com/bitcoin/bitcoin/pull/21694 on testing purpose
  - in #125

  Closes #288.

ACKs for top commit:
  jarolrod:
    ACK 8b77133651

Tree-SHA512: 466ade35f4969a41fbf3196780b1ae9fa810bab5d2f09077f8631604636cc63b24a901c719f6b5797366d2aa307993d0aa419ce35200c8d0a741a3d81cad3e6b
2021-05-27 13:19:39 +03:00
W. J. van der Laan
811aa24c71
Merge bitcoin/bitcoin#22060: contrib: add torv3 seed nodes for testnet, drop v2 ones
6fe0516858 contrib: add torv3 seed nodes for testnet, drop v2 ones (Jon Atack)

Pull request description:

  Replace the ancient (2015) Tor V2 hardcoded seeds with new Tor V3 ones. This needs to be done before 0.22 to make sure onion-only testnet nodes can still connect to the network. Continues #21560.

  Ways to test:
  - Re-generate ` src/chainparamsseeds.h` with `cd contrib/seeds && python3 generate-seeds.py . > ../../src/chainparamsseeds.h`, check if git tree stays the same.
  - Create a new testnet node with `bitcoind -testnet -onlynet=onion -proxy=127.0.0.1:9050` (or delete `~/.bitcoin/testnet3/peers.dat`), check if it is able to connect to the network and get blocks.
  - Check if the addresses are connectable for ex.:
  ```python3
  #!/usr/bin/env python3
  import subprocess
  with open('contrib/seeds/nodes_test.txt') as f:
      for line in (line for line in (line.rstrip().split('#', 1)[0] for line in f) if line):
          subprocess.call(["nc", "-v", "-x", "127.0.0.1:9050", "-z"] + line.split(':'))
  ```

  Thanks to jonatack for providing the list.

ACKs for top commit:
  jonatack:
    ACK 6fe0516858

Tree-SHA512: 61bfdb44dfab9d02b75e5cb06c089a3b1a1fe7134875e1d09166c4116e961d809aa25422fe03f068876e9423b571ecc4a0c7a7eeacba4aac3b2768717f3ee6d6
2021-05-27 11:25:29 +02:00
Hennadii Stepanov
5c041cb348
Merge bitcoin-core/gui#311: Peers Window rename 'Peer id' to 'Peer'
657b33ef2d qt: add translator comments for peers table columns (Jarol Rodriguez)
73a91c63ec gui: rename "Peer Id" to "Peer" in tab column and details area (Jon Atack)

Pull request description:

  Picking up https://github.com/bitcoin-core/gui/pull/290

  **Original PR Description:**
  - renames the peers tab column header from `Peer Id` to `Peer` to allow resizing the column more tightly (this will be particularly useful after #256) and does the same for the peer details area.

  While here, we also add Qt translator comments for the Peer Table columns.

  | Master        | PR               |
  | ----------- | ----------- |
  | ![Screen Shot 2021-05-03 at 1 23 05 AM](https://user-images.githubusercontent.com/23396902/116843818-20a14b00-abaf-11eb-913e-ddff11cda5cd.png) | ![Screen Shot 2021-05-05 at 4 08 45 AM](https://user-images.githubusercontent.com/23396902/117112825-a2cc7380-ad57-11eb-939b-1aceb4214ad1.png) |

ACKs for top commit:
  jonatack:
    utACK 657b33ef2d
  hebasto:
    re-ACK 657b33ef2d

Tree-SHA512: f50116f7ca8719cadf1f95f45e3594b3b92bde9c43eb954f3e963ed10629dd9406efdb5e96aa1f750a926e24a96321d824ed3780bd9cd748774e0b85fd0c9535
2021-05-27 00:16:18 +03:00
Hennadii Stepanov
7d07192dde
Add src/qt/android/.gitignore
This change makes git ignore files created by `make apk`.
2021-05-26 23:29:19 +03:00
W. J. van der Laan
456c8d6cd8
Merge bitcoin-core/gui#313: qt: Optimize string concatenation by default
a02c970eb0 qt, refactor: Revert explicit including QStringBuilder (Hennadii Stepanov)
3fd3a0fc87 qt, build: Optimize string concatenation (Hennadii Stepanov)

Pull request description:

  From [Qt docs](https://doc.qt.io/qt-5/qstring.html#more-efficient-string-construction):
  > ... multiple uses of the \[`QString`\] '+' operator usually means multiple memory allocations. When concatenating n substrings, where n > 2, there can be as many as n - 1 calls to the memory allocator.

  With this PR
  > ... the '+' will automatically be performed as the `QStringBuilder` '%' everywhere.

  The change in the `src/Makefile.qt.include` file does not justify submitting this PR into the main repo, IMHO.

ACKs for top commit:
  laanwj:
    Code review ACK a02c970eb0
  Talkless:
    utACK a02c970eb0, built successfully on Debian Sid with Qt 5.15.2, but did not check if any displayed strings are "wrong" after refactoring.
  jarolrod:
    ACK a02c970eb0

Tree-SHA512: cbb476ee96f27c3bd6e125efab74d8bf24bbdb4c30576b3feea45e203405f3bf5b497dd7d3e11361fc825fcbf4b893b152921a9efdeaf73b42d1865d85f0ae84
2021-05-26 15:01:18 +02:00
Russell Yanofsky
c7bd5842e4 MOVEONLY: CWallet transaction code out of wallet.cpp/.h
This commit just moves functions without making any changes. It can be
reviewed with `git log -p -n1 --color-moved=dimmed_zebra`

Motivation for this change is to make wallet.cpp/h less monolithic and
start to make wallet transaction state tracking comprehensible so bugs
in
https://github.com/bitcoin-core/bitcoin-devwiki/wiki/Wallet-Transaction-Conflict-Tracking
can be fixed safely without introducing new problems.

This commit moves wallet classes and methods that deal with transactions
out of wallet.cpp/.h into better organized files:

- transaction.cpp/.h - CWalletTx and CMerkleTx class definitions
- receive.cpp/.h - functions checking received transactions and computing balances
- spend.cpp/.h - functions creating transactions and finding spendable coins

After #20773, when loading is separated from syncing it will also be
possible to move more wallet.cpp/.h functions to:

- sync.cpp/.h - functions handling chain notifications and rescanning

This commit arranges receive.cpp and spend.cpp functions in dependency
order so it's possible to skim receive.cpp and get an idea of how
computing balances works, and skim spend.cpp and get an idea of how
transactions are created, without having to jump all over wallet.cpp
where functions are not in order and there is a lot of unrelated code.

Followup commit "refactor: Detach wallet transaction methods" in
https://github.com/bitcoin/bitcoin/pull/21206 follows up this PR and
tweaks function names and arguments to reflect new locations. The two
commits are split into separate PRs because this commit is more work to
maintain and less work to review, while the other commit is less work to
maintain and more work to review, so hopefully this commit can be merged
earlier.
2021-05-26 06:32:51 -05:00
fanquake
ecddd12482
Merge bitcoin/bitcoin#18418: wallet: Increase OUTPUT_GROUP_MAX_ENTRIES to 100
e6fe1c37d0 rpc: Improve avoidpartialspends and avoid_reuse documentation (Fabian Jahr)
8f073076b1 wallet: Increase OUTPUT_GROUP_MAX_ENTRIES to 100 (Fabian Jahr)

Pull request description:

  Follow-up to #17824.

  This increases OUTPUT_GROUP_MAX_ENTRIES to 100 which means that OutputGroups will now be up to 100 outputs large, up from previously 10. The main motivation for this change is that during the PR review club on #17824 [several participants signaled](https://bitcoincore.reviews/17824.html#l-339) that 100 might be a better value here.

  I think fees should be manageable for users but more importantly, users should know what they can expect when using the wallet with this configuration, so I also tried to clarify the documentation on `-avoidpartialspends` and `avoid_reuse` a bit. If there are other additional ways how or docs where users can be made aware of the potential consequences of using these parameters, please let me know. Another small upside is that [there seem to be a high number of batching transactions with 100 and 200 inputs](https://miro.medium.com/max/3628/1*sZ5eaBSbsJsHx-J9iztq2g.png)([source](https://medium.com/@hasufly/an-analysis-of-batching-in-bitcoin-9bdf81a394e0)) giving these transactions a bit of a larger anonymity set, although that is probably a very weak argument.

ACKs for top commit:
  jnewbery:
    ACK e6fe1c37d0
  Xekyo:
    retACK e6fe1c37d0
  rajarshimaitra:
    tACK `e6fe1c3`
  achow101:
    ACK e6fe1c37d0
  glozow:
    code review ACK e6fe1c37d0

Tree-SHA512: 79685c58bafa64ed8303b0ecd616fce50fc9a2b758aa79833e4ad9f15760e09ab60c007bc16ab4cbc4222e644cfd154f1fa494b0f3a5d86faede7af33a6f2826
2021-05-26 19:32:51 +08:00
Hennadii Stepanov
3ec033ed32
Merge bitcoin-core/gui#121: Early subscribe core signals in transaction table model
cafef080a2 qt: Refactor to remove unnecessary block in DispatchNotifications (João Barbosa)
57785fb7f6 qt: Early subscribe core signals in transaction table model (João Barbosa)
c6cbdf1a90 qt: Refactor ShowProgress to DispatchNotifications (João Barbosa)
3bccd50ad2 qt: Set flag after inital load on transaction table model (João Barbosa)

Pull request description:

  This fixes the case where transaction notifications arrive between `getWalletTxs` and `subscribeToCoreSignals`. Basically notifications are queued until `getWalletTxs` and wallet rescan complete.

  This is also a requirement to call `getWalletTxs` in a background thread.

  Motivated by https://github.com/bitcoin/bitcoin/issues/20241.

ACKs for top commit:
  jonatack:
    tACK cafef080a2
  ryanofsky:
    Code review ACK cafef080a2. Only change since last review is splitting commits and replacing m_progress with m_loading.
  meshcollider:
    Code review ACK cafef080a2

Tree-SHA512: 003caab2f2ae3522619711c8d02d521d2b8f7f280a467f6c3d08abf37ca81cc66b4b9fa10acfdf34e5fe250da7b696cfeec435f72b53c1ea97ccda96d8b4be33
2021-05-26 13:30:17 +03:00
W. J. van der Laan
707ba8692b
Merge bitcoin/bitcoin#21966: Remove double serialization; use software encoder for fee estimation
66545da200 Remove support for double serialization (Pieter Wuille)
fff1cae43a Convert uses of double-serialization to {En,De}codeDouble (Pieter Wuille)
afd964d70b Convert existing float encoding tests (Pieter Wuille)
bda33f98e2 Add unit tests for serfloat module (Pieter Wuille)
2be4cd94f4 Add platform-independent float encoder/decoder (Pieter Wuille)
e40224d0c7 Remove unused float serialization (MarcoFalke)

Pull request description:

  Based on #21981.

  This adds a software-based platform-independent float/double encoder/decoder (platform independent in the sense that it only uses arithmetic and library calls, but never inspects the binary representation). This should strengthen our guarantee that encoded float/double values are portable across platforms. It then removes the functionality to serialize doubles from serialize.h, and replaces its only (non-test) use for fee estimation data serialization with the software encoder.

  At least on x86/ARM, the only difference should be how certain NaN values are encoded/decoded (but not *whether* they are NaN or not).

  It comes with tests that verify on is_iec559 platforms (which are the only ones we support, at least for now) that the serialized bytes exactly match the binary representation of floats in memory (for non-NaN).

ACKs for top commit:
  laanwj:
    Code review re-ACK 66545da200
  practicalswift:
    cr re-ACK 66545da200

Tree-SHA512: 62ad9adc26e28707b2eb12a919feefd4fd10cf9032652dbb1ca1cc97638ac21de89e240858e80d293d5112685c623e58affa3d316a9783ff0e6d291977a141f5
2021-05-26 10:16:41 +02:00
fanquake
7aa41fc581
Merge bitcoin/bitcoin#22042: Replace size/weight estimate tuple with struct for named fields
881a3e2e17 Replace size/weight estimate tuple with struct for named fields (Gregory Sanders)

Pull request description:

  For clarity of return values of size estimation functions.

ACKs for top commit:
  MarcoFalke:
    review ACK 881a3e2e17
  practicalswift:
    cr ACK 881a3e2e17

Tree-SHA512: 9aa97e3774fcaf1e5b905259418d827051325c2ad76d6c7388ad7c687c605c024a6c5d2f7e9565f4c180ad1a9f6b179557fcb8b23371ff1a4f3b81300ac1f3d1
2021-05-26 14:24:50 +08:00
MarcoFalke
48c86eca02
Merge bitcoin/bitcoin#22069: fuzz: don't try and use fopencookie() when building for Android
1be6267ce1 fuzz: don't try and use fopencookie when building for Android (fanquake)

Pull request description:

  When building for Android, `_GNU_SOURCE` will be defined:
  ```bash
  /home/ubuntu/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang++ -dM -E -x c++ - < /dev/null
  #define _GNU_SOURCE 1
  #define _LP64 1
  #define __AARCH64EL__ 1
  #define __AARCH64_CMODEL_SMALL__ 1
  #define __ANDROID_API__ 30
  #define __ANDROID__ 1
  #define __ARM_64BIT_STATE 1
  .....
  ```
  but it doesn't have the [`fopencookie()` function](https://www.gnu.org/software/libc/manual/html_node/Streams-and-Cookies.html), or define the `cookie_io_functions_t` type, which results in compile failures:
  ```bash
  In file included from test/fuzz/addition_overflow.cpp:7:
  ./test/fuzz/util.h:388:15: error: unknown type name 'cookie_io_functions_t'
          const cookie_io_functions_t io_hooks = {
                ^
  15 warnings and 1 error generated.
  ```

  Just skip trying to use it if we are building for Android. Should fix #22062.

ACKs for top commit:
  practicalswift:
    cr ACK 1be6267ce1

Tree-SHA512: d62f63d0624af04b76c7e07b0332c71eca2bf9cd9e096a60aea9e212b7bbc1548e9fa9a76d065ec719bb345fe8726619c3bd2d0631f54d877c82972b7b289321
2021-05-26 07:44:34 +02:00
MarcoFalke
35b83e6e43
Merge bitcoin/bitcoin#22056: doc: describe in fuzzing.md how to reproduce a CI crash
d8f1ea7227 doc: describe in fuzzing.md how to reproduce a CI crash (Jon Atack)

Pull request description:

  Not sure if this is 100% accurate or missing any pertinent info, but I misremembered how to do this today and it seems like useful information to provide.

ACKs for top commit:
  practicalswift:
    ACK d8f1ea7227

Tree-SHA512: 1b74e4187e6ea13b04eb03b3c6e2615c4eb18cc38cce215ad1645f8b135c5c31a243748eb313ccec05f1f62187ba33d550119acf07088968d2d2c1c09bc4c653
2021-05-26 07:35:01 +02:00
fanquake
7e2a9890e5
depends: latest config.sub (2021-04-30) 2021-05-26 13:30:18 +08:00
fanquake
f16d4cd8c5
depends: latest config.guess (2021-05-24) 2021-05-26 13:28:47 +08:00