Skip to content

refactor(sequencer): align streaming Inbox selection names with their docs - #342

Open
spalladino wants to merge 3 commits into
spl/simplify-checkpoint-proposal-jobfrom
spl/inbox-position-vocabulary
Open

spalladino wants to merge 3 commits into
spl/simplify-checkpoint-proposal-jobfrom
spl/inbox-position-vocabulary

Conversation

@spalladino

Copy link
Copy Markdown
Collaborator

Renames the streaming Inbox selection functions so their names use the words their own docs, tests and README already use, and fixes one variable that named the wrong concept. No behaviour change. Stacked on #340.

Context

The selection module called the greedy step "ordinary" and the endpoint-lookup threshold a "ceiling", while every comment, test and README paragraph said "greedy" and "threshold". The node's simulator stored the result of selectSafeLocalEnd in a variable named greedyEnd, which is the other function's concept. The three observed counts every selection function takes were declared inline four times with no docs.

Approach

  • getOrdinaryCeiling → getEndpointLookupThreshold, selectOrdinaryMessageEnd → selectGreedyEnd.
  • The simulator's local and its debug log key become safeLocalEnd.
  • New InboxSelectionPositions type (cursor, local synced, checkpoint start counts) with a doc per field, used by the selection functions and the consumption class's snapshot. It is structurally identical to the inline types, so no call site changes.
  • A short module header states what no single function owns: the shared cumulative-count coordinate, its three suffix spellings, and that bucketSeq is an ordinal, not a count.
  • README: corrects the description of the endpoint lookup bound, which for a non-final block is the checkpoint-wide reach, not the block's.

API changes

getOrdinaryCeiling, selectOrdinaryMessageEnd and mustQueryEndpoint are removed from the @aztec-labs/sequencer-client root export. Nothing outside the package imports them, and they have only shipped in v6 nightlies.

…heir prose

Rename getOrdinaryCeiling to getEndpointLookupThreshold and selectOrdinaryMessageEnd to selectGreedyEnd, the words the jsdocs, tests and README already use. Drop both, and mustQueryEndpoint, from the package root export; nothing outside sequencer-client imports them. Add InboxSelectionPositions for the three observed counts the selection functions take, a module header for the shared count coordinate, and correct the README's description of the endpoint lookup bound.
@spalladino
spalladino force-pushed the spl/inbox-position-vocabulary branch from 834e157 to f85c23c Compare October 9, 2026 19:31

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants