Skip to content

fix(debank): source live world-state diff from IAVL - #4

Merged
littlehand26 merged 2 commits into
mainfrom
fix/bugb-live-statediff
Aug 5, 2026
Merged

littlehand26 merged 2 commits into
mainfrom
fix/bugb-live-statediff

Conversation

@littlehand26

@littlehand26 littlehand26 commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Problem

trace_debankBlock derives world-state changes from transaction replay and a limited address set. Cronos upgrades and module writes can modify committed state outside that path, so live output can miss account, code, balance, and storage changes.

Solution

Pin the merged Chaintable/ethermint-cronos#9 fix at 918f0e711b5d.

The emitter now derives NewAccounts, DeletedAccounts, NewCodes, and StorageDiff from committed acc, bank, and evm IAVL changesets. It seeds touched account and balance keys from version N-1, applies version N changes, and fails closed when required roots are unavailable.

BlockFile, traces, events, and StorageContracts keep their existing behavior. The IAVL source is enabled only with the JSON-RPC trace namespace.

Historical repair remains a separate rewriter workflow.

Validation

  • go mod verify
  • go test -count=1 ./app ./cmd/cronosd
  • make build
  • regenerated gomod2nix.toml with the repository-pinned gomod2nix revision
  • Ethermint: targeted tests, race tests, go vet, and git diff --check
  • existing 1,000-block live storage comparison and mainnet bridge storage fixtures remain valid

Rollout requirement

The ETL must run with --process-tip-lag=1 before or together with this node image. Record the first correctly emitted block height for the archive repair boundary.

Signed-off-by: lihe he.li@debank.com

Signed-off-by: lihe <he.li@debank.com>
@littlehand26

Copy link
Copy Markdown
Contributor Author

SRE rollout artifact (production writer is linux/amd64, verified from the live r6i.2xlarge node):

public.ecr.aws/b2h7a5c4/chaintable/cronos-writer@sha256:6b6a15ad6d7b734d8d5be5bf71500cefc543267a49ac5c3b08e97d491950d045

Tag for traceability: amd64-a08abbd-rocksdb. The AMD64 RocksDB build and manifest jobs passed.

Rollout gate: change the co-located ETL from --process-tip-lag=0 to --process-tip-lag=1 before or together with the node image. Record the first successfully emitted height L; the old S3/Leafage history remains unchanged and will be repaired by the separate archive workflow.

Signed-off-by: lihe <he.li@debank.com>
@littlehand26 littlehand26 changed the title fix(debank): source live storage diff from IAVL fix(debank): source live world-state diff from IAVL Aug 5, 2026
@littlehand26
littlehand26 merged commit d668897 into main Aug 5, 2026
24 of 39 checks passed
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