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

Chain Sync CLI Commands #1175

Merged
merged 40 commits into from
Jul 20, 2021
Merged

Chain Sync CLI Commands #1175

merged 40 commits into from
Jul 20, 2021

Conversation

connormullett
Copy link
Contributor

@connormullett connormullett commented Jun 24, 2021

Summary of changes
Changes introduced in this pull request:

  • Adds Chain-Sync CLI commands to forest. Blocks can be marked as bad blocks to never be synced. Users can check bad blocks and why they were marked as bad. Users can also ping the current state of the syncing process with two different commands.

Reference issue to close (if applicable)

Closes
#536

Other information and links

@connormullett connormullett changed the title Connor/chain sync cli Chain Sync CLI Commands Jun 24, 2021
@connormullett connormullett marked this pull request as ready for review July 9, 2021 18:46
@connormullett connormullett requested a review from a user July 9, 2021 18:46
Copy link
Contributor

@cryptoquick cryptoquick left a comment

Choose a reason for hiding this comment

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

I just checked out sync wait and sync status, and they look really good!

I'm not sure I know how to use sync check-bad, or at least, there's no output from that, and I'm not sure why. However, I also acknowledge that this isn't going to work great while we can't sync to mainnet.

Just some other minor nits and comments. Good work on this one, the serialization stuff seemed especially tricky!

blockchain/chain_sync/src/sync_state.rs Outdated Show resolved Hide resolved
blockchain/chain_sync/src/sync_state.rs Outdated Show resolved Hide resolved
forest/src/cli/sync_cmd.rs Outdated Show resolved Hide resolved
node/rpc-client/src/sync_ops.rs Outdated Show resolved Hide resolved
@connormullett
Copy link
Contributor Author

I'm not sure I know how to use sync check-bad, or at least, there's no output from that, and I'm not sure why. However, I also acknowledge that this isn't going to work great while we can't sync to mainnet.

Check bad needs a block to be marked as bad. Otherwise there are no blocks marked as bad. I'll add in a condition to display "No blocks bad" or something if nothing is returned

Copy link
Contributor

@cryptoquick cryptoquick left a comment

Choose a reason for hiding this comment

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

Great work! Glad my suggestions were helpful.

if response.is_empty() {
println!("Block \"{}\" is not marked as a bad block", cid);
} else {
println!("response");
Copy link
Contributor

Choose a reason for hiding this comment

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

Feels like an incomplete message?

Copy link
Contributor

@creativcoder creativcoder left a comment

Choose a reason for hiding this comment

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

lgtm!

@connormullett connormullett merged commit d4a1d04 into main Jul 20, 2021
@connormullett connormullett deleted the connor/chain-sync-cli branch July 20, 2021 16:47
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.

3 participants