Skip to content
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
7072174
execution/cache: test unwind fill-readmission window
yperbasis Aug 6, 2026
9a4e898
execution/cache, db/state: publish StateCache by state version
yperbasis Aug 7, 2026
5245ef6
Merge remote-tracking branch 'origin/main' into yperbasis/statecache-…
yperbasis Aug 7, 2026
c51d08e
execution/cache, db/state: clarify publication contract
yperbasis Aug 7, 2026
b085d39
execution/cache, commitment, db/state: unify cache publication
yperbasis Aug 7, 2026
b097a2f
execution/cache, commitment, db/state: reconcile file publications
yperbasis Aug 7, 2026
28bc1af
execution/vm: clarify jump destination cache comment
yperbasis Aug 7, 2026
6e3da33
execution/cache, db/state: bind cache generations to file views
yperbasis Aug 7, 2026
cfd5bf8
execution/commitment, cache: reject stale adaptive pin plans
yperbasis Aug 8, 2026
0891e94
Merge remote-tracking branch 'origin/main' into yperbasis/statecache-…
yperbasis Aug 8, 2026
f9823c9
db/state/execctx: bind cache views to transaction files
yperbasis Aug 9, 2026
88fc6ba
execution/commitment, cache: reset file provenance on lineage change
yperbasis Aug 10, 2026
72f06fe
db/state, rawdbreset: revoke caches on execution reset
yperbasis Aug 10, 2026
3b80d63
cmd/integration: publish caches after execution unwind
yperbasis Aug 10, 2026
739c9e5
Merge remote-tracking branch 'origin/main' into yperbasis/statecache-…
yperbasis Aug 10, 2026
718d4bb
db, execution: avoid cache-view frontier cursors
yperbasis Aug 10, 2026
d59decb
Merge remote-tracking branch 'origin/main' into yperbasis/statecache-…
yperbasis Aug 10, 2026
b98dcc4
db/state: restore visibility guard after file reset
yperbasis Aug 10, 2026
cd785c6
db/state: remove obsolete cache tx number lookup
yperbasis Aug 10, 2026
d7b5693
execution/cache: simplify generation publication state
yperbasis Aug 10, 2026
8c3a7d3
db/state/execctx: pair cache generations and clears
yperbasis Aug 10, 2026
40255e7
execution/stagedsync: remove stale state cache comment
yperbasis Aug 10, 2026
c620fb2
execution/cache: correct unwind test name
yperbasis Aug 10, 2026
498f214
execution/cache, commitment: simplify cache lifecycle APIs
yperbasis Aug 10, 2026
fb7c61f
exec, execctx: share state cache view derivation
yperbasis Aug 10, 2026
0dd480f
execution, db: clarify cache coherence comments
yperbasis Aug 10, 2026
bcb0de1
Merge remote-tracking branch 'origin/main' into yperbasis/statecache-…
yperbasis Aug 10, 2026
11c86e3
execution/cache, db/state: clarify publication invariants
yperbasis Aug 10, 2026
b5df0e9
execution, db/state: make cache publication authority explicit
yperbasis Aug 10, 2026
372ade3
db/state/execctx: avoid cache locks during database commit
yperbasis Aug 10, 2026
47b9a65
execution/stagedsync: bind commitment reader cache views
yperbasis Aug 10, 2026
4d84e03
db/state/execctx: require state cache publication authority
yperbasis Aug 10, 2026
02d926d
execution/commitment: skip stale adaptive pin plans
yperbasis Aug 10, 2026
3344d41
db/state/execctx: keep bounded reads out of latest caches
yperbasis Aug 10, 2026
cb74b08
execution/cache, commitment, db/state: handle file-view lowering
yperbasis Aug 11, 2026
ea404c5
Merge remote-tracking branch 'origin/main' into yperbasis/statecache-…
yperbasis Aug 11, 2026
e01be8f
execution/commitment: make storage trunk creation atomic
yperbasis Aug 11, 2026
e717146
execution/cache, commitment: make generation publication panic-safe
yperbasis Aug 11, 2026
3420435
execution/cache, commitment: make cache closure permanent
yperbasis Aug 11, 2026
cf5a0e4
execution/commitment: recover adaptive planning after panic
yperbasis Aug 11, 2026
526407a
execution/cache, db/state: cover every domain at canonical commit
yperbasis Aug 11, 2026
f567f70
execution/cache, commitment: share publication lifecycle
yperbasis Aug 11, 2026
5b9534b
execution/cache, commitment: share generation read guard
yperbasis Aug 11, 2026
4df6bba
execution/commitment: preserve synchronized adaptive pins
yperbasis Aug 11, 2026
f96335c
execution/cache, db/state: correct publication ordering comments
yperbasis Aug 11, 2026
8c75e5e
execution/commitment: reuse generation fill admission
yperbasis Aug 11, 2026
d17cd9f
execution/cache: inline state fill eligibility
yperbasis Aug 11, 2026
cc3279b
execution/cache, commitment: clarify files publication contract
yperbasis Aug 11, 2026
542766a
execution/cache: clarify cache comments
yperbasis Aug 11, 2026
09fcbaa
Merge main into yperbasis/statecache-versioned-generation
yperbasis Aug 11, 2026
6509a61
execution, db: restore cache contract comments
yperbasis Aug 11, 2026
0d25828
execution/cache: reject stale generation publications
yperbasis Aug 11, 2026
81bc203
db: keep branch cache active without history
yperbasis Aug 11, 2026
094f054
db/kv/temporal: remove unused visible-end memo
yperbasis Aug 11, 2026
ad80698
db, execution: unify cache view eligibility
yperbasis Aug 11, 2026
7ae65de
db: remove unused domain visible end
yperbasis Aug 11, 2026
9521ae3
execution/cache: fence publishers across reset
yperbasis Aug 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/integration/commands/stages.go
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ func execBlocksBatch(ctx context.Context, db kv.TemporalRwDB, st *stagedsync.Syn
}
defer doms.Close()
doms.SetInMemHistoryReads(false)
doms.SetStateCache(stateCache)
doms.SetCanonicalStateCache(stateCache)
doms.SetCodeStore(codeStore)
execctx.GuardAggregatorForCache(db, stateCache)

