-
Notifications
You must be signed in to change notification settings - Fork 19
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: sync task engine for parlia(bsc) #16
Conversation
68a4e7e
to
61087bb
Compare
d2562f8
to
b3f15f9
Compare
61087bb
to
0d65933
Compare
903abfc
to
e34b99c
Compare
f9524f0
to
31bb5ec
Compare
e706cf6
to
fcbcfc9
Compare
}, | ||
} | ||
// skip if number is lower than best number | ||
if info.block_number <= best_header.number { |
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.
if a bad peer broadcast a very large block_number
which never exist, I guess it will block any other message from the correct peer.
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.
It is a bit difficult to judge this situation here. In swan, if the fetch result is wrong, the peer will be automatically eliminated.
What can be done here is probably to pass in a timeout time to prevent it from being locked for too long?
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.
Add a TODO here.
Better solutions need to be considered.
d4a9743
to
09b9cbb
Compare
crates/bsc/consensus/src/task.rs
Outdated
|
||
this.start_block_event_listening(); | ||
this.start_fork_choice_update_notifier(); | ||
this |
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.
It seems that this returned struct has never been used. Why we need it?
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.
fixed
Description
Implement
ParliaEngineTask
andParliaCleint
The purpose of these two structures is to process
NewBlobk
andNewBlockHash
messages from p2p without using an external consensus node.Give reth the ability to synchronize with the
BSC
networkExample
Changes
NewBlobk
andNewBlockHash
handling from p2p messgeNotable changes:
ParliaEngineTask
andParliaCleint
intoreth-bsc-consensus
Potential Impacts