Skip to content

Commit

Permalink
Merge branch 'master' into split-load-test
Browse files Browse the repository at this point in the history
  • Loading branch information
ceyonur committed Jan 5, 2024
2 parents 867aaad + 84e86b4 commit e29a8b4
Show file tree
Hide file tree
Showing 64 changed files with 341 additions and 360 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto-generated-code-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- shell: bash
run: scripts/mock.gen.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- run: go mod download
shell: bash
Expand Down
118 changes: 116 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
shell: bash
- uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand All @@ -34,7 +34,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- run: go mod download
shell: bash
Expand All @@ -45,6 +45,120 @@ jobs:
- run: ./scripts/coverage.sh
shell: bash

e2e_precompile:
name: e2e precompile tests
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '~1.20.12'
check-latest: true
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.15"
- name: NPM Clean Install
run: npm ci
working-directory: ./contracts
- name: Hardhat Clean
run: npx hardhat clean
working-directory: ./contracts
- name: Hardhat Compile
run: npx hardhat compile
working-directory: ./contracts
- name: Install AvalancheGo Release
shell: bash
run: BASEDIR=/tmp/e2e-test AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego ./scripts/install_avalanchego_release.sh
- name: Build Subnet-EVM Plugin Binary
shell: bash
run: ./scripts/build.sh /tmp/e2e-test/avalanchego/plugins/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy
- name: Run E2E Precompile Tests
shell: bash
run: AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego DATA_DIR=/tmp/e2e-test/precompile-data ./scripts/run_ginkgo_precompile.sh
- name: Upload Artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: subnet-evm-e2e-logs-precompile
path: /tmp/network-runner-root-data*/
retention-days: 5
e2e_warp:
name: e2e warp tests
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '~1.20.12'
check-latest: true
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.15"
- name: NPM Clean Install
run: npm ci
working-directory: ./contracts
- name: Hardhat Clean
run: npx hardhat clean
working-directory: ./contracts
- name: Hardhat Compile
run: npx hardhat compile
working-directory: ./contracts
- name: Install AvalancheGo Release
shell: bash
run: BASEDIR=/tmp/e2e-test AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego ./scripts/install_avalanchego_release.sh
- name: Build Subnet-EVM Plugin Binary
shell: bash
run: ./scripts/build.sh /tmp/e2e-test/avalanchego/plugins/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy
- name: Run Warp E2E Tests
shell: bash
run: AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego DATA_DIR=/tmp/e2e-test/warp-data ./scripts/run_ginkgo_warp.sh
- name: Upload Artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: subnet-evm-e2e-logs-warp
path: /tmp/network-runner-root-data*/
retention-days: 5
e2e_load:
name: e2e load tests
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '~1.20.12'
check-latest: true
- name: Install AvalancheGo Release
shell: bash
run: BASEDIR=/tmp/e2e-test AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego ./scripts/install_avalanchego_release.sh
- name: Build Subnet-EVM Plugin Binary
shell: bash
run: ./scripts/build.sh /tmp/e2e-test/avalanchego/plugins/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy
- name: Run E2E Load Tests
shell: bash
run: AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego DATA_DIR=/tmp/e2e-test/load-data ./scripts/run_ginkgo_load.sh
- name: Upload Artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: subnet-evm-e2e-logs-load
path: /tmp/network-runner-root-data*/
retention-days: 5

build_image:
name: Build Docker Image
runs-on: ubuntu-20.04
Expand Down
124 changes: 0 additions & 124 deletions .github/workflows/e2e.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- name: Set up arm64 cross compiler
run: |
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
ARG AVALANCHE_VERSION

# ============= Compilation Stage ================
FROM golang:1.20.10-bullseye AS builder
FROM golang:1.20.12-bullseye AS builder

WORKDIR /build

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ To support these changes, there have been a number of changes to the SubnetEVM b

### Clone Subnet-evm