Expand Down
23 changes: 10 additions & 13 deletions db/state/execctx/codehash_routing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func TestCodeHashForAddr_InBatchAccountWinsOverStaleLRU(t *testing.T) {
}
var staleArr [32]byte
copy(staleArr[:], stale[:])
sc.View(frontierAt(0)).SeedAddrCodeHash(addr[:], staleArr, 0)
currentStateCacheView(t, sc).SeedAddrCodeHash(addr[:], staleArr)

t.Run("empty in-batch account wins (codeHash-no-code repro)", func(t *testing.T) {
acc := accounts.Account{Nonce: 7, CodeHash: accounts.EmptyCodeHash}
Expand All @@ -69,13 +69,9 @@ func TestCodeHashForAddr_InBatchAccountWinsOverStaleLRU(t *testing.T) {
})
}

// The addr→codeHash admission gate vouches for the tx read view's frontier, but
// resolve() may serve the account record from the shared accounts cache, which
// lags a just-committed flush until the apply loop reaches the key. A
// cache-sourced record must therefore never seed the mapping — an apply
// interleaved between the read and the fill would leave a mapping derived from
// the pre-apply record.
func TestCodeHashForAddr_CacheSourcedRecordDoesNotSeedMapping(t *testing.T) {
// A generation-bound account-cache hit can safely seed the derived mapping:
// publication revokes the view before changing either cache layer.
func TestCodeHashForAddr_CacheSourcedRecordSeedsMapping(t *testing.T) {
t.Parallel()

ctx := t.Context()
Expand Down Expand Up @@ -103,9 +99,9 @@ func TestCodeHashForAddr_CacheSourcedRecordDoesNotSeedMapping(t *testing.T) {
require.NoError(t, seedSD.Commit(ctx, seedTx))
seedSD.Close()

_, ok := sc.View(nil).Get(kv.AccountsDomain, addr[:])
_, ok := currentStateCacheView(t, sc).Get(kv.AccountsDomain, addr[:])
require.True(t, ok, "the committed record must be served by the accounts cache")
_, ok = sc.View(nil).GetAddrCodeHash(addr[:])
_, ok = currentStateCacheView(t, sc).GetAddrCodeHash(addr[:])
require.False(t, ok, "the post-commit apply must leave the derived mapping empty")

roTx, err := db.BeginTemporalRo(ctx)
Expand All @@ -118,8 +114,9 @@ func TestCodeHashForAddr_CacheSourcedRecordDoesNotSeedMapping(t *testing.T) {

got := sd.CodeHashForAddr(roTx, addr[:], 20)
require.Equal(t, codeHash[:], got)
_, ok = sc.View(nil).GetAddrCodeHash(addr[:])
require.False(t, ok, "a cache-sourced account record must not seed the addr→codeHash mapping")
h, ok := currentStateCacheView(t, sc).GetAddrCodeHash(addr[:])
require.True(t, ok)
require.Equal(t, [32]byte(codeHash), h)
}

// A record read from the tx's read view (accounts-cache miss) is exactly what
Expand Down Expand Up @@ -163,7 +160,7 @@ func TestCodeHashForAddr_ViewSourcedRecordSeedsMapping(t *testing.T) {

got := sd.CodeHashForAddr(roTx, addr[:], 20)
require.Equal(t, codeHash[:], got)
h, ok := sc.View(nil).GetAddrCodeHash(addr[:])
h, ok := currentStateCacheView(t, sc).GetAddrCodeHash(addr[:])
require.True(t, ok, "a view-sourced record must seed the mapping")
require.Equal(t, [32]byte(codeHash), h)
}
Loading
Loading