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

tests: use tests submodule v13.1, skip precompiled contract tests #657

Open
wants to merge 3 commits into
base: audit-scope-december-2024
Choose a base branch
from
Open
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
15 changes: 15 additions & 0 deletions tests/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"reflect"
"testing"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/eth/tracers/logger"

"github.com/ethereum/go-ethereum/core/rawdb"
Expand All @@ -31,10 +32,21 @@ import (
"github.com/ethereum/go-ethereum/core/vm"
)

// discard the proof of possession precompiled contract
func resetPrecompiledContracts() {
addrProofOfPossession := common.BytesToAddress([]byte{106})
delete(vm.PrecompiledContractsConsortiumMiko, addrProofOfPossession)
delete(vm.PrecompiledContractsBerlin, addrProofOfPossession)
delete(vm.PrecompiledContractsCancun, addrProofOfPossession)
}

func TestState(t *testing.T) {
resetPrecompiledContracts()

t.Parallel()

st := new(testMatcher)

// Long tests:
st.slow(`^stAttackTest/ContractCreationSpam`)
st.slow(`^stBadOpcode/badOpcodes`)
Expand All @@ -53,6 +65,8 @@ func TestState(t *testing.T) {
st.skipLoad(`^stStaticCall/static_Call1MB`)

// Broken tests:
st.skipLoad(`^stPreCompiledContracts`) // Ronin contract are not match with Ethereum

// Expected failures:
//st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/Byzantium/0`, "bug in test")
//st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/Byzantium/3`, "bug in test")
Expand Down Expand Up @@ -80,6 +94,7 @@ func TestState(t *testing.T) {
return result
})
})

t.Run(key+"/hash/snap", func(t *testing.T) {
withTrace(t, test.gasLimit(subtest), func(vmconfig vm.Config) error {
var result error
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata