Skip to content

Rebase the main patch onto current erigon - #45

Merged
samcm merged 2 commits into
mainfrom
rebase-main-patch
Nov 27, 2026
Merged

samcm merged 2 commits into
mainfrom
rebase-main-patch

Conversation

@samcm

@samcm samcm commented Nov 27, 2026

Copy link
Copy Markdown
Member

The main patch no longer applies to erigon main (cmd/utils/flags.go, execution/vm and node/eth/backend.go conflict), so the daily patch check fails for main and releases build no -main image. This rebases the existing changes onto current main without adding behaviour.

Upstream changes the patch now follows:

  • Precompiles take and return MdGas, and identity output goes through a new runPrecompile fast path. RunPrecompiledContract takes the gas schedule again, and the fast path applies precompile overrides as well.
  • Gas functions return MdGasCost, and the three CREATE gas functions are folded into initCodeGas. memoryGasCost takes the EVM again, and initCodeGas and the new cached-slot SLOAD path read the schedule like the code they replaced.
  • Ethereum.Init no longer takes the chain config, so Xatu is initialised from the chain config Ethereum keeps.
  • TestEVMFitsItsSizeClass limits EVM to 480 bytes. GasSchedule and Config.CustomJumpTable add a pointer each and EVM has no padding for them, so evmSizeClass moves to 512.

Overlay changes needed to build against main:

  • params.TxAAGas is gone (AA transactions became EIP-8141 frames). CalcCustomIntrinsicGas loses its isAATxn argument, which every caller passed as false. The call in each tagged patch drops the argument as well.
  • transactions.ComputeTxContext lost its engine and chain config arguments on main but not in v3.7.x and v3.8.x, which share the main overlay. The overlay now builds the message and tx context itself, the same way that function does.
  • The tracer test mock implements HasSelfdestructed, which main added to tracing.IntraBlockState.

Checked against erigon main at 61c2c00:

  • The patch applies cleanly.
  • go vet passes for node/xatu, node/eth, execution/vm, execution/protocol and cmd/utils with the release build tags.
  • go test ./execution/vm/ ./execution/protocol/ ./node/xatu/ passes.
  • validate-patch.sh passes for every patch.

The main patch stopped applying after erigon main moved precompile gas to
MdGas, folded the CREATE gas functions into initCodeGas, returned
MdGasCost from gas functions, dropped the chain config argument from
Ethereum.Init and replaced AA transactions with EIP-8141 frames.

- RunPrecompiledContract takes the gas schedule again, and the identity
  fast path in runPrecompile applies precompile overrides too.
- memoryGasCost takes the EVM again; initCodeGas and the cached-slot SLOAD
  path read the schedule like the code they replaced.
- Xatu is initialised from the chain config Ethereum keeps.
- evmSizeClass moves to 512: GasSchedule and Config.CustomJumpTable add a
  pointer each, and EVM has no padding to hold them.
- CalcCustomIntrinsicGas loses its isAATxn argument. Every caller passed
  false, and params.TxAAGas no longer exists on main.
- The overlay builds the message and tx context itself, because
  transactions.ComputeTxContext lost two arguments on main but not in the
  v3.7 and v3.8 releases that share the main overlay.
- The tracer test mock implements HasSelfdestructed, which main added to
  tracing.IntraBlockState.

Co-authored-by: Sam Calder-Mason <samcaldermason@gmail.com>
@samcm samcm added the build-image Build test Docker images for all patch targets label Nov 27, 2026

@redpanda-reviewer redpanda-reviewer 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.

This PR rebases the erigon integration patch (plus the shared overlay and version-specific patch call sites) onto current erigon main. I verified the mechanical parts against real upstream source: the main patch applies cleanly to erigontech/erigon at 61c2c00, the new local computeTxContext helper reproduces transactions.ComputeTxContext byte-for-byte in main, v3.7.1 and v3.8.1 (the engine/chain-config arguments were genuinely unused there), the folded initCodeGas keeps the CREATE2 keccak and EIP-3860 init-code-word overrides that the three removed gas functions had, the new cached-slot SLOAD path keeps the warm/cold overrides, and every GasKey* override key still has a live use. No behavioural regression found; the delta reads as a faithful rebase.


