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#19572, #20953, #20523, #21008, #21310, #22079, #23471, #24218 (zmq backports) #6231

Merged
merged 10 commits into from
Aug 31, 2024

Conversation

kwvg
Copy link
Collaborator

@kwvg kwvg commented Aug 24, 2024

Additional Information

  • bitcoin#19572 introduces tests in interface_zmq.py that validate newly introduced "sequence" reporting of all message types (C, D, R and A). The R message type (removed from mempool) is tested by leveraging the RBF mechanism, which isn't present in Dash.

    In order to allow the tests to successfully pass, all fee bumping and RBF-specific code had to be removed from the tests. This test also involves creating a new block to test the C message (connected block) that would return a time-too-new error and fail unless mocktime has been disabled (which has been done in this test).

  • When backporting bitcoin#18309 (dash#5728), Dash-specific ZMQ notifications did not have those changes applied to them and that particular backport was merged upstream after bitcoin#19572, meaning, for completion, the changes from bitcoin#18309 have been integrated into bitcoin#19572's backport.

    As for the Dash-specific notifications, they have been covered to ensure uniformity in a separate commit.

  • The ZMQ notification interface has been converted to a smart pointer in the interest of safety (this change is eventually done upstream in 8ed4ff8 (bitcoin#27125))

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 (note: N/A)
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

@kwvg kwvg added this to the 21.2 milestone Aug 24, 2024
@kwvg kwvg marked this pull request as ready for review August 24, 2024 14:23
UnregisterValidationInterface(g_zmq_notification_interface);
delete g_zmq_notification_interface;
g_zmq_notification_interface = nullptr;
UnregisterValidationInterface(g_zmq_notification_interface.get());
Copy link

Choose a reason for hiding this comment

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

ecea54c: shouldn't it be named partial merge bitcoin#27125: ...?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was planning to make changes of this nature anyway (see a5f9110 for a similar change to pdsNotificationInterface, will be part of a PR dedicated to misc. changes) and the change isn't strictly speaking essential for the functionality of the backports in this PR nor is the change something that doesn't serve value standalone (as opposed to being a part of a larger backport valuable in this immediate PR).

Added attribution in commit comment.

contrib/zmq/zmq_sub.py Outdated Show resolved Hide resolved
contrib/zmq/zmq_sub.py Outdated Show resolved Hide resolved
doc/zmq.md Outdated Show resolved Hide resolved
doc/zmq.md Outdated Show resolved Hide resolved
src/zmq/zmqnotificationinterface.cpp Show resolved Hide resolved
label = chr(body[32])
mempool_sequence = None if len(body) != 32+1+8 else struct.unpack("<Q", body[32+1:])[0]
if mempool_sequence is not None:
assert label == "A"
Copy link

Choose a reason for hiding this comment

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

19572: we could probably add some tests for R in interface_zmq_dash.py by "replacing" old txes via islock-ed ones

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've reintroduced most of the R-specific logic and added a TODO suggesting that such tests may be added in the future. Thoughts?

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 b75e83b

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 b75e83b

Copy link
Collaborator

@knst knst left a comment

Choose a reason for hiding this comment

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

utACK b75e83b

we should have release notes for, it can be added by a new PR:

  • zmq support sequence events
  • zmq address can be IPv6 now

@PastaPastaPasta PastaPastaPasta merged commit 7a9e475 into dashpay:develop Aug 31, 2024
39 of 51 checks passed
@UdjinM6 UdjinM6 modified the milestones: 21.2, 22 Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants