Skip to content

Cold bootstrap seems unnecessarily slow #995

@ssg

Description

@ssg

Describe the improvement
Cold bootstrap takes a long time (hours) with Avalanche which makes recovery scenarios quite risky for validator nodes due to high uptime requirements.

Avalanchego shouldn't need to retrieve all blocks for a chain before executing state transitions. Executing state transitions as soon as the first set of blocks are received would make cold bootstrap times almost twice as fast as I understand from my own observation (on a low-end hardware).

Similarly, a new chain could be immediately fetched while state transitions are executed for the previous chain. Currently, it looks like this:

thread 1: [.....fetch P......][.......execute P.....][..........fetch X........][.......execute X]

This should be possible instead:

thread 1: [.....fetch P......][..........fetch X........]
thread 2:  [.......execute P.....]
thread 3:                      [.......execute X]

Obviously, this would increase the CPU-load of an Avalanche node during bootstrap, but I believe cut-down bootstrap times can easily make up for it.

Operating System
Linux 3.10.108 x86_64 Braswell

By submitting this issue I agree to the Terms and Conditions of the Developer Accelerator Program.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions