Skip to content

refactor state DB / snapshot interfaces - #4041

Merged
cody-littley merged 2 commits into
mainfrom
cjl/state-view-interface
Aug 27, 2026
Merged

refactor state DB / snapshot interfaces#4041
cody-littley merged 2 commits into
mainfrom
cjl/state-view-interface

Conversation

@cody-littley

Copy link
Copy Markdown
Contributor

Describe your changes and provide context

Rename "snapshots" to "views", other minor refactors

@cursor

cursor Bot commented Aug 27, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Interface-only changes in the giga state DB layer with no implementations or production callers in this diff; breaking API renames for future integrators.

Overview
Refactors the giga state DB API by moving the top-level StateDB interface into a new state_db.go file and renaming read surfaces from snapshot to view terminology (StateSnapshotStateView, EVMStateSnapshotEVMStateView, OpenSnapshot / OpenSnapshotAtOpenView / OpenViewAt).

The read-only StateView.Get signature now takes a module string plus key (Get(module string, key []byte)), so raw KV reads are scoped by module instead of a single global key space. Comments and lifecycle wording are updated to match “view” naming (e.g. reads do not observe writes after the view was opened).

Reviewed by Cursor Bugbot for commit ac2420a. Bugbot is set up for automated code reviews on this repo. Configure here.

@cody-littley
cody-littley enabled auto-merge August 27, 2026 18:39
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedAug 27, 2026, 8:39 PM

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pure rename/reorganization of the declaration-only giga package: StateSnapshot/EVMStateSnapshot/OpenSnapshot* become StateView/EVMStateView/OpenView*, and StateDB moves to its own file with the proto import. No implementations or callers exist in the tree, so nothing breaks, and doc comments were updated consistently.

Findings: 0 blocking | 0 non-blocking | 0 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • None at the file/PR level.

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.24%. Comparing base (991d64c) to head (ac2420a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4041      +/-   ##
==========================================
- Coverage   61.23%   60.24%   -0.99%     
==========================================
  Files        2153     2054      -99     
  Lines      188412   176727   -11685     
==========================================
- Hits       115381   106476    -8905     
+ Misses      62285    60472    -1813     
+ Partials    10746     9779     -967     
Flag Coverage Δ
sei-db 69.80% <ø> (ø)
sei-db-state-db ?

Flags with carried forward coverage won't be shown. Click here to find out more.
see 99 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cody-littley
cody-littley added this pull request to the merge queue Aug 27, 2026
@cody-littley
cody-littley removed this pull request from the merge queue due to a manual request Aug 27, 2026
@cody-littley
cody-littley enabled auto-merge August 27, 2026 20:38
@cody-littley
cody-littley added this pull request to the merge queue Aug 27, 2026
Merged via the queue into main with commit 7cf5a21 Aug 27, 2026
71 checks passed
@cody-littley
cody-littley deleted the cjl/state-view-interface branch August 27, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants