Repository navigation
Conversation
cjonas9
added this pull request to stack #1061
October 2, 2026 23:29
3 of 5 tasks
cjonas9
removed this pull request from stack #1061
October 5, 2026 22:57
cjonas9
changed the base branch from
feature/full-history
to
bypass-jrpc2-marshal
October 5, 2026 23:00
cjonas9
force-pushed
the
bypass-jrpc2-marshal
branch
from
October 5, 2026 23:12
4490bc6 to
731856f
Compare
cjonas9
force-pushed
the
cache-getLatestLedger
branch
from
October 5, 2026 23:12
406cf48 to
d7df9c9
Compare
cjonas9
added this pull request to stack #1093
October 5, 2026 23:47
cjonas9
removed this pull request from stack #1093
October 5, 2026 23:48
cjonas9
added this pull request to stack #1094
October 5, 2026 23:48
This was referenced Oct 6, 2026
cjonas9
force-pushed
the
cache-getLatestLedger
branch
3 times, most recently
from
October 6, 2026 23:10
5c6163a to
0983f01
Compare
… POST state Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cjonas9
force-pushed
the
cache-getLatestLedger
branch
from
October 7, 2026 18:17
0983f01 to
f932dc1
Compare
cjonas9
force-pushed
the
bypass-jrpc2-marshal
branch
from
October 7, 2026 18:18
45d4c4c to
3caa253
Compare
cjonas9
force-pushed
the
cache-getLatestLedger
branch
from
October 7, 2026 19:53
f932dc1 to
7660e51
Compare
cjonas9
force-pushed
the
bypass-jrpc2-marshal
branch
from
October 8, 2026 16:41
99f86ed to
b99e8eb
Compare
cjonas9
removed this pull request from stack #1094
October 8, 2026 18:35
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.
What
Adds
latestMemo[T]inmethods/latest_memo.go, an atomic pointer to a{seq, value}entry plus a miss mutex. A new ledger invalidates it by moving the key, so there is no ingestion hook.This is used so that...
getLatestLedgermemoizes its rendered response.** The fully rendered JSON is cached keyed by ledger sequence.getNetworkandgetVersionInfoalso benefit from this, asgetProtocolVersionnow memoizes the result by sequence with the samelatestMemo.You can compare the optimized performance seen in coordinator runs here to the base perf measured in #1018. The results in the coordinator runs here include all recent optimization work -- XDR views adoption (#945, #962, #941, #1035, all validated by tests in #976, #982), as well as more recent tangential optimizations (see the stack, particularly #1036, 1037, and this PR).
Measurements
Handler-level, from the perf-eval go-bench leg on this branch (pubnet-sized ledger):
getNetwork over the pubnet sqlite fixture (
BenchmarkLedgerReadsharness; v1 sqlite / v2 hot). getVersionInfo tracks it within noise:The memo row is getHealth cost. The 103K allocations per call were what made these endpoints fold under concurrency.
Tests
BenchmarkGetLatestLedgergained cached and uncached rows.Why
getLatestLedger, getNetwork and getVersionInfo are what SDKs and wallets poll continuously, and they were the first endpoints to buckle under load even though their answers change once per ledger. Proportionate to what they return, they were made needlessly expensive because every request touched the 2 MB latest ledger. This is a full decode for one field or a base64 render of the whole thing.
Known limitations / additional notes
specs.go, and a getNetwork miss would then either trigger the 2 MB render or need per-field laziness.