Skip to content

Commit

Permalink
Added compatibility tracking (#334)
Browse files Browse the repository at this point in the history
* Added compatibility tracking

* Added version moved test

* Cleaned up test

* Bump avalanchego version and nits

* go mod tidy cmd/simulator

* Mark trie clean jouranl test as flaky

* Bump avalanchego to v1.9.2

* Bump anr version in scripts/versions.sh

* Bump anr version in go.mod

* go mod tidy cmd/simulator

Co-authored-by: Aaron Buchwald <aaron.buchwald56@gmail.com>
  • Loading branch information
Connor Daly and aaronbuchwald authored Nov 4, 2022
1 parent 7f268e4 commit 55518f7
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 25 deletions.
2 changes: 1 addition & 1 deletion cmd/simulator/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ replace github.com/ava-labs/subnet-evm => ../..

require (
github.com/VictoriaMetrics/fastcache v1.10.0 // indirect
github.com/ava-labs/avalanchego v1.9.1 // indirect
github.com/ava-labs/avalanchego v1.9.2 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions cmd/simulator/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ github.com/VictoriaMetrics/fastcache v1.10.0 h1:5hDJnLsKLpnUEToub7ETuRu8RCkb40wo
github.com/VictoriaMetrics/fastcache v1.10.0/go.mod h1:tjiYeEfYXCqacuvYw/7UoDIeJaNxq6132xHICNP77w8=
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8=
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
github.com/ava-labs/avalanchego v1.9.1 h1:TJLvoA5kHAwsaBG80x57hCMnwJYWFDnHOoI/fw+Off8=
github.com/ava-labs/avalanchego v1.9.1/go.mod h1:EwV2l8rFtFObM9jKwAWX2uhDkUw9UEGkUlXo3ICG1yk=
github.com/ava-labs/avalanchego v1.9.2 h1:cMjFqnnePfx+Hq94j89B3EcWr3r5eORt/EnmZbBoYdc=
github.com/ava-labs/avalanchego v1.9.2/go.mod h1:ezcsL6vzAu1eL3Ws8QNobEAqadXFCheEogk1d2+bir4=
github.com/btcsuite/btcd v0.23.1 h1:IB8cVQcC2X5mHbnfirLG5IZnkWYNTPlLZVrxUYSotbE=
github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPxiMSCF5k=
github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU=
Expand Down
22 changes: 22 additions & 0 deletions compatibility.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"rpcChainVMProtocolVersion": {
"v0.4.3": 19,
"v0.4.2": 18,
"v0.4.1": 18,
"v0.4.0": 17,
"v0.3.0": 16,
"v0.2.9": 15,
"v0.2.8": 15,
"v0.2.7": 15,
"v0.2.6": 15,
"v0.2.5": 15,
"v0.2.4": 15,
"v0.2.3": 15,
"v0.2.2": 14,
"v0.2.1": 12,
"v0.2.0": 11,
"v0.1.2": 10,
"v0.1.1": 10,
"v0.1.0": 9
}
}
1 change: 1 addition & 0 deletions core/blockchain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ func awaitWatcherEventsSubside(watcher *fsnotify.Watcher, subsideTimeout time.Du
}

func TestTrieCleanJournal(t *testing.T) {
t.Skip("FLAKY")
require := require.New(t)
assert := assert.New(t)

Expand Down
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ go 1.18

require (
github.com/VictoriaMetrics/fastcache v1.10.0
github.com/ava-labs/avalanche-network-runner v1.2.4-0.20221028215503-bb4b661ac88e
github.com/ava-labs/avalanchego v1.9.1
github.com/ava-labs/avalanche-network-runner v1.3.1-0.20221104223238-35be10cd3867
github.com/ava-labs/avalanchego v1.9.2
github.com/cespare/cp v0.1.0
github.com/creack/pty v1.1.18
github.com/davecgh/go-spew v1.1.1
Expand All @@ -26,7 +26,7 @@ require (
github.com/mattn/go-isatty v0.0.14
github.com/olekukonko/tablewriter v0.0.5
github.com/onsi/ginkgo/v2 v2.4.0
github.com/onsi/gomega v1.23.0
github.com/onsi/gomega v1.24.0
github.com/prometheus/client_golang v1.13.0
github.com/prometheus/client_model v0.2.0
github.com/rjeczalik/notify v0.9.2
Expand Down Expand Up @@ -55,8 +55,8 @@ require (
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/aead/siphash v1.0.1 // indirect
github.com/ava-labs/avalanche-ledger-go v0.0.10 // indirect
github.com/ava-labs/coreth v0.11.1-rc.7 // indirect
github.com/ava-labs/avalanche-ledger-go v0.0.11 // indirect
github.com/ava-labs/coreth v0.11.2-rc.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/btcsuite/btcd v0.23.1 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect
Expand Down Expand Up @@ -135,7 +135,7 @@ require (
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 // indirect
github.com/zondax/ledger-go v0.12.3-0.20221005223406-dbd460b7296d // indirect
github.com/zondax/ledger-go v0.13.0 // indirect
go.opentelemetry.io/otel v1.11.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.0 // indirect
Expand Down
24 changes: 12 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0=
github.com/ava-labs/avalanche-ledger-go v0.0.10 h1:qEiTJvjuEmTYhYczk/CYvXoQuLlgd7xYyC2OcXOhAlw=
github.com/ava-labs/avalanche-ledger-go v0.0.10/go.mod h1:60Ftil/0sHi8IwjvBFyrvRsPVAue8zAkIMGuvXXMwVM=
github.com/ava-labs/avalanche-network-runner v1.2.4-0.20221028215503-bb4b661ac88e h1:fdRNC9ykEFg/zemCxAX1YJJvRk+agCLXq+Xml/6cYCs=
github.com/ava-labs/avalanche-network-runner v1.2.4-0.20221028215503-bb4b661ac88e/go.mod h1:TbbYc8E0dZZOEF4AXW8Fa595qlhNjuEi4Y0llwzWsic=
github.com/ava-labs/avalanchego v1.9.1 h1:TJLvoA5kHAwsaBG80x57hCMnwJYWFDnHOoI/fw+Off8=
github.com/ava-labs/avalanchego v1.9.1/go.mod h1:EwV2l8rFtFObM9jKwAWX2uhDkUw9UEGkUlXo3ICG1yk=
github.com/ava-labs/coreth v0.11.1-rc.7 h1:cENs+9K/aLyRbvB7fa6JDOvKert3DAdsBfCNQBU5U9Y=
github.com/ava-labs/coreth v0.11.1-rc.7/go.mod h1:VBJEpNMEGphnEZ6KjsX43g2fq5v+pupk8xFQSdqXwyM=
github.com/ava-labs/avalanche-ledger-go v0.0.11 h1:AZ2cKEZ1noMZPCLvjyl/33LBu2u/ESgolr661epH0Ak=
github.com/ava-labs/avalanche-ledger-go v0.0.11/go.mod h1:ZU0gQAFDbyKV2WiBxsvvuigJbKgxVjWn509ajTYozT0=
github.com/ava-labs/avalanche-network-runner v1.3.1-0.20221104223238-35be10cd3867 h1:a2xT2Q4zYpeMaJGCuUw6D7h4WUiX1vTMRPUuPwvAQP0=
github.com/ava-labs/avalanche-network-runner v1.3.1-0.20221104223238-35be10cd3867/go.mod h1:8vwD/JzteWwaoms1lipmM0q4jDSkury+Z4GXQvrcb/8=
github.com/ava-labs/avalanchego v1.9.2 h1:cMjFqnnePfx+Hq94j89B3EcWr3r5eORt/EnmZbBoYdc=
github.com/ava-labs/avalanchego v1.9.2/go.mod h1:ezcsL6vzAu1eL3Ws8QNobEAqadXFCheEogk1d2+bir4=
github.com/ava-labs/coreth v0.11.2-rc.0 h1:aK6Hd9I9t3FTqgofgPK5ZYFp8wfHzrUT/Aj4HtBRbTA=
github.com/ava-labs/coreth v0.11.2-rc.0/go.mod h1:gLc+jBTJXfoSyhBP6x6BU7/Tq1K4ptj5/y6T7qgmyyA=
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
Expand Down Expand Up @@ -474,8 +474,8 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro=
github.com/onsi/gomega v1.23.0 h1:/oxKu9c2HVap+F3PfKort2Hw5DEU+HGlW8n+tguWsys=
github.com/onsi/gomega v1.23.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg=
github.com/onsi/gomega v1.24.0 h1:+0glovB9Jd6z3VR+ScSwQqXVTIfJcGA9UBM8yzQxhqg=
github.com/onsi/gomega v1.24.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg=
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU=
Expand Down Expand Up @@ -620,8 +620,8 @@ github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQ
github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 h1:O9XLFXGkVswDFmH9LaYpqu+r/AAFWqr0DL6V00KEVFg=
github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
github.com/zondax/ledger-go v0.12.3-0.20221005223406-dbd460b7296d h1:0x2GQWgIP6+XAitVxzflRLcGOhnuEbhaBotwTbmpfMk=
github.com/zondax/ledger-go v0.12.3-0.20221005223406-dbd460b7296d/go.mod h1:KatxXrVDzgWwbssUWsF5+cOJHXPvzQ09YSlzGNuhOEo=
github.com/zondax/ledger-go v0.13.0 h1:3brWtvAlfKqpe27JSUC/t1f0CvVVOX8zR/f/3+ShPBY=
github.com/zondax/ledger-go v0.13.0/go.mod h1:KatxXrVDzgWwbssUWsF5+cOJHXPvzQ09YSlzGNuhOEo=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
Expand Down
2 changes: 1 addition & 1 deletion plugin/evm/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var (
// GitCommit is set by the build script
GitCommit string
// Version is the version of Subnet EVM
Version string
Version string = "v0.4.3"
)

func init() {
Expand Down
29 changes: 29 additions & 0 deletions plugin/evm/version_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package evm

import (
"encoding/json"
"os"
"testing"

"github.com/ava-labs/avalanchego/version"
"github.com/stretchr/testify/assert"
)

type rpcChainCompatibility struct {
RPCChainVMProtocolVersion map[string]uint `json:"rpcChainVMProtocolVersion"`
}

const compatibilityFile = "../../compatibility.json"

func TestCompatibility(t *testing.T) {
compat, err := os.ReadFile(compatibilityFile)
assert.NoError(t, err)

var parsedCompat rpcChainCompatibility
err = json.Unmarshal(compat, &parsedCompat)
assert.NoError(t, err)

rpcChainVMVersion, valueInJSON := parsedCompat.RPCChainVMProtocolVersion[Version]
assert.True(t, valueInJSON)
assert.Equal(t, rpcChainVMVersion, version.RPCChainVMProtocol)
}
6 changes: 3 additions & 3 deletions scripts/versions.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash

# Set up the versions to be used
subnet_evm_version=${SUBNET_EVM_VERSION:-'v0.4.2'}
subnet_evm_version=${SUBNET_EVM_VERSION:-'v0.4.3'}
# Don't export them as they're used in the context of other calls
avalanche_version=${AVALANCHE_VERSION:-'v1.9.1'}
network_runner_version=${NETWORK_RUNNER_VERSION:-'bb4b661ac88ebe50ab719424eecc1a55e01e7019'}
avalanche_version=${AVALANCHE_VERSION:-'v1.9.2'}
network_runner_version=${NETWORK_RUNNER_VERSION:-'35be10cd3867a94fbe960a1c14a455f179de60d9'}
ginkgo_version=${GINKGO_VERSION:-'v2.2.0'}

0 comments on commit 55518f7

Please sign in to comment.