Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ require (
lukechampine.com/blake3 v1.3.0 // indirect
)

replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101602.1-rc.1
replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101602.3-0.20250911101322-e215d5f615e5

// replace github.com/ethereum/go-ethereum => ../op-geth

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ github.com/emicklei/dot v1.6.2 h1:08GN+DD79cy/tzN6uLCT84+2Wk9u+wvqP+Hkx/dIR8A=
github.com/emicklei/dot v1.6.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s=
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3 h1:RWHKLhCrQThMfch+QJ1Z8veEq5ZO3DfIhZ7xgRP9WTc=
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3/go.mod h1:QziizLAiF0KqyLdNJYD7O5cpDlaFMNZzlxYNcWsJUxs=
github.com/ethereum-optimism/op-geth v1.101602.1-rc.1 h1:gt96/7JhVw4bEk4i0URyOKTaAoA3v+Pa+ms868IaoaY=
github.com/ethereum-optimism/op-geth v1.101602.1-rc.1/go.mod h1:rOTZfq3JrsY8ktvTnS6XT9X+t4WQQ42zFb+hzXua2EU=
github.com/ethereum-optimism/op-geth v1.101602.3-0.20250911101322-e215d5f615e5 h1:R78OvBSzkqIEP/8J5ZVx4/gAdXUxMcKqGBFiPaKoGu4=
github.com/ethereum-optimism/op-geth v1.101602.3-0.20250911101322-e215d5f615e5/go.mod h1:rOTZfq3JrsY8ktvTnS6XT9X+t4WQQ42zFb+hzXua2EU=
github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20250603144016-9c45ca7d4508 h1:A/3QVFt+Aa9ozpPVXxUTLui8honBjSusAaiCVRbafgs=
github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20250603144016-9c45ca7d4508/go.mod h1:NZ816PzLU1TLv1RdAvYAb6KWOj4Zm5aInT0YpDVml2Y=
github.com/ethereum/c-kzg-4844/v2 v2.1.0 h1:gQropX9YFBhl3g4HYhwE70zq3IHFRgbbNPw0Shwzf5w=
Expand Down
102 changes: 102 additions & 0 deletions op-acceptance-tests/tests/jovian/calldata_footprint_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
package jovian

import (
"crypto/rand"
"fmt"
"math/big"
"sync"
"testing"

"github.com/ethereum-optimism/optimism/op-devstack/devtest"
"github.com/ethereum-optimism/optimism/op-devstack/dsl"
"github.com/ethereum-optimism/optimism/op-devstack/presets"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-service/eth"
"github.com/ethereum-optimism/optimism/op-service/txplan"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/params"
"github.com/stretchr/testify/require"
)

func sendTx(t devtest.T, eoa *dsl.EOA, to common.Address, calldataSize int) {
data := make([]byte, calldataSize)
_, err := rand.Read(data)
t.Require().NoError(err)
eoa.Transact(
eoa.Plan(),
txplan.WithTo(&to),
txplan.WithData(data),
)
fmt.Println("sent tx", eoa.Address())
}

// TestCalldataFootprint generates a large volume of transactions with configurable calldata size.
// It is used to test the calldata footprint response of the L2 under Jovian HF.
func TestCalldataFootprint(gt *testing.T) {
t := devtest.SerialT(gt)
sys := presets.NewMinimal(t)

// check that the chain is running on Jovian fork
err := dsl.RequiresL2Fork(t.Ctx(), sys, 0, rollup.Jovian)
require.NoError(t, err, "Jovian fork must be active for this test")

calldataSize := 120_000
eoaGroupSize := 50

// create eoas
eoaGroup := make([]*dsl.EOA, eoaGroupSize)
for i := range eoaGroup {
eoaGroup[i] = sys.FunderL2.NewFundedEOA(eth.HundredEther)
}

// all eoas send tx to the same recipient simultaneously
to := eoaGroup[0].Address()
wg := sync.WaitGroup{}
for i := range eoaGroup {
wg.Add(1)
go func() {
defer wg.Done()
sendTx(t, eoaGroup[i], to, calldataSize)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now the mere presence of transactions, even with negligible calldata, is causing bad blocks and failure to include the tx. Not sure why, investigating this, but I assume it's an issue with the feature.

}()
}
wg.Wait()
fmt.Println("all txs sent")

// get blocks of the L2 and check for the txs
ethClient := sys.L2Chain.Escape().L2ELNodes()[0].EthClient()
lastBlock, err := ethClient.BlockRefByLabel(t.Ctx(), eth.BlockLabel(eth.Unsafe))
t.Require().NoError(err)

daLimitedSeen := false
// check for the txs in the block
for i := range lastBlock.Number {
info, txs, err := ethClient.InfoAndTxsByNumber(t.Ctx(), uint64(i))
t.Require().NoError(err)
fmt.Println("txs", txs.Len())
fmt.Println("info", info)
blockGasUsed := info.GasUsed()
gasUsedAccumulated := uint64(0)
daFootprintAccumulated := big.NewInt(0)
for _, tx := range txs {
receipt, err := ethClient.TransactionReceipt(t.Ctx(), tx.Hash())
t.Require().NoError(err)
gasUsedAccumulated += receipt.GasUsed
daFootprintAccumulated.Add(daFootprintAccumulated, tx.RollupCostData().EstimatedDASize())
}
fmt.Println("blockGasUsed", blockGasUsed)
fmt.Println("gasUsedAccumulated", gasUsedAccumulated)
fmt.Println("daFootprintAccumulated", daFootprintAccumulated)

// if the blockGasUsed is based on actual gasUsed, nothing to validate
if blockGasUsed == gasUsedAccumulated {
continue
}

// else, the blockGasUsed is based on da footprint,
// so we need to validate that the calldata footprint rules were followed
daFootprintAccumulated.Mul(daFootprintAccumulated, big.NewInt(params.DAFootprintGasScalar))
require.Equal(t, daFootprintAccumulated, big.NewInt(int64(blockGasUsed)), "blockGasUsed is not gas or da based")
daLimitedSeen = true
}
require.True(t, daLimitedSeen, "no da limited blocks seen")
}
34 changes: 34 additions & 0 deletions op-acceptance-tests/tests/jovian/init_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package jovian

import (
"testing"

"github.com/ethereum-optimism/optimism/op-chain-ops/devkeys"
"github.com/ethereum-optimism/optimism/op-devstack/devtest"
"github.com/ethereum-optimism/optimism/op-devstack/presets"
"github.com/ethereum-optimism/optimism/op-devstack/stack"
"github.com/ethereum-optimism/optimism/op-devstack/sysgo"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/intentbuilder"
"github.com/ethereum-optimism/optimism/op-node/rollup"
)

func TestMain(m *testing.M) {
presets.DoMain(m,
presets.WithMinimal(),
WithJovianEnabled(),
)
}

// WithJovianEnabled creates a preset option that enables Jovian hardfork at genesis
func WithJovianEnabled() stack.CommonOption {
return stack.MakeCommon(sysgo.WithDeployerOptions(WithJovianAtGenesis()))
}

// Helper function to activate Jovian at genesis
func WithJovianAtGenesis() sysgo.DeployerOption {
return func(p devtest.P, keys devkeys.Keys, builder intentbuilder.Builder) {
for _, l2Cfg := range builder.L2s() {
l2Cfg.WithForkAtGenesis(rollup.Jovian)
}
}
}