Skip to content

Commit

Permalink
use cancun for e2e-test
Browse files Browse the repository at this point in the history
Signed-off-by: Jun Kimura <[email protected]>
  • Loading branch information
bluele committed Nov 26, 2024
1 parent 9fac703 commit 08c0139
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FOUNDRY_PROFILE=default
FORGE=FOUNDRY_PROFILE=$(FOUNDRY_PROFILE) forge
SOLC_VERSION=0.8.24
EVM_VERSION=paris
EVM_VERSION=cancun
DOCKER=docker
ABIGEN="$(DOCKER) run -v .:/workspace -w /workspace -it ethereum/client-go:alltools-v1.11.6 abigen"
SOLHINT=npx solhint
Expand All @@ -16,7 +16,7 @@ TEST_UPGRADEABLE=false

.PHONY: build
build:
$(FORGE) build --sizes --skip test --use solc:$(SOLC_VERSION)
$(FORGE) build --sizes --skip test --use solc:$(SOLC_VERSION) --evm-version $(EVM_VERSION)

.PHONY: clean
clean:
Expand All @@ -33,7 +33,7 @@ lint:

.PHONY: test
test:
TEST_UPGRADEABLE=$(TEST_UPGRADEABLE) $(FORGE) test -vvvv --gas-report --isolate --use solc:$(SOLC_VERSION)
TEST_UPGRADEABLE=$(TEST_UPGRADEABLE) $(FORGE) test -vvvv --gas-report --isolate --use solc:$(SOLC_VERSION) --evm-version $(EVM_VERSION)

.PHONY: snapshot
snapshot:
Expand Down
3 changes: 2 additions & 1 deletion chains/ibft2/chain0/ibftConfigFile.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"genesis": {
"config": {
"chainId": 2018,
"muirglacierblock": 0,
"cancunTime": 0,
"zeroBaseFee": true,
"ibft2": {
"blockperiodseconds": 1,
"epochlength": 30000,
Expand Down
3 changes: 2 additions & 1 deletion chains/ibft2/chain1/ibftConfigFile.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"genesis": {
"config": {
"chainId": 3018,
"muirglacierblock": 0,
"cancunTime": 0,
"zeroBaseFee": true,
"ibft2": {
"blockperiodseconds": 1,
"epochlength": 30000,
Expand Down
2 changes: 1 addition & 1 deletion chains/qbft/chain0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM hyperledger/besu:24.3.0
FROM hyperledger/besu:24.10.0

USER root

Expand Down
3 changes: 2 additions & 1 deletion chains/qbft/chain0/qbftConfigFile.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"genesis": {
"config": {
"chainId": 2018,
"muirglacierblock": 0,
"cancunTime": 0,
"zeroBaseFee": true,
"qbft": {
"blockperiodseconds": 1,
"epochlength": 30000,
Expand Down
2 changes: 1 addition & 1 deletion chains/qbft/chain1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM hyperledger/besu:24.3.0
FROM hyperledger/besu:24.10.0

USER root

Expand Down
3 changes: 2 additions & 1 deletion chains/qbft/chain1/qbftConfigFile.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"genesis": {
"config": {
"chainId": 3018,
"muirglacierblock": 0,
"cancunTime": 0,
"zeroBaseFee": true,
"qbft": {
"blockperiodseconds": 1,
"epochlength": 30000,
Expand Down
4 changes: 3 additions & 1 deletion pkg/testing/chains.go
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,7 @@ func (chain *Chain) WaitForReceiptAndGet(ctx context.Context, tx *gethtypes.Tran
func (chain *Chain) WaitIfNoError(ctx context.Context, txName string) func(tx *gethtypes.Transaction, err error) error {
return func(tx *gethtypes.Transaction, err error) error {
if err != nil {
return fmt.Errorf("failed to call transaction: tx=%v err='%v'", txName, err)
return fmt.Errorf("failed to call transaction: tx=%v txPayload=%#v err='%v'", txName, tx, err)
}
return chain.WaitForReceiptAndGet(ctx, tx, txName)
}
Expand Down Expand Up @@ -1290,6 +1290,8 @@ func makeGenTxOpts(chainID *big.Int, prv *ecdsa.PrivateKey) func(ctx context.Con
// Set non-zero value to avoid call `estimateGas`
// This allows we can extract the revert reason from the transaction receipt if the transaction fails.
GasLimit: 6382056,
// Use legacy tx
GasPrice: big.NewInt(0),
Signer: func(address common.Address, tx *gethtypes.Transaction) (*gethtypes.Transaction, error) {
if address != addr {
return nil, errors.New("not authorized to sign this account")
Expand Down

0 comments on commit 08c0139

Please sign in to comment.