You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cc98f9e merge bitcoin#23670: Build minisketch test in make check, not in make (Kittywhiskers Van Gogh)
606a444 merge bitcoin#26686: Enable erlay setting in process_message(s) targets (Kittywhiskers Van Gogh)
38a16a2 merge bitcoin#26359: Erlay support signaling follow-ups (Kittywhiskers Van Gogh)
b55a6f7 merge bitcoin#26448: fix intermittent failure in p2p_sendtxrcncl.py (Kittywhiskers Van Gogh)
36be978 merge bitcoin#26396: Avoid SetTxRelay for feeler connections (Kittywhiskers Van Gogh)
62dc9cb merge bitcoin#26381: Fix intermittent issue in p2p_sendtxrcncl.py (Kittywhiskers Van Gogh)
6a7868d merge bitcoin#23443: Erlay support signaling (Kittywhiskers Van Gogh)
fdc3c07 partial bitcoin#19953: Implement BIP 340-342 validation (Kittywhiskers Van Gogh)
477157d merge bitcoin#26272: Prevent UB in `minisketch_tests.cpp` (Kittywhiskers Van Gogh)
0cf7401 merge bitcoin#23496: Add minisketch fuzz test (Kittywhiskers Van Gogh)
49ef53c merge bitcoin#23491: Move minisketchwrapper to src/node (Kittywhiskers Van Gogh)
Pull request description:
## Additional Information
* Dependent on #6332
* Dependent on #6365
* Erlay requires nodes to be `WTXIDRELAY` (as defined by BIP-339, [source](https://github.com/bitcoin/bips/blob/17c04f9fa1ecae173d6864b65717e13dfc1880af/bip-0339.mediawiki))-capable ([source](https://github.com/bitcoin/bips/blob/17c04f9fa1ecae173d6864b65717e13dfc1880af/bip-0330.mediawiki#sendtxrcncl)) as prior to `WTXIDRELAY` adoption, TXIDs of SegWit transactions didn't include the witness data in the hash, which meant, the witness data was malleable ([source](https://bitcoin.stackexchange.com/a/107394)), which would be a relevant factor when you are building out a reconciliation system where you need TXIDs to authoritatively identify a transaction's contents.
As Dash _doesn't_ support SegWit, this requirement can be dispensed with. It has instead been replaced with checking if the node is running Dash Core v22 or above to retain the underlying test logic (but this can also be dispensed with as `SENDTXRCNCL` will simply be ignored by older nodes and major releases are _generally_ mandatory upgrades anyways)
## Breaking Changes
None expected.
## Checklist
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
- [x] I have added or updated relevant unit/integration/functional/e2e tests
- [x] I have made corresponding changes to the documentation **(note: N/A)**
- [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
ACKs for top commit:
PastaPastaPasta:
utACK cc98f9e
UdjinM6:
utACK cc98f9e
Tree-SHA512: fe985f4df6c96c0a7b984882815a1bce7f23c54370198d099e41a59ac4c46c283a2b8dd95f5c8fc12eb1dc1330c4e5c21626b76d33d83d395326e8eb19d564ce
argsman.AddArg("-v2transport", strprintf("Support v2 transport (default: %u)", DEFAULT_V2_TRANSPORT), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
579
580
argsman.AddArg("-peerblockfilters", strprintf("Serve compact block filters to peers per BIP 157 (default: %u)", DEFAULT_PEERBLOCKFILTERS), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
580
581
argsman.AddArg("-peerbloomfilters", strprintf("Support filtering of blocks and transaction with bloom filters (default: %u)", DEFAULT_PEERBLOOMFILTERS), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
argsman.AddArg("-peertimeout=<n>", strprintf("Specify a p2p connection timeout delay in seconds. After connecting to a peer, wait this amount of time before considering disconnection based on inactivity (minimum: 1, default: %d)", DEFAULT_PEER_CONNECT_TIMEOUT), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
argsman.AddArg("-port=<port>", strprintf("Listen for connections on <port>. Nodes not using the default ports (default: %u, testnet: %u, regtest: %u) are unlikely to get incoming connections. Not relevant for I2P (see doc/i2p.md).", defaultChainParams->GetDefaultPort(), testnetChainParams->GetDefaultPort(), regtestChainParams->GetDefaultPort()), ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::CONNECTION);
// Received from a peer demonstrating readiness to announce transactions via reconciliations.
3762
+
// This feature negotiation must happen between VERSION and VERACK to avoid relay problems
3763
+
// from switching announcement protocols after the connection is up.
3764
+
if (msg_type == NetMsgType::SENDTXRCNCL) {
3765
+
if (!m_txreconciliation) {
3766
+
LogPrint(BCLog::NET, "sendtxrcncl from peer=%d ignored, as our node does not have txreconciliation enabled\n", pfrom.GetId());
3767
+
return;
3768
+
}
3769
+
3770
+
if (pfrom.fSuccessfullyConnected) {
3771
+
LogPrint(BCLog::NET, "sendtxrcncl received after verack from peer=%d; disconnecting\n", pfrom.GetId());
3772
+
pfrom.fDisconnect = true;
3773
+
return;
3774
+
}
3775
+
3776
+
// Peer must not offer us reconciliations if we specified no tx relay support in VERSION.
3777
+
if (RejectIncomingTxs(pfrom)) {
3778
+
LogPrint(BCLog::NET, "sendtxrcncl received from peer=%d to which we indicated no tx relay; disconnecting\n", pfrom.GetId());
3779
+
pfrom.fDisconnect = true;
3780
+
return;
3781
+
}
3782
+
3783
+
// Peer must not offer us reconciliations if they specified no tx relay support in VERSION.
3784
+
// This flag might also be false in other cases, but the RejectIncomingTxs check above
3785
+
// eliminates them, so that this flag fully represents what we are looking for.
3786
+
if (!pfrom.m_relays_txs) {
3787
+
LogPrint(BCLog::NET, "sendtxrcncl received from peer=%d which indicated no tx relay to us; disconnecting\n", pfrom.GetId());
3788
+
pfrom.fDisconnect = true;
3789
+
return;
3790
+
}
3791
+
3792
+
uint32_t peer_txreconcl_version;
3793
+
uint64_t remote_salt;
3794
+
vRecv >> peer_txreconcl_version >> remote_salt;
3795
+
3796
+
const ReconciliationRegisterResult result = m_txreconciliation->RegisterPeer(pfrom.GetId(), pfrom.IsInboundConn(),
3797
+
peer_txreconcl_version, remote_salt);
3798
+
switch (result) {
3799
+
case ReconciliationRegisterResult::NOT_FOUND:
3800
+
LogPrint(BCLog::NET, "Ignore unexpected txreconciliation signal from peer=%d\n", pfrom.GetId());
3801
+
break;
3802
+
case ReconciliationRegisterResult::SUCCESS:
3803
+
break;
3804
+
case ReconciliationRegisterResult::ALREADY_REGISTERED:
3805
+
LogPrint(BCLog::NET, "txreconciliation protocol violation from peer=%d (sendtxrcncl received from already registered peer); disconnecting\n", pfrom.GetId());
3806
+
pfrom.fDisconnect = true;
3807
+
return;
3808
+
case ReconciliationRegisterResult::PROTOCOL_VIOLATION:
3809
+
LogPrint(BCLog::NET, "txreconciliation protocol violation from peer=%d; disconnecting\n", pfrom.GetId());
3810
+
pfrom.fDisconnect = true;
3811
+
return;
3812
+
}
3813
+
return;
3814
+
}
3815
+
3730
3816
if (!pfrom.fSuccessfullyConnected) {
3731
3817
LogPrint(BCLog::NET, "Unsupported message \"%s\" prior to verack from peer=%d\n", SanitizeString(msg_type), pfrom.GetId());
0 commit comments