First install Go 1.20.10 or later. Follow the instructions [here](https://go.dev/doc/install). You can verify by running `go version`.
First install Go 1.20.12 or later. Follow the instructions [here](https://go.dev/doc/install). You can verify by running `go version`.

Set `$GOPATH` environment variable properly for Go to look for Go Workspaces. Please read [this](https://go.dev/doc/code) for details. You can verify by running `echo $GOPATH`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestVerify(t *testing.T) {
Config: NewConfig(utils.NewUint64(3){{- if .Contract.AllowList}}, admins, enableds, managers{{- end}}),
ChainConfig: func() precompileconfig.ChainConfig {
config := precompileconfig.NewMockChainConfig(gomock.NewController(t))
config.EXPECT().IsDUpgrade(gomock.Any()).Return(true).AnyTimes()
config.EXPECT().IsDurango(gomock.Any()).Return(true).AnyTimes()
return config
}(),
ExpectedError: "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func Set{{.Contract.Type}}AllowListStatus(stateDB contract.StateDB, address comm
// assumes that [input] does not include selector (omits first 4 func signature bytes)
func Unpack{{capitalise .Normalized.Name}}Input(input []byte) ({{capitalise .Normalized.Name}}Input, error) {
inputStruct := {{capitalise .Normalized.Name}}Input{}
// The strict mode in decoding is disabled after DUpgrade. You can re-enable by changing the last argument to true.
// The strict mode in decoding is disabled after Durango. You can re-enable by changing the last argument to true.
err := {{$contract.Type}}ABI.UnpackInputIntoInterface(&inputStruct, "{{.Original.Name}}", input, false)
return inputStruct, err
Expand All @@ -160,7 +160,7 @@ func Pack{{.Normalized.Name}}(inputStruct {{capitalise .Normalized.Name}}Input)
// Unpack{{capitalise .Normalized.Name}}Input attempts to unpack [input] into the {{$bindedType}} type argument
// assumes that [input] does not include selector (omits first 4 func signature bytes)
func Unpack{{capitalise .Normalized.Name}}Input(input []byte)({{$bindedType}}, error) {
// The strict mode in decoding is disabled after DUpgrade. You can re-enable by changing the last argument to true.
// The strict mode in decoding is disabled after Durango. You can re-enable by changing the last argument to true.
res, err := {{$contract.Type}}ABI.UnpackInput("{{$method.Original.Name}}", input, false)
if err != nil {
return {{bindtypenew $input.Type $structs}}, err
Expand Down
2 changes: 1 addition & 1 deletion cmd/evm/internal/t8ntool/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func Transaction(ctx *cli.Context) error {
r.Error = errors.New("gas * maxFeePerGas exceeds 256 bits")
}
// Check whether the init code size has been exceeded.
if chainConfig.IsDUpgrade(0) && tx.To() == nil && len(tx.Data()) > params.MaxInitCodeSize {
if chainConfig.IsDurango(0) && tx.To() == nil && len(tx.Data()) > params.MaxInitCodeSize {
r.Error = errors.New("max initcode size exceeded")
}
results = append(results, r)
Expand Down
2 changes: 1 addition & 1 deletion consensus/dummy/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func (self *DummyEngine) verifyHeader(chain consensus.ChainHeaderReader, header
return errUnclesUnsupported
}
switch {
case config.IsDUpgrade(header.Time):
case config.IsDurango(header.Time):
if len(header.Extra) < params.DynamicFeeExtraDataSize {
return fmt.Errorf("expected extra-data field length >= %d, found %d", params.DynamicFeeExtraDataSize, len(header.Extra))
}
Expand Down
4 changes: 2 additions & 2 deletions core/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ func NewEVMBlockContext(header *types.Header, chain ChainContext, author *common
if !ok {
return newEVMBlockContext(header, chain, author, nil)
}
// Prior to the DUpgrade, the VM enforces the extra data is smaller than or
// equal to this size. After the DUpgrade, the VM pre-verifies the extra
// Prior to Durango, the VM enforces the extra data is smaller than or
// equal to this size. After Durango, the VM pre-verifies the extra
// data past the dynamic fee rollup window is valid.
predicateResults, err := predicate.ParseResults(predicateBytes)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions core/state/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ func (s *StateDB) commit(deleteEmptyObjects bool, snaps *snapshot.Tree, blockHas
//
// Potential EIPs:
// - Reset access list (Berlin)
// - Add coinbase to access list (EIP-3651/DUpgrade)
// - Add coinbase to access list (EIP-3651/Durango)
// - Reset transient storage (EIP-1153)
func (s *StateDB) Prepare(rules params.Rules, sender, coinbase common.Address, dst *common.Address, precompiles []common.Address, list types.AccessList) {
if rules.IsSubnetEVM {
Expand All @@ -1191,7 +1191,7 @@ func (s *StateDB) Prepare(rules params.Rules, sender, coinbase common.Address, d
al.AddSlot(el.Address, key)
}
}
if rules.IsDUpgrade { // EIP-3651: warm coinbase
if rules.IsDurango { // EIP-3651: warm coinbase
al.AddAddress(coinbase)
}

Expand Down
Loading

0 comments on commit e29a8b4

Please sign in to comment.