Skip to content

tcache: producer floors and consumer tails - #306

Merged
vladimir-ea merged 5 commits into
mainfrom
ve/tache_tails
Sep 25, 2026
Merged

vladimir-ea merged 5 commits into
mainfrom
ve/tache_tails

Conversation

@vladimir-ea

Copy link
Copy Markdown
Collaborator

This adds a mechanism for consumers to accurately set their tail value without skipping TCacheReads that arrive out of order:

  • every TCacheRead now includes an emitter id and a floor value
  • every producer also periodically publishes their floor value in TCacheHead
  • for tiles that read, store and forward TCacheReads, the floor is their own consumer tail.

the value of floor means: I will not produce an event containing a TCacheRead with a seq lower than floor.

  • readers track the received floors per TCache per emitting Tile (emitters); combined with the locally acquired reads this is used to calculate the tail
  • idle consumers read the producer's published floor, so they follow the producer

This mechanism has the following consequences:

  • all TCacheReads that are held or stored across tile loops must be acquired
  • readers declare expected emitters when constructing consumers (in Tile::try_init())
  • producers call .loop_start() at the start of every tile loop - this fixes the producer's floor for the current loop

Comment thread crates/beacon_state/tile/src/tile/gossip.rs Outdated
@vladimir-ea
vladimir-ea merged commit 5e42207 into main Sep 25, 2026
2 of 3 checks passed
@vladimir-ea
vladimir-ea deleted the ve/tache_tails branch September 25, 2026 16:04
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.

3 participants