oasisprotocol / oasisprotocol/oasis-core
Optimize runtime iterative state sync
Open
Nobody has claimed this yet.
c:performance
- Dominant language
- Go
- Stars
- 369
- Forks
- 151
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 6
Description
Currently, it takes days (Sapphire, mainnet) for iterative state sync to finish.
State sync should be benchmarked and optimized.
Possible bottlenecks:
- Default fetcher pool has
4workers (see).- Possibly increase, also bottleneck could be number of peers for diff fetching.
- Fetching, applying diffs and finalizing versions (see) are three completely independent processes.
- Currently this is not implemented optimally and processes may block each other.
- See original discussion here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with go/worker/storage/committee/node.go, especially the default four-worker fetcher pool and the fetching, diff-application, and finalization flow around lines 1114-1308. Benchmark iterative state sync on Sapphire mainnet, then compare the findings with the discussion in PR 6239. Done means the identified bottlenecks are addressed and state sync completes faster.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- blockchain, distributed-systems, performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100