Skip to content

Conversation

furszy
Copy link
Member

@furszy furszy commented Sep 3, 2024

Because AssumeUTXO nodes prioritize tip synchronization, they relay their local
address through the network before completing the background chain sync.
This, combined with the advertising of full-node service (NODE_NETWORK), can
result in an honest peer in IBD connecting to the AssumeUTXO node (while syncing)
and requesting an historical block the node does not have. This behavior leads to
an abrupt disconnection due to perceived unresponsiveness from the AssumeUTXO
node.

This lack of response occurs because nodes ignore getdata requests when they do
not have the block data available (further discussion can be found in #30385).

Fix this by refraining from signaling full-node service support while the
background chain is being synced. During this period, the node will only
signal NODE_NETWORK_LIMITED support. Then, full-node (NODE_NETWORK)
support will be re-enabled once the background chain sync is completed.

Thanks mzumsande for a post-#30385 convo too.

Testing notes:
Just cherry-pick the second commit (bb08c22) on master.
It will fail there, due to the IBD node requesting historical blocks to the snapshot
node - which is bad because the snapshot node will ignore the requests and
stall + disconnect after some time.

@DrahtBot
Copy link
Contributor

DrahtBot commented Sep 3, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK naumenkogs, mzumsande, achow101
Concept ACK tdb3
Stale ACK fjahr

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #29641 (scripted-diff: Use LogInfo over LogPrintf by maflcko)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@fjahr
Copy link
Contributor

fjahr commented Sep 4, 2024

Concept ACK

I've read through #30385 and this seems like a good change.

@fjahr
Copy link
Contributor

fjahr commented Sep 4, 2024

CI doesn't seem happy though. Kind of weird, the logs don't load for me.

@furszy
Copy link
Member Author

furszy commented Sep 4, 2024

CI doesn't seem happy though. Kind of weird, the logs don't load for me.

Yeah, working on it. Almost there.

@furszy furszy force-pushed the 2024_net_assumeUTXO_service branch 2 times, most recently from dd45ee2 to bb08c22 Compare September 4, 2024 21:45
Copy link
Member Author

@furszy furszy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated and rebased due to conflicts with a recently merged PR. The CI shouldn't complain now.

On a side note:
It took me longer to place my test code inside feature_assumeutxo.py than to fix the issue. I think it would be good to reorganize this file a bit and make the assumeUTXO params configurable at startup or runtime for tests. This would allow us to split tests into different files for each of the products we provide: network/p2p, local node, and wallet.

@achow101
Copy link
Member

achow101 commented Sep 5, 2024

ACK bb08c22

@DrahtBot DrahtBot requested a review from fjahr September 5, 2024 22:15
Copy link
Contributor

@tdb3 tdb3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

Brief code review.
Looks good. Planning to review in more detail.

Copy link
Contributor

@fjahr fjahr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK bb08c22

If we are in a hurry for v28 this is fine to merge as is, my comments can be kept for a follow-up.

Aside from the inline comments I would suggest to modernize the naming of nLocalServices. I prepared a scripted-diff commit to cherry-pick or I can open the follow-up: fjahr@6cc25ff

@@ -1791,7 +1791,8 @@ void CConnman::CreateNodeFromAcceptedSocket(std::unique_ptr<Sock>&& sock,
const bool inbound_onion = std::find(m_onion_binds.begin(), m_onion_binds.end(), addr_bind) != m_onion_binds.end();
// The V2Transport transparently falls back to V1 behavior when an incoming V1 connection is
// detected, so use it whenever we signal NODE_P2P_V2.
const bool use_v2transport(nLocalServices & NODE_P2P_V2);
ServiceFlags local_services = GetLocalServices();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Seems like this isn't needed so I would have preferred if that was left out or a separate commit because the file isn't touched at all otherwise.

Copy link
Member Author

@furszy furszy Sep 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Seems like this isn't needed so I would have preferred if that was left out or a separate commit because the file isn't touched at all otherwise.

This is needed to prevent a race condition. Since fafc73b, nLocalServices can be accessed from different threads. So, we need to store the value once it's read and use it here and few lines below (in the InitializeNode call), to maintain consistency in this flow. Otherwise, use_v2transport could have been calculated with a different nLocalServices value than the one used in InitializeNode.

# Ensure headers arrived
default_value = {'status': ''} # No status
headers_tip_hash = miner.getbestblockhash()
self.wait_until(lambda: next(filter(lambda x: x['hash'] == headers_tip_hash, snapshot_node.getchaintips()), default_value)['status'] == "headers-only")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think this does the same and is a bit simpler? Allows to get rid of the default_value when applied to the ibd_node line below as well.

Suggested change
self.wait_until(lambda: next(filter(lambda x: x['hash'] == headers_tip_hash, snapshot_node.getchaintips()), default_value)['status'] == "headers-only")
self.wait_until(lambda: any(tip['hash'] == headers_tip_hash and tip['status'] == "headers-only" for tip in snapshot_node.getchaintips()))

# Connect nodes and verify the ibd_node can sync-up the headers-chain from the snapshot_node
self.connect_nodes(ibd_node.index, snapshot_node.index)
snapshot_block_hash = snapshot['base_hash']
self.wait_until(lambda: next(filter(lambda x: x['hash'] == snapshot_block_hash, ibd_node.getchaintips()), default_value)['status'] == "headers-only")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above

Suggested change
self.wait_until(lambda: next(filter(lambda x: x['hash'] == snapshot_block_hash, ibd_node.getchaintips()), default_value)['status'] == "headers-only")
self.wait_until(lambda: any(tip['hash'] == snapshot_block_hash and tip['status'] == "headers-only" for tip in ibd_node.getchaintips()))

snapshot_node = self.nodes[2]
ibd_node = self.nodes[3]

# Start test fresh by cleaning up node directories
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is self-contained and you need to wipe everything this could have been done in a separate test line p2p_assumeutxo.py for example and you copy over the setup from this file here but it seems like there isn't much needed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is self-contained and you need to wipe everything this could have been done in a separate test line p2p_assumeutxo.py for example and you copy over the setup from this file here but it seems like there isn't much needed.

I started there (see me crying about the feature_assumeutxo.py code organization here #30807 (review)), but ended up moving it inside this all-in-one file because I wasn't happy copy pasting the costly snapshot setup into another test file (this test case doesn't need all of that).
I think we should allow assumeUTXO snapshot customization on regtest. It would make testing much simpler and self-contained. We would be able to subdivide it on network/p2p, local node, and wallet test files.
But still, if you don't mind, let's leave this convo for a follow-up so we can fix this bug for v28. I would be happy to tackle if we reach consensus over it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should allow assumeUTXO snapshot customization on regtest. It would make testing much simpler and self-contained.

How would it make it simpler? It's another thing to keep track of in the test code and the implementation code. If we need more snapshot heights we can always add them but I haven't felt the need for it so far when I have added new coverage.

Copy link
Member Author

@furszy furszy Sep 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should allow assumeUTXO snapshot customization on regtest. It would make testing much simpler and self-contained.

How would it make it simpler? It's another thing to keep track of in the test code and the implementation code.

The custom snapshot feature shouldn't take more than few lines at init.cpp. And for the test side, it would be an extra argument during init. I believe we will sooner or later need different snapshot for further wallet tests, maybe more than one in order to cover different self-contained test scenarios. I think it worth splitting feature_assumeutxo.py in rpc_assumeutxo.py, p2p_assumeutxo.py, wallet_assumeutxo.py, validation_assumeutxo.py etc.. for maintenance reasons.

If we need more snapshot heights we can always add them but I haven't felt the need for it so far when I have added new coverage.

This is simpler in the sense of not requiring to add new hardcoded values at chainparams.cpp every time we need to test something different. For example, this p2p test case just need a snapshot, it can be a very simple one. It does not require all the extra txs setup time.

@DrahtBot DrahtBot requested a review from tdb3 September 8, 2024 23:04
@furszy
Copy link
Member Author

furszy commented Sep 9, 2024

Thanks for the review fjahr!, it seems that your scripted-diff commit fjahr@6cc25ff makes CI unhappy. I haven't checked the reason but we could leave it for a follow-up to move forward with the fix for v28. Happy to check it.

Copy link
Contributor

@mzumsande mzumsande left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

I think the description of the first commit could be improved:

AssumeUTXO nodes prioritize tip synchronization first, meaning they advertise
knowledge of all blocks posterior to the snapshot base block hash.

This is confusing to me - nodes advertise NODE_NETWORK (all historical blocks prior to tip) or NODE_NETWORK_LIMITED (last 288 from tip). They also communicate their current tip with peers, but it's not part of the advertisement. So this includes (amongst others) blocks prior to the snapshot block hash, not posterior.

while the AssumeUTXO node is synchronizing the tip chain or the background chain.

Only the latter is a problem: while synchronzing the tip chain IsInitialBlockDownload is false and the node doesn't self-advertise, and therefore wouldn't receive inbound peers normally. Otherwise we'd have (at least in theory) a similar problem right after the snapshot was loaded, when also NODE_NETWORK_LIMITED would be incorrect because we don't have the last 288 blocks on disk. But this shouldn't be a problem in practice.

after stalling for ~10 minutes

This could be much less, due to the stalling detection (m_stalling_since), I wouldn't mention it.

@furszy furszy force-pushed the 2024_net_assumeUTXO_service branch from bb08c22 to a322da3 Compare September 10, 2024 20:21
Copy link
Member Author

@furszy furszy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AssumeUTXO nodes prioritize tip synchronization first, meaning they advertise
knowledge of all blocks posterior to the snapshot base block hash.

This is confusing to me - nodes advertise NODE_NETWORK (all historical blocks prior to tip) or NODE_NETWORK_LIMITED (last 288 from tip). They also communicate their current tip with peers, but it's not part of the advertisement. So this includes (amongst others) blocks prior to the snapshot block hash, not posterior.

Yeah ok. Changed it. Thanks!

while the AssumeUTXO node is synchronizing the tip chain or the background chain.

Only the latter is a problem: while synchronzing the tip chain IsInitialBlockDownload is false and the node doesn't self-advertise, and therefore wouldn't receive inbound peers normally. Otherwise we'd have (at least in theory) a similar problem right after the snapshot was loaded, when also NODE_NETWORK_LIMITED would be incorrect because we don't have the last 288 blocks on disk. But this shouldn't be a problem in practice.

What about us connecting to a synced limited peer, during tip sync, who tries to fetch historical blocks due to the NODE_NETWORK service, like #29183.
Also, manual connections are also affected if the other peer is in IBD. But.. this is something the node operator would hopefully be aware of before connecting peers.

Aside from this two nuances, thanks for the feedback!
Updated the commit description. Let me know if further updates are needed.

Because AssumeUTXO nodes prioritize tip synchronization, they relay their local
address through the network before completing the background chain sync.
This, combined with the advertising of full-node service (NODE_NETWORK), can
result in an honest peer in IBD connecting to the AssumeUTXO node (while syncing)
and requesting an historical block the node does not have. This behavior leads to
an abrupt disconnection due to perceived unresponsiveness (lack of response)
from the AssumeUTXO node.

This lack of response occurs because nodes ignore getdata requests when they do
not have the block data available (further discussion can be found in PR 30385).

Fix this by refraining from signaling full-node service support while the
background chain is being synced. During this period, the node will only
signal 'NODE_NETWORK_LIMITED' support. Then, full-node ('NODE_NETWORK')
support will be re-enabled once the background chain sync is completed.
Exercising and verifying the following points:

1. An IBD node can sync headers from an AssumeUTXO node at
   any time.

2. IBD nodes do not request historical blocks from AssumeUTXO
   nodes while they are syncing the background-chain.

3. The assumeUTXO node dynamically adjusts the network services
   it offers according to its state.

4. IBD nodes can fully sync from AssumeUTXO nodes after they
   finish the background-chain sync.
@furszy furszy force-pushed the 2024_net_assumeUTXO_service branch from a322da3 to 992f83b Compare September 10, 2024 21:08
Copy link
Member

@naumenkogs naumenkogs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 992f83b

Copy link
Contributor

@mzumsande mzumsande left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 992f83b

Updated the commit description. Let me know if further updates are needed.

Looks good to me!

What about us connecting to a synced limited peer, during tip sync, who tries to fetch historical blocks due to the NODE_NETWORK service, like #29183.

I think we just wouldn't connect to limited peers during tip sync - only when we are very close to the global tip we accept those as outbound peers (GetDesirableServiceFlags).

@achow101
Copy link
Member

ACK 992f83b

@achow101 achow101 merged commit 349632e into bitcoin:master Sep 11, 2024
15 of 16 checks passed
achow101 pushed a commit to achow101/bitcoin that referenced this pull request Sep 11, 2024
Because AssumeUTXO nodes prioritize tip synchronization, they relay their local
address through the network before completing the background chain sync.
This, combined with the advertising of full-node service (NODE_NETWORK), can
result in an honest peer in IBD connecting to the AssumeUTXO node (while syncing)
and requesting an historical block the node does not have. This behavior leads to
an abrupt disconnection due to perceived unresponsiveness (lack of response)
from the AssumeUTXO node.

This lack of response occurs because nodes ignore getdata requests when they do
not have the block data available (further discussion can be found in PR 30385).

Fix this by refraining from signaling full-node service support while the
background chain is being synced. During this period, the node will only
signal 'NODE_NETWORK_LIMITED' support. Then, full-node ('NODE_NETWORK')
support will be re-enabled once the background chain sync is completed.

Github-Pull: bitcoin#30807
Rebased-From: 6d5812e
achow101 pushed a commit to achow101/bitcoin that referenced this pull request Sep 11, 2024
Exercising and verifying the following points:

1. An IBD node can sync headers from an AssumeUTXO node at
   any time.

2. IBD nodes do not request historical blocks from AssumeUTXO
   nodes while they are syncing the background-chain.

3. The assumeUTXO node dynamically adjusts the network services
   it offers according to its state.

4. IBD nodes can fully sync from AssumeUTXO nodes after they
   finish the background-chain sync.

Github-Pull: bitcoin#30807
Rebased-From: 992f83b
@achow101
Copy link
Member

Backported to 28.x in #30827

@furszy furszy deleted the 2024_net_assumeUTXO_service branch September 11, 2024 19:12
@furszy
Copy link
Member Author

furszy commented Sep 11, 2024

I think we just wouldn't connect to limited peers during tip sync - only when we are very close to the global tip we accept those as outbound peers (GetDesirableServiceFlags).

ha.. and I fixed an issue exactly there in the past.. (#28170). What a good memory I have..

@fjahr
Copy link
Contributor

fjahr commented Sep 12, 2024

post-merge utACK 992f83b

@fanquake
Copy link
Member

Any chance this is now causing #30878? If so, would be good to fix before this is backported.

Copy link
Member

@pablomartin4btc pablomartin4btc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK 992f83b

I was reviewing it before merge, went thru the src code change and the test, which are both very well documented and easy to follow.

I agree with the split of feature_assumeutxo.py for different scenarios required by a particular module/ area (p2p, wallet, etc.) having a base or common file too when possible.

TheCharlatan added a commit to TheCharlatan/rust-bitcoinkernel that referenced this pull request Sep 16, 2024
…6e67b2a

d8b6e67b2a kernel: Add check if the chainstate maanger is busy loading blocks
f12a131af8 kernel: Process transactions
75d48e6718 kernel: Add optional mempool
889632bb70 kernel: Add support for handling transactions
476c754f3b kernel: Add check for when a block has been mutated.
ebef1b465b kernel: Add support for handling block headers
a56c79a2b5 kernel: Add utxo set iteration and value retrieval
33c71843e3 kernel: Add pure kernel bitcoin-chainstate
ccb2bb59f9 kernel: Add block index utility functions to C header
c953e1f530 kernel: Add function to read block undo data from disk to C header
55673f7f70 kernel: Add functions to read block from disk to C header
348e1c0a22 kernel: Add function for copying  block data to C header
4c71ffbef6 kernel: Add functions for the block validation state to C header
160343c9c2 kernel: Add validation interface and task runner to C header
55a60d8c3f kernel: Add interrupt function to C header
0d59e95b82 kernel: Add import blocks function to C header
804e064ff6 kernel: Add chainstate load options for in-memory dbs in C header
1c829ce9f4 kernel: Add options for reindexing in C header
c8a2917004 kernel: Add block validation to C header
8015b8374c Kernel: Add chainstate loading to kernel C header
b3c8467b62 kernel: Add chainstate manager object to C header
07c55185c2 kernel: Add notifications context option to C header
71c45c0680 kerenl: Add chain params context option to C header
d2ad67bd5f kernel: Add kernel library context object
1c6716c609 kernel: Add logging to kernel library C header
63a83b8dad kernel: Introduce initial kernel C header API
REVERT: 8777c555fc kernel: Add pure kernel bitcoin-chainstate
REVERT: fcc69abdb9 kernel: Add block index utility functions to C header
REVERT: 266d21c9c6 kernel: Add function to read block undo data from disk to C header
REVERT: 62b2926c0a kernel: Add functions to read block from disk to C header
REVERT: 440d7a7a86 kernel: Add function for copying  block data to C header
REVERT: 8827ebd5ea kernel: Add functions for the block validation state to C header
REVERT: 1ad10251b4 kernel: Add validation interface and task runner to C header
REVERT: b96eb0c49c kernel: Add interrupt function to C header
REVERT: d96ffb9165 kernel: Add import blocks function to C header
REVERT: 28dc294a13 kernel: Add chainstate load options for in-memory dbs in C header
REVERT: 7de1202a01 kernel: Add options for reindexing in C header
REVERT: 2e28c5516d kernel: Add block validation to C header
REVERT: f511ce1489 Kernel: Add chainstate loading to kernel C header
REVERT: 7ed0a89a3e kernel: Add chainstate manager object to C header
REVERT: 3fb9cec5d4 kernel: Add notifications context option to C header
REVERT: d71bbbab94 kerenl: Add chain params context option to C header
REVERT: 7cfc892152 kernel: Add kernel library context object
REVERT: ba01b6bd0e kernel: Add logging to kernel library C header
REVERT: 17b98b95eb kernel: Introduce initial kernel C header API
REVERT: 0c4ff18ee9 Merge bitcoin/bitcoin#30896: kernel: Move background load thread to node context
REVERT: 87d54500bf Merge bitcoin/bitcoin#30892: test: Check already deactivated network stays suspended after dumptxoutset
REVERT: 71af7435ef Merge bitcoin/bitcoin#30233: refactor: move m_is_inbound out of CNodeState
REVERT: 1d5b2406bb Merge bitcoin/bitcoin#30877: code style: update .editorconfig file
REVERT: fea550b480 Merge bitcoin/bitcoin#30890: doc: unit test runner help fixup and improvements
REVERT: 95560616fb code style: update .editorconfig file
REVERT: 282f0e9255 Unit test runner documentation fix and improvements
REVERT: 06a9f7789e Merge bitcoin/bitcoin#30433: build: add `standard branch-protection` to hardening flags for aarch64-linux
REVERT: bc7900f33d kernel: Move background load thread to node context
REVERT: e43ce250c6 Merge bitcoin-core/gui#835: Fix crash when closing wallet
REVERT: 001b1cf010 build: use standard branch-protection for aarch64-linux
REVERT: a965f2bc07 gui: fix crash when closing wallet
REVERT: 72c9a1fe94 test: Check that network stays suspended after dumptxoutset if it was off before
REVERT: cf0120ff02 Merge bitcoin/bitcoin#30880: test: Wait for local services to update in feature_assumeutxo
REVERT: e46bebb444 Merge bitcoin/bitcoin#30546: util: Use consteval checked format string in FatalErrorf, LogConnectFailure
REVERT: be768dbd18 Merge bitcoin/bitcoin#30618: test: support std::optional in BOOST_CHECK_* and increase FromUserHex fuzz feature coverage
REVERT: 07c7c96022 Merge bitcoin/bitcoin#30883: build: Revert "Minimize I/O operations in `GenerateHeaderFrom{Json,Raw}.cmake`"
REVERT: 24817e8b15 Merge bitcoin/bitcoin#30814: kernel: Create usable static kernel library
REVERT: fdeb717e78 Revert "build: Minimize I/O operations in `GenerateHeaderFrom{Json,Raw}.cmake`"
REVERT: 07f4cebe57 refactor: move m_is_inbound out of CNodeState
REVERT: 19f4a7c95a test: Wait for local services to update in feature_assumeutxo
REVERT: 7d43bca052 Merge bitcoin/bitcoin#30872: test: fix exclude parsing for functional runner
REVERT: cf786eccd7 Merge bitcoin/bitcoin#30865: build: Skip secp256k1 ctime tests when tests are not being built
REVERT: 23eedc5d1e build: Skip secp256k1 ctime tests when tests are not being built
REVERT: fa5bc450d5 util: Use compile-time check for LogConnectFailure
REVERT: fa7087b896 util: Use compile-time check for FatalErrorf
REVERT: faa62c0112 util: Add ConstevalFormatString
REVERT: 72b46f28bf test: fix exclude parsing for functional runner
REVERT: a5e99669cc Merge bitcoin/bitcoin#30733: test: remove unused src_dir param from run_tests after CMake migration
REVERT: 0c1e507278 Merge bitcoin/bitcoin#30871: build: Add more cmake presets
REVERT: fcb61bbc8d Merge bitcoin/bitcoin#27038: security-check: test for `_FORTIFY_SOURCE` usage in release binaries
REVERT: 85833cf05f Merge bitcoin/bitcoin#30847: test: Drop no longer needed workarounds
REVERT: 11e2f9fff4 Merge bitcoin/bitcoin#30835: build: Introduce "Kernel" installation component
REVERT: db8350b0e3 Merge bitcoin/bitcoin#30803: build: Minor build system fixes and amendments
REVERT: a86e7a476d Merge bitcoin/bitcoin#30838: build: Use CMake's default permissions in macOS `deploy` target
REVERT: f0eb63399a Merge bitcoin/bitcoin#30841: ci: Post CMake-migration fixes and amendments
REVERT: 155963768a Merge bitcoin/bitcoin#30842: build: Minimize I/O operations in `GenerateHeaderFrom{Json,Raw}.cmake`
REVERT: c773618886 Merge bitcoin/bitcoin#30867: build: Fix `ENABLE_WALLET` option
REVERT: 349632e022 Merge bitcoin/bitcoin#30807: Fix peers abruptly disconnecting from AssumeUTXO nodes during IBD
REVERT: f6298a878f Merge bitcoin/bitcoin#30840: docs: Updated debug build instructions for cmake
REVERT: a8809aeb6e Merge bitcoin/bitcoin#30870: docs: updated developer notes for --with-sanitizers to -DSANITIZERS
REVERT: f15e817811 build: add more CMake presets (dev-mode, libfuzzer, libfuzzer-nosan)
REVERT: fae7b83eb5 lint: Remove forbidden functions from lint-format-strings.py
REVERT: 4b1ce3cac8 docs: updated developer notes for --with-sanitizers to -DSANITIZERS and removed resource for -fsanitze flags
REVERT: 1eac96a503 Compare FromUserHex result against other hex validators and parsers
REVERT: 19947863e1 Use BOOST_CHECK_EQUAL for optional, arith_uint256, uint256, uint160
REVERT: 0725a37494 Merge bitcoin/bitcoin#30805: test: Add explicit onion bind to p2p_permissions
REVERT: 0037d53d1a build: Fix `ENABLE_WALLET` option
REVERT: 992f83bb6f test: add coverage for assumeUTXO honest peers disconnection
REVERT: 6d5812e5c8 assumeUTXO: fix peers disconnection during sync
REVERT: 082779d606 test: Add explicit onion bind to p2p_permissions
REVERT: c66c68345e Merge bitcoin/bitcoin#30773: Remove unsafe uint256S() and test-only uint160S()
REVERT: 2756797eca Merge bitcoin/bitcoin#30065: init: fixes file descriptor accounting
REVERT: 5ba03e7d35 build: Use CMake's default permissions in macOS `deploy` target
REVERT: e4fb97a512 Merge bitcoin/bitcoin#30791: build: Use correct variable name
REVERT: df3f63ccfa Merge bitcoin/bitcoin#30509: multiprocess: Add -ipcbind option to bitcoin-node
REVERT: 743ac30e34 Add std::optional support to Boost's equality check
REVERT: 712a2b5453 Merge bitcoin/bitcoin#30817: test: Add coverage for dumptxoutset failure robustness
REVERT: fb52023ee6 Merge bitcoin/bitcoin#30684: init: fix init fatal error on invalid negated option value
REVERT: 746f88000e Merge bitcoin/bitcoin#30401: fix: increase consistency of rpcauth parsing
REVERT: 2d68c3b1c2 build: Use correct variables when passing `-fsanitize` to libsecp256k1
REVERT: df86a4f333 Merge bitcoin/bitcoin#30845: Update libsecp256k1 subtree to latest master
REVERT: be4f78275f contrib: test for FORTIFY_SOURCE in security-check.py
REVERT: 94bc3c4cc0 Merge bitcoin/bitcoin#30824: cmake: decouple `FORTIFY_SOURCE` check from `Debug` build type
REVERT: ba84c2774d Merge bitcoin/bitcoin#30823: cmake: add `USE_SOURCE_PERMISSIONS` to all `configure_file()` usage
REVERT: da3f4cb8ee Merge bitcoin/bitcoin#30850: doc: fix minor typo
REVERT: 7a669fde18 docs: Fix minor typo
REVERT: 1cc93fe7b4 build: Delete dead code that implements `IF_CHECK_FAILED` option
REVERT: 0b003e1ff7 docs: Updated debug build instructions for cmake
REVERT: 341ad23809 build: Delete MSVC special case for `BUILD_FOR_FUZZING` option
REVERT: 5c80192ff6 test: Drop no longer needed workarounds
REVERT: ff54395de4 Update secp256k1 subtree to latest master
REVERT: 611562806c Squashed 'src/secp256k1/' changes from 642c885b61..2f2ccc4695
REVERT: b07fe666f2 build: Minimize I/O operations in `GenerateHeaderFrom{Json,Raw}.cmake`
REVERT: c45186ca54 ci: Switch from `make` to `cmake --build`
REVERT: 6e5f33af58 ci: Handle log files regardless of CMake's version
REVERT: fdad128b52 build: Stop enabling CMake's CMP0141 policy
REVERT: b2a6f545b4 doc: Drop `ctest` command from Windows cross-compiling instructions
REVERT: 73b618582d build: Print `CMAKE_CXX_COMPILER_ARG1` in summary
REVERT: f03c942095 build, test: Add missed log options
REVERT: 6f2cb0eafd doc: Amend comment about ZeroMQ config files
REVERT: 0dd16d7118 build: Add a pkg-config file for libbitcoinkernel
REVERT: 45be32f838 build: Produce a usable static kernel library
REVERT: 43cd83b0c7 test: move uint256_tests/operator_with_self to arith_uint256_tests
REVERT: c6c994cb2b test: remove test-only uint160S
REVERT: 62cc4656e2 test: remove test-only uint256S
REVERT: adc00ad728 test: remove test-only arith_uint256S
REVERT: a5fa90706a Merge bitcoin/bitcoin#30834: test: Work around boost compilation error
REVERT: 7b04fabe2d build: Introduce "Kernel" installation component
REVERT: fa9d7d5d20 test: Work around boost compilation error
REVERT: fa3ecdf778 Revert "build: work around issue with Boost <= 1.80 and Clang >= 18"
REVERT: 30073e6b3a multiprocess: Add -ipcbind option to bitcoin-node
REVERT: bbf95c0cc5 Merge bitcoin/bitcoin#30755: ci: Add missed configuration options to "Win64 native" job
REVERT: 73fe7d7230 multiprocess: Add unit tests for connect, serve, and listen functions
REVERT: 955d4077aa multiprocess: Add IPC connectAddress and listenAddress methods
REVERT: 4da20434d4 depends: Update libmultiprocess library for CustomMessage function and ThreadContext bugfix
REVERT: ee22bf55e3 doc: Update and amend MSVC build guide
REVERT: c07fdd6546 fuzz: Don't compile BDB-specific code on MSVC in `wallet_bdb_parser.cpp`
REVERT: e07a3ede52 ci: Add missed configuration options to "Win64 native" job
REVERT: 1f054eca4e cmake: add USE_SOURCE_PERMISSIONS to all configure_file usage
REVERT: 0e5cd608da Merge bitcoin/bitcoin#30415: contrib: fix check-deps.sh to check for weak symbols
REVERT: 118b55c462 Merge bitcoin/bitcoin#30790: bench: Remove redundant logging benchmarks
REVERT: c0cbe26a86 Merge bitcoin/bitcoin#30748: test: Pin and document TEST_DIR_PATH_ELEMENT, SeedRand::FIXED_SEED
REVERT: c3af4b1ec3 Merge bitcoin/bitcoin#30822: cmake: scope Boost Test check to `vcpkg`
REVERT: 7f472e9bcd Merge bitcoin/bitcoin#30821: build: work around issue with Boost <= 1.80 and Clang >= 18
REVERT: d4c7c4009d init: error out if -maxconnections is negative
REVERT: c773649481 init: improves file descriptors accounting and docs
REVERT: 29008a7ff4 init: fixes fd accounting regarding poll/select
REVERT: 30803a35d5 cmake: decouple FORTIFY_SOURCE check from Debug build type
REVERT: a7a4e11db8 cmake: scope Boost Test check to vcpkg
REVERT: d661e2b1b7 Merge bitcoin/bitcoin#30812: lint: Check for release note snippets in the wrong folder
REVERT: cd062d6684 build: work around issue with Boost <= 1.80 and Clang >= 18
REVERT: d6a1b94ffd Merge bitcoin-core/gui#834: qt, build: remove unneeded `Q_IMPORT_PLUGIN` macro calls
REVERT: 6852d1d487 Merge bitcoin/bitcoin#30796: test: Use std::span and std::string_view for raw data
REVERT: fa3a7ebe5b lint: Check for release note snippets in the wrong folder
REVERT: fa05ee0517 Merge bitcoin/bitcoin#30772: build: Fix / improve coverage scripts
REVERT: 79772cd26e Merge bitcoin/bitcoin#30743: depends: build libevent with `-D_GNU_SOURCE`
REVERT: faecca9a85 test: Use span for raw data
REVERT: c2b779da4e refactor: Manage dumptxoutset RAII classes with std::optional
REVERT: 4b5bf335ad test: Add coverage for failing dumptxoutset behavior
REVERT: f794a0d5f4 Merge bitcoin/bitcoin#30819: doc: fix assumeutxo design doc link
REVERT: fadbcd51fc bench: Remove redundant logging benchmarks
REVERT: fa8dd952e2 bench: Use LogInfo instead of the deprecated alias LogPrintf
REVERT: e5f7272ad3 doc: fix assumeutxo design doc link
REVERT: 93e48240bf Merge bitcoin/bitcoin#30244: ci: parse TEST_RUNNER_EXTRA into an array
REVERT: f640b323bd Merge bitcoin/bitcoin#30723: lint: Speed up and fix flake8 checks
REVERT: 3ae35b427f ci: run check-deps.sh as part of clang-tidy job
REVERT: 0aaa1298a0 contrib: fix check-deps.sh when libraries do not import symbols
REVERT: 3c99f5a38a contrib: fix check-deps.sh to check for weak symbols
REVERT: 86c80e9cf2 contrib: make check-deps.sh script work with cmake
REVERT: 5373aa30e2 Merge bitcoin/bitcoin#30788: test: fixing failing system_tests/run_command under some Locales
REVERT: 3210d87dfc Merge bitcoin/bitcoin#29043: fuzz: make FuzzedDataProvider usage deterministic
REVERT: 81276540d3 Merge bitcoin/bitcoin#30148: cli: restrict multiple exclusive argument usage in bitcoin-cli
REVERT: 210210c923 Merge bitcoin/bitcoin#29566: test: update satoshi_round function
REVERT: b0c3de6847 Merge bitcoin/bitcoin#28417: contrib/signet/miner updates
REVERT: cb65ac469a Merge bitcoin/bitcoin#29605: net: Favor peers from addrman over fetching seednodes
REVERT: b8d2f58e06 Merge bitcoin/bitcoin#30808: rpc: dumptxoutset height parameter follow-ups (29553)
REVERT: f51b237723 refactor: rpc: use uint256::FromHex for ParseHashV
REVERT: d9fcbfc372 build: Add `JOBS` variable support to `CoverageFuzz.cmake` script
REVERT: e7cf4a6f27 build: Add missed `-g` for "Coverage" build configuration
REVERT: fe2003ab12 build: Add `COMMAND_ERROR_IS_FATAL` to every process in coverage scrips
REVERT: a3108a7c56 rpc: Manage dumptxoutset rollback with RAII class
REVERT: c5eaae3b89 doc: Add -rpcclienttimeout=0 to loadtxoutset examples
REVERT: 598b9bba5a rpc: Don't re-enable previously disabled network after dumptxoutset
REVERT: ae48a22a3d test: fixing failing system_tests/run_command under some Locales
REVERT: fac973647d test: Use string_view for json_tests
REVERT: 5567754087 depends: build libevent with -D_GNU_SOURCE
REVERT: 7346b01092 qt, build: remove unneeded `Q_IMPORT_PLUGIN` macro calls
REVERT: fa84f9decd test: Pin and document TEST_DIR_PATH_ELEMENT
REVERT: 2ad560139b Remove unused src_dir param from run_tests
REVERT: 2222f7a874 test: Rename SeedRand::SEED to FIXED_SEED for clarity
REVERT: fafdb7df34 lint: Speed up flake8 checks
REVERT: faf17df7fb lint: Document missing py_lint dependency
REVERT: faebeb828f lint: Remove python whitespace and shadowing lint rules
REVERT: 7777047835 lint: Remove python lint rules that are SyntaxError
REVERT: faaf3e53f0 test: [refactor] Fix F841 flake8
REVERT: 444421db69 test: [refactor] Fix E714 pycodestyle
REVERT: ee47ca29d6 init: fix fatal error on '-wallet' negated option value
REVERT: 27c976d11a fix: increase consistency of rpcauth parsing
REVERT: 2ad3689512 test: add norpcauth test
REVERT: 67df0dec1a test: blank rpcauth CLI interaction
REVERT: fb6d51eb25 signet/miner: Use argparse exclusive groups
REVERT: ec317bc44b test: update satoshi_round function
REVERT: ecc98ccff2 test: add cases for blank rpcauth
REVERT: c8e6771af0 test: restrict multiple CLI arguments
REVERT: 8838c4f171 common/args.h: automate check for multiple cli commands
REVERT: 6eeb188d40 test: adds seednode functional tests
REVERT: 3270f0adad net: Favor peers from addrman over fetching seednodes
REVERT: 8131bf7483 ci: parse TEST_RUNNER_EXTRA into an array
REVERT: c4762b0aa0 test: allow excluding func test by name and arg
REVERT: 338a266a9a signet/miner: add support for a poolnum/poolid tag in mined blocks
REVERT: 409ab7d35b signet/miner: add Generate.mine function
REVERT: 7b31332370 signet/miner: add Generate.gbt function
REVERT: 85c5c0bea9 signet/miner: add Generate.next_block_time function
REVERT: 5540e6ca49 signet/miner: move next_block_* functions into new Generator class
REVERT: 35f4631196 signet/miner: rename do_decode_psbt to decode_psbt
REVERT: aac040b439 signet/miner: drop create_coinbase function
REVERT: 16951f549e signet/miner: drop do_createpsbt function
REVERT: 3aed0a4284 signet/miner: drop get_reward_address function
REVERT: 01960c53c7 fuzz: make FuzzedDataProvider usage deterministic

git-subtree-dir: libbitcoinkernel-sys/bitcoin
git-subtree-split: d8b6e67b2a12332f188320e90262e2d741e27f7b
TheCharlatan added a commit to TheCharlatan/rust-bitcoinkernel that referenced this pull request Sep 16, 2024
…e7b1f5e

d5ee7b1f5e kernel: Add check if the chainstate maanger is busy loading blocks
604752a1da kernel: Process transactions
37d74344e8 kernel: Add optional mempool
fdfb45e273 kernel: Add support for handling transactions
5ed4aa699c kernel: Add check for when a block has been mutated.
b8f6a2740d kernel: Add support for handling block headers
1aad96a695 kernel: Add utxo set iteration and value retrieval
8777c555fc kernel: Add pure kernel bitcoin-chainstate
fcc69abdb9 kernel: Add block index utility functions to C header
266d21c9c6 kernel: Add function to read block undo data from disk to C header
62b2926c0a kernel: Add functions to read block from disk to C header
440d7a7a86 kernel: Add function for copying  block data to C header
8827ebd5ea kernel: Add functions for the block validation state to C header
1ad10251b4 kernel: Add validation interface and task runner to C header
b96eb0c49c kernel: Add interrupt function to C header
d96ffb9165 kernel: Add import blocks function to C header
28dc294a13 kernel: Add chainstate load options for in-memory dbs in C header
7de1202a01 kernel: Add options for reindexing in C header
2e28c5516d kernel: Add block validation to C header
f511ce1489 Kernel: Add chainstate loading to kernel C header
7ed0a89a3e kernel: Add chainstate manager object to C header
3fb9cec5d4 kernel: Add notifications context option to C header
d71bbbab94 kerenl: Add chain params context option to C header
7cfc892152 kernel: Add kernel library context object
ba01b6bd0e kernel: Add logging to kernel library C header
17b98b95eb kernel: Introduce initial kernel C header API
0c4ff18ee9 Merge bitcoin/bitcoin#30896: kernel: Move background load thread to node context
87d54500bf Merge bitcoin/bitcoin#30892: test: Check already deactivated network stays suspended after dumptxoutset
71af7435ef Merge bitcoin/bitcoin#30233: refactor: move m_is_inbound out of CNodeState
1d5b2406bb Merge bitcoin/bitcoin#30877: code style: update .editorconfig file
fea550b480 Merge bitcoin/bitcoin#30890: doc: unit test runner help fixup and improvements
95560616fb code style: update .editorconfig file
282f0e9255 Unit test runner documentation fix and improvements
06a9f7789e Merge bitcoin/bitcoin#30433: build: add `standard branch-protection` to hardening flags for aarch64-linux
bc7900f33d kernel: Move background load thread to node context
e43ce250c6 Merge bitcoin-core/gui#835: Fix crash when closing wallet
001b1cf010 build: use standard branch-protection for aarch64-linux
a965f2bc07 gui: fix crash when closing wallet
72c9a1fe94 test: Check that network stays suspended after dumptxoutset if it was off before
cf0120ff02 Merge bitcoin/bitcoin#30880: test: Wait for local services to update in feature_assumeutxo
e46bebb444 Merge bitcoin/bitcoin#30546: util: Use consteval checked format string in FatalErrorf, LogConnectFailure
be768dbd18 Merge bitcoin/bitcoin#30618: test: support std::optional in BOOST_CHECK_* and increase FromUserHex fuzz feature coverage
07c7c96022 Merge bitcoin/bitcoin#30883: build: Revert "Minimize I/O operations in `GenerateHeaderFrom{Json,Raw}.cmake`"
24817e8b15 Merge bitcoin/bitcoin#30814: kernel: Create usable static kernel library
fdeb717e78 Revert "build: Minimize I/O operations in `GenerateHeaderFrom{Json,Raw}.cmake`"
07f4cebe57 refactor: move m_is_inbound out of CNodeState
19f4a7c95a test: Wait for local services to update in feature_assumeutxo
7d43bca052 Merge bitcoin/bitcoin#30872: test: fix exclude parsing for functional runner
cf786eccd7 Merge bitcoin/bitcoin#30865: build: Skip secp256k1 ctime tests when tests are not being built
23eedc5d1e build: Skip secp256k1 ctime tests when tests are not being built
fa5bc450d5 util: Use compile-time check for LogConnectFailure
fa7087b896 util: Use compile-time check for FatalErrorf
faa62c0112 util: Add ConstevalFormatString
72b46f28bf test: fix exclude parsing for functional runner
a5e99669cc Merge bitcoin/bitcoin#30733: test: remove unused src_dir param from run_tests after CMake migration
0c1e507278 Merge bitcoin/bitcoin#30871: build: Add more cmake presets
fcb61bbc8d Merge bitcoin/bitcoin#27038: security-check: test for `_FORTIFY_SOURCE` usage in release binaries
85833cf05f Merge bitcoin/bitcoin#30847: test: Drop no longer needed workarounds
11e2f9fff4 Merge bitcoin/bitcoin#30835: build: Introduce "Kernel" installation component
db8350b0e3 Merge bitcoin/bitcoin#30803: build: Minor build system fixes and amendments
a86e7a476d Merge bitcoin/bitcoin#30838: build: Use CMake's default permissions in macOS `deploy` target
f0eb63399a Merge bitcoin/bitcoin#30841: ci: Post CMake-migration fixes and amendments
155963768a Merge bitcoin/bitcoin#30842: build: Minimize I/O operations in `GenerateHeaderFrom{Json,Raw}.cmake`
c773618886 Merge bitcoin/bitcoin#30867: build: Fix `ENABLE_WALLET` option
349632e022 Merge bitcoin/bitcoin#30807: Fix peers abruptly disconnecting from AssumeUTXO nodes during IBD
f6298a878f Merge bitcoin/bitcoin#30840: docs: Updated debug build instructions for cmake
a8809aeb6e Merge bitcoin/bitcoin#30870: docs: updated developer notes for --with-sanitizers to -DSANITIZERS
f15e817811 build: add more CMake presets (dev-mode, libfuzzer, libfuzzer-nosan)
fae7b83eb5 lint: Remove forbidden functions from lint-format-strings.py
4b1ce3cac8 docs: updated developer notes for --with-sanitizers to -DSANITIZERS and removed resource for -fsanitze flags
1eac96a503 Compare FromUserHex result against other hex validators and parsers
19947863e1 Use BOOST_CHECK_EQUAL for optional, arith_uint256, uint256, uint160
0725a37494 Merge bitcoin/bitcoin#30805: test: Add explicit onion bind to p2p_permissions
0037d53d1a build: Fix `ENABLE_WALLET` option
992f83bb6f test: add coverage for assumeUTXO honest peers disconnection
6d5812e5c8 assumeUTXO: fix peers disconnection during sync
082779d606 test: Add explicit onion bind to p2p_permissions
c66c68345e Merge bitcoin/bitcoin#30773: Remove unsafe uint256S() and test-only uint160S()
2756797eca Merge bitcoin/bitcoin#30065: init: fixes file descriptor accounting
5ba03e7d35 build: Use CMake's default permissions in macOS `deploy` target
e4fb97a512 Merge bitcoin/bitcoin#30791: build: Use correct variable name
df3f63ccfa Merge bitcoin/bitcoin#30509: multiprocess: Add -ipcbind option to bitcoin-node
743ac30e34 Add std::optional support to Boost's equality check
712a2b5453 Merge bitcoin/bitcoin#30817: test: Add coverage for dumptxoutset failure robustness
fb52023ee6 Merge bitcoin/bitcoin#30684: init: fix init fatal error on invalid negated option value
746f88000e Merge bitcoin/bitcoin#30401: fix: increase consistency of rpcauth parsing
2d68c3b1c2 build: Use correct variables when passing `-fsanitize` to libsecp256k1
df86a4f333 Merge bitcoin/bitcoin#30845: Update libsecp256k1 subtree to latest master
be4f78275f contrib: test for FORTIFY_SOURCE in security-check.py
94bc3c4cc0 Merge bitcoin/bitcoin#30824: cmake: decouple `FORTIFY_SOURCE` check from `Debug` build type
ba84c2774d Merge bitcoin/bitcoin#30823: cmake: add `USE_SOURCE_PERMISSIONS` to all `configure_file()` usage
da3f4cb8ee Merge bitcoin/bitcoin#30850: doc: fix minor typo
7a669fde18 docs: Fix minor typo
1cc93fe7b4 build: Delete dead code that implements `IF_CHECK_FAILED` option
0b003e1ff7 docs: Updated debug build instructions for cmake
341ad23809 build: Delete MSVC special case for `BUILD_FOR_FUZZING` option
5c80192ff6 test: Drop no longer needed workarounds
ff54395de4 Update secp256k1 subtree to latest master
611562806c Squashed 'src/secp256k1/' changes from 642c885b61..2f2ccc4695
b07fe666f2 build: Minimize I/O operations in `GenerateHeaderFrom{Json,Raw}.cmake`
c45186ca54 ci: Switch from `make` to `cmake --build`
6e5f33af58 ci: Handle log files regardless of CMake's version
fdad128b52 build: Stop enabling CMake's CMP0141 policy
b2a6f545b4 doc: Drop `ctest` command from Windows cross-compiling instructions
73b618582d build: Print `CMAKE_CXX_COMPILER_ARG1` in summary
f03c942095 build, test: Add missed log options
6f2cb0eafd doc: Amend comment about ZeroMQ config files
0dd16d7118 build: Add a pkg-config file for libbitcoinkernel
45be32f838 build: Produce a usable static kernel library
43cd83b0c7 test: move uint256_tests/operator_with_self to arith_uint256_tests
c6c994cb2b test: remove test-only uint160S
62cc4656e2 test: remove test-only uint256S
adc00ad728 test: remove test-only arith_uint256S
a5fa90706a Merge bitcoin/bitcoin#30834: test: Work around boost compilation error
7b04fabe2d build: Introduce "Kernel" installation component
fa9d7d5d20 test: Work around boost compilation error
fa3ecdf778 Revert "build: work around issue with Boost <= 1.80 and Clang >= 18"
30073e6b3a multiprocess: Add -ipcbind option to bitcoin-node
bbf95c0cc5 Merge bitcoin/bitcoin#30755: ci: Add missed configuration options to "Win64 native" job
73fe7d7230 multiprocess: Add unit tests for connect, serve, and listen functions
955d4077aa multiprocess: Add IPC connectAddress and listenAddress methods
4da20434d4 depends: Update libmultiprocess library for CustomMessage function and ThreadContext bugfix
ee22bf55e3 doc: Update and amend MSVC build guide
c07fdd6546 fuzz: Don't compile BDB-specific code on MSVC in `wallet_bdb_parser.cpp`
e07a3ede52 ci: Add missed configuration options to "Win64 native" job
1f054eca4e cmake: add USE_SOURCE_PERMISSIONS to all configure_file usage
0e5cd608da Merge bitcoin/bitcoin#30415: contrib: fix check-deps.sh to check for weak symbols
118b55c462 Merge bitcoin/bitcoin#30790: bench: Remove redundant logging benchmarks
c0cbe26a86 Merge bitcoin/bitcoin#30748: test: Pin and document TEST_DIR_PATH_ELEMENT, SeedRand::FIXED_SEED
c3af4b1ec3 Merge bitcoin/bitcoin#30822: cmake: scope Boost Test check to `vcpkg`
7f472e9bcd Merge bitcoin/bitcoin#30821: build: work around issue with Boost <= 1.80 and Clang >= 18
d4c7c4009d init: error out if -maxconnections is negative
c773649481 init: improves file descriptors accounting and docs
29008a7ff4 init: fixes fd accounting regarding poll/select
30803a35d5 cmake: decouple FORTIFY_SOURCE check from Debug build type
a7a4e11db8 cmake: scope Boost Test check to vcpkg
d661e2b1b7 Merge bitcoin/bitcoin#30812: lint: Check for release note snippets in the wrong folder
cd062d6684 build: work around issue with Boost <= 1.80 and Clang >= 18
d6a1b94ffd Merge bitcoin-core/gui#834: qt, build: remove unneeded `Q_IMPORT_PLUGIN` macro calls
6852d1d487 Merge bitcoin/bitcoin#30796: test: Use std::span and std::string_view for raw data
fa3a7ebe5b lint: Check for release note snippets in the wrong folder
fa05ee0517 Merge bitcoin/bitcoin#30772: build: Fix / improve coverage scripts
79772cd26e Merge bitcoin/bitcoin#30743: depends: build libevent with `-D_GNU_SOURCE`
faecca9a85 test: Use span for raw data
c2b779da4e refactor: Manage dumptxoutset RAII classes with std::optional
4b5bf335ad test: Add coverage for failing dumptxoutset behavior
f794a0d5f4 Merge bitcoin/bitcoin#30819: doc: fix assumeutxo design doc link
fadbcd51fc bench: Remove redundant logging benchmarks
fa8dd952e2 bench: Use LogInfo instead of the deprecated alias LogPrintf
e5f7272ad3 doc: fix assumeutxo design doc link
93e48240bf Merge bitcoin/bitcoin#30244: ci: parse TEST_RUNNER_EXTRA into an array
f640b323bd Merge bitcoin/bitcoin#30723: lint: Speed up and fix flake8 checks
3ae35b427f ci: run check-deps.sh as part of clang-tidy job
0aaa1298a0 contrib: fix check-deps.sh when libraries do not import symbols
3c99f5a38a contrib: fix check-deps.sh to check for weak symbols
86c80e9cf2 contrib: make check-deps.sh script work with cmake
5373aa30e2 Merge bitcoin/bitcoin#30788: test: fixing failing system_tests/run_command under some Locales
3210d87dfc Merge bitcoin/bitcoin#29043: fuzz: make FuzzedDataProvider usage deterministic
81276540d3 Merge bitcoin/bitcoin#30148: cli: restrict multiple exclusive argument usage in bitcoin-cli
210210c923 Merge bitcoin/bitcoin#29566: test: update satoshi_round function
b0c3de6847 Merge bitcoin/bitcoin#28417: contrib/signet/miner updates
cb65ac469a Merge bitcoin/bitcoin#29605: net: Favor peers from addrman over fetching seednodes
b8d2f58e06 Merge bitcoin/bitcoin#30808: rpc: dumptxoutset height parameter follow-ups (29553)
f51b237723 refactor: rpc: use uint256::FromHex for ParseHashV
d9fcbfc372 build: Add `JOBS` variable support to `CoverageFuzz.cmake` script
e7cf4a6f27 build: Add missed `-g` for "Coverage" build configuration
fe2003ab12 build: Add `COMMAND_ERROR_IS_FATAL` to every process in coverage scrips
a3108a7c56 rpc: Manage dumptxoutset rollback with RAII class
c5eaae3b89 doc: Add -rpcclienttimeout=0 to loadtxoutset examples
598b9bba5a rpc: Don't re-enable previously disabled network after dumptxoutset
ae48a22a3d test: fixing failing system_tests/run_command under some Locales
fac973647d test: Use string_view for json_tests
5567754087 depends: build libevent with -D_GNU_SOURCE
7346b01092 qt, build: remove unneeded `Q_IMPORT_PLUGIN` macro calls
fa84f9decd test: Pin and document TEST_DIR_PATH_ELEMENT
2ad560139b Remove unused src_dir param from run_tests
2222f7a874 test: Rename SeedRand::SEED to FIXED_SEED for clarity
fafdb7df34 lint: Speed up flake8 checks
faf17df7fb lint: Document missing py_lint dependency
faebeb828f lint: Remove python whitespace and shadowing lint rules
7777047835 lint: Remove python lint rules that are SyntaxError
faaf3e53f0 test: [refactor] Fix F841 flake8
444421db69 test: [refactor] Fix E714 pycodestyle
ee47ca29d6 init: fix fatal error on '-wallet' negated option value
27c976d11a fix: increase consistency of rpcauth parsing
2ad3689512 test: add norpcauth test
67df0dec1a test: blank rpcauth CLI interaction
fb6d51eb25 signet/miner: Use argparse exclusive groups
ec317bc44b test: update satoshi_round function
ecc98ccff2 test: add cases for blank rpcauth
c8e6771af0 test: restrict multiple CLI arguments
8838c4f171 common/args.h: automate check for multiple cli commands
6eeb188d40 test: adds seednode functional tests
3270f0adad net: Favor peers from addrman over fetching seednodes
8131bf7483 ci: parse TEST_RUNNER_EXTRA into an array
c4762b0aa0 test: allow excluding func test by name and arg
338a266a9a signet/miner: add support for a poolnum/poolid tag in mined blocks
409ab7d35b signet/miner: add Generate.mine function
7b31332370 signet/miner: add Generate.gbt function
85c5c0bea9 signet/miner: add Generate.next_block_time function
5540e6ca49 signet/miner: move next_block_* functions into new Generator class
35f4631196 signet/miner: rename do_decode_psbt to decode_psbt
aac040b439 signet/miner: drop create_coinbase function
16951f549e signet/miner: drop do_createpsbt function
3aed0a4284 signet/miner: drop get_reward_address function
01960c53c7 fuzz: make FuzzedDataProvider usage deterministic
REVERT: d8b6e67b2a kernel: Add check if the chainstate maanger is busy loading blocks
REVERT: f12a131af8 kernel: Process transactions
REVERT: 75d48e6718 kernel: Add optional mempool
REVERT: 889632bb70 kernel: Add support for handling transactions
REVERT: 476c754f3b kernel: Add check for when a block has been mutated.
REVERT: ebef1b465b kernel: Add support for handling block headers
REVERT: a56c79a2b5 kernel: Add utxo set iteration and value retrieval
REVERT: 33c71843e3 kernel: Add pure kernel bitcoin-chainstate
REVERT: ccb2bb59f9 kernel: Add block index utility functions to C header
REVERT: c953e1f530 kernel: Add function to read block undo data from disk to C header
REVERT: 55673f7f70 kernel: Add functions to read block from disk to C header
REVERT: 348e1c0a22 kernel: Add function for copying  block data to C header
REVERT: 4c71ffbef6 kernel: Add functions for the block validation state to C header
REVERT: 160343c9c2 kernel: Add validation interface and task runner to C header
REVERT: 55a60d8c3f kernel: Add interrupt function to C header
REVERT: 0d59e95b82 kernel: Add import blocks function to C header
REVERT: 804e064ff6 kernel: Add chainstate load options for in-memory dbs in C header
REVERT: 1c829ce9f4 kernel: Add options for reindexing in C header
REVERT: c8a2917004 kernel: Add block validation to C header
REVERT: 8015b8374c Kernel: Add chainstate loading to kernel C header
REVERT: b3c8467b62 kernel: Add chainstate manager object to C header
REVERT: 07c55185c2 kernel: Add notifications context option to C header
REVERT: 71c45c0680 kerenl: Add chain params context option to C header
REVERT: d2ad67bd5f kernel: Add kernel library context object
REVERT: 1c6716c609 kernel: Add logging to kernel library C header
REVERT: 63a83b8dad kernel: Introduce initial kernel C header API

git-subtree-dir: libbitcoinkernel-sys/bitcoin
git-subtree-split: d5ee7b1f5ee19e454a74d00502a0bf7be849c260
fanquake added a commit that referenced this pull request Sep 17, 2024
06a7df7 doc: Generate manpages (Ava Chow)
5315886 build: Bump to 28.0rc2 (Ava Chow)
ff95cb3 streams: remove AutoFile::Get() entirely (Pieter Wuille)
8229e98 streams: cache file position within AutoFile (Pieter Wuille)
1b853fd qt: Translations update (Hennadii Stepanov)
674dded gui: fix crash when closing wallet (furszy)
d39262e test: Wait for local services to update in feature_assumeutxo (Fabian Jahr)
b329ed7 test: add coverage for assumeUTXO honest peers disconnection (furszy)
c6b5db1 assumeUTXO: fix peers disconnection during sync (furszy)
598415b test: Work around boost compilation error (MarcoFalke)

Pull request description:

  * #30834
  * #30807
  * #30880
  * bitcoin-core/gui#835
  * #30899
  * #30884

ACKs for top commit:
  stickies-v:
    ACK 06a7df7
  hebasto:
    ACK 06a7df7, I've backported the listed PRs locally. The only merge conflict I faced was in #30807. It was trivial to resolve.

Tree-SHA512: 779d734b50fdce379a20865ba30c969def028963ba51da0f497ddf1b5375e1f6166365295f226c1a07bab8be0c1aa0a6a3296fc6acd9fcf17bcc4874aac980a6
achow101 added a commit that referenced this pull request Oct 9, 2024
33381ea scripted-diff: Modernize nLocalServices to m_local_services (Fabian Jahr)

Pull request description:

  The type of the `nLocalServices` variable was changed to `std::atomic<ServiceFlags>` in #30807 and I suggested the variable name to get updated with a scripted diff along with it. It wasn't included in the PR but I am still suggesting to do it as a follow-up since I had already prepared the commit.

ACKs for top commit:
  sipa:
    utACK 33381ea
  achow101:
    ACK 33381ea
  furszy:
    utACK 33381ea
  jonatack:
    ACK 33381ea
  theStack:
    ACK 33381ea

Tree-SHA512: 407ea9eac694f079aa5b5c1611b5874d7a0897ba6bc3aa0570be94afe1bf3a826657b6890b6597c03c063e95b9dc868f0bdfbfc41e77ec7e06f5b045bf065c71
achow101 added a commit that referenced this pull request Nov 19, 2024
111465d test: Remove unused attempts parameter from wait_until (Fabian Jahr)
5468a23 test: Add check_interval parameter to wait_until (Fabian Jahr)
16c87d9 test: Introduce ensure_for helper (Fabian Jahr)

Pull request description:

  A repeating pattern in the functional tests is that the test sleeps for a while to ensure that a certain condition is still true after some amount of time has elapsed. Most recently a new case of this was added in #30807. This PR here introduces an `ensure` helper to streamline this functionality.

  Some approach considerations:
  - It is possible to construct this by reusing `wait_until` and wrapping it in `try` internally. However, the logger output of the failing wait would still be printed which seems irritating. So I opted for simplified but similar internals to `wait_until`.
  - This implementation starts for a failure in the condition right away which has the nice side-effect that it might give feedback on a failure earlier than is currently the case. However, in some cases, it may be expected that the condition may still be false at the beginning and then turns true until time has run out, something that would work when the test sleeps without checking in a loop. I decided against this design (and even against adding it as an option) because such a test design seems like it would be racy either way.
  - I have also been going back and forth on naming. To me `ensure` works well but I am also not a native speaker, happy consider a different name if others don't think it's clear enough.

ACKs for top commit:
  maflcko:
    re-ACK 111465d 🍋
  achow101:
    ACK 111465d
  tdb3:
    code review re ACK 111465d
  furszy:
    utACK 111465d

Tree-SHA512: ce01a4f3531995375a6fbf01b27d51daa9d4c3d7cd10381be6e86ec5925d2965861000f7cb4796b8d40aabe3b64c4c27e2811270e4e3c9916689575b8ba4a2aa
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Apr 23, 2025
Summary:
Because AssumeUTXO nodes prioritize tip synchronization, they relay their local
address through the network before completing the background chain sync.
This, combined with the advertising of full-node service (NODE_NETWORK), can
result in an honest peer in IBD connecting to the AssumeUTXO node (while syncing)
and requesting an historical block the node does not have. This behavior leads to
an abrupt disconnection due to perceived unresponsiveness (lack of response)
from the AssumeUTXO node.

This lack of response occurs because nodes ignore getdata requests when they do
not have the block data available (further discussion can be found in PR 30385).

Fix this by refraining from signaling full-node service support while the
background chain is being synced. During this period, the node will only
signal 'NODE_NETWORK_LIMITED' support. Then, full-node ('NODE_NETWORK')
support will be re-enabled once the background chain sync is completed.

Add coverage for assumeUTXO honest peers disconnection.

Exercising and verifying the following points:

1. An IBD node can sync headers from an AssumeUTXO node at
   any time.

2. IBD nodes do not request historical blocks from AssumeUTXO
   nodes while they are syncing the background-chain.

3. The assumeUTXO node dynamically adjusts the network services
   it offers according to its state.

4. IBD nodes can fully sync from AssumeUTXO nodes after they
   finish the background-chain sync.

This is a backport of [[bitcoin/bitcoin#30807 | core#30807]] and core#30880

Depends on D17966

Test Plan: `ninja all check-all`

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D17968
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants