Commit Graph

2546 Commits

Author SHA1 Message Date
Andrew Chow
91ccb62faa
Merge bitcoin/bitcoin#25158: rpc, wallet: add abandoned field for all categories of transaction in ListTransaction
0c520679ab doc: add release notes for `abandoned` field in `gettransaction` and `listtransactions` (brunoerg)
a1aaa7f51f rpc, wallet: add `abandoned` field for all categories of transactions in ListTransactions (brunoerg)

Pull request description:

  Fixes #25130

ACKs for top commit:
  achow101:
    re-ACK 0c520679ab

Tree-SHA512: 1864460d76decab7898737c96517d722055eb8f81ca52248fe1035723258c6cd4a93251e06a86ecbbb0b0a80af1466b2c86fb142ace4ccb74cc40d5dc3967d7f
2023-04-26 08:50:56 -04:00
glozow
bdfe27c9d2
Merge bitcoin/bitcoin#26933: mempool: disallow txns under min relay fee, even in packages
bf77fc9cb4 [test] mempool full in package accept (glozow)
b51ebccc28 [validation] set PackageValidationState when mempool full (glozow)
563a2ee4f5 [policy] disallow transactions under min relay fee, even in packages (glozow)
c4554fe894 [test] package cpfp bumps parents <mempoolminfee but >=minrelaytxfee (glozow)
ac463e87df [test util] mock mempool minimum feerate (glozow)