Reviewed 12 changed file(s) @ 1cd18c2f — no blocking issues found.
"Design is how it works." — Steve Jobs

- Updated patches for erigontech/erigon v3.3.10 (commit: e7de183)
- Updated patches for erigontech/erigon v3.7.0 (commit: bdc78cc)
- Updated patches for erigontech/erigon v3.7.1 (commit: 8c1e389)
- Updated patches for erigontech/erigon v3.8.0 (commit: 7539da1)
- Updated patches for erigontech/erigon v3.8.1 (commit: cf6f141)
@github-actions

Copy link
Copy Markdown
Contributor

Docker Image Built (main)

Multi-architecture (amd64/arm64) image has been built and pushed to Docker Hub:

Repository: ethpandaops/erigone
Upstream ref: main
Tags:

  • pr-45-1cd18c2-main
  • 1cd18c2fd7016ea8ea5b8c95e57888f9928d8e76-main

Usage

docker pull ethpandaops/erigone:pr-45-1cd18c2-main
docker run ethpandaops/erigone:pr-45-1cd18c2-main --help

@github-actions

Copy link
Copy Markdown
Contributor

Docker Image Built (v3.3.10)

Multi-architecture (amd64/arm64) image has been built and pushed to Docker Hub:

Repository: ethpandaops/erigone
Upstream ref: v3.3.10
Tags:

  • pr-45-1cd18c2-v3.3.10
  • 1cd18c2fd7016ea8ea5b8c95e57888f9928d8e76-v3.3.10

Usage

docker pull ethpandaops/erigone:pr-45-1cd18c2-v3.3.10
docker run ethpandaops/erigone:pr-45-1cd18c2-v3.3.10 --help

@github-actions

Copy link
Copy Markdown
Contributor

Docker Image Built (v3.7.0)

Multi-architecture (amd64/arm64) image has been built and pushed to Docker Hub:

Repository: ethpandaops/erigone
Upstream ref: v3.7.0
Tags:

  • pr-45-1cd18c2-v3.7.0
  • 1cd18c2fd7016ea8ea5b8c95e57888f9928d8e76-v3.7.0

Usage

docker pull ethpandaops/erigone:pr-45-1cd18c2-v3.7.0
docker run ethpandaops/erigone:pr-45-1cd18c2-v3.7.0 --help

@github-actions

Copy link
Copy Markdown
Contributor

Docker Image Built (v3.7.1)

Multi-architecture (amd64/arm64) image has been built and pushed to Docker Hub:

Repository: ethpandaops/erigone
Upstream ref: v3.7.1
Tags:

  • pr-45-1cd18c2-v3.7.1
  • 1cd18c2fd7016ea8ea5b8c95e57888f9928d8e76-v3.7.1

Usage

docker pull ethpandaops/erigone:pr-45-1cd18c2-v3.7.1
docker run ethpandaops/erigone:pr-45-1cd18c2-v3.7.1 --help

@github-actions

Copy link
Copy Markdown
Contributor

Docker Image Built (v3.8.0)

Multi-architecture (amd64/arm64) image has been built and pushed to Docker Hub:

Repository: ethpandaops/erigone
Upstream ref: v3.8.0
Tags:

  • pr-45-1cd18c2-v3.8.0
  • 1cd18c2fd7016ea8ea5b8c95e57888f9928d8e76-v3.8.0

Usage

docker pull ethpandaops/erigone:pr-45-1cd18c2-v3.8.0
docker run ethpandaops/erigone:pr-45-1cd18c2-v3.8.0 --help

@github-actions

Copy link
Copy Markdown
Contributor

Docker Image Built (v3.8.1)

Multi-architecture (amd64/arm64) image has been built and pushed to Docker Hub:

Repository: ethpandaops/erigone
Upstream ref: v3.8.1
Tags:

  • pr-45-1cd18c2-v3.8.1
  • 1cd18c2fd7016ea8ea5b8c95e57888f9928d8e76-v3.8.1

Usage

docker pull ethpandaops/erigone:pr-45-1cd18c2-v3.8.1
docker run ethpandaops/erigone:pr-45-1cd18c2-v3.8.1 --help

@samcm
samcm merged commit 07ecf57 into main Nov 27, 2026
@samcm
samcm deleted the rebase-main-patch branch November 27, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-image Build test Docker images for all patch targets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants