oasisprotocol / oasisprotocol/oasis-core

Optimize runtime iterative state sync

Open
#6,241 2 comments 0 reactions 0 assignees View on GitHub

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:

  1. Default fetcher pool has 4 workers (see).
    • Possibly increase, also bottleneck could be number of peers for diff fetching.
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.