-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Skip dao challenge if top block < hard fork block #5580
Conversation
These tests are failing on linux:
I suspect the timeout might just be something we hit from time-to-time based on how long the tests take to execute. Here's the VM trace failure:
I haven't seen this kind of failure before and I'm not familiar with this test, I'll investigate. |
As a syncing optimization, skip performing the dao hard fork challenge if our top block < dao hard fork block since we can still successfully sync these blocks from ETC nodes. Note that sync will fail starting with the dao hard fork block because we validate that the dao balance is refunded (in Block::performIrregularModifications).
56cd70f
to
2c9c72a
Compare
Codecov Report
@@ Coverage Diff @@
## master #5580 +/- ##
==========================================
- Coverage 62.11% 62.09% -0.03%
==========================================
Files 347 347
Lines 29107 29107
Branches 3302 3302
==========================================
- Hits 18080 18074 -6
- Misses 9847 9853 +6
Partials 1180 1180 |
Made the change slightly cleaner by performing the comparison in |
Looks like these were one-off issues since they didn't repro on a subsequent run. The new failing tests are known to be unreliable due to issues @gumb0 called out in #5544
|
Looks fine, but it would be nice to check how we pass DAO fork block after this (so sync ~2M mainnet blocks) One potential complication is related to the parallel pipeline of the sync - at the moment when we check the highest block number (taken from the database) here, further blocks might be already downloaded, and around DAO fork block they might have been downloaded from the ETC nodes. |
Restarted my sync on Linux, hope to have hit 2M+ blocks by tomorrow morning (assuming I don't hit the "sync gets stuck" issue again). |
@gumb0 Sync'd my Linux machine to over 2M blocks but then hit a core dump a bit after 2M. Was able to resume syncing on relaunch but I'm going to try restarting syncing from genesis to see if I hit this again and if so debug. |
@gumb0 I resync'd past the DAO fork block and Aleth didn't crash. I did hit the sync stuck issue again despite Aleth consistently having between 5 and 10 peers and I'm seeing "stack offloading: depth 80" messages since block 1.7M, but I'll merge my changes and investigate those separately since they're probably unrelated. Here's the log: |
Fix #5579
As a syncing optimization, skip performing the dao hard fork challenge if our top block < dao hard fork block since we can still successfully sync these blocks from ETC nodes. Note that sync from these peers will fail starting with the dao hard fork block because we validate that the dao balance is refunded in
Block::performIrregularModifications
so we don't run the risk of syncing on an ETC chain after the dao fork block:aleth/libethereum/Block.cpp
Lines 690 to 701 in 60fbc2f