Block building in the presence of epoch change
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- go
- Domain
- distributed-systems
Research direction
Start by tracing the block builder's empty-block lobbying behavior and the epoch-change approval collection described in the issue. Examine how unavailable next-epoch nodes affect approval progress, then define and verify behavior that avoids indefinite block building without preventing a recoverable epoch change.
Written by the indexing model from the issue text.
Description
In our version of Simplex, a node only builds a block in one of two cases:
- Transactions exist in the mempool of the VM and a block should be built to contain them
- The block builder detects that an epoch change should occur, or is ongoing, so it builds a block to initiate or drive forward the epoch change.
This means that a block is not built if there is nothing in the mempool or there is no need to initiate an epoch change.
For (1), if a node that is not designated as the leader of the current round detects that transactions exist in the mempool for too long without a block being built and disseminated, it starts lobbying to notarize an empty block, which should make the nodes move to the next round and this will designate a new leader.
For (2), https://github.com/ava-labs/Simplex/pull/514 introduces a mechanism in which a node that is not the leader of the round also starts lobbying to notarize an empty block if a block isn't being built and disseminated for too long and the previous block indicates that there is an ongoing epoch change, or that the previous block doesn't indicate that, but an epoch change should be initiated.
Completing the epoch change requires gathering approvals from at least a quorum of nodes of the next epoch.
However, if there are not enough approvals to collect because the nodes of the next epoch are not available yet (e.g they are still syncing the P-chain) it would mean that blocks will be built indefinitely until then.
We could make the epoch change and the mechanism introduced in (2) smarter and only build a block or expect one to be build in case we know that we can drive forward the approval collection, but that's a problem for the future.
- Dominant language
- Go
- Stars
- 22
- Forks
- 4
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 19
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from ava-labs/Simplex
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 40/100
Maintainers usually reply within 1 day
-
Verification accepts aux info appends after the history is sufficient, changing the approval digestOpen
Difficulty 3/5 1-2 days Newbie friendliness 74/100
Maintainers usually reply within 1 day
All issues in ava-labs/Simplex
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
prime-radiant-inc/evener#4223 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-telemetry/opentelemetry-go-compile-instrumentation#1467 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
yetone/magpie#1490 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
modelcontextprotocol/go-sdk#1367 · 1 comment ·
Maintainers usually reply within 1 day