Implement processed commitment module - #50
Draft
ArthurPaivaT wants to merge 2 commits into
Draft
ArthurPaivaT wants to merge 2 commits into
ArthurPaivaT wants to merge 2 commits into
Conversation
ArthurPaivaT
force-pushed
the
feat/processed-accounts
branch
from
September 16, 2026 18:17
ebbe21a to
b30d7ae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
API holds the newest Yellowstone blocks in memory, around the slot Postgres has confirmed.
to. The context slot and the block time come from the newest block.
a confirmed request would. Forks are served as the feed reports them. Dead or restarted slots, duplicate blocks and feed gaps fall back
until Postgres confirmed passes them.
Core (crates/core)
store.rs for the block store, read.rs for ProcessedBlocks and get_account, and subscribe.rs for the feed thread.
owns the store and publishes the latest chained blocks as an immutable ProcessedBlocks after every event. A request clones one Arc and
holds no lock while it reads, and ProcessedBlocks get_account answers a key as Live, Closed or Unknown.
from recent_blockhashes. The walk fails when a link is missing, a hash differs, the head has no block time, or a slot on the way is dead,
restarted, has no bank creation in this session, or was seen before the last reconnect.
Processed then falls back until Postgres confirmed passes that slot.
filter is treated as closed.
replay and its give-up panic. The API feed never replays, retries forever and never changes node health.
API (crates/api)
commitment, with their own SQL. Each method keeps its own owner filter, decode, encode and errors. Without processed blocks the read is the
same Postgres query as before.
Postgres, and an unknown key reads Postgres with the same SQL at the confirmed slot the blocks link to. jsonParsed token accounts resolve
their mint through the blocks first.
longer underflows when the slot cache is ahead of Postgres.
errors as before. getTokenAccountBalance.sql is removed.
is not above their anchor.
They replace gai_sql, gma_sql, get_token_account_balance_sql, get_token_supply_sql and the matching per-method span names. The in-memory
lookup runs in a processed_read span with the store size in stored_blocks and stored_bytes.
Config
fails without it.
Metrics
finalized_above_anchor).
Integration tests
with per-source latency. It checks that a processed answer at slot S matches confirmed at exactly S, and compares getBalance,
getTokenAccountBalance and getTokenSupply against a reference. It reports processed getSlot against confirmed getSlot and the references.