Pull request description:

  Part of package relay, see #27463.

  Note that this still allows packages to bump transactions that are below the dynamic mempool minimum feerate, which means this still solves the "mempool is congested and my presigned 1sat/vB tx is screwed" problem for all transactions.

  On master, the package policy (only accessible through regtest-only RPC submitpackage) allows 0-fee (or otherwise below min relay feerate) transactions if they are bumped by a child. However, with default package limits, we don't yet have a DoS-resistant way of ensuring these transactions remain bumped throughout their time in the mempool. Primarily, the fee-bumping child may later be replaced by another transaction that doesn't bump the parent(s). The parent(s) could potentially stay bumped by other transactions, but not enough to ever be selected by the `BlockAssembler` (due to `blockmintxfee`).

  For example, (tested [here](https://github.com/glozow/bitcoin/commits/26933-motivation)):
  - The mempool accepts 24 below-minrelayfeerate transactions ("0-fee parents"), all bumped by a single high-fee transaction ("the fee-bumping child"). The fee-bumping child also spends a confirmed UTXO.
  - Two additional children are added to each 0-fee parent. These children each pay a feerate slightly above the minimum relay feerate (e.g. 1.9sat/vB) such that, for each 0-fee parent, the total fees of its two children divided by the total size of the children and parent is above the minimum relay feerate.
  - If a block template is built now, all transactions would be selected.
  - A transaction replaces the the fee-bumping child, spending only the confirmed UTXO and not any of the outputs from the 0-fee parents.
   - The 0-fee parents now each have 2 children. Their descendant feerates are above minrelayfeerate, which means that they remain in the mempool, even if the mempool evicts all below-minrelayfeerate packages.
   - If a block template is built now, none of the 0-fee parents or their children would be selected.
   - Even more low-feerate descendants can be added to these below-minrelayfeerate packages and they will not be evicted until they expire or the mempool reaches capacity.

  Unless we have a DoS-resistant way of ensuring package CPFP-bumped transactions are always bumped, allowing package CPFP to bump below-minrelayfeerate transactions can result in these problematic situations. See #27018 which proposes a partial solution with some limitations, and contains discussion about potential improvements to eviction strategy. While no adequate solution exists, for now, avoid these situations by requiring all transactions to meet min relay feerate.

ACKs for top commit:
  ajtowns:
    reACK bf77fc9cb4
  instagibbs:
    re-ACK bf77fc9cb4

Tree-SHA512: 28940f41493a9e280b010284316fb8caf1ed7b2090ba9a4ef8a3b2eafc5933601074b142f4f7d4e3c6c4cce99d3146f5c8e1393d9406c6f2070dd41c817985c9
2023-04-26 11:18:09 +01:00
Andrew Chow
9c24826e7b doc: Remove 25.0 release note fragments 2023-04-20 14:01:06 -04:00
fanquake
3133d935ce
Merge bitcoin/bitcoin#27482: kernel: chainparams updates for 25.x
a2bef805c1 kernel: update m_assumed_* chain params for 25.x (fanquake)
4128e01dba kernel: update chainTxData for 25.x (fanquake)
00b2b114b4 kernel: update nMinimumChainWork & defaultAssumeValid for 25.x (fanquake)
07fcc0a82c doc: update references to kernel/chainparams.cpp (fanquake)

Pull request description:

  Update chainparams pre `25.x` branch off.
  Co-Author in the commits as a PR (#27223) had previously been opened too-early to do the same.

  Note: Remember that some variance is expected in the `m_assumed_*` sizes.

ACKs for top commit:
  achow101:
    ACK a2bef805c1
  josibake:
    ACK a2bef805c1
  gruve-p:
    ACK a2bef805c1
  dergoegge:
    ACK a2bef805c1 on the new mainnet params

Tree-SHA512: 0b19c2ef15c6b15863d6a560a1053ee223057c7bfb617ffd3400b1734cee8f75bc6fd7f04d8f8e3f5af6220659a1987951a1b36945d6fe17d06972004fd62610
2023-04-20 11:23:13 +01:00
fanquake
fde224a661
doc: remove outdated version number usage from release-process
We no-longer use the leading 0. version number, and having a mixture is
both in the release-process examples is needlessly confusing.
2023-04-18 12:36:19 +01:00
fanquake
07fcc0a82c
doc: update references to kernel/chainparams.cpp 2023-04-18 11:02:05 +01:00
glozow
563a2ee4f5
[policy] disallow transactions under min relay fee, even in packages
Avoid adding transactions below min relay feerate because, even if they
were bumped through CPFP when entering the mempool, we do not have a
DoS-resistant way of ensuring they always remain bumped.  In the future,
this rule can be relaxed (e.g. to allow packages to bump 0-fee
transactions) if we find a way to do so.
2023-04-17 09:53:59 +01:00
Riahiamirreza
f24f4fa3f1
Update developer-notes.md 2023-04-14 20:11:51 +03:30
Andrew Chow
6a167325f0
Merge bitcoin/bitcoin#27279: Add "warnings", deprecate "warning" in {create,load,unload,restore}wallet
7ccdd741fe test: fix importmulti/importdescriptors assertion (Jon Atack)
19d888ce40 rpc: move WALLET_FLAG_CAVEATS to the compilation unit of its caller (Jon Atack)
01df011ca2 doc: release note for wallet RPCs "warning" field deprecation (Jon Atack)
9ea8b3739a test: createwallet "warning" field deprecation test (Jon Atack)
645d7f75ac rpc: deprecate "warning" field in {create,load,unload,restore}wallet (Jon Atack)
2f4a926e95 test: add test coverage for "warnings" field in createwallet (Jon Atack)
4a1e479ca6 rpc: add "warnings" field to RPCs {create,load,unload,restore}wallet (Jon Atack)
079d8cdda8 rpc: extract wallet "warnings" fields to a util helper (Jon Atack)
f73782a903 doc: fix/improve warning helps in {create,load,unload,restore}wallet (Jon Atack)

Pull request description:

  Based on discussion and concept ACKed in #27138, add a `warnings` field to RPCs createwallet, loadwallet, unloadwallet, and restorewallet as a JSON array of strings to replace the `warning` string field in these 4 RPCs. The idea is to more gracefully handle multiple warning messages and for consistency with other wallet RPCs.  Then, deprecate the latter fields, which represent all the remaining RPC `warning` fields.

  The first commit f73782a903 implements https://github.com/bitcoin/bitcoin/pull/27138#issuecomment-1474789198 as an alternative to #27138. One of those two could potentially be backported to our currently supported releases.

ACKs for top commit:
  achow101:
    ACK 7ccdd741fe
  1440000bytes:
    utACK 7ccdd741fe
  vasild:
    ACK 7ccdd741fe
  pinheadmz:
    re-ACK 7ccdd741fe

Tree-SHA512: 314e0a4c41fa383d95e2817bfacf359d449e460529d235c3eb902851e2f4eacbabe646d9a5a4beabc4964cdfabf6397ed8301366a58d344a2f787f83b75e9d64
2023-04-12 13:09:23 -04:00
fanquake
7f4ab67e7b
Merge bitcoin/bitcoin#27449: doc: update OpenBSD build docs for 7.3 (external signer support available)
6b17994ede doc: update OpenBSD build docs for 7.3 (external signer support available) (Sebastian Falbesoner)

Pull request description:

  With OpenBSD 7.3, the waitid(2) system call is implemented (see 8112871f19, first mentioned kernel improvement at https://www.openbsd.org/73.html).

  This means Boost.Process finally doesn't fail to compile anymore and we can remove the build hint about missing external signer support. Tested on my amd64 machine by reconfiguring / rebuilding master branch and successfully running the functional test wallet_signer.py. ✔️

ACKs for top commit:
  fanquake:
    ACK 6b17994ede - haven't tested, but looks good to me.

Tree-SHA512: 5bbcecce4ced38d8221f2c906a54667e50317e9ded182554cf73bb7f2fce55a38e53730eca25f813cff1d2d65c94141eb158d40f83228d12dcf859c16a1798b9
2023-04-12 15:50:09 +01:00
Sebastian Falbesoner
6b17994ede doc: update OpenBSD build docs for 7.3 (external signer support available)
With OpenBSD 7.3, the waitid(2) system call is implemented (see
8112871f19).

This means Boost.Process finally doesn't fail to compile anymore and we
can remove the build hint about missing external signer support. Tested
on my amd64 machine by reconfiguring / rebuilding master branch and
successfully running the functional test wallet_signer.py.
2023-04-11 22:59:08 +02:00
Andrew Chow
18fc71a3ad doc: Release note for purpose string restriction 2023-04-11 15:55:32 -04:00
Andrew Chow
a3eea2a27d
Merge bitcoin/bitcoin#27441: doc: correct sqlite & qrencode versions used in depenendencies.md
a12d9cfa46 doc: correct sqlite & qrencode versions used in depenendencies.md (fanquake)

Pull request description:

  Followup to https://github.com/bitcoin/bitcoin/pull/27312 & https://github.com/bitcoin/bitcoin/pull/25378.

ACKs for top commit:
  achow101:
    ACK a12d9cfa46
  hebasto:
    ACK a12d9cfa46, I have reviewed the code and it looks OK, I agree it can be merged.
  jarolrod:
    ACK a12d9cfa46

Tree-SHA512: 29e1fe4c31089fce6acbadb14aa7619fdd55738a882b490f1a0835d7648798a68b4f0d62e213c60d92f8e021ea856a4d1759578da07413265fef2338840da506
2023-04-10 21:20:53 -04:00
Jon Atack
01df011ca2 doc: release note for wallet RPCs "warning" field deprecation 2023-04-10 10:41:56 -07:00
fanquake
d544d03ba6
Merge bitcoin/bitcoin#26741: doc: FreeBSD DataDirectoryGroupReadable Setting
499c464394 doc: update DataDirectoryGroupReadable 1 in tor.md (Jesse Barton)

Pull request description:

  Updating tor.md doc to include mention of FreeBSD requiring the DataDirectoryGroupReadable be set to 1.
  Default per the FreeBSD man page is 0.

         DataDirectoryGroupReadable 0|1
     If this option is set to 0, don't allow the filesystem groupto
     readthe DataDirectory. If the option is setto 1, make the
     DataDirectory readable by the default GID. (Default:0)

ACKs for top commit:
  vasild:
    ACK 499c464394

Tree-SHA512: 8750b49cd04e900435c7991d1a24641fd1171227c1f14ed59afb157f24c1ca60380d30aecfb174ca46fd5b4b99dcdb3a1cfd019aafc343362e8103abf7c17e6a
2023-04-09 22:11:43 +02:00
fanquake
a12d9cfa46
doc: correct sqlite & qrencode versions used in depenendencies.md 2023-04-09 12:55:47 +02:00
Jesse Barton
499c464394 doc: update DataDirectoryGroupReadable 1 in tor.md
Move DataDirectoryGroupReadable 1 up a few lines to more clearly
communicate that it is required for the filesystem group to read the
DataDirectory.

Per the Tor documentation
https://2019.www.torproject.org/docs/tor-manual.html.en#DataDirectoryGroupReadable
"If this option is set to 0, don’t allow the filesystem group to read
the DataDirectory. If the option is set to 1, make the DataDirectory
readable by the default GID. (Default: 0)"
2023-04-07 12:31:58 -05:00
Andrew Chow
b7edd55c22
Merge bitcoin/bitcoin#26899: p2p: set -dnsseed and -listen false if maxconnections=0
fabb95e7bf doc: add release note for 26899 (brunoerg)
c84c5f6e89 p2p: set `-dnsseed` and `-listen` false if `maxconnections=0` (brunoerg)

Pull request description:

  If `maxconnections=0`, it means our possible connections are going to be manual (e.g via `addnode`). For this reason, we can skip DNS seeds and set `listen` false.

ACKs for top commit:
  achow101:
    ACK fabb95e7bf
  vasild:
    ACK fabb95e7bf
  1440000bytes:
    reACK fabb95e7bf

Tree-SHA512: 33919a784723a32450f39ee4f6de3e27cc7c7f4c6ab4b8ce673981d461df334197deaf43e3f882039fa1ac36b2fddc6c6ab4413512d6c393d4a6865302dd05e7
2023-03-20 12:49:10 -04:00
Andrew Chow
60f142e395
Merge bitcoin/bitcoin#26531: mempool: Add mempool tracepoints
4b7aec2951 Add mempool tracepoints (virtu)

Pull request description:

  This PR adds multiple mempool tracepoints.

  | tracepoint  | description |
  | ------------- | ------------- |
  | `mempool:added`  | Is called when a transaction enters the mempool  |
  | `mempool:removed`  | ... when a transaction is removed from the mempool |
  | `mempool:replaced`  | ... when a transaction is replaced in the mempool |
  | `mempool:rejected`  | ... when a transaction is rejected from entering the mempool |

  The tracepoints are further documented in `docs/tracing.md`. Usage is demonstrated in the example script `contrib/tracing/mempool_monitor.py`. Interface tests are provided in `test/functional/interface_usdt_mempool.py`.

  The rationale for passing the removal reason as a string instead of numerically is that the benefits of not having to maintain a redundant enum-string mapping seem to outweigh the small cost of string generation. The reject reason is passed as string as well, although in this instance the string does not have to be generated but is readily available.

ACKs for top commit:
  0xB10C:
    ACK 4b7aec2951
  achow101:
    ACK 4b7aec2951

Tree-SHA512: 6deb3ba2d1a061292fb9b0f885f7a5c4d11b109b838102d8a8f4828cd68f5cd03fa3fc64adc6fdf54a08a1eaccce261b0aa90c2b8c33cd5fd3828c8f74978958
2023-03-20 12:42:24 -04:00
virtu
4b7aec2951 Add mempool tracepoints
Tracepoints for added, removed, replaced, and rejected transactions.

The removal reason is passed as string instead of a numeric value, since
the benefits of not having to maintain a redundant enum-string mapping
seem to outweigh the small cost of string generation.  The reject reason
is passed as string as well, although here the string does not have to
be generated but is readily available.

So far, tracepoint PRs typically included two demo scripts: a naive
bpftrace script to show raw tracepoint data and a bcc script for a more
refined view. However, as some of the ongoing changes to bpftrace
introduce a certain degree of unreliability (running some of the
existing bpftrace scripts was not possible with standard kernels and
bpftrace packages on latest stable Ubuntu, Debian, and NixOS), this PR
includes only a single bcc script that fuses the functionality of former
bpftrace and bcc scripts.
2023-03-20 15:57:31 +01:00
Andrew Chow
ebb15ea75a
Merge bitcoin/bitcoin#26207: rest: add verbose and mempool_sequence query params for mempool/contents
1ff5d61dfd doc: add mempool/contents rest verbose and mempool_sequence args (Andrew Toth)
52a31dccc9 tests: mempool/contents verbose and mempool_sequence query params tests (Andrew Toth)
a518fff0f2 rest: add verbose and mempool_sequence query params for mempool/contents (Andrew Toth)

Pull request description:

  The verbose mempool json response can get very large. This adds an option to return the non-verbose response of just the txids. It is identical to the rpc response so the diff here is minimal. This also adds the mempool_sequence parameter for rpc consistency. Verbose defaults to true to remain backwards compatible.

  It uses query parameters to be compatible with the efforts in https://github.com/bitcoin/bitcoin/issues/25752.

ACKs for top commit:
  achow101:
    ACK 1ff5d61dfd
  stickies-v:
    re-ACK [1ff5d61](1ff5d61dfd)
  pablomartin4btc:
    tested ACK 1ff5d61dfd.

Tree-SHA512: 1bf08a7ffde2e7db14dc746e421feedf17d84c4b3f1141e79e36feb6014811dfde80e1d8dbc476c15ff705de2d3c967b3081dcd80536d76b7edf888f1a92e9d1
2023-03-15 19:39:30 -04:00
fanquake
3d53a85ddf
Merge bitcoin/bitcoin#27220: doc: update broken str util reference links on developer-notes
da347de530 doc: update broken links (pablomartin4btc)

Pull request description:

  References to `utilstrencodings` and `lint-locale-dependence.sh` where incorrect, updating them accordingly.

  Also, adding another reference to util function [`LocaleIndependentAtoi`](https://github.com/bitcoin/bitcoin/blob/master/src/util/strencodings.h#L108-L118), which is related with the updated section of the guide:

  ```
  // LocaleIndependentAtoi is provided for backwards compatibility reasons.
  //
  // New code should use ToIntegral or the ParseInt* functions
  // which provide parse error feedback.
  //
  // The goal of LocaleIndependentAtoi is to replicate the defined behaviour of
  // std::atoi as it behaves under the "C" locale, and remove some undefined
  // behavior. If the parsed value is bigger than the integer type's maximum
  // value, or smaller than the integer type's minimum value, std::atoi has
  // undefined behavior, while this function returns the maximum or minimum
  // values, respectively.
  ```

ACKs for top commit:
  MarcoFalke:
    lgtm ACK da347de530

Tree-SHA512: c8f4cd9cff1fb3ea367ac9dbe5aa45dc187fc60114f2e2106e02e0e17fea4ee34d6e0c408fe920c2d8765e06b4dc30c231f0454fa35469c4399e0cadbcd341ba
2023-03-11 11:02:03 +01:00
brunoerg
fabb95e7bf doc: add release note for 26899 2023-03-10 13:42:32 -03:00
fanquake
c7f1d95f52
Merge bitcoin/bitcoin#27205: doc: Show how less noisy clang-tidy output can be achieved
54c4d03578 doc: Show how less noisy clang-tidy output can be achieved (TheCharlatan)

Pull request description:

  Adds a paragraph to the clang-tidy section explaining how to de-noise its output. By default clang-tidy will print errors arrising from included headers in leveldb and other dependencies. By passing `--enable-suppress-external-warnings` flag to configure, errors arising from external dependencies are suppressed. Additional errors arrising from internal dependencies such as leveldb are suppressed by passing the `src/.bear-tidy-config` configuration file to bear. This file includes exclusionary rules for leveldb.

ACKs for top commit:
  MarcoFalke:
    utACK 54c4d03578

Tree-SHA512: c3dd8fb0600157582a38365a587e02e1d249fb246d6b8b4949a800fd05d3473dee49e2a4a556c60e51d6508feff810024e55fe09f5a0875f560fde30f3b6817c
2023-03-10 17:38:56 +01:00
TheCharlatan
54c4d03578
doc: Show how less noisy clang-tidy output can be achieved 2023-03-10 16:47:41 +01:00
pablomartin4btc
da347de530 doc: update broken links 2023-03-08 18:26:41 -03:00
Andrew Chow
1ff135ca7f
Merge bitcoin/bitcoin#26194: rpc, wallet: use the same next_index key in listdescriptors and importdescriptors
b082f28101 rpc, wallet: use the same `next_index` in listdescriptors and importdescriptors (w0xlt)

Pull request description:

  Currently `listdescriptors` RPC uses `next` key to represent `WalletDescriptor::next_index` while `importdescriptors` uses `next_index`. This creates two different descriptor formats.

  This  PR changes `listdescriptors` to use the same key as `importdescriptors`.

ACKs for top commit:
  achow101:
    ACK b082f28101
  aureleoules:
    reACK b082f28101

Tree-SHA512: c29ec59051878e614d749ed6dc85e5c14ad00db0e8fcbce3f5066d1aae85ef07ca70f02920299e48d191b7387024fe224b0054c4191a5951cb805106f7b8e37b
2023-03-08 12:15:31 -05:00
Andrew Chow
d5e4f9a439
Merge bitcoin/bitcoin#25740: assumeutxo: background validation completion
2b373fe49d docs: update assumeutxo.md (James O'Beirne)
87a1108c81 test: add snapshot completion unittests (James O'Beirne)
d70919a88f refactor: make MempoolMutex() public (James O'Beirne)
7300ced9de log: add LoadBlockIndex() message for assumedvalid blocks (James O'Beirne)
d96c59cc5c validation: add ChainMan logic for completing UTXO snapshot validation (James O'Beirne)
f2a4f3376f move-only-ish: init: factor out chainstate initialization (James O'Beirne)
637a90b973 add Chainstate::HasCoinsViews() (James O'Beirne)
c29f26b47b validation: add CChainState::m_disabled and ChainMan::isUsable (James O'Beirne)
5ee22cdafd add ChainstateManager.GetSnapshot{BaseHeight,BaseBlock}() (James O'Beirne)

Pull request description:

  This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11) (parent PR: https://github.com/bitcoin/bitcoin/pull/15606)

  Part two of replacing https://github.com/bitcoin/bitcoin/pull/24232.

  ---

  When a user activates a snapshot, the serialized UTXO set data is used to create an "assumed-valid" chainstate, which becomes active in an attempt to get the node to network tip as quickly as possible. Simultaneously in the background, the already-existing chainstate continues "conventional" IBD to both accumulate full block data and serve as a belt-and-suspenders to validate the assumed-valid chainstate.

  Once the background chainstate's tip reaches the base block of the snapshot used, we set `m_stop_use` on that chainstate and immediately take the hash of its UTXO set; we verify that this matches the assumeutxo value in the source code. Note that while we ultimately want to remove this background chainstate, we don't do so until the following initialization process, when we again check the UTXO set hash of the background chainstate, and if it continues to match, we remove the (now unnecessary) background chainstate, and move the (previously) assumed-valid chainstate into its place. We then reinitialize the chainstate in the normal way.

  As noted in previous comments, we could do the filesystem operations "inline" immediately when the background validation completes, but that's basically just an optimization that saves disk space until the next restart. It didn't strike me as worth the risk of moving chainstate data around on disk during runtime of the node, though maybe my concerns are overblown.

  The final result of this completion process is a fully-validated chain, where the only evidence that the user synced using assumeutxo is the existence of a `base_blockhash` file in the `chainstate` directory.

ACKs for top commit:
  achow101:
    ACK 2b373fe49d

Tree-SHA512: a204e1d6e6932dd83c799af3606b01a9faf893f04e9ee1a36d63f2f1ccfa9118bdc1c107d86976aa0312814267e6a42074bf3e2bf1dead4b2513efc6d955e13d
2023-03-07 18:54:59 -05:00
James O'Beirne
2b373fe49d docs: update assumeutxo.md
Include notes about the `chainstate_snapshot` rename as well as
updates for the included code.
2023-03-07 16:06:20 -05:00
Hennadii Stepanov
9c371e50a2
doc: Update Transifex links and slug format in Release Process 2023-03-01 15:01:16 +00:00
fanquake
84ca5b349e
doc: mention sanitizer suppressions in developer docs
Should be enough to close #17834.
2023-02-24 12:16:37 +00:00
Andrew Chow
b7702bd546
Merge bitcoin/bitcoin#25943: rpc: Add a parameter to sendrawtransaction which sets a maximum value for unspendable outputs.
7013da07fb Add release note for PR#25943 (David Gumberg)
04f270b435 Add test for unspendable transactions and parameter 'maxburnamount' to sendrawtransaction. (David Gumberg)

Pull request description:

  This PR adds a user configurable, zero by default parameter — `maxburnamount` — to `sendrawtransaction`. This PR makes bitcoin core reject transactions that contain unspendable outputs which exceed `maxburnamount`.  closes #25899.

  As a result of this PR, `sendrawtransaction` will by default block 3 kinds of transactions:

  1. Those that begin with `OP_RETURN` - (datacarriers)
  2. Those whose lengths exceed the script limit.
  3. Those that contain invalid opcodes.

  The user is able to configure a `maxburnamount` that will override this check and allow a user to send a potentially unspendable output into the mempool.

  I see two legitimate use cases for this override:
  1. Users that deliberately use `OP_RETURN` for datacarrier transactions that embed data into the blockchain.
  2.  Users that refuse to update, or are unable to update their bitcoin core client would be able to make use of new opcodes that their client doesn't know about.

ACKs for top commit:
  glozow:
    reACK 7013da07fb
  achow101:
    re-ACK 7013da07fb

Tree-SHA512: f786a796fb71a587d30313c96717fdf47e1106ab4ee0c16d713695e6c31ed6f6732dff6cbc91ca9841d66232166eb058f96028028e75c1507324426309ee4525
2023-02-23 13:57:38 -05:00
Andrew Chow
832fa2d238
Merge bitcoin/bitcoin#25574: validation: Improve error handling when VerifyDB dosn't finish successfully
0af16e7134 doc: add release note for #25574 (Martin Zumsande)
57ef2a4812 validation: report if pruning prevents completion of verification (Martin Zumsande)
0c7785bb25 init, validation: Improve handling if VerifyDB() fails due to insufficient dbcache (Martin Zumsande)
d6f781f1cf validation: return VerifyDBResult::INTERRUPTED if verification was interrupted (Martin Zumsande)
6360b5302d validation: Change return value of VerifyDB to enum type (Martin Zumsande)

Pull request description:

  `VerifyDB()` can fail to complete due to insufficient dbcache at the level 3 checks. This PR improves the error handling in this case in the following ways:
  - The rpc `-verifychain` now returns false if the check can't be completed due to insufficient cache
  - During init, we only log a warning if the default values for `-checkblocks` and `-checklevel` are taken and the check doesn't complete. However, if the user actively specifies one of these args, we return with an InitError if we can't complete the check.

  This PR also changes `-verifychain` RPC to return `false` if the verification didn't finish due to missing block data (pruning) or due to being interrupted by the node being shutdown.

  Previously, this PR also included a fix for a possible assert during verification - this was done in #27009 (now merged).

ACKs for top commit:
  achow101:
    ACK 0af16e7134
  ryanofsky:
    Code review ACK 0af16e7134. Only small suggested changes since the last review, like renaming some of the enum values. I did leave more suggestions, but they are not very important and could be followups
  john-moffett:
    ACK 0af16e7134
  MarcoFalke:
    lgtm re-ACK 0af16e7134 🎚

Tree-SHA512: 84b4f767cf9bfbafef362312757c9bf765b41ae3977f4ece840e40c52a2266b1457832df0cdf70440be0aac2168d9b58fc817238630b0b6812f3836ca950bc0e
2023-02-22 14:19:44 -05:00
James O'Beirne
c29f26b47b validation: add CChainState::m_disabled and ChainMan::isUsable
and remove m_snapshot_validated. This state can now be inferred by the
number of isUsable chainstates.

m_disabled is used to signal that a chainstate should no longer be used
by validation logic; it is used as a sentinel when background validation
completes or if the snapshot chainstate is found to be invalid.

isUsable is a convenience method that incorporates m_disabled.
2023-02-22 12:13:11 -05:00
John Moffett
b4bdabc223 doc: Release notes for 27068
To reflect the change in behavior.
2023-02-21 14:40:59 -05:00
David Gumberg
7013da07fb Add release note for PR#25943
Co-authored-by: glozow <gloriajzhao@gmail.com>
2023-02-20 11:47:20 -07:00
fanquake
fe1b325688
Merge bitcoin/bitcoin#27029: guix: consolidate to glibc 2.27 for Linux builds
d5d4b75840 guix: combine glibc hardening options into hardened-glibc (fanquake)
c49f2b8eb5 guix: remove no-longer needed powerpc workaround (fanquake)
74c9893989 guix: use glibc 2.27 for all Linux builds (fanquake)

Pull request description:

  Build against glibc 2.27 for all Linux builds (previously only used for RISC-V), and at the same time, increase our minimum required glibc to 2.27 (2018). This would drop support for Ubuntu Xenial (16.04) & Debian Stretch (9), from the produced release binaries. Compiling from source on those systems may be possible, assuming you can install a recent enough compiler/toolchain etc.

ACKs for top commit:
  hebasto:
    ACK d5d4b75840, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 910f0ef45b4558f2a45d35a5c1c39aaac97e8aff086dc4fc1eddbb80c0b6e4bd23667d64e21d0fd42e4db37b6f26f447ca5d1150bb861128af7e71fb42835cf8
2023-02-17 10:40:57 +00:00
Martin Zumsande
0af16e7134 doc: add release note for #25574 2023-02-16 17:58:52 -05:00
fanquake
75f0e0b607
Merge bitcoin/bitcoin#26773: doc: FreeBSD build doc updates to reflect removal of install_db4.sh
c572eae989 update the freebsd build doc to reflect recent changes to DB4 install process (Murray Nesbitt)

Pull request description:

  This PR introduces documentation changes needed to keep up with #26834.

ACKs for top commit:
  fanquake:
    ACK c572eae989 - have not tested, but looks ok.

Tree-SHA512: 42a79e7b45834916b1b738db524b51b9ff4fde8348ba66fc331ff6603532dd9fce73ea392eef97d31112326c6d60ec2c5c7c29e66aab33aaf846aab8aea1d1aa
2023-02-16 14:50:00 +00:00
Murray Nesbitt
c572eae989 update the freebsd build doc to reflect recent changes to DB4 install process 2023-02-15 01:12:00 -08:00
fanquake
1ad0711d7c
Merge bitcoin/bitcoin#27016: mapport: require miniupnpc API version 17 or later
b3b673f704 mapport: require miniupnpc API version 17 or later (fanquake)

Pull request description:

  Version 17 is currently the latest version, see: https://github.com/miniupnp/miniupnp/blob/master/miniupnpc/apiversions.txt, and has been available since the release of 2.1. 2.1 or newer is readily available across all distros, see https://repology.org/project/miniupnpc/versions, so drop support for the older API versions.

  Split out of #22644.

ACKs for top commit:
  hebasto:
    ACK b3b673f704, tested on Ubuntu 20.04 w/ and w/o [`libminiupnpc-dev`](https://packages.ubuntu.com/focal/libminiupnpc-dev) package.
  TheCharlatan:
    ACK b3b673f704

Tree-SHA512: f53b36b82462c4ea83d9b83413dca8097885d1620f7ca0a53a79d6b3d3cf37c7773828b23f4278ccfcc3b14fcb0faffa35f60191b519b04570f3d2783d0303e2
2023-02-13 16:25:09 +00:00
fanquake
74c9893989
guix: use glibc 2.27 for all Linux builds
Also point to the latest commit on the glibc 2.27 releases branch.

https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/release/2.27/master
2023-02-13 14:16:24 +00:00
MarcoFalke
de1d189534
Merge bitcoin/bitcoin#27056: doc: use arch agnostic clang path in fuzzing doc (macOS)
b49e19ccd9 doc: use arch agnostic clang path in fuzzing doc (macOS) (fanquake)

Pull request description:

  The current path will only work for clang installed via brew on x86_64 macOS.

ACKs for top commit:
  hebasto:
    ACK b49e19ccd9, similar to 702836530f.

Tree-SHA512: 8ae4845e1953d5a7178f2b422e2241af1057d8cce1ab79da65df0cd068456dbf85da3489355f81fc4ee09ba602a4b53e989e2dc02476b4abf6c5b3bc3e96473b
2023-02-08 12:49:49 +01:00
fanquake
8d69b614cc
Merge bitcoin/bitcoin#23810: docs: avoid C-style casts; use modern C++ casts
75347236f2 docs: document c-style cast prohibition (Pasta)

Pull request description:

  In the words of practicalswift:
  ```
  A C-style cast is equivalent to try casting in the following order:

      const_cast(...)
      static_cast(...)
      const_cast(static_cast(...))
      reinterpret_cast(...)
      const_cast(reinterpret_cast(...))

  By using static_cast<T>(...) explicitly we avoid the possibility of an unintentional and
  dangerous reinterpret_cast. Furthermore static_cast<T>(...) allows for easier grepping of casts.

  For a more thorough discussion, see "ES.49: If you must use a cast, use a named cast"
  in the C++ Core Guidelines (Stroustrup & Sutter).
  ```

  Modern tooling, specifically `-Wold-style-cast` can enable us to enforce never using C-style casts. I believe this is especially important due to the number of C-style casts the codebase is currently being used as a reinterpret_cast. reinterpret_casts are especially dangerous, and should never be done via C-style casts.

  Update the docs to suggest the use of named cast or functional casts.

Top commit has no ACKs.

Tree-SHA512: 29a98de396f0c78e32d8a1831319162203c4405a670da5add5da956fcc7df200a1cec162ef1cfac4ddfb02714b66406081d40ed435c7f0f28581cfa24d94fac1
2023-02-08 10:36:43 +00:00
fanquake
b49e19ccd9
doc: use arch agnostic clang path in fuzzing doc (macOS) 2023-02-08 09:45:04 +00:00
Hennadii Stepanov
8a6219e543
Remove -sysperms option
This change effectively reverts commits from
https://github.com/bitcoin/bitcoin/pull/4286.

Users, who rely on non-default access permissions, should use `chmod`
command.
2023-02-05 08:09:16 +00:00
Antoine Poinsot
6699d850e4
doc: release notes for #27037 2023-02-03 18:18:39 +01:00
fanquake
b3b673f704
mapport: require miniupnpc API version 17 or later
Version 17 is currently the latest version, and has been available since
the release of 2.1.
See: https://github.com/miniupnp/miniupnp/blob/master/miniupnpc/apiversions.txt.
2023-02-01 15:57:26 +00:00
glozow
22ccf4e360
Merge bitcoin/bitcoin#26991: doc: followups to #26471
47c174d8ce doc: NetPermissionFlags for tx relay in blocksonly (willcl-ark)
e325e0fccb doc: Fix comment syntax error (willcl-ark)

Pull request description:

  Fix syntax error and specify `NetPermissionFlags` for whitelisted tx relay

ACKs for top commit:
  w0xlt:
    ACK 47c174d8ce

Tree-SHA512: eb579dc599a96a3ea79c01ac3e76160ec59cf71c2486c9401da8fbbd96ae756ba647aa9ba874835946bc76ba02782729da788617f982ae5a852139e10e7dfd75
2023-02-01 11:46:22 +00:00
willcl-ark
47c174d8ce
doc: NetPermissionFlags for tx relay in blocksonly
Detail which permission type enables transaction relay for nodes
connected in blockonly mode
2023-01-30 11:21:49 +00:00