Skip to content

Conversation

@kwvg
Copy link
Collaborator

@kwvg kwvg commented Mar 23, 2024

Additional Information

  • bitcoin#19884 doesn't seem to play nice on its own and necessitated two more backports (namely bitcoin#21165 and bitcoin#21254) before it did.

    • Trying to find why that is has been time consuming but there doesn't seem to be a concrete answer. If running the daemon normally (dashd --regtest --dnsseed=1), the functionality behaves as expected but the test still fails.

    • The closest explanation is that our OOO backports with relation to mocking time could explain why it isn't working as expected due to debug statements I added that always shown the time delta between each "enough time has passed" check was 0 seconds even when the log was advancing forward in time.

  • The usage of dnsseed=0 stems from bitcoin#16551 (link to diff in commit comment), a backport that was skipped due to complexity. Though, some aspects of the PR have made it with dash#3946.

  • bitcoin#19829 does away with CConnman::ForEachNode usage in PeerManagerImpl::UpdatedBlockTip (source). Dash cannot do the same and continues to use ForEachNode as we use the CNode::CanRelay check, which is not accessible through the Peer struct.

    • It would be valuable to find values that are Dash-specific (like m_masternode_connection) and migrate them to Peer to avoid Dash-specific patches and closer alignment with upstream.

Breaking Changes

Potential change in behaviour in the GUI and RPC.

In RPC, getpeerinfo will now display pingwait and startingheight if fStateStats is true (earlier behaviour was unconditional). startingheight has been placed below banscore (earlier behaviour placed it above). In the GUI (Qt), peerHeight and peerPingWait are subject to similar conditionality as mentioned earlier.

No changes in protocol or consensus. Changes are primarily related to refactoring, cleaning up, improving networking code and adding a new flag (-fixedseeds).

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 21 milestone Mar 23, 2024
@kwvg kwvg marked this pull request as ready for review March 23, 2024 18:40
@UdjinM6 UdjinM6 added the RPC Some notable changes to RPC params/behaviour/descriptions label Mar 23, 2024
@kwvg kwvg changed the title backport: merge bitcoin#20624, #19829, #20477, #20146, #20724, #20721, #19972, #19884, #21165, #21254 (networking backports) backport: merge bitcoin#20624, #20477, #20146, #20724, #20721, #19972, #19884, #21165, #21254, partial bitcoin#19829 (networking backports) Mar 24, 2024
@kwvg kwvg requested a review from UdjinM6 March 24, 2024 12:25
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.

Mostly LGTM

src/net.cpp Outdated
Copy link
Member

@PastaPastaPasta PastaPastaPasta Mar 24, 2024

Choose a reason for hiding this comment

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

20477: nit: missing added optional include? probably compiles fine due to other headers already including; but we should IWYU

src/net.cpp Outdated
Comment on lines +1074 to +1061
Copy link
Member

Choose a reason for hiding this comment

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

20477: nit whitespace diff with upstream could result in conflicts in future

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 99e87c98fab273965b05ea2b2d366bf925bca234

@kwvg
Copy link
Collaborator Author

kwvg commented Mar 25, 2024

Branch re-pushed to have commits arranged in order of upstream merger. No changes in diff or conflicts caused by re-org.

@kwvg kwvg changed the title backport: merge bitcoin#20624, #20477, #20146, #20724, #20721, #19972, #19884, #21165, #21254, partial bitcoin#19829 (networking backports) backport: merge bitcoin#20146, #20477, #20624, #19972, #20724, #19884, #21165, #20721, #21254, partial bitcoin#19829 (networking backports) Mar 25, 2024
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.

re-utACK 0d90465

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.

utACK

@PastaPastaPasta PastaPastaPasta merged commit e9fdfa8 into dashpay:develop Mar 25, 2024
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