4.5 KiB
Upgrading plugeth-statediff for Ethereum fork
This guide covers the process of updating plugeth-statediff for a new Ethereum fork (e.g., Deneb/Cancun, Pectra, etc.).
See project-dependencies.md for the full dependency graph of all related projects.
Overview
plugeth-statediff is the core state-diffing plugin that extracts Ethereum state changes. It depends on:
- plugeth: The plugin framework (Geth fork)
- plugeth-utils: Shared utilities for plugins
Integration tests additionally depend on:
- stack-orchestrator: For deployment
- fixturenet-eth-stacks: Stack definitions for local test networks
- system-tests: For end-to-end testing
- eth-statediff-compliance: For verification and benchmarking
Update sequence
Phase 1: Update utility tools to target new geth version
These tools depend on geth directly and should be updated first. They can be done in parallel:
- eth-testing - Update to new geth version
- eth-iterator-utils - Update to new geth version
- eth-dump-genblock - Update to new geth version
- eth-statediff-compliance - Update to new geth version
These updates ensure testing and validation infrastructure is ready before updating the core plugin.
Phase 2: Update core plugin stack
These should be done sequentially in this order:
1. Update plugeth-utils
Start here as it's the base dependency for both plugeth and plugeth-statediff.
- Update to track new geth version
- Test and release first
2. Update plugeth
- Update plugeth-utils reference in go.mod
- Also update plugeth-utils in
wrapmain/go.mod - Rebase or update to target new geth version
- Test and release
3. Update plugeth-statediff
Main plugin update:
Dependencies to update:
- Update plugeth reference
- Update plugeth-utils reference
Code changes:
- Adapt to any geth core/state API changes
- Update state diffing logic if needed
Testing requirements:
- Unit tests must pass
- Integration tests (require stack-orchestrator and system-tests)
- Compliance tests (using eth-statediff-compliance)
Phase 3: Integration testing
Before releasing plugeth-statediff, ensure integration tests pass:
- Update stack-orchestrator with any needed config changes
- Update fixturenet-eth-stacks if stack definitions need changes for the new fork
- Deploy local test network using fixturenet-eth-stacks
- Update system-tests if needed
- Run full integration test suite against the fixturenet
- Run eth-statediff-compliance benchmarks
Known issues and workarounds
Go plugin module name workaround
When updating plugeth, be aware of the Go plugin module naming issue:
- Issue: cerc-io/plugeth-statediff#6
- Fix:
d730849b7e
The module name must match exactly between plugin and host for Go's plugin system to work correctly.
Release order
Recommended release order to minimize breaking changes:
- plugeth-utils - Base dependency, release first
- plugeth - After plugeth-utils is released and tested
- eth-testing and other utility tools - Can be released in parallel
- plugeth-statediff - After plugeth and plugeth-utils are stable
- Downstream services - After plugeth-statediff is released (see project-dependencies.md for full list)
Post-release updates
After releasing plugeth-statediff, the following projects will need updates:
Immediate dependents:
- eth-statediff-service
- ipld-eth-db-validator
IPLD/StateDB layer:
- ipld-eth-statedb (can use
git patch/applyfrom gethcore/state/*) - ipfs-ethdb
See project-dependencies.md for the complete update sequence for all downstream services. For a
concrete example, see the Notion milestone and tasks for the Deneb/Cancun
upgrade.
Checklist
Before considering the upgrade complete:
- plugeth-utils updated and released
- plugeth updated (including wrapmain/go.mod) and released
- plugeth-statediff updated with new dependency versions
- Unit tests pass
- fixturenet-plugeth stack successfully builds and deploys with updated versions
- Integration tests pass (using fixturenet-plugeth stack via stack-orchestrator)
- Compliance tests pass (eth-statediff-compliance)
- System tests pass
- Performance benchmarks reviewed
- Release notes prepared
- Downstream services identified for follow-up updates
- Update these docs if needed