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

Implement sync fork #248

Merged
merged 3 commits into from
Mar 4, 2020
Merged

Implement sync fork #248

merged 3 commits into from
Mar 4, 2020

Conversation

dutterbutter
Copy link
Contributor

@dutterbutter dutterbutter commented Mar 2, 2020

Summary of changes
Changes introduced in this pull request:

  • Added the method sync_fork within the ChainSyncer
  • Adds forks into return_set in sync_headers_reverse
  • Removed redundant method on tipset

Reference issue to close (if applicable)

Closes N/A

Other information and links

* Added sync fork method
* Updated sync_headers_reverse to include forked tipsets
Comment on lines +472 to +476
let tips: Vec<Tipset> = self
.network
.blocksync_headers(peer_id.clone(), head.parents(), FORK_LENGTH_THRESHOLD)
.await
.map_err(|_| Error::Other("Could not retrieve tipset".to_string()))?;
Copy link
Contributor

Choose a reason for hiding this comment

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

the problem I have with this is that if this one request to the one peer fails, this will exit the execution of the node. The way the sync function is called and handled is likely to change, but I don't think any network error should automatically fail the sync

blockchain/chain_sync/src/sync.rs Outdated Show resolved Hide resolved
blockchain/chain_sync/src/sync.rs Outdated Show resolved Hide resolved
blockchain/chain_sync/src/sync.rs Outdated Show resolved Hide resolved
node/clock/src/lib.rs Outdated Show resolved Hide resolved
blockchain/chain_sync/src/sync.rs Outdated Show resolved Hide resolved
blockchain/chain_sync/src/sync.rs Outdated Show resolved Hide resolved
@dutterbutter dutterbutter merged commit 970d476 into master Mar 4, 2020
@dutterbutter dutterbutter deleted the dustin/sync-forks branch March 4, 2020 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants