p2p: Erlay support signaling follow-ups #26359

pull naumenkogs wants to merge 8 commits into bitcoin:master from naumenkogs:2021-11-erlay1_followup changing 8 files +169 −166
  1. naumenkogs commented at 8:08 am on October 21, 2022: member

    Non-trivial changes include:

    • Getting rid of roles in sendtxrcncl message (summarized in the BIP PR);
    • Disconnect the peer if it send sendtxrcncl although we are in blocksonly and notified the peer with fRelay=0;
    • Don’t send sendtxrcncl to feeler connections.
  2. fanquake added the label P2P on Oct 21, 2022
  3. in src/net_processing.cpp:3278 in cfd5c27dcd outdated
    3272@@ -3273,8 +3273,9 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
    3273             // - protocol version per the VERSION message supports WTXID_RELAY;
    3274             // - we intended to exchange transactions over this connection while establishing it
    3275             //   and the peer indicated support for transaction relay in the VERSION message;
    3276-            // - we are not in -blocksonly mode.
    3277-            if (pfrom.m_relays_txs && !m_ignore_incoming_txs) {
    3278+            // - we are not in -blocksonly mode;
    3279+            // - this is not a feeler.
    3280+            if (pfrom.m_relays_txs && !m_ignore_incoming_txs && !pfrom.IsFeelerConn()) {
    


    maflcko commented at 9:30 am on October 21, 2022:

    cfd5c27dcdc39cf7a65c56c3dbf3bf60ea0c475f:

    There are several unrelated things:

    • If this feeler check isn’t dead code here, it should probably be moved to the previous section that initializes the TxRelay struct. (And maybe in a separate pull request, as it would change non-erlay code?) This would mean that the tx relay struct isn’t initialized and also m_relays_txs isn’t set, which is then checked in this line here.
    • Unrelated, I wonder if RejectIncomingTxs should be used here. The difference is that the Relay permission will be carved out. I don’t know the answer, I just wanted to raise the point.

    naumenkogs commented at 10:20 am on October 21, 2022:
    good point, i’ll look closer.

    naumenkogs commented at 2:14 pm on October 21, 2022:
    1. From my understanding, this code isn’t dead. The feeler check could indeed be moved above. Not sure what’s the best way to attack this w.r.t. this PR (surely, a separate PR is the best option, but is that gonna get merged sooner…)
    2. Yeah checking for tx relay support is kinda ugly in general. RejectIncomingTxs is of course relevant, but not 100% match, if you just look at the name. I’d better keep the code as-is now, and refactor this separately (dunno how yet)

    naumenkogs commented at 6:20 pm on October 21, 2022:

    By the latter I mean that even RejectIncomingTxs-ing (whatever that could mean) doesn’t necessarily mean we should reject reconciling. Might be useful to reconcile even if we “should reject”. Not 100% sure (certainly not how Erlay intends to work in the default case).

    Anyway, not changing the code until further consideration.


    maflcko commented at 3:47 pm on October 25, 2022:

    Not sure what’s the best way to attack this w.r.t. this PR

    Happy to work on this, unless you want to


    naumenkogs commented at 8:08 pm on October 25, 2022:
    I was waiting for another opinion to show up here :) Feel free to open a separate PR with that stuff, I will ack. Or, if you think it makes more sense here,, then I can just add a commit here, that i can do.

    maflcko commented at 3:59 pm on October 26, 2022:
    Heh, maybe it should be left as-is here. We also send a lot of other messages, such as GETADDR, so the SENDTXRCNCL message seems to be consistent. Changing the tx-relay allocation could still be done, though. See https://github.com/bitcoin/bitcoin/pull/26396

    ariard commented at 11:57 pm on October 30, 2022:
    What about IsAddrFetchConn() ? I think we should restrain ourselves to send ConnectionType::ADDR_FETCH.

    naumenkogs commented at 8:57 am on October 31, 2022:
    Similarly to #26396, i think this should be fixed above (m_relays_tx), and done in a separate PR :) Let’s hope Marco updates that one for now.

    mzumsande commented at 11:30 pm on November 1, 2022:
    #26396 seems likely to be accepted, so I agree that the commit can be removed here.
  4. DrahtBot commented at 10:18 am on October 21, 2022: contributor

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK vasild, ariard, mzumsande

    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:

    • #26283 (p2p: Fill reconciliation sets and request reconciliation (Erlay) by naumenkogs)
    • #25572 (refactor: Introduce EvictionManager and use it for the inbound eviction logic by dergoegge)
    • #25268 (refactor: Introduce EvictionManager by dergoegge)
    • #21515 (Erlay: bandwidth-efficient transaction relay protocol by naumenkogs)

    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.

  5. naumenkogs force-pushed on Oct 25, 2022
  6. naumenkogs marked this as a draft on Oct 26, 2022
  7. naumenkogs force-pushed on Oct 26, 2022
  8. naumenkogs force-pushed on Oct 26, 2022
  9. naumenkogs marked this as ready for review on Oct 26, 2022
  10. in src/test/txreconciliation_tests.cpp:40 in 2b9cd5f7b6 outdated
    40     BOOST_REQUIRE(!tracker.IsPeerRegistered(0));
    41-    BOOST_REQUIRE(tracker.RegisterPeer(0, true, true, false, 1, salt) == ReconciliationRegisterResult::SUCCESS);
    42+    BOOST_REQUIRE_EQUAL(tracker.RegisterPeer(0, true, 1, salt), ReconciliationRegisterResult::SUCCESS);
    43     BOOST_CHECK(tracker.IsPeerRegistered(0));
    44-
    45-    // Reconciliation version is higher than ours, should be able to register.
    


    vasild commented at 10:22 am on October 28, 2022:

    In commit 2269d91d2a p2p: Drop roles from sendtxrcncl there is this change:

    0     // Reconciliation version is higher than ours, should be able to register.
    1     BOOST_REQUIRE(!tracker.IsPeerRegistered(1));
    2     tracker.PreRegisterPeer(1);
    3-    BOOST_REQUIRE(tracker.RegisterPeer(1, true, true, false, 2, salt) == ReconciliationRegisterResult::SUCCESS);
    4+    BOOST_REQUIRE(tracker.RegisterPeer(1, false, 1, salt) == ReconciliationRegisterResult::SUCCESS);
    5     BOOST_CHECK(tracker.IsPeerRegistered(1));
    

    I think that should be

    0+    BOOST_REQUIRE(tracker.RegisterPeer(1, true, 2, salt) == ReconciliationRegisterResult::SUCCESS);
    

    (it is further modified by subsequent commits and I think that the cumulative diff is ok, but still each commit should make sense on its own)

  11. in src/net_processing.cpp:3510 in 2b9cd5f7b6 outdated
    3505-            // support transaction relay.
    3506+        if (!peer->GetTxRelay() || m_ignore_incoming_txs) {
    3507             LogPrintLevel(BCLog::NET, BCLog::Level::Debug, "sendtxrcncl received from peer=%d to which we indicated no tx relay; disconnecting\n", pfrom.GetId());
    3508             pfrom.fDisconnect = true;
    3509             return;
    3510         }
    


    vasild commented at 10:55 am on October 28, 2022:

    In commit 60a066da70 p2p: Disconnect peer after sendtxrcncl if we are in blocksonly

    It could happen that m_ignore_incoming_txs is true (thus we disconnect the peer), but we did not indicate no tx relay to that peer as mentioned in the log message. That is - we sent relay=true in the VERSION message.

    This could happen if the peer has NetPermissionFlags::Relay permission.

    Or the other way around - we may send relay=false in the VERSION message, but not disconnect the peer here (block-only or feeler connections).

    Would it be better to use PeerManagerImpl::RejectIncomingTxs() here instead of m_ignore_incoming_txs? The relay flag in the VERSION message is set based on it in PeerManagerImpl::PushNodeVersion().


    vasild commented at 11:15 am on October 28, 2022:

    It may also happen that we disconnect the peer because peer->GetTxRelay() is not set because the peer did not sent us relay=true in their VERSION message and we don’t provide bloom filter to them. I think this warrants a separate log message, something like:

    “sendtxrcncl received from peer=%d that indicated no tx relay; disconnecting\n”


    vasild commented at 11:15 am on October 28, 2022:
    What about peers that send us relay=false in the VERSION message but we provide bloom filters to them. The code in this PR would not disconnect such a peer, but I think it should, right?

    naumenkogs commented at 12:04 pm on October 28, 2022:

    These flags are confusing :( Indeed, having fRelay=false I think is not currently compatible with reconciliations.

    So, instead of GetTxRelay(), we better look at pfrom.m_relays_txs, right?


    vasild commented at 12:49 pm on October 28, 2022:

    These flags are confusing :(

    Yes! :frowning_face:

    Indeed, having fRelay=false I think is not currently compatible with reconciliations.

    I guess you mean the relay flag in the either VERSION message - sent or received, right?

    What about clarifying the BIP:

    0-sendtxrcncl ... Must not be sent if peer specified no support for transaction relay (fRelay=0) in "version". Otherwise, the sender should be disconnected.
    1+sendtxrcncl ... Must not be sent if either peer specified no support for transaction relay (fRelay=0) in "version". Otherwise, the sender should be disconnected.
    

    So, instead of GetTxRelay(), we better look at pfrom.m_relays_txs, right?

    Yes, this is closer to checking whether the peer sent us relay=false in VERSION. However it is not identical - fRelay may be true, but pfrom.m_relays_txs be false if pfrom.IsBlockOnlyConn(). It is ok to accept this discrepancy because for block-only connections we sent relay=false in our VERSION message.

    That said, maybe the condition should be:

    0-if (!peer->GetTxRelay() || m_ignore_incoming_txs) {
    1+if (!pfrom.m_relays_txs /* they sent relay=false */ ||
    2+    RejectIncomingTxs(pfrom) /* we sent relay=false */) {
    
  12. in src/net_processing.cpp:3542 in 2b9cd5f7b6 outdated
    3543+        if (result == ReconciliationRegisterResult::NOT_FOUND) {
    3544+            LogPrintLevel(BCLog::NET, BCLog::Level::Debug, "Ignore unexpected txreconciliation signal from peer=%d\n", pfrom.GetId());
    3545+            return;
    3546+        }
    3547+
    3548         return;
    


    vasild commented at 11:46 am on October 28, 2022:
    nit: the return inside the if is unnecessary

    naumenkogs commented at 11:56 am on October 28, 2022:
    i thought this improves readability somehow… good to drop.

    naumenkogs commented at 8:16 am on October 31, 2022:
    I decided to keep it unless there are strong objections.
  13. vasild commented at 11:47 am on October 28, 2022: contributor
    Approach ACK 2b9cd5f7b6c0cba03da7b234eb638296eeb05cfa
  14. in src/node/txreconciliation.cpp:133 in 2269d91d2a outdated
    127-        // The peer set both flags to false, we treat it as a protocol violation.
    128-        if (!(they_initiate || we_initiate)) return PROTOCOL_VIOLATION;
    129-
    130-        LogPrintLevel(BCLog::TXRECONCILIATION, BCLog::Level::Debug, "Register peer=%d with the following params: " /* Continued */
    131-                                                                    "we_initiate=%i, they_initiate=%i.\n",
    132-                      peer_id, we_initiate, they_initiate);
    


    ariard commented at 11:52 pm on October 30, 2022:
    I think you should update SENDTXRCNCL , this still mentioning the role assignment based on booleans. I would also suggest to document somewhere, in protocol.h or txreconciliation.cpp, near to m_we_initiate how the role assignment is made.
  15. mzumsande commented at 11:32 pm on November 1, 2022: contributor

    Approach ACK

    I reviewed the code, and all points I found were already mentioned by others, so I’d be happy to ACK after the oustanding comments are addressed.

  16. naumenkogs force-pushed on Nov 2, 2022
  17. naumenkogs force-pushed on Nov 2, 2022
  18. DrahtBot added the label Needs rebase on Nov 4, 2022
  19. naumenkogs force-pushed on Nov 4, 2022
  20. DrahtBot removed the label Needs rebase on Nov 4, 2022
  21. in src/node/txreconciliation.cpp:106 in 2193344280 outdated
    108-        if (recon_state == m_states.end()) return NOT_FOUND;
    109+        if (recon_state == m_states.end()) return ReconciliationRegisterResult::NOT_FOUND;
    110         uint64_t* local_salt = std::get_if<uint64_t>(&recon_state->second);
    111         // A peer is already registered. This should be checked by the caller.
    112-        Assume(local_salt);
    113+        assert(local_salt);
    


    vasild commented at 5:48 pm on November 7, 2022:

    There is some inconsistency between handling these edge cases. This assert() also looks a bit dangerous to me wrt to future changes - it seems that if the peer sends us two times SENDTXRCNCL that could trigger a remote crash by tripping this assert(). The only thing that is stopping this now is the IsPeerRegistered() in the caller, but it is not obvious there that if it is removed, grave things will ensue. I can imagine it getting wiped away by a future “refactor”.

    If the caller has checked IsPeerRegistered() before this, then we will never return NOT_FOUND from here either. So that may as well be an assert too :fire:

    What about not having such an assert at all and returning ReconciliationRegisterResult::NOT_FOUND if the peer is not pre-registered (like now) and ReconciliationRegisterResult::ALREADY_REGISTERED if the peer is already registered? Then the caller need not to check IsPeerRegistered() before calling this method.

  22. in src/net_processing.cpp:3274 in 2193344280 outdated
    3272@@ -3273,17 +3273,14 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
    3273 
    3274         if (greatest_common_version >= WTXID_RELAY_VERSION && m_txreconciliation) {
    


    vasild commented at 5:54 pm on November 7, 2022:

    Not sure if that is better, just an idea, feel free to ignore:

     0diff --git i/src/net_processing.cpp w/src/net_processing.cpp
     1index 376a263183..0ed7781b2c 100644
     2--- i/src/net_processing.cpp
     3+++ w/src/net_processing.cpp
     4@@ -3265,26 +3265,27 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
     5             (fRelay || (peer->m_our_services & NODE_BLOOM))) {
     6             auto* const tx_relay = peer->SetTxRelay();
     7             {
     8                 LOCK(tx_relay->m_bloom_filter_mutex);
     9                 tx_relay->m_relay_txs = fRelay; // set to true after we get the first filter* message
    10             }
    11-            if (fRelay) pfrom.m_relays_txs = true;
    12-        }
    13-
    14-        if (greatest_common_version >= WTXID_RELAY_VERSION && m_txreconciliation) {
    15-            // Per BIP-330, we announce txreconciliation support if:
    16-            // - protocol version per the peer's VERSION message supports WTXID_RELAY;
    17-            // - transaction relay is supported per the peer's VERSION message (see m_relays_txs);
    18-            // - this is not a block-relay-only connection and not a feeler (see m_relays_txs);
    19-            // - this is not an addr fetch connection;
    20-            // - we are not in -blocksonly mode.
    21-            if (pfrom.m_relays_txs && !pfrom.IsAddrFetchConn() && !m_ignore_incoming_txs) {
    22-                const uint64_t recon_salt = m_txreconciliation->PreRegisterPeer(pfrom.GetId());
    23-                m_connman.PushMessage(&pfrom, msg_maker.Make(NetMsgType::SENDTXRCNCL,
    24-                                                             TXRECONCILIATION_VERSION, recon_salt));
    25+            if (fRelay) {
    26+                pfrom.m_relays_txs = true;
    27+
    28+                if (greatest_common_version >= WTXID_RELAY_VERSION &&
    29+                    m_txreconciliation &&
    30+                    !pfrom.IsAddrFetchConn() && !m_ignore_incoming_txs) {
    31+                    // Per BIP-330, we announce txreconciliation support if:
    32+                    // - protocol version per the peer's VERSION message supports WTXID_RELAY;
    33+                    // - transaction relay is supported per the peer's VERSION message (see m_relays_txs);
    34+                    // - this is not a block-relay-only connection and not a feeler (see m_relays_txs);
    35+                    // - this is not an addr fetch connection;
    36+                    // - we are not in -blocksonly mode.
    37+                    const uint64_t recon_salt = m_txreconciliation->PreRegisterPeer(pfrom.GetId());
    38+                    m_connman.PushMessage(&pfrom, msg_maker.Make(NetMsgType::SENDTXRCNCL, TXRECONCILIATION_VERSION, recon_salt));
    39+                }
    40             }
    41         }
    42 
    43         m_connman.PushMessage(&pfrom, msg_maker.Make(NetMsgType::VERACK));
    44 
    45         // Potentially mark this peer as a preferred download peer.
    

    naumenkogs commented at 10:04 am on November 8, 2022:
    Not sure about this — it’s kinda difficult either way :) Will see what others say.
  23. vasild commented at 5:56 pm on November 7, 2022: contributor
    ACK 2193344280c53cfd2145d5c5e60f774b5a73b1ea modulo the failing test which seems to need some tweaking and the comment below wrt assert().
  24. tests: stabilize sendtxrcncl test 6772cbf69c
  25. naumenkogs force-pushed on Nov 8, 2022
  26. maflcko renamed this:
    p2p, refactor: #23443 (Erlay support signaling) follow-ups
    p2p: Erlay support signaling follow-ups
    on Nov 8, 2022
  27. in src/net_processing.cpp:3538 in 1597210a6d outdated
    3553+                break;
    3554+            case ReconciliationRegisterResult::ALREADY_REGISTERED: {
    3555+                LogPrintLevel(BCLog::NET, BCLog::Level::Debug, "txreconciliation protocol violation from peer=%d (sendtxrcncl received from already registered peer); disconnecting\n", pfrom.GetId());
    3556+                pfrom.fDisconnect = true;
    3557+                return;
    3558+            };
    


    vasild commented at 2:16 pm on November 8, 2022:
    nit: the { } brackets shouldn’t be necessary.
  28. in src/net_processing.cpp:3525 in 1597210a6d outdated
    3532 
    3533+        uint32_t peer_txreconcl_version;
    3534+        uint64_t remote_salt;
    3535+        vRecv >> peer_txreconcl_version >> remote_salt;
    3536+
    3537         const ReconciliationRegisterResult result = m_txreconciliation->RegisterPeer(pfrom.GetId(), pfrom.IsInboundConn(),
    


    vasild commented at 2:25 pm on November 8, 2022:
    The commit bd1563f72962bb888153d9a6bf804a64a72ff66e refactor: Switch to enum class for ReconciliationRegisterResult now contains also the behavioral change of RegisterPeer() wrt its return value and the removal of the assert.
  29. vasild approved
  30. vasild commented at 2:25 pm on November 8, 2022: contributor
    ACK 1597210a6d244927651b6a4b573b884cc6f9236c
  31. naumenkogs force-pushed on Nov 9, 2022
  32. in src/net_processing.cpp:3538 in 5c8c99b128 outdated
    3536                 LogPrintLevel(BCLog::NET, BCLog::Level::Debug, "txreconciliation protocol violation from peer=%d (sendtxrcncl received from already registered peer); disconnecting\n", pfrom.GetId());
    3537                 pfrom.fDisconnect = true;
    3538                 return;
    3539             case ReconciliationRegisterResult::PROTOCOL_VIOLATION:
    3540-                LogPrintLevel(BCLog::NET, BCLog::Level::Debug, "txreconciliation protocol violation from peer=%d; disconnecting\n", pfrom.GetId());
    3541+            LogPrintLevel(BCLog::NET, BCLog::Level::Debug, "txreconciliation protocol violation from peer=%d; disconnecting\n", pfrom.GetId());
    


    mzumsande commented at 8:26 pm on November 9, 2022:
    nit, if you touch again: indentation changes for the worse here. Also, usually while case block is indented, the case lines aren’t indented wrt the switch line, see other examples or apply clang-format script.
  33. in src/net_processing.cpp:3281 in 1aa164574d outdated
    3280+            // - transaction relay is supported per the peer's VERSION message (see m_relays_txs);
    3281+            // - this is not a block-relay-only connection and not a feeler (see m_relays_txs);
    3282+            // - this is not an addr fetch connection;
    3283             // - we are not in -blocksonly mode.
    3284-            if (pfrom.m_relays_txs && !m_ignore_incoming_txs) {
    3285+            if (pfrom.m_relays_txs && !pfrom.IsAddrFetchConn() && !m_ignore_incoming_txs) {
    


    mzumsande commented at 8:37 pm on November 9, 2022:
    Not a big fan of special casing behavior for AddrFetch without any tangible benefits (or are there any?) - I’d like to think of them as normal outbound connections, where we just happen to disconnect after we get the GETADDR answer, and while I admit that concerns such as #26396 (comment) aren’t super strong, I think it’s also easier mental model and less complicated code not to special-case for each message whether AddrFetch connections need it.
  34. mzumsande commented at 8:43 pm on November 9, 2022: contributor
    Code Review ACK 58786a102ae716332c2d56a00a10726fb7e305f1
  35. in src/node/txreconciliation.cpp:43 in 58786a102a outdated
    38@@ -39,7 +39,8 @@ class TxReconciliationState
    39      * the following commits.
    40      *
    41      * Reconciliation protocol assumes using one role consistently: either a reconciliation
    42-     * initiator (requesting sketches), or responder (sending sketches). This defines our role.
    43+     * initiator (requesting sketches), or responder (sending sketches). This defines our role,
    44+     * based on the direction of the p2p connection.
    


    ariard commented at 0:15 am on November 10, 2022:

    Note you have a bunch of references to the term initiator left in reconciatliation.{h,cpp}:

    0src/node/txreconciliation.cpp:     * initiator (requesting sketches), or responder (sending sketches). This defines our role,
    1src/node/txreconciliation.h: * 2.  At regular intervals, a txreconciliation initiator requests a sketch from a peer, where a
    2src/node/txreconciliation.h: * 3.  Once the initiator received a sketch from the peer, the initiator computes a local sketch,
    3src/node/txreconciliation.h: * 4b. If the difference was larger than estimated, initial txreconciliation fails. The initiator
    4src/node/txreconciliation.h: * SUCCESS. The initiator knows full symmetrical difference and can request what the initiator is
    5src/node/txreconciliation.h: * FAILURE. The initiator notifies the peer about the failure and announces all transactions from
    

    It’s minor, I think they can be addressed in its own commit here or in #26283 to avoid another review round.


    mzumsande commented at 1:18 am on November 10, 2022:
    I think it makes sense to keep using the more abstract terms initiator / receiver within the txreconciliation module, even after removing it from the sendtxrcncl message.
  36. ariard approved
  37. ariard commented at 0:18 am on November 10, 2022: member

    ACK 58786a1

    Verified the test coverage updates in removal of initiator/responder and after defining better sendtxrcncl policy.

  38. p2p: Drop roles from sendtxrcncl
    This feature was currently redundant (although could have provided
    more flexibility in the future), and already been causing confusion.
    a60f729e29
  39. naumenkogs force-pushed on Nov 10, 2022
  40. naumenkogs commented at 7:26 am on November 10, 2022: member
    Applied clang-format everywhere.
  41. ariard approved
  42. ariard commented at 7:07 pm on November 11, 2022: member

    ACK d44438c7

    Note the new commit d44438c reodering functional tests for readability.

  43. vasild commented at 3:01 pm on November 12, 2022: contributor

    The cumulative diff as of d44438c7d7b98d790052f8848de4aaa6d0ea7704 looks ok, but the individual commits seem somewhat messed up:

    • d7239b5d84f7f658c504002a8a7df75d1f90792b test: Expand unit and functional tests for txreconciliation contains non-test changes related to the return value of RegisterPeer().

    • 9cb6b33c62a6d3afe478727f782ae676f78bed07 p2p, refactor: Switch to enum class for ReconciliationRegisterResult has some indentation changes, and not the enum class changes

    • 29df2d79d1b48621829b98d667c1c899d94d2ed5 p2p, refactor: Minor code improvements has some adverse indentation changes and introduces the unnecessary { }

    • 5a183ddd8d8f46e6b89cce3a24ab3d8c9b5ddac4 p2p, refactor: Extend logs for unexpected sendtxrcncl fixes the adverse indentation from 29df2d79d1b48621829b98d667c1c899d94d2ed5 but not the unnecessary { }

  44. p2p, refactor: Switch to enum class for ReconciliationRegisterResult
    While doing this, add a new value: ALREADY_REGISTERED.
    bc84e24a4f
  45. test: Expand unit and functional tests for txreconciliation ac6ee5ba21
  46. p2p: Clarify sendtxrcncl policies 00c5dec818
  47. p2p, test, refactor: Minor code improvements 87493e112e
  48. p2p, refactor: Extend logs for unexpected sendtxrcncl 14263c13f1
  49. test, refactor: Reorder sendtxrcncl tests for better readability 46339d29b1
  50. naumenkogs force-pushed on Nov 14, 2022
  51. naumenkogs commented at 10:04 am on November 14, 2022: member
    @vasild sorry for that mess, addressed everything without introducing behavior changes.
  52. vasild approved
  53. vasild commented at 10:42 am on November 14, 2022: contributor

    ACK 46339d29b10c9fb597af928c21c34945d76bbd22

    :sun_with_face:

  54. in src/net_processing.cpp:3529 in 46339d29b1
    3532-            // A peer is already registered, meaning we already received SENDTXRCNCL from them.
    3533+        const ReconciliationRegisterResult result = m_txreconciliation->RegisterPeer(pfrom.GetId(), pfrom.IsInboundConn(),
    3534+                                                                                     peer_txreconcl_version, remote_salt);
    3535+        switch (result) {
    3536+        case ReconciliationRegisterResult::NOT_FOUND:
    3537+            LogPrintLevel(BCLog::NET, BCLog::Level::Debug, "Ignore unexpected txreconciliation signal from peer=%d\n", pfrom.GetId());
    


    ariard commented at 0:28 am on November 16, 2022:
    nit: The message could be clearer saying “Ignore sendtxrcncl received from peer”. “txreconciliation signal” is a bit hand-wawy.
  55. ariard commented at 0:30 am on November 16, 2022: member

    ACK 46339d2

    Did another parse of the code changes to verify there wasn’t functional modification.

  56. fanquake requested review from mzumsande on Nov 16, 2022
  57. mzumsande commented at 8:26 pm on November 29, 2022: contributor
    Code Review ACK 46339d29b10c9fb597af928c21c34945d76bbd22
  58. fanquake merged this on Nov 30, 2022
  59. fanquake closed this on Nov 30, 2022

  60. sidhujag referenced this in commit 69de47c40d on Dec 1, 2022
  61. bitcoin locked this on Nov 30, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-05 19:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me