-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Warp-only sync with warp-barrier [blocknumber] flag. #8228
Conversation
@@ -658,6 +668,10 @@ impl ChainSync { | |||
return Ok(()); | |||
} | |||
|
|||
if self.sync_start_time.is_none() { |
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.
Moved that after the initial checks, otherwise in case we are not using warp-only sync, we might timeout a bit too early (I actually got a lot of peers on different chains from discovery), without even giving a chance to start warping.
LGTM, but I think we'll need some guidance on how to choose the block number. If people go on etherscan and pick the highest, they'll have to wait a long time until they find a snapshot for that, if they go back 100 blocks (1000 blocks?), they're more likely to find a snapshot quickly and can sync from there. Just a one-liner recommendation would be good. |
Can we just set a default to 5 million? This would partially address Fred's comment as users do not really need to care about this feature unless they really want to fine-tune parity. |
The problem with setting it to 5 million is that it will then gradually get longer to sync from there, so you'd have to manually update the default every so often. If you go back 5000 blocks that should be enough to guarantee that nearly all peers (except for those that don't take snapshots) would have taken a snapshot. |
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!
@5chdn I'm more in favour of (optionally) storing network start date and average block time in the spec file and compute default value from this, at least it's always green. |
Voting for a better CLI name:
|
http://memory-alpha.wikia.com/wiki/Warp_barrier
|
I vote for |
This suggests that |
What about |
Of course, this must be a chain-dependent default, so chain-spec is an idea. |
To convey the meaning more shortly than |
I got errors when building from source:
|
I compiled master this morning without problem, did you do |
@jamesray1 Update your rust compiler to 1.25, since those methods on |
OK, updated on my desktop, running |
On my laptop:
Sorry this is kind of basic, but is there a better way to update than uninstalling Rust then installing Rustup? |
Which rust version? |
rustc 1.22.1 |
I'll try |
just |
OK so it built on the desktop: |
On the laptop, the first try included: So I ran Then running
|
I think you're missing some dependencies, it's documented here: https://wiki.parity.io/Setup#dependencies.
|
@5chdn as explained above |
I'll try uninstalling Rust and reinstalling. |
I ran
Interestingly:
|
Please keep the Parity issue tracker on topic. |
Fixed: removed /usr/cargo/bin. Overnight on the desktop, running |
5362706 is a bit optimistic. Could you share the logs (toward the end of the snapshot sync and the beginning of the blocks sync)? |
1155 snapshots take you directly to 5_370_000, just reset your db and try again |
Moving this to Gitter: https://gitter.im/paritytech/parity?at=5ac57b411130fe3d36a26b0a.
Actually for the latest command I didn't set https://gist.github.com/jamesray1/74fa10b3f9f78f2c3c9ace21ada317bb |
Actually for the latest command I didn't set |
reset = delete |
thx to afri about the menioning of rust version 1.25 |
* Warp-only sync with warp-after [blocknumber] flag. * Fix tests. * Fix configuration tests. * Rename to warp barrier.
* Warp-only sync with warp-barrier [blocknumber] flag. (#8228) * Warp-only sync with warp-after [blocknumber] flag. * Fix tests. * Fix configuration tests. * Rename to warp barrier. * Allow unsafe js eval on Parity Wallet. (#8204) * Update musicoin spec in line with gmc v2.6.2 (#8242) * Supress TemporaryInvalid verification failures. (#8256) * Include suicided accounts in state diff (#8297) * Include suicided accounts in state diff * Shorten form match -> if let * Test suicide trace diff in State * replace_home for password_files, reserved_peers and log_file (#8324) * replace_home for password_files, reserved_peers and log_file * typo: arg_log_file is Option * Enable UI by default, but only display info page. * Fix test. * Fix naming and remove old todo. * Change "wallet" with "browser UI"
Enables warp-only sync in case
--warp-after <block-number>
is provided.This allows the user to ignore old snapshots floating around and also makes sure that you are actually warp syncing.
After that block is reached we fall back to regular sync.
Resolves #8097