Skip to content

Conversation

@VladChernenko
Copy link
Member

Summary

  • update leader rotation proof voting rules to depend on approvement epoch and leader indices
  • allow voting for past epochs unconditionally while using approvement progress for active epochs

Testing

  • not run (not requested)

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +159 to +162
leaderFinished := idx < epochHandler.CurrentLeaderIndex ||
(idx == epochHandler.CurrentLeaderIndex && leaderTimeIsOut(epochHandler, networkParams, idx))

if leaderFinished {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use live leader index for ALRP readiness

The finalization thread decides which leaders are ready to collect rotation proofs by comparing idx with epochHandler.CurrentLeaderIndex here, but the handler it uses comes from the EPOCH_HANDLER snapshot stored in EPOCH_DATA when an epoch is created (see threads/find_new_epoch.go where it is written once) and is never updated as the approvement thread advances the leader index. This means CurrentLeaderIndex remains at its initial value (often 0), so only the first leader is ever considered finished and allLeaderRotationProofsCollected never becomes true. In practice the ALRP collector will get stuck on the first leader of the first epoch and processingEpochId will never advance, so no aggregated leader rotation proofs are produced for subsequent leaders or epochs.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants