Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

Conversation

gumb0
Copy link
Member

@gumb0 gumb0 commented Dec 18, 2017

  1. Copy snapshot into data dir after importing it.
  2. Support server-side of Warp protocol, so that cpp nodes could download snapshots from other cpp nodes.

Snapshot files won't ever change and the node will give out the same snapshot all the time.
Further improvements could support periodic generation of our own snapshots.

@codecov-io
Copy link

codecov-io commented Dec 19, 2017

Codecov Report

Merging #4710 into develop will increase coverage by 1.28%.
The diff coverage is 33.76%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4710      +/-   ##
===========================================
+ Coverage    59.51%   60.79%   +1.28%     
===========================================
  Files          342      347       +5     
  Lines        27026    27298     +272     
  Branches      2838     2865      +27     
===========================================
+ Hits         16084    16597     +513     
+ Misses        9981     9705     -276     
- Partials       961      996      +35

@gumb0
Copy link
Member Author

gumb0 commented Dec 19, 2017

Applied clang-format in the separate commit

@gumb0 gumb0 removed the in progress label Dec 19, 2017
… produces too many messages from BlockHeader class during blocks import
@gumb0 gumb0 requested review from pirapira and chfast December 20, 2017 14:48
auto const networkId = _r[1].toInt<u256>(RLP::VeryStrict);
auto const totalDifficulty = _r[2].toInt<u256>(RLP::VeryStrict);
auto const latestHash = _r[3].toHash<h256>(RLP::VeryStrict);
auto const genesisHash = _r[4].toHash<h256>(RLP::VeryStrict);
Copy link
Member

Choose a reason for hiding this comment

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

Is it a good idea to check genesisHash against _chainGenesisHash given to init()? (Likewise for networkId?)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I do that in the snapshot downloading PRs.

In this PR it doesn't make much difference, because it's a server part, and downloading peer checks it anyway.
I will add it later, anyway

Copy link
Member

Choose a reason for hiding this comment

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

OK.

Copy link
Member

@pirapira pirapira left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@gumb0 gumb0 merged commit 730bbdf into develop Dec 21, 2017
@gumb0 gumb0 deleted the snapshot-server branch December 21, 2017 15:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants