Skip to content

Commit ba75ebb

Browse files
authored
Merge branch 'master' into alarso16/rpc-flakes
2 parents 46253c1 + 74e4756 commit ba75ebb

File tree

76 files changed

+3519
-879
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+3519
-879
lines changed

.avalanche-golangci.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ linters:
7777
- spancheck
7878
- staticcheck
7979
- tagalign
80-
# - testifylint
80+
- testifylint
8181
- unconvert
8282
- unparam
8383
- unused
@@ -208,16 +208,16 @@ linters:
208208
- serialize
209209
strict: true
210210
testifylint:
211-
# Enable all checkers (https://github.com/Antonboom/testifylint#checkers).
212-
# Default: false
213-
enable-all: true
214-
# Disable checkers by name
215-
# (in addition to default
216-
# suite-thelper
217-
# ).
218-
disable:
219-
- go-require
220-
- float-compare
211+
# Enable all checkers (https://github.com/Antonboom/testifylint#checkers).
212+
# Default: false
213+
enable-all: true
214+
# Disable checkers by name
215+
# (in addition to default
216+
# suite-thelper
217+
# ).
218+
disable:
219+
- go-require
220+
- float-compare
221221
unused:
222222
# Mark all struct fields that have been written to as used.
223223
# Default: true

.github/CONTRIBUTING.md

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,22 @@ Mocks are auto-generated using [mockgen](https://pkg.go.dev/go.uber.org/mock/moc
3434
- To **re-generate all mocks**, use the command below from the root of the project:
3535

3636
```sh
37-
go generate -run "go.uber.org/mock/mockgen" ./...
37+
go generate -run mockgen ./...
3838
```
3939

40-
- To **add** an interface that needs a corresponding mock generated:
41-
- if the file `mocks_generate_test.go` exists in the package where the interface is located, either:
42-
- modify its `//go:generate go run go.uber.org/mock/mockgen` to generate a mock for your interface (preferred); or
43-
- add another `//go:generate go run go.uber.org/mock/mockgen` to generate a mock for your interface according to specific mock generation settings
44-
- if the file `mocks_generate_test.go` does not exist in the package where the interface is located, create it with content (adapt as needed):
40+
* To **add** an interface that needs a corresponding mock generated:
41+
* if the file `mocks_generate_test.go` exists in the package where the interface is located, either:
42+
* modify its `//go:generate go tool -modfile=tools/go.mod mockgen` to generate a mock for your interface (preferred); or
43+
* add another `//go:generate go tool -modfile=tools/go.mod mockgen` to generate a mock for your interface according to specific mock generation settings
44+
* if the file `mocks_generate_test.go` does not exist in the package where the interface is located, create it with content (adapt as needed):
4545

4646
```go
4747
// Copyright (C) 2019-2025, Ava Labs, Inc. All rights reserved.
4848
// See the file LICENSE for licensing terms.
4949
5050
package mypackage
5151
52-
//go:generate go run go.uber.org/mock/mockgen -package=${GOPACKAGE} -destination=mocks_test.go . YourInterface
52+
//go:generate go tool -modfile=tools/go.mod mockgen -package=${GOPACKAGE} -destination=mocks_test.go . YourInterface
5353
```
5454

5555
Notes:
@@ -58,22 +58,28 @@ Mocks are auto-generated using [mockgen](https://pkg.go.dev/go.uber.org/mock/moc
5858
- To **remove** an interface from having a corresponding mock generated:
5959
1. Edit the `mocks_generate_test.go` file in the directory where the interface is defined
6060
1. If the `//go:generate` mockgen command line:
61-
- generates a mock file for multiple interfaces, remove your interface from the line
62-
- generates a mock file only for the interface, remove the entire line. If the file is empty, remove `mocks_generate_test.go` as well.
61+
* generates a mock file for multiple interfaces, remove your interface from the line
62+
* generates a mock file only for the interface, remove the entire line. If the file is empty, remove `mocks_generate_test.go` as well.
6363

64-
## Documentation guidelines
64+
## Tool Dependencies
6565

66-
- Code should be well commented, so it is easier to read and maintain.
67-
Any complex sections or invariants should be documented explicitly.
68-
- Code must be documented adhering to the official Go
69-
[commentary](https://go.dev/doc/effective_go#commentary) guidelines.
70-
- Changes with user facing impact (e.g., addition or modification of flags and
71-
options) should be accompanied by a link to a pull request to the [avalanche-docs](https://github.com/ava-labs/avalanche-docs)
72-
repository. [example](https://github.com/ava-labs/avalanche-docs/pull/1119/files).
73-
- Changes that modify a package significantly or add new features should
74-
either update the existing or include a new `README.md` file in that package.
66+
This project uses `go tool` to manage development tool dependencies in `tools/go.mod`. This isolates tool dependencies from the main application dependencies and provides consistent, version-locked tools across the team.
7567

76-
## Can I have feature X
68+
### Managing Tools
7769

78-
Before you submit a feature request, please check and make sure that it isn't
79-
possible through some other means.
70+
* To **add a new tool**:
71+
```sh
72+
go get -tool -modfile=tools/go.mod example.com/tool/cmd/toolname@version
73+
```
74+
75+
* To **upgrade a tool**:
76+
```sh
77+
go get -tool -modfile=tools/go.mod example.com/tool/cmd/toolname@newversion
78+
```
79+
80+
* To **run a tool manually**:
81+
```sh
82+
go tool -modfile=tools/go.mod toolname [args...]
83+
```
84+
85+
Note: `ginkgo` remains in the main `go.mod` as it is used directly in e2e test code.

.github/workflows/ci.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ jobs:
1919
- uses: actions/setup-go@v5
2020
with:
2121
go-version-file: "go.mod"
22+
cache-dependency-path: |
23+
go.sum
24+
tools/go.sum
25+
tools/legacy-golangci-lint.sum
2226
- name: Run all lint checks
2327
run: ./scripts/run_task.sh lint-all-ci
2428
- name: Check go.mod and go.sum are up-to-date
@@ -40,6 +44,9 @@ jobs:
4044
- uses: actions/setup-go@v5
4145
with:
4246
go-version-file: "go.mod"
47+
cache-dependency-path: |
48+
go.sum
49+
tools/go.sum
4350
- run: go mod download
4451
- name: Check generated codec files are up to date
4552
run: ./scripts/run_task.sh check-generate-codec
@@ -60,10 +67,6 @@ jobs:
6067
with:
6168
fetch-depth: 0
6269
submodules: recursive
63-
- name: Set up Go
64-
uses: actions/setup-go@v5
65-
with:
66-
go-version-file: "go.mod"
6770
- name: Set up solc
6871
uses: ARR4N/setup-solc@v0.2.0
6972
with:
@@ -104,7 +107,7 @@ jobs:
104107
- name: Setup Contracts
105108
run: ./scripts/run_task.sh setup-contracts
106109
- name: Run Warp E2E Tests
107-
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@edff59906ed4d6334d9e591dcb9c85a144520600
110+
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@29b4e6bc541bcd913da6c51c1c5403fff2e377a4
108111
with:
109112
run: ./scripts/run_task.sh test-e2e-warp-ci
110113
artifact_prefix: warp
@@ -126,7 +129,7 @@ jobs:
126129
with:
127130
fetch-depth: 0
128131
- name: Run E2E Load Tests
129-
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@edff59906ed4d6334d9e591dcb9c85a144520600
132+
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@29b4e6bc541bcd913da6c51c1c5403fff2e377a4
130133
with:
131134
run: ./scripts/run_task.sh test-e2e-load-ci
132135
artifact_prefix: load

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ The Subnet EVM runs in a separate process from the main AvalancheGo process and
3030
[v0.7.7] AvalancheGo@v1.13.3 (Protocol Version: 42)
3131
[v0.7.8] AvalancheGo@v1.13.4 (Protocol Version: 43)
3232
[v0.7.9] AvalancheGo@v1.13.5 (Protocol Version: 43)
33+
[v0.8.0] AvalancheGo@v1.14.0 (Protocol Version: 44)
3334
```
3435

3536
## API

RELEASES.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
# Release Notes
22

3-
## [v0.7.10](https://github.com/ava-labs/subnet-evm/releases/tag/v0.7.10)
3+
## [v0.8.1](https://github.com/ava-labs/subnet-evm/releases/tag/v0.8.1)
44

55
- Add pending releases here
6+
7+
## [v0.8.0](https://github.com/ava-labs/subnet-evm/releases/tag/v0.8.0)
8+
9+
This version is compatible with the Avalanche Granite upgrade. All mainnet nodes **MUST** update to a Granite compatible version prior to the upgrade activation time: November 19th, 2025 16:00 UTC.
10+
11+
### AvalancheGo Compatibility
12+
13+
The plugin version is **updated** to 44 and is compatible with AvalancheGo version v1.14.0.
14+
15+
### Updates
16+
617
- Upgrade to Go version 1.24
718
- ACP-226:
819
- Set expected block gas cost to 0 in Granite network upgrade, removing block gas cost requirements for block building.

Taskfile.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,14 @@ tasks:
6767
- task: check-clean-branch
6868

6969
check-go-mod-tidy:
70-
desc: Checks that go.mod and go.sum are up-to-date (requires a clean git working tree)
70+
desc: Checks that all go.mod and go.sum files are up-to-date (requires a clean git working tree)
7171
cmds:
7272
- cmd: go mod tidy
7373
- task: check-clean-branch
74+
- cmd: cd tools && go mod tidy
75+
- task: check-clean-branch
76+
- cmd: cd tools && go mod tidy -modfile=legacy-golangci-lint.mod
77+
- task: check-clean-branch
7478

7579
coverage:
7680
desc: Display test coverage statistics from coverage.out file
@@ -80,19 +84,19 @@ tasks:
8084
desc: Generates fjl/gencodec files
8185
cmds:
8286
- cmd: grep -lr -E '^// Code generated by github\.com\/fjl\/gencodec\. DO NOT EDIT\.$' . | xargs -r rm
83-
- cmd: go generate -run "github.com/fjl/gencodec" ./...
87+
- cmd: go generate -run gencodec ./...
8488

8589
generate-mocks:
8690
desc: Generates testing mocks
8791
cmds:
8892
- cmd: grep -lr -E '^// Code generated by MockGen\. DO NOT EDIT\.$' . | xargs -r rm
89-
- cmd: go generate -run "go.uber.org/mock/mockgen" ./...
90-
93+
- cmd: go generate -run mockgen ./...
94+
9195
generate-rlp:
9296
desc: Generates rlp files
9397
cmds:
9498
- cmd: grep -lr -E '^// Code generated by rlpgen\. DO NOT EDIT.\.$' . | xargs -r rm
95-
- cmd: go generate -run "github.com/ava-labs/libevm/rlp/rlpgen" ./...
99+
- cmd: go generate -run rlpgen ./...
96100

97101
install-avalanchego-release:
98102
desc: Download and install AvalancheGo release binary for testing, with fallback to building from source

accounts/abi/abi_extra_test.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
package abi
55

66
import (
7-
"bytes"
87
"math/big"
98
"strings"
109
"testing"
@@ -82,14 +81,10 @@ func TestUnpackInputIntoInterface(t *testing.T) {
8281
err = abi.UnpackInputIntoInterface(&v, "receive", data, test.strictMode) // skips 4 byte selector
8382

8483
if test.expectedErrorSubstring != "" {
85-
require.Error(t, err)
8684
require.ErrorContains(t, err, test.expectedErrorSubstring)
8785
} else {
8886
require.NoError(t, err)
89-
// Verify unpacked values match input
90-
require.Equal(t, v.Amount, input.Amount)
91-
require.EqualValues(t, v.Amount, input.Amount)
92-
require.True(t, bytes.Equal(v.Memo, input.Memo))
87+
require.Equal(t, input, v)
9388
}
9489
})
9590
}

accounts/abi/abi_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,8 +1319,8 @@ func TestABI_PackEvent(t *testing.T) {
13191319
t.Fatal(err)
13201320
}
13211321

1322-
assert.EqualValues(t, test.expectedTopics, topics)
1323-
assert.EqualValues(t, test.expectedData, data)
1322+
assert.Equal(t, test.expectedTopics, topics)
1323+
assert.Equal(t, test.expectedData, data)
13241324
})
13251325
}
13261326
}

bin/ginkgo

Lines changed: 0 additions & 10 deletions
This file was deleted.

bin/ginkgo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../scripts/run_ginkgo.sh

0 commit comments

Comments
 (0)