-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Update light client hardcoded headers #9098
Conversation
Tbaut
commented
Jul 11, 2018
- Mainnet hardcoded headers until #5941249
- Ropsten hardcoded headers until #3612673
- Kovan hardcoded headers until #7690241
It looks like this contributor signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
would be nice to have light headers for classic too, /cc @pyskell |
Excuse my ignorance, what are light headers? |
This is hard to review without a better description with some context. |
@dvdplm @pyskell the chainspec can contain hardcoded light headers. this allows the light client to sync from a "trusted" block rather than syncing from genesis. ref #8075 https://wiki.parity.io/FAQ#how-to-generate-a-new-hardcoded-sync-block-for-parity-light-client |
Got it, will get a PR ready soon. |
Almost done with this but light syncing seems to freeze:
In both cases the output looks like this:
Debug log: https://paste.ee/p/LoVM9 Going to try restarting from Off to an okay start, seems we only light client ~half way through the chain:
P.S. Let me know if you want this all moved to a separate issue or if it's still appropriate here. Reached some interesting output. Note the one-character difference in expected vs. actual difficulty.
Debug log: sync-issues-block3.1million.log |
@pyskell For the one with problem, do you use the chain spec with hardcoded sync or without? I think if initially there're issues for light client to be on the right chain, what you can do is:
|
Just for information why this is part of chainspec? |
I'm happy if you have a better idea. I had a similar question here when this was introduced. #8075 (comment) |
@sorpaas Thanks I will try that. I actually encounter this issue both with and without the The difference is: @5chdn That is possible. I need to go through and test all of the nodes to see which are working and if any need replacing. EDIT: Started syncing using @sorpaas' suggestion, will report back |
* Insert Kovan hardcoded headers until #7690241 * Insert Kovan hardcoded headers until block 7690241 * Insert Ropsten hardcoded headers until #3612673 * Insert Mainnet hardcoded headers until block 5941249
* Insert Kovan hardcoded headers until #7690241 * Insert Kovan hardcoded headers until block 7690241 * Insert Ropsten hardcoded headers until #3612673 * Insert Mainnet hardcoded headers until block 5941249
Looks like it's working although I only get 2 peers. Is this because parity needs more bootnodes running recent versions of parity? Or is this just how light clients work? Will make a PR. Edit: Done #9121 |
@pyskell Light client has metering (https://github.com/paritytech/parity/blob/master/ethcore/light/src/net/request_credits.rs#L17), which may be one cause why you don't have many peers. In the mean time, we definitely need more nodes (with recent versions)! |
Thanks, I just wanted to be ensure that's not consensus-related info at that point.. Ideally it shouldn't be in this file, but could came with a better solution later I think. Does it worth to open an issue to find a better solution for this (just so as not to forget)? |
@fckt yes |
* parity-version: stabelize 1.11 * parity-version: bump stable to 1.11.7 * Don't fetch snapshot chunks at random (#9088) * Offload cull to IoWorker. * Limit the number of transactions in pending set (#8777) * Unordered iterator. * Use unordered and limited set if full not required. * Split timeout work into smaller timers. * Avoid collecting all pending transactions when mining * Remove println. * Use priority ordering in eth-filter. * Fix ethcore-miner tests and tx propagation. * Review grumbles addressed. * Add test for unordered not populating the cache. * Fix ethcore tests. * Fix light tests. * Fix ethcore-sync tests. * Fix RPC tests. * Make sure to produce full blocks. * Update hidapi, fixes #7542 (#9108) * docker: add cmake dependency (#9111) * Fix miner tests. * Revert "Make sure to produce full blocks." This reverts commit b12d592. * Update light client hardcoded headers (#9098) * Insert Kovan hardcoded headers until #7690241 * Insert Kovan hardcoded headers until block 7690241 * Insert Ropsten hardcoded headers until #3612673 * Insert Mainnet hardcoded headers until block 5941249 * Make sure to produce full blocks. (#9115) * Insert ETC (classic) hardcoded headers until block #6170625 (#9121) * fix verification in ethcore-sync collect_blocks (#9135) * `evm bench` fix broken dependencies (#9134) * `evm bench` use valid dependencies Benchmarks of the `evm` used stale versions of a couple a crates that this commit fixes! * fix warnings
* parity-version: betalize 2.0 * Multiple improvements to discovery ping handling (#8771) * discovery: Only add nodes to routing table after receiving pong. Previously the discovery algorithm would add nodes to the routing table before confirming that the endpoint is participating in the protocol. This now tracks in-flight pings and adds to the routing table only after receiving a response. * discovery: Refactor packet creation into its own function. This function is useful inside unit tests. * discovery: Additional testing for new add_node behavior. * discovery: Track expiration of pings to non-yet-in-bucket nodes. Now that we may ping nodes before adding to a k-bucket, the timeout tracking must be separate from BucketEntry. * discovery: Verify echo hash on pong packets. Stores packet hash with in-flight requests and matches with pong response. * discovery: Track timeouts on FIND_NODE requests. * discovery: Retry failed pings with exponential backoff. UDP packets may get dropped, so instead of immediately booting nodes that fail to respond to a ping, retry 4 times with exponential backoff. * !fixup Use slice instead of Vec for request_backoff. * Add separate database directory for light client (#8927) (#9064) * Add seperate default DB path for light client (#8927) * Improve readability * Revert "Replace `std::env::home_dir` with `dirs::home_dir` (#9077)" (#9097) * Revert "Replace `std::env::home_dir` with `dirs::home_dir` (#9077)" This reverts commit 7e77932. * Restore some of the changes * Update parity-common * Offload cull to IoWorker. (#9099) * Fix work-notify. (#9104) * Update hidapi, fixes #7542 (#9108) * docker: add cmake dependency (#9111) * Update light client hardcoded headers (#9098) * Insert Kovan hardcoded headers until #7690241 * Insert Kovan hardcoded headers until block 7690241 * Insert Ropsten hardcoded headers until #3612673 * Insert Mainnet hardcoded headers until block 5941249 * Make sure to produce full blocks. (#9115) * Insert ETC (classic) hardcoded headers until block #6170625 (#9121) * fix verification in ethcore-sync collect_blocks (#9135) * Completely remove all dapps struct from rpc (#9107) * Completely remove all dapps struct from rpc * Remove unused pub use * `evm bench` fix broken dependencies (#9134) * `evm bench` use valid dependencies Benchmarks of the `evm` used stale versions of a couple a crates that this commit fixes! * fix warnings * Update snapcraft.yaml (#9132)