Skip to content

Refine address mapping for delegations and rebinds#3499

Draft
masih wants to merge 8 commits into
mainfrom
masih/clean-up-decoding
Draft

Refine address mapping for delegations and rebinds#3499
masih wants to merge 8 commits into
mainfrom
masih/clean-up-decoding

Conversation

@masih
Copy link
Copy Markdown
Collaborator

@masih masih commented May 22, 2026

Simplify the address-mapping and code-storage helpers in x/evm/keeper and the parallel giga/deps/xevm/keeper package. Comments document the non-obvious invariants (the three-way GetCodeHash semantics, the bidirectional index contract, the cast-address receive rule), magic constants are named, and a few stale branches in SetCode and SetAddressMapping are simplified along the way.

Expand the keeper test suites on both sides to cover behaviours that were previously implicit: SetCode with delegation-shaped input, SetAddressMapping when either side is rebound to a new partner, and GetCodeHash for accounts with a nonce but no balance. The two keeper packages share underlying storage via GigaEvmKeeper.UseRegularStore=true, so coverage is mirrored to keep them from drifting.

Mirror both fixes into giga/deps/xevm/keeper.

masih added 2 commits May 22, 2026 16:20
Simplify the address-mapping and code-storage helpers in x/evm/keeper
and the parallel giga/deps/xevm/keeper package. Comments document the
non-obvious invariants (the three-way GetCodeHash semantics, the
bidirectional index contract, the cast-address receive rule), magic
constants are named, and a few stale branches in SetCode and
SetAddressMapping are simplified along the way.

Expand the keeper test suites on both sides to cover behaviours that
were previously implicit: SetCode with delegation-shaped input,
SetAddressMapping when either side is rebound to a new partner, and
GetCodeHash for accounts with a nonce but no balance. The two keeper
packages share underlying storage via
GigaEvmKeeper.UseRegularStore=true, so coverage is mirrored to keep
them from drifting.

Mirror both fixes into giga/deps/xevm/keeper.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 22, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMay 27, 2026, 1:17 PM

@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.01%. Comparing base (3936ac9) to head (cf2deda).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3499      +/-   ##
==========================================
- Coverage   59.04%   59.01%   -0.03%     
==========================================
  Files        2199     2187      -12     
  Lines      182096   181206     -890     
==========================================
- Hits       107513   106939     -574     
+ Misses      64933    64652     -281     
+ Partials     9650     9615      -35     
Flag Coverage Δ
sei-db 70.41% <ø> (ø)
sei-db-state-db ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
giga/deps/xevm/keeper/address.go 84.21% <ø> (-2.68%) ⬇️
giga/deps/xevm/keeper/code.go 82.35% <ø> (+1.79%) ⬆️
giga/deps/xevm/state/code.go 84.21% <ø> (-2.75%) ⬇️
giga/deps/xevm/state/journal.go 89.90% <ø> (ø)
x/evm/keeper/address.go 97.36% <ø> (+0.64%) ⬆️
x/evm/keeper/code.go 100.00% <ø> (+5.55%) ⬆️
x/evm/module.go 26.27% <ø> (-0.54%) ⬇️

... and 110 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.

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.

1 participant