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

[Protocol State] Differentiate between uncommitted and committed epochs in API #6191

Open
jordanschalm opened this issue Jul 9, 2024 · 1 comment
Assignees
Labels
Preserve Stale Bot repellent Protocol Team: Issues assigned to the Protocol Pillar. Tech Debt

Comments

@jordanschalm
Copy link
Member

jordanschalm commented Jul 9, 2024

Problem Definition

The Epoch Preparation Protocol prepares for each subsequent epoch in two steps: EpochSetup and EpochCommit, each represented by a service event.

Most components should only access data (view ranges, etc.) for committed epochs (after EpochCommit step is complete), because uncommitted are tentative and may change.

However, the components directly involved in epoch preparation (namely the DKG engine and QC Voting engine) in Consensus and Collection Nodes respectively, require access to the tentative data associated with uncommitted epochs.

The current epoch API:

  • uses the same interface type to represent all epochs, whether committed or not
  • exposes all epoch data as soon as it is available, even if the epoch is not committed

Proposed Solution

  • Create two types to represent uncommitted and committed epochs distinctly (eg. TentativeEpoch and CommittedEpoch)
    • EpochQuery.Previous() returns CommittedEpoch, nil or nil, NotFound
    • EpochQuery.Current() returns CommittedEpoch, nil
    • EpochQuery.Next() may return nil, NotFound, TentativeEpoch, nil, or CommittedEpoch, nil (need a way for caller to check which of the two return types it is)
  • CommittedEpoch is informationally equivalent to current protocol.Epoch API
  • TentativeEpoch contains only the information from the EpochSetup service event which is necessary to complete DKG and QC voting
    • (For example, I think we could omit the overall epoch view range)

Related Issues

Copy link
Contributor

github-actions bot commented Oct 8, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale Label used when marking an issue stale. label Oct 8, 2024
@jordanschalm jordanschalm added Preserve Stale Bot repellent and removed Stale Label used when marking an issue stale. labels Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Preserve Stale Bot repellent Protocol Team: Issues assigned to the Protocol Pillar. Tech Debt
Projects
None yet
Development

No branches or pull requests

1 participant