Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep deprecated precompiles in cancun (as deprecated) #663

Merged
merged 4 commits into from
Sep 30, 2024
Merged
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
16 changes: 14 additions & 2 deletions core/state_transition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func TestNativeAssetContractCall(t *testing.T) {
makeTx(1, contractAddr, common.Big0, 100_000, big.NewInt(params.LaunchMinGasPrice), nil), // No input data is necessary, since this will hit the contract's fallback function.
}

phase6Tests := map[string]stateTransitionTest{
tests := map[string]stateTransitionTest{
"phase5": {
config: params.TestApricotPhase5Config,
txs: txs,
Expand All @@ -167,9 +167,21 @@ func TestNativeAssetContractCall(t *testing.T) {
gasUsed: []uint64{132091, 21618},
want: "",
},
"durango": {
config: params.TestDurangoChainConfig,
txs: txs,
gasUsed: []uint64{132117, 21618},
want: "",
},
"etna": {
config: params.TestEtnaChainConfig,
txs: txs,
gasUsed: []uint64{132117, 21618},
want: "",
},
}

for name, stTest := range phase6Tests {
for name, stTest := range tests {
t.Run(name, func(t *testing.T) {
executeStateTransitionTest(t, stTest)
})
Expand Down
3 changes: 3 additions & 0 deletions core/vm/contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ var PrecompiledContractsCancun = map[common.Address]contract.StatefulPrecompiled
common.BytesToAddress([]byte{8}): newWrappedPrecompiledContract(&bn256PairingIstanbul{}),
common.BytesToAddress([]byte{9}): newWrappedPrecompiledContract(&blake2F{}),
common.BytesToAddress([]byte{0x0a}): newWrappedPrecompiledContract(&kzgPointEvaluation{}),
genesisContractAddr: &deprecatedContract{},
NativeAssetBalanceAddr: &deprecatedContract{},
NativeAssetCallAddr: &deprecatedContract{},
}

// PrecompiledContractsBLS contains the set of pre-compiled Ethereum
Expand Down
3 changes: 3 additions & 0 deletions params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ var (
MuirGlacierBlock: big.NewInt(0),
BerlinBlock: big.NewInt(0),
LondonBlock: big.NewInt(0),
ShanghaiTime: utils.NewUint64(0),
NetworkUpgrades: NetworkUpgrades{
ApricotPhase1BlockTimestamp: utils.NewUint64(0),
ApricotPhase2BlockTimestamp: utils.NewUint64(0),
Expand Down Expand Up @@ -478,6 +479,8 @@ var (
MuirGlacierBlock: big.NewInt(0),
BerlinBlock: big.NewInt(0),
LondonBlock: big.NewInt(0),
ShanghaiTime: utils.NewUint64(0),
CancunTime: utils.NewUint64(0),
NetworkUpgrades: NetworkUpgrades{
ApricotPhase1BlockTimestamp: utils.NewUint64(0),
ApricotPhase2BlockTimestamp: utils.NewUint64(0),
Expand Down
Loading