Skip to content

feat: slim output and bump geth#8

Open
gacevicljubisa wants to merge 2 commits into
mainfrom
feat/slim-output-and-bump-geth
Open

feat: slim output and bump geth#8
gacevicljubisa wants to merge 2 commits into
mainfrom
feat/slim-output-and-bump-geth

Conversation

@gacevicljubisa
Copy link
Copy Markdown
Member

@gacevicljubisa gacevicljubisa commented May 28, 2026

Summary

  • Add --slim flag (default true) emitting only the types.Log fields Bee's snapshot decoder consumes — address, topics, data, blockNumber, transactionHash — using the same hex JSON shape geth emits. Pass --slim=false to keep the full geth shape.
  • Bump github.com/ethereum/go-ethereum v1.15.11 → v1.17.3 to align with Bee mainline (bee#5467).
  • Add guard tests so a future geth bump that changes a kept field's encoding or adds a required field fails CI.

Why

Bee reads exported logs into types.Log via json.Decoder.Decode (see pkg/node/snapshot.go). Tracing through pkg/postage/listener/listener.go and pkg/transaction/event.go shows it only consumes the five fields above; the rest (blockHash, transactionIndex, logIndex, blockTimestamp, removed) are dropped on read. Slim mode skips them at write time, removing the random-looking blockHash hex that gzip can't dedupe. Expected ~10–15% gzipped size win.

Slim and full snapshots are decoder-interchangeable on the Bee side: geth's generated UnmarshalJSON only requires address, topics, data, transactionHash; all others are optional. Slim keeps those four plus blockNumber.

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