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

Work on db replay #2284

Merged
merged 1 commit into from
May 22, 2020
Merged

Work on db replay #2284

merged 1 commit into from
May 22, 2020

Conversation

ineiti
Copy link
Member

@ineiti ineiti commented May 19, 2020

This PR does the following for 'bcadmin db replay':

  • clean up the different backward-compatible but used nowhere extensions of StateReplay
  • add all blocks to the skipchain.db, so that contracts using 'ReadOnlySkipchain' work
  • by default doesn't verify the forward link signature of blocks, as this is very costly,
    and can be supposed to be correct if its in 'cached.db'
  • use a memory state trie instead of a disk state trie when replaying -> much faster
  • can discard, write, resume blocks

This makes replaying the current chain having 50k blocks possible in about 30' on a fast machine.

@ineiti ineiti self-assigned this May 19, 2020
@ineiti ineiti force-pushed the speedup_replay branch 7 times, most recently from 53b07dc to 13469e1 Compare May 21, 2020 07:37
- clean up the different backward-compatible but used nowhere extensions of `StateReplay`
- add all blocks to the skipchain.db, so that contracts using 'ReadOnlySkipchain' work
- by default doesn't verify the forward link signature of blocks, as this is very costly,
and can be supposed to be correct if its in 'cached.db'
- use a memory state trie instead of a disk state trie when replaying -> much faster
- can discard, write, resume blocks

This makes replaying the current chain having 50k blocks possible in about 30' on a fast machine.
@ineiti ineiti requested a review from tharvik May 22, 2020 09:13
@tharvik tharvik merged commit 7a37546 into master May 22, 2020
@tharvik tharvik deleted the speedup_replay branch May 22, 2020 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants