Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport: merge bitcoin#27653, #24748, #29352, #29372, #29460, #29358, #29511, #29390, #29431, bitcoin-core/gui#788 (BIP324 backports: part 4) #6330

Merged
merged 12 commits into from
Oct 24, 2024

Conversation

kwvg
Copy link
Collaborator

@kwvg kwvg commented Oct 15, 2024

Additional Information

  • Depends on backport: merge bitcoin#20524, #26553, #27986, #28645, #28632, #28782, #28822, #29006, #29212, merge bitcoin-core/gui#754, partial bitcoin#23443, #26448 (BIP324 backports: part 3) #6329

  • Dash-specific P2P messages have been allocated short IDs after 128 based on a prior suggestion (source) as there are 255 potential short IDs (ID 0 is reserved for V1 fallback, source) and upstream uses 28 short IDs (though Dash has left ID 5 blank as we do not implement the FEEFILTER message, source).

    As it is unlikely that upstream will utilize more than 127 short IDs (and the spec refers to IDs after 32 as "undefined", source), there shouldn't be an adverse effect to utilizing IDs >=128. The unified array of short IDs are accessible through V2ShortIDs().

    • As there are checks to see if an ID can be valid by checking against the array size (which wouldn't work here as we create an array of 256 entries combining both upstream and Dash's allocated short IDs, filling the rest with blank values and we cannot ignore blank values to know if a value is unallocated as the blanking could also signal a reservation, source), such a check needs to be done by using IsValidV2ShortID().
    • V2ShortIDs() isn't as elegant as desired as std::fill and std::copy are not constexpr until C++20 (source, source) and until we drop C++17 support, we have to be mindful of that.
  • masternode connect will now attempt to establish a P2Pv2 connection if the node initiating the connection has opted-in using the new argument (v2transport) and the node was started with P2Pv2 enabled (using the launch argument, -v2transport).

    This mirrors changes to behavior to addconnection introduced in bitcoin#24748

  • The oversized payload test in p2p_invalid_messages.py will expect an excessively large message of size of 3145729 bytes (and in P2Pv2, 3145742 bytes), as opposed to upstream's 4000001 and 4000014 bytes respectively as Dash has a lower protocol limit of 3MiB (source) vs Bitcoin's 4MB (source)

Breaking Changes

None expected.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation (note: N/A)
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

@kwvg kwvg added this to the 22 milestone Oct 15, 2024
@kwvg kwvg added the RPC Some notable changes to RPC params/behaviour/descriptions label Oct 15, 2024
Copy link

This pull request has conflicts, please rebase.

PastaPastaPasta added a commit that referenced this pull request Oct 22, 2024
, bitcoin#28645, bitcoin#28632, bitcoin#28782, bitcoin#28822, bitcoin#29006, bitcoin#29212, merge bitcoin-core/gui#754, partial bitcoin#23443, bitcoin#26448 (BIP324 backports: part 3)

aa5311d merge bitcoin#29212: Fix -netinfo backward compat with getpeerinfo pre-v26 (Kittywhiskers Van Gogh)
1a293c7 merge bitcoin#29006: fix v2 transport intermittent test failure (Kittywhiskers Van Gogh)
d0804d4 merge bitcoin#28822: Add missing wait for version to be sent in add_outbound_p2p_connection (Kittywhiskers Van Gogh)
c0b3062 merge bitcoin#28782: Add missing sync on send_version in peer_connect (Kittywhiskers Van Gogh)
35253cd merge bitcoin#28632: make python p2p not send getaddr on incoming connections (Kittywhiskers Van Gogh)
6a4ca62 merge bitcoin#28645: fix `assert_debug_log` call-site bugs, add type checks (Kittywhiskers Van Gogh)
deaee14 merge bitcoin-core/gui#754: Add BIP324-specific labels to peer details (Kittywhiskers Van Gogh)
fffe6e7 merge bitcoin#27986: remove race in the user-agent reception check (Kittywhiskers Van Gogh)
1bf135b merge bitcoin#26553: Fix intermittent failure in rpc_net.py (Kittywhiskers Van Gogh)
5bf245b partial bitcoin#26448: fix intermittent failure in p2p_sendtxrcncl.py (Kittywhiskers Van Gogh)
b7c0030 partial bitcoin#23443: Erlay support signaling (Kittywhiskers Van Gogh)
c709df7 merge bitcoin#20524: Move MIN_VERSION_SUPPORTED to p2p.py (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * Dependent on #6324

  * Dependency for #6330

  ## How Has This Been Tested?

  * Changes to Qt client were validated by running the client

    <details>

    <summary>Screenshot</summary>

    ![Transport reporting in Qt](https://github.com/user-attachments/assets/0d551e19-f3a2-4ce7-83d6-5cb3d03b1765)

    </details>

  * Changes to `dash-cli` were validated by running it with different node versions

    **Against a node built on this PR**

    <details>

    <summary>Screenshot</summary>

    ![getinfo with node running the latest build](https://github.com/user-attachments/assets/8cda68cc-727a-4cf3-a4d8-dd6a33331d78)

    </details>

    **Against a node built running the last release**

    <details>

    <summary>Screenshot</summary>

    ![getinfo with node running the latest release](https://github.com/user-attachments/assets/0c6ff476-7cc9-4297-bae5-35d423aba480)

    </details>

  ## 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:
  UdjinM6:
    ACK aa5311d
  PastaPastaPasta:
    utACK aa5311d

Tree-SHA512: 8cca324ac988a73c0590a4e9b318e81ce951ac55fb173cf507fa647cab01ab4981e6a06d4792376b4bfb44ff09d4811de05fadb9ba793dd00b4c7965b4b22654
Copy link

This pull request has conflicts, please rebase.

@kwvg kwvg marked this pull request as ready for review October 23, 2024 20:05
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

Looks good overall, will test + see few notes below

src/net.cpp Outdated Show resolved Hide resolved
src/protocol.cpp Show resolved Hide resolved
test/functional/feature_addrman.py Show resolved Hide resolved
@UdjinM6
Copy link

UdjinM6 commented Oct 24, 2024

changes looks good but needs rebase on latest develop now

@UdjinM6
Copy link

UdjinM6 commented Oct 24, 2024

also, I tested it a bit and it seems to be working with no issues on testnet 👍

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

utACK 4735b82

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

light ACK 4735b82

@UdjinM6 UdjinM6 mentioned this pull request Oct 24, 2024
5 tasks
@PastaPastaPasta PastaPastaPasta merged commit 2e162da into dashpay:develop Oct 24, 2024
22 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RPC Some notable changes to RPC params/behaviour/descriptions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants