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

feat: mem pool p2p sync #642

Merged
merged 1 commit into from
Apr 19, 2022
Merged

feat: mem pool p2p sync #642

merged 1 commit into from
Apr 19, 2022

Conversation

blckngm
Copy link
Contributor

@blckngm blckngm commented Apr 2, 2022

Mem-pool syncing with p2p networking.

@blckngm blckngm marked this pull request as ready for review April 2, 2022 05:04
@blckngm blckngm requested a review from jjyr April 2, 2022 05:05
@Flouse Flouse requested review from magicalne and zeroqn April 6, 2022 04:10
Copy link
Contributor

@magicalne magicalne left a comment

Choose a reason for hiding this comment

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

Not sure is there any way to drop old msgs in this pr? For example, a corner case could be:
If the current tip of readonly node is 100, but the tip of the full node is 200. So we have to wait_on_tip for the readonly node to sync to the tip(200). After the readonly node sync to the new tip(200), the old msgs from the old tips should be removed.

@blckngm
Copy link
Contributor Author

blckngm commented Apr 12, 2022

Not sure is there any way to drop old msgs in this pr? For example, a corner case could be: If the current tip of readonly node is 100, but the tip of the full node is 200. So we have to wait_on_tip for the readonly node to sync to the tip(200). After the readonly node sync to the new tip(200), the old msgs from the old tips should be removed.

When the readonly node gets to 200, it will send another P2PSyncRequest { 200 } requesting messages in and after 200.

zeroqn
zeroqn previously approved these changes Apr 12, 2022
magicalne
magicalne previously approved these changes Apr 12, 2022
crates/p2p-network/src/lib.rs Outdated Show resolved Hide resolved
crates/p2p-network/examples/p2p.rs Show resolved Hide resolved
crates/p2p-network/examples/p2p.rs Show resolved Hide resolved
crates/p2p-network/src/lib.rs Show resolved Hide resolved
crates/p2p-network/src/lib.rs Show resolved Hide resolved
@blckngm blckngm dismissed stale reviews from magicalne and zeroqn via dd025a7 April 13, 2022 09:09
crates/mem-pool/src/sync/p2p.rs Outdated Show resolved Hide resolved
crates/mem-pool/src/sync/p2p.rs Show resolved Hide resolved
crates/mem-pool/src/sync/p2p.rs Show resolved Hide resolved
crates/mem-pool/src/sync/p2p.rs Outdated Show resolved Hide resolved
jjyr
jjyr previously approved these changes Apr 15, 2022
jjyr
jjyr previously approved these changes Apr 18, 2022
@blckngm
Copy link
Contributor Author

blckngm commented Apr 18, 2022

Squashed and rebased.

@jjyr jjyr merged commit 954fb9a into godwokenrises:develop Apr 19, 2022
@blckngm blckngm deleted the mem-pool-p2p-sync-server-buffer branch April 20, 2022 06:10
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.

5 participants