-
Notifications
You must be signed in to change notification settings - Fork 144
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
Chain syncing verification fixes #503
Conversation
blockchain/chain_sync/src/sync.rs
Outdated
}, | ||
) | ||
.await | ||
} | ||
NetworkEvent::PubsubMessage { source, topics, message } => { | ||
match topics[0].as_str() { | ||
"/fil/blocks/interop" => { |
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.
the topic depends on the network name from genesis (in case that helps debugging)
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.
Oh, yeah. I will polish this more later. Just wanted to make it clear that we call sync when we receive something over gossip.
blockchain/chain_sync/src/sync.rs
Outdated
let new_blk = Tipset::new(vec![new_blk]).unwrap(); | ||
let chain_syncer = chain_syncer.clone(); | ||
task::spawn(async move { | ||
chain_syncer.sync(&new_blk).await.unwrap(); | ||
}); |
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.
I really don't think this is what we want to do, we shouldn't be manually constructing the tipset and doing a full sync from it, can you explain reasoning?
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.
Hmm, I think we actually are supposed to call inform_new_head here instead. Does that answer your question?
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.
yeah, that makes a lot more sense, calling sync I'm pretty sure isn't what we want
…austin/rpcreplace
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.
LGTM pending functional testing
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.
Just those two comments
Summary of changes
Changes introduced in this pull request:
Reference issue to close (if applicable)
Closes
Other information and links