Skip to content

Commit df66835

Browse files
authored
Merge pull request #1254 from ava-labs/bump-avago-version
Update AvalancheGo to v1.14.2
2 parents 32f451e + b2f5f91 commit df66835

13 files changed

Lines changed: 78 additions & 235 deletions

File tree

go.mod

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ tool (
99

1010
require (
1111
github.com/alexliesenfeld/health v0.8.1
12-
github.com/ava-labs/avalanchego v1.14.1
13-
github.com/ava-labs/avalanchego/graft/subnet-evm v0.8.2
12+
github.com/ava-labs/avalanchego v1.14.2
13+
github.com/ava-labs/avalanchego/graft/subnet-evm v1.14.2
1414
github.com/ava-labs/libevm v1.13.15-0.20251215154636-865e03ca6a28
1515
github.com/aws/aws-sdk-go-v2 v1.41.5
1616
github.com/aws/aws-sdk-go-v2/config v1.32.14
@@ -40,14 +40,14 @@ require (
4040

4141
// This is a placeholder require directive since the replacement below is necessary and for replacement to work, the require directive must be present. Separating it out here since it's an indirect requirement.
4242

43-
require github.com/ava-labs/avalanchego/graft/evm v0.0.0-00010101000000-000000000000 // indirect
43+
require github.com/ava-labs/avalanchego/graft/evm v1.14.2 // indirect
4444

4545
// These are manual replacements pointing to the same commit as the avalanchego module. They must be updated whenever the avalanchego version is updated. Version is ignored but the short commit hash and the timestamp must be accepted by go mod tidy.
46-
replace github.com/ava-labs/avalanchego/graft/subnet-evm => github.com/ava-labs/avalanchego/graft/subnet-evm v0.0.0-20260105172535-1a59a6f646ef
46+
replace github.com/ava-labs/avalanchego/graft/subnet-evm => github.com/ava-labs/avalanchego/graft/subnet-evm v0.0.0-20260326183716-6e5acf909c7a
4747

48-
replace github.com/ava-labs/avalanchego/graft/evm => github.com/ava-labs/avalanchego/graft/evm v0.0.0-20260105172535-1a59a6f646ef
48+
replace github.com/ava-labs/avalanchego/graft/evm => github.com/ava-labs/avalanchego/graft/evm v0.0.0-20260326183716-6e5acf909c7a
4949

50-
replace github.com/ava-labs/avalanchego/graft/coreth => github.com/ava-labs/avalanchego/graft/coreth v0.0.0-20260105172535-1a59a6f646ef
50+
replace github.com/ava-labs/avalanchego/graft/coreth => github.com/ava-labs/avalanchego/graft/coreth v0.0.0-20260326183716-6e5acf909c7a
5151

5252
require (
5353
4d63.com/gocheckcompilerdirectives v1.3.0 // indirect
@@ -84,7 +84,7 @@ require (
8484
github.com/Masterminds/semver/v3 v3.4.0 // indirect
8585
github.com/Microsoft/go-winio v0.6.2 // indirect
8686
github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect
87-
github.com/StephenButtolph/canoto v0.17.3 // indirect
87+
github.com/StephenButtolph/canoto v0.18.0 // indirect
8888
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
8989
github.com/alecthomas/go-check-sumtype v0.3.1 // indirect
9090
github.com/alexkohler/nakedret/v2 v2.0.5 // indirect
@@ -94,8 +94,8 @@ require (
9494
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
9595
github.com/ashanbrown/forbidigo v1.6.0 // indirect
9696
github.com/ashanbrown/makezero v1.2.0 // indirect
97-
github.com/ava-labs/avalanchego/graft/coreth v0.0.0-20260105172535-70148edc6eca // indirect
98-
github.com/ava-labs/firewood-go-ethhash/ffi v0.0.18 // indirect
97+
github.com/ava-labs/avalanchego/graft/coreth v1.14.2 // indirect
98+
github.com/ava-labs/firewood-go-ethhash/ffi v0.3.1 // indirect
9999
github.com/aws/aws-sdk-go-v2/credentials v1.19.14 // indirect
100100
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.21 // indirect
101101
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21 // indirect
@@ -149,7 +149,7 @@ require (
149149
github.com/denis-tingaikin/go-header v0.5.0 // indirect
150150
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
151151
github.com/distribution/reference v0.6.0 // indirect
152-
github.com/dlclark/regexp2 v1.11.0 // indirect
152+
github.com/dlclark/regexp2 v1.11.5 // indirect
153153
github.com/docker/cli v29.2.0+incompatible // indirect
154154
github.com/docker/distribution v2.8.3+incompatible // indirect
155155
github.com/docker/docker v28.5.1+incompatible // indirect
@@ -203,7 +203,7 @@ require (
203203
github.com/golangci/plugin-module-register v0.1.1 // indirect
204204
github.com/golangci/revgrep v0.8.0 // indirect
205205
github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect
206-
github.com/google/btree v1.1.2 // indirect
206+
github.com/google/btree v1.1.3 // indirect
207207
github.com/google/cel-go v0.26.1 // indirect
208208
github.com/google/gnostic-models v0.6.8 // indirect
209209
github.com/google/go-cmp v0.7.0 // indirect

go.sum

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA
7373
github.com/OpenPeeDeeP/depguard/v2 v2.2.1 h1:vckeWVESWp6Qog7UZSARNqfu/cZqvki8zsuj3piCMx4=
7474
github.com/OpenPeeDeeP/depguard/v2 v2.2.1/go.mod h1:q4DKzC4UcVaAvcfd41CZh0PWpGgzrVxUYBlgKNGquUo=
7575
github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0=
76-
github.com/StephenButtolph/canoto v0.17.3 h1:lvsnYD4b96vD1knnmp1xCmZqfYpY/jSeRozGdOfdvGI=
77-
github.com/StephenButtolph/canoto v0.17.3/go.mod h1:IcnAHC6nJUfQFVR9y60ko2ecUqqHHSB6UwI9NnBFZnE=
76+
github.com/StephenButtolph/canoto v0.18.0 h1:czLis9aEly5R/ExPwB5X0PJLhXi7Sv4PpffaAJV3KnE=
77+
github.com/StephenButtolph/canoto v0.18.0/go.mod h1:01RsiQp1gnV1eJ6LwygP6buPCLUoAz7jKadQSB0FI0o=
7878
github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40=
7979
github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o=
8080
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
@@ -106,16 +106,16 @@ github.com/ashanbrown/forbidigo v1.6.0 h1:D3aewfM37Yb3pxHujIPSpTf6oQk9sc9WZi8ger
106106
github.com/ashanbrown/forbidigo v1.6.0/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU=
107107
github.com/ashanbrown/makezero v1.2.0 h1:/2Lp1bypdmK9wDIq7uWBlDF1iMUpIIS4A+pF6C9IEUU=
108108
github.com/ashanbrown/makezero v1.2.0/go.mod h1:dxlPhHbDMC6N6xICzFBSK+4njQDdK8euNO0qjQMtGY4=
109-
github.com/ava-labs/avalanchego v1.14.1 h1:955YG175dhyFibiPr1LA1rDw9x8Vt1UcLuNwRLOk1kM=
110-
github.com/ava-labs/avalanchego v1.14.1/go.mod h1:TWuYmX/Wmfdd+9KvFZJHGldQ6SXq0jZ334T0kUOaJsM=
111-
github.com/ava-labs/avalanchego/graft/coreth v0.0.0-20260105172535-1a59a6f646ef h1:nEkBQEvAJYn2XR8k+fErTCzT+M/3ieERZ6o28pL46i4=
112-
github.com/ava-labs/avalanchego/graft/coreth v0.0.0-20260105172535-1a59a6f646ef/go.mod h1:4MyhlWkDuSoIuEiYH5ROkdxqMoVZq7r7uQc5TtoeTBw=
113-
github.com/ava-labs/avalanchego/graft/evm v0.0.0-20260105172535-1a59a6f646ef h1:0gxnb3e52FIQuFEnd3xEt+X2RHAK86EohJHEaUzo6eU=
114-
github.com/ava-labs/avalanchego/graft/evm v0.0.0-20260105172535-1a59a6f646ef/go.mod h1:md/bvhc+ackO3enSZxN+i+gv/5hj6EoZT/Slh2S7anA=
115-
github.com/ava-labs/avalanchego/graft/subnet-evm v0.0.0-20260105172535-1a59a6f646ef h1:u5cOcD3LbMjceJCo0BprUNq6Agl1vG25dROtXxToBXo=
116-
github.com/ava-labs/avalanchego/graft/subnet-evm v0.0.0-20260105172535-1a59a6f646ef/go.mod h1:abXA3WHk4X3mqXSqp/pXfvCHb3F1DQ0gxQ9n2Gl07SY=
117-
github.com/ava-labs/firewood-go-ethhash/ffi v0.0.18 h1:Lk4yxNL3iZMRxKZlTKVCHp0Rg7i5QclRei0ZKCgtPac=
118-
github.com/ava-labs/firewood-go-ethhash/ffi v0.0.18/go.mod h1:hR/JSGXxST9B9olwu/NpLXHAykfAyNGfyKnYQqiiOeE=
109+
github.com/ava-labs/avalanchego v1.14.2 h1:li3Ky2Mz6b5as/1C1xHmDmUqweaMtp+6LMVkeT2j9/A=
110+
github.com/ava-labs/avalanchego v1.14.2/go.mod h1:yscKaxEqRep24ZsM+O9ZQ0N7OwkChG3mk5XB02FTeRM=
111+
github.com/ava-labs/avalanchego/graft/coreth v0.0.0-20260326183716-6e5acf909c7a h1:CbHUxdjqKnH4+eenL2gi3jwA6Z95HgmlXNYs9SxG+xo=
112+
github.com/ava-labs/avalanchego/graft/coreth v0.0.0-20260326183716-6e5acf909c7a/go.mod h1:dp6gM+2b7SdWEqZwxi+4SnfJvgMj0wW9y6WKCHMlmEc=
113+
github.com/ava-labs/avalanchego/graft/evm v0.0.0-20260326183716-6e5acf909c7a h1:iOxbUn8tkHD47p5uPQ8I9GBplGOqqZHyY7ZuJICGYeg=
114+
github.com/ava-labs/avalanchego/graft/evm v0.0.0-20260326183716-6e5acf909c7a/go.mod h1:OW1I/KEO9StVafcdgwmRWvY4xsBzWJyZtNZNlUdgDJ4=
115+
github.com/ava-labs/avalanchego/graft/subnet-evm v0.0.0-20260326183716-6e5acf909c7a h1:5I5+R0DBQDNpHZ/M3mRwLQW1N7YUKUml5k6+4PuRVzE=
116+
github.com/ava-labs/avalanchego/graft/subnet-evm v0.0.0-20260326183716-6e5acf909c7a/go.mod h1:F1ihP1mHIzVR0dqXSIN8vkigj33Rn3rX0NU/a4Hz/WU=
117+
github.com/ava-labs/firewood-go-ethhash/ffi v0.3.1 h1:2LXaw0vQ/nSjSKyNil2NoNXXuH+nFSSrlUUBl1x6Jcg=
118+
github.com/ava-labs/firewood-go-ethhash/ffi v0.3.1/go.mod h1:0Z60sYkUFvvOlOc0XHGbP+271EjP5KjaaOA0EQxCCSA=
119119
github.com/ava-labs/libevm v1.13.15-0.20251215154636-865e03ca6a28 h1:HgSr7pbKlzqCfXryyzla0mXG1LDgDqPXcybciLmU2bI=
120120
github.com/ava-labs/libevm v1.13.15-0.20251215154636-865e03ca6a28/go.mod h1:DqSotSn4Dx/UJV+d3svfW8raR+cH7+Ohl9BpsQ5HlGU=
121121
github.com/aws/aws-sdk-go-v2 v1.41.5 h1:dj5kopbwUsVUVFgO4Fi5BIT3t4WyqIDjGKCangnV/yY=
@@ -299,8 +299,8 @@ github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5Qvfr
299299
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
300300
github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
301301
github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
302-
github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
303-
github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
302+
github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ=
303+
github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
304304
github.com/docker/cli v29.2.0+incompatible h1:9oBd9+YM7rxjZLfyMGxjraKBKE4/nVyvVfN4qNl9XRM=
305305
github.com/docker/cli v29.2.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
306306
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
@@ -481,8 +481,8 @@ github.com/golangci/revgrep v0.8.0/go.mod h1:U4R/s9dlXZsg8uJmaR1GrloUr14D7qDl8gi
481481
github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed h1:IURFTjxeTfNFP0hTEi1YKjB/ub8zkpaOqFFMApi2EAs=
482482
github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed/go.mod h1:XLXN8bNw4CGRPaqgl3bv/lhz7bsGPh4/xSaMTbo2vkQ=
483483
github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
484-
github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU=
485-
github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
484+
github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
485+
github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
486486
github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ=
487487
github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM=
488488
github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
@@ -631,8 +631,8 @@ github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zt
631631
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
632632
github.com/klauspost/cpuid v1.2.1 h1:vJi+O/nMdFt0vqm8NZBI6wzALWdA2X+egi0ogNyrC/w=
633633
github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
634-
github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
635-
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
634+
github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg=
635+
github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
636636
github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU=
637637
github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
638638
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
@@ -1006,6 +1006,10 @@ github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+
10061006
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
10071007
github.com/vbatts/tar-split v0.12.1 h1:CqKoORW7BUWBe7UL/iqTVvkTBOF8UvOMKOIZykxnnbo=
10081008
github.com/vbatts/tar-split v0.12.1/go.mod h1:eF6B6i6ftWQcDqEn3/iGFRFRo8cBIMSJVOpnNdfTMFA=
1009+
github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8=
1010+
github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok=
1011+
github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g=
1012+
github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
10091013
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
10101014
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
10111015
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=

icm-contracts/tests/network/local_avalanche_network.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,22 +92,22 @@ func newTmpnetNetwork(
9292
) *tmpnet.Network {
9393
var l1s []*tmpnet.Subnet
9494

95-
bootstrapNodes := subnetEvmTestUtils.NewTmpnetNodes(numPrimaryNetworkValidators)
95+
bootstrapNodes := tmpnet.NewNodesOrPanic(numPrimaryNetworkValidators)
9696
for i, l1Spec := range l1Specs {
9797
// Create a single bootstrap node. This will be removed from the L1 validator set after it is converted,
9898
// but will remain a primary network validator
9999
initialL1Bootstrapper := bootstrapNodes[i] // One bootstrap node per L1
100100

101101
l1 := subnetEvmTestUtils.NewTmpnetSubnet(
102102
l1Spec.Name,
103-
utils.InstantiateGenesisTemplate(
103+
[]byte(utils.InstantiateGenesisTemplate(
104104
warpGenesisTemplateFile,
105105
l1Spec.EVMChainID,
106106
l1Spec.TeleporterContractAddress,
107107
l1Spec.TeleporterDeployedBytecode,
108108
l1Spec.TeleporterDeployerAddress,
109109
l1Spec.RequirePrimaryNetworkSigners,
110-
),
110+
)),
111111
maps.Clone(utils.DefaultChainConfig()),
112112
initialL1Bootstrapper,
113113
)
@@ -165,10 +165,10 @@ func NewLocalAvalancheNetwork(
165165
Expect(numPrimaryNetworkValidators).Should(BeNumerically(">=", len(l1Specs)))
166166

167167
// Create extra nodes to be used to add more validators later
168-
extraNodes := subnetEvmTestUtils.NewTmpnetNodes(extraNodeCount)
168+
extraNodes := tmpnet.NewNodesOrPanic(extraNodeCount)
169169

170170
for _, l1Spec := range l1Specs {
171-
initialVdrNodes := subnetEvmTestUtils.NewTmpnetNodes(l1Spec.NodeCount)
171+
initialVdrNodes := tmpnet.NewNodesOrPanic(l1Spec.NodeCount)
172172
extraNodes = append(extraNodes, initialVdrNodes...)
173173
}
174174

@@ -630,10 +630,13 @@ func (n *LocalAvalancheNetwork) GetFundedAccountInfo() (common.Address, *ecdsa.P
630630
}
631631

632632
func (n *LocalAvalancheNetwork) TearDownNetwork() {
633+
ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
634+
defer cancel()
635+
633636
log.Info("Tearing down network")
634637
Expect(n).ShouldNot(BeNil())
635638
Expect(n.Network).ShouldNot(BeNil())
636-
Expect(n.Network.Stop(context.Background())).Should(BeNil())
639+
Expect(n.Network.Stop(ctx)).Should(BeNil())
637640
}
638641

639642
func (n *LocalAvalancheNetwork) SetChainConfigs(chainConfigs map[string]string) {

icm-contracts/tests/rpc-client/rpc_client.go

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

icm-contracts/tests/test-info/test_info.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,17 @@ import (
66
"math/big"
77
"strings"
88

9-
subnetevmRPC "github.com/ava-labs/avalanchego/graft/subnet-evm/rpc"
109
"github.com/ava-labs/avalanchego/ids"
11-
rpcclient "github.com/ava-labs/icm-services/icm-contracts/tests/rpc-client"
1210
"github.com/ava-labs/libevm/ethclient"
13-
libevmRPC "github.com/ava-labs/libevm/rpc"
11+
"github.com/ava-labs/libevm/rpc"
1412
. "github.com/onsi/gomega"
1513
)
1614

1715
// NetworkTestInfo Abstraction over the info for Avalanche L1s and Ethereum networks.
1816
type NetworkTestInfo interface {
1917
GetEVMTestInfo() *EVMTestInfo
2018
ChainID() ids.ID
21-
RPCClient(ctx context.Context) rpcclient.RpcClient
19+
RPCClient(ctx context.Context) *rpc.Client
2220
}
2321

2422
type EVMTestInfo struct {
@@ -44,8 +42,8 @@ func (l1 *L1TestInfo) ChainID() ids.ID {
4442
return l1.BlockchainID
4543
}
4644

47-
func (l1 *L1TestInfo) RPCClient(ctx context.Context) rpcclient.RpcClient {
48-
rpcClient, err := subnetevmRPC.DialContext(
45+
func (l1 *L1TestInfo) RPCClient(ctx context.Context) *rpc.Client {
46+
rpcClient, err := rpc.DialContext(
4947
ctx,
5048
fmt.Sprintf(
5149
"http://%s/ext/bc/%s/rpc",
@@ -54,7 +52,7 @@ func (l1 *L1TestInfo) RPCClient(ctx context.Context) rpcclient.RpcClient {
5452
),
5553
)
5654
Expect(err).Should(BeNil())
57-
return &rpcclient.SubnetEvmRpcClient{Client: rpcClient}
55+
return rpcClient
5856
}
5957

6058
// EthereumTestInfo Tracks information about a test Ethereum network used for executing tests against.
@@ -73,8 +71,8 @@ func (e *EthereumTestInfo) ChainID() ids.ID {
7371
return blockchainID
7472
}
7573

76-
func (e *EthereumTestInfo) RPCClient(ctx context.Context) rpcclient.RpcClient {
77-
rpcClient, err := libevmRPC.DialContext(ctx, e.BaseURL)
74+
func (e *EthereumTestInfo) RPCClient(ctx context.Context) *rpc.Client {
75+
rpcClient, err := rpc.DialContext(ctx, e.BaseURL)
7876
Expect(err).Should(BeNil())
79-
return &rpcclient.LibevmRPC{Client: rpcClient}
77+
return rpcClient
8078
}

icm-contracts/tests/utils/chain.go

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -516,9 +516,8 @@ func GetChainConfigWithOffChainMessages(offChainMessages []avalancheWarp.Unsigne
516516
return string(offChainMessageJson)
517517
}
518518

519-
// read in the template file, make the substitutions declared at the beginning
520-
// of the function, write out the instantiation to a temp file, and then return
521-
// the path to that temp file.
519+
// InstantiateGenesisTemplate reads the template file, performs variable
520+
// substitutions, and returns the resulting genesis JSON content.
522521
func InstantiateGenesisTemplate(
523522
templateFileName string,
524523
chainID uint64,
@@ -566,19 +565,12 @@ func InstantiateGenesisTemplate(
566565
templateFileBytes, err := os.ReadFile(templateFileName)
567566
Expect(err).Should(BeNil())
568567

569-
l1GenesisFile, err := os.CreateTemp(os.TempDir(), "")
570-
Expect(err).Should(BeNil())
571-
572-
defer l1GenesisFile.Close()
573-
574-
var replaced string = string(templateFileBytes[:])
568+
replaced := string(templateFileBytes)
575569
for _, s := range substitutions {
576570
replaced = strings.ReplaceAll(replaced, s.Target, s.Value)
577571
}
578572

579-
l1GenesisFile.WriteString(replaced)
580-
581-
return l1GenesisFile.Name()
573+
return replaced
582574
}
583575

584576
// Native minter utils

icm-contracts/tests/utils/signature_aggregator.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (s *SignatureAggregator) CreateSignedMessage(
127127
) (*avalancheWarp.Message, error) {
128128
var err error
129129
var signedMessage *avalancheWarp.Message
130-
for i := 0; i < 3; i++ {
130+
for i := 0; i < 6; i++ {
131131
signedMessage, err = s.createSignedMessage(
132132
unsignedMessage,
133133
justification,
@@ -138,7 +138,7 @@ func (s *SignatureAggregator) CreateSignedMessage(
138138
if err == nil {
139139
return signedMessage, nil
140140
}
141-
time.Sleep(time.Second * 1)
141+
time.Sleep(10 * time.Second)
142142
}
143143
return nil, err
144144
}
@@ -165,7 +165,7 @@ func (s *SignatureAggregator) createSignedMessage(
165165
}
166166

167167
client := &http.Client{
168-
Timeout: 20 * time.Second,
168+
Timeout: 40 * time.Second,
169169
}
170170
requestURL := fmt.Sprintf("http://localhost:%d%s", DEFAULT_API_PORT, SIG_AGG_API_PATH)
171171
reqBody := AggregateSignaturesRequest{

icm-contracts/tests/utils/validator_manager.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,9 @@ func InitiateAndCompleteEndPoSValidation(
12101210

12111211
var receipt *types.Receipt
12121212
if includeUptime {
1213+
// Without this sleep we're signing an uptime proof is ~2 seconds of uptime.
1214+
// This shouldn't cause an issue, but it is for unclear reasons.
1215+
time.Sleep(10 * time.Second)
12131216
uptime := uint64(time.Since(validatorStartTime).Seconds())
12141217
receipt = ForceInitiateEndPoSValidationWithUptime(
12151218
ctx,

scripts/e2e_test.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,9 @@ source "$REPO_PATH"/scripts/versions.sh
106106

107107
BASEDIR=${BASEDIR:-"$HOME/.teleporter-deps"}
108108

109-
# Install the avalanchego and subnet-evm binaries
109+
# Install the avalanchego binary and subnet-evm plugin
110110
rm -rf $BASEDIR/avalanchego
111111
BASEDIR=$BASEDIR AVALANCHEGO_BUILD_PATH=$BASEDIR/avalanchego "${REPO_PATH}/scripts/install_avalanchego_release.sh"
112-
BASEDIR=$BASEDIR "${REPO_PATH}/scripts/install_subnetevm_release.sh"
113-
114-
cp ${BASEDIR}/subnet-evm/subnet-evm ${BASEDIR}/avalanchego/plugins/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy
115-
echo "Copied ${BASEDIR}/subnet-evm/subnet-evm binary to ${BASEDIR}/avalanchego/plugins/"
116112

117113
export AVALANCHEGO_BUILD_PATH=$BASEDIR/avalanchego
118114
export AVALANCHEGO_PATH=$AVALANCHEGO_BUILD_PATH/avalanchego

0 commit comments

Comments
 (0)