-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Add preconfirmation gossip messages #2726
base: master
Are you sure you want to change the base?
Conversation
} | ||
|
||
#[tokio::test] | ||
async fn run__gossip_message_from_p2p_service_is_broadcasted__tx_confirmations() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only new test in this file. The rest were just copied over during the refactor.
|
||
#[tokio::test] | ||
#[instrument] | ||
async fn gossipsub_broadcast_tx_with_reject__tx_confirmations() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New test.
|
||
#[tokio::test] | ||
#[instrument] | ||
async fn gossipsub_broadcast_tx_with_accept__tx_confirmations() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New test.
|
||
// TODO: Move me before tests that use this function | ||
/// Reusable helper function for Broadcasting Gossipsub requests | ||
async fn gossipsub_broadcast( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method was updated to accept the new GossipsubBroadcastRequest::Confirmations
variant.
Introduced check_message_matches_request
as part of that (before it was hardcoded to look for a specific value).
TxConfirmation
gossip messages
Linked Issues/PRs
Closes #2738
Description
This is part of the greater tx confirmation work. This will enable the block producer to gossip a batch of signed transactions around the network for the senders of those transactions to receive.
In an attempt to cleanup the P2P code, some of the tests were moved to their own files (this makes reviewing slightly more difficult, so I've marked the new tests with comments in those refactored test suites).
TODO:
TxConfirmations
typesignature
?txs
?Constrain peers for gossiping to minimize trafficAllow nodes to specify with whom they want to gossip Preconfirmations #2740Checklist
Before requesting review
After merging, notify other teams
[Add or remove entries as needed]