From 8fa6fe2f8f158df13cc1fe1a02835c77aab836da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Nov 2022 04:43:42 +0000 Subject: [PATCH 01/26] Bump github.com/onsi/ginkgo/v2 from 2.5.0 to 2.5.1 Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.5.0 to 2.5.1. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.5.0...v2.5.1) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 71b454c3..a132d143 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/ava-labs/coreth v0.11.2 github.com/ethereum/go-ethereum v1.10.26 github.com/grpc-ecosystem/grpc-gateway/v2 v2.13.0 - github.com/onsi/ginkgo/v2 v2.5.0 + github.com/onsi/ginkgo/v2 v2.5.1 github.com/onsi/gomega v1.24.1 github.com/otiai10/copy v1.9.0 github.com/prometheus/client_golang v1.14.0 diff --git a/go.sum b/go.sum index bf81bbbb..9a361e73 100644 --- a/go.sum +++ b/go.sum @@ -373,8 +373,8 @@ github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vv github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.5.0 h1:TRtrvv2vdQqzkwrQ1ke6vtXf7IK34RBUJafIy1wMwls= -github.com/onsi/ginkgo/v2 v2.5.0/go.mod h1:Luc4sArBICYCS8THh8v3i3i5CuSZO+RaQRaJoeNwomw= +github.com/onsi/ginkgo/v2 v2.5.1 h1:auzK7OI497k6x4OvWq+TKAcpcSAlod0doAH72oIN0Jw= +github.com/onsi/ginkgo/v2 v2.5.1/go.mod h1:63DOGlLAH8+REH8jUGdL3YpCpu7JODesutUjdENfUAc= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= From ac59f9445252abea3155bfac5b483c9fdd3e9f3f Mon Sep 17 00:00:00 2001 From: Felipe Madero Date: Wed, 23 Nov 2022 19:58:59 -0300 Subject: [PATCH 02/26] add bls key file support --- README.md | 2 ++ local/helpers.go | 6 ++++++ local/network.go | 41 ++++++++++++++++++++++++++++------------- network/node/node.go | 2 ++ 4 files changed, 38 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 9dc143e9..f958399f 100644 --- a/README.md +++ b/README.md @@ -813,6 +813,8 @@ type Config struct { StakingKey string `json:"stakingKey"` // Must not be nil. StakingCert string `json:"stakingCert"` + // Must not be nil. + StakingSigningKey string `json:"stakingSigningKey"` // May be nil. ConfigFile string `json:"configFile"` // May be nil. diff --git a/local/helpers.go b/local/helpers.go index cc5c7378..5f49b110 100644 --- a/local/helpers.go +++ b/local/helpers.go @@ -33,6 +33,12 @@ func writeFiles(genesis []byte, nodeRootDir string, nodeConfig *node.Config) ([] pathKey: config.StakingCertPathKey, contents: []byte(nodeConfig.StakingCert), }, + { + flagValue: filepath.Join(nodeRootDir, stakingSigningKeyFileName), + path: filepath.Join(nodeRootDir, stakingSigningKeyFileName), + pathKey: config.StakingSignerKeyPathKey, + contents: []byte(nodeConfig.StakingSigningKey), + }, { flagValue: filepath.Join(nodeRootDir, genesisFileName), path: filepath.Join(nodeRootDir, genesisFileName), diff --git a/local/network.go b/local/network.go index b892a9da..5d51c732 100644 --- a/local/network.go +++ b/local/network.go @@ -23,6 +23,7 @@ import ( "github.com/ava-labs/avalanchego/network/peer" "github.com/ava-labs/avalanchego/staking" "github.com/ava-labs/avalanchego/utils/beacon" + "github.com/ava-labs/avalanchego/utils/crypto/bls" "github.com/ava-labs/avalanchego/utils/ips" "github.com/ava-labs/avalanchego/utils/logging" "github.com/ava-labs/avalanchego/utils/wrappers" @@ -31,19 +32,20 @@ import ( ) const ( - defaultNodeNamePrefix = "node" - configFileName = "config.json" - upgradeConfigFileName = "upgrade.json" - stakingKeyFileName = "staking.key" - stakingCertFileName = "staking.crt" - genesisFileName = "genesis.json" - stopTimeout = 30 * time.Second - healthCheckFreq = 3 * time.Second - DefaultNumNodes = 5 - snapshotPrefix = "anr-snapshot-" - rootDirPrefix = "network-runner-root-data" - defaultDbSubdir = "db" - defaultLogsSubdir = "logs" + defaultNodeNamePrefix = "node" + configFileName = "config.json" + upgradeConfigFileName = "upgrade.json" + stakingKeyFileName = "staking.key" + stakingCertFileName = "staking.crt" + stakingSigningKeyFileName = "signer.key" + genesisFileName = "genesis.json" + stopTimeout = 30 * time.Second + healthCheckFreq = 3 * time.Second + DefaultNumNodes = 5 + snapshotPrefix = "anr-snapshot-" + rootDirPrefix = "network-runner-root-data" + defaultDbSubdir = "db" + defaultLogsSubdir = "logs" // difference between unlock schedule locktime and startime in original genesis genesisLocktimeStartimeDelta = 2836800 ) @@ -211,6 +213,11 @@ func init() { panic(err) } defaultNetworkConfig.NodeConfigs[i].StakingCert = string(stakingCert) + stakingSigningKey, err := fs.ReadFile(configsDir, fmt.Sprintf("node%d/signer.key", i+1)) + if err != nil { + panic(err) + } + defaultNetworkConfig.NodeConfigs[i].StakingSigningKey = string(stakingSigningKey) defaultNetworkConfig.NodeConfigs[i].IsBeacon = true } @@ -517,6 +524,14 @@ func (ln *localNetwork) addNode(nodeConfig node.Config) (node.Node, error) { nodeConfig.StakingCert = string(stakingCert) nodeConfig.StakingKey = string(stakingKey) } + if nodeConfig.StakingSigningKey == "" { + key, err := bls.NewSecretKey() + if err != nil { + return nil, fmt.Errorf("couldn't generate new signing key: %w", err) + } + keyBytes := bls.SecretKeyToBytes(key) + nodeConfig.StakingSigningKey = string(keyBytes) + } if err := ln.setNodeName(&nodeConfig); err != nil { return nil, err diff --git a/network/node/node.go b/network/node/node.go index a166cfb7..90ab6c2d 100644 --- a/network/node/node.go +++ b/network/node/node.go @@ -68,6 +68,8 @@ type Config struct { StakingKey string `json:"stakingKey"` // Must not be nil. StakingCert string `json:"stakingCert"` + // Must not be nil. + StakingSigningKey string `json:"stakingSigningKey"` // May be nil. ConfigFile string `json:"configFile"` // May be nil. From 1fa3344218e2e99d25b6159d1f2a19f544f543c7 Mon Sep 17 00:00:00 2001 From: Felipe Madero Date: Wed, 23 Nov 2022 20:06:00 -0300 Subject: [PATCH 03/26] add key files --- local/default/node1/signer.key | Bin 0 -> 32 bytes local/default/node2/signer.key | 1 + local/default/node3/signer.key | 1 + local/default/node4/signer.key | 1 + local/default/node5/signer.key | 1 + 5 files changed, 4 insertions(+) create mode 100644 local/default/node1/signer.key create mode 100644 local/default/node2/signer.key create mode 100644 local/default/node3/signer.key create mode 100644 local/default/node4/signer.key create mode 100644 local/default/node5/signer.key diff --git a/local/default/node1/signer.key b/local/default/node1/signer.key new file mode 100644 index 0000000000000000000000000000000000000000..7e27c36cad11ab5ca7e956290b5284ec95cc26f7 GIT binary patch literal 32 ocmY%Ve Date: Wed, 23 Nov 2022 20:12:13 -0300 Subject: [PATCH 04/26] fix unit tests --- local/network_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/local/network_test.go b/local/network_test.go index 7ff83d83..ca978c0d 100644 --- a/local/network_test.go +++ b/local/network_test.go @@ -1137,6 +1137,8 @@ func TestWriteFiles(t *testing.T) { stakingKeyFlag := fmt.Sprintf("--%s=%v", config.StakingTLSKeyPathKey, stakingKeyPath) stakingCertPath := filepath.Join(tmpDir, stakingCertFileName) stakingCertFlag := fmt.Sprintf("--%s=%v", config.StakingCertPathKey, stakingCertPath) + stakingSigningKeyPath := filepath.Join(tmpDir, stakingSigningKeyFileName) + stakingSigningKeyFlag := fmt.Sprintf("--%s=%v", config.StakingSignerKeyPathKey, stakingSigningKeyPath) genesisPath := filepath.Join(tmpDir, genesisFileName) genesisFlag := fmt.Sprintf("--%s=%v", config.GenesisConfigFileKey, genesisPath) configFilePath := filepath.Join(tmpDir, configFileName) @@ -1167,6 +1169,7 @@ func TestWriteFiles(t *testing.T) { expectedFlags: []string{ stakingKeyFlag, stakingCertFlag, + stakingSigningKeyFlag, genesisFlag, chainConfigDirFlag, subnetConfigDirFlag, @@ -1184,6 +1187,7 @@ func TestWriteFiles(t *testing.T) { expectedFlags: []string{ stakingKeyFlag, stakingCertFlag, + stakingSigningKeyFlag, genesisFlag, configFileFlag, chainConfigDirFlag, @@ -1203,6 +1207,7 @@ func TestWriteFiles(t *testing.T) { expectedFlags: []string{ stakingKeyFlag, stakingCertFlag, + stakingSigningKeyFlag, genesisFlag, configFileFlag, chainConfigDirFlag, From 1213f88478e2579509c9b4a1d70a6e2f2501dd8f Mon Sep 17 00:00:00 2001 From: Felipe Madero Date: Wed, 23 Nov 2022 21:56:48 -0300 Subject: [PATCH 05/26] fix encoding issue --- local/helpers.go | 7 ++++++- local/network.go | 7 +++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/local/helpers.go b/local/helpers.go index 5f49b110..32110ca7 100644 --- a/local/helpers.go +++ b/local/helpers.go @@ -1,6 +1,7 @@ package local import ( + "encoding/base64" "fmt" "os" "path/filepath" @@ -20,6 +21,10 @@ func writeFiles(genesis []byte, nodeRootDir string, nodeConfig *node.Config) ([] path string contents []byte } + decodedStakingSigningKey, err := base64.StdEncoding.DecodeString(nodeConfig.StakingSigningKey) + if err != nil { + return nil, err + } files := []file{ { flagValue: filepath.Join(nodeRootDir, stakingKeyFileName), @@ -37,7 +42,7 @@ func writeFiles(genesis []byte, nodeRootDir string, nodeConfig *node.Config) ([] flagValue: filepath.Join(nodeRootDir, stakingSigningKeyFileName), path: filepath.Join(nodeRootDir, stakingSigningKeyFileName), pathKey: config.StakingSignerKeyPathKey, - contents: []byte(nodeConfig.StakingSigningKey), + contents: decodedStakingSigningKey, }, { flagValue: filepath.Join(nodeRootDir, genesisFileName), diff --git a/local/network.go b/local/network.go index 5d51c732..0f5a03b7 100644 --- a/local/network.go +++ b/local/network.go @@ -3,6 +3,7 @@ package local import ( "context" "embed" + "encoding/base64" "encoding/json" "errors" "fmt" @@ -217,7 +218,8 @@ func init() { if err != nil { panic(err) } - defaultNetworkConfig.NodeConfigs[i].StakingSigningKey = string(stakingSigningKey) + encodedStakingSigningKey := base64.StdEncoding.EncodeToString(stakingSigningKey) + defaultNetworkConfig.NodeConfigs[i].StakingSigningKey = encodedStakingSigningKey defaultNetworkConfig.NodeConfigs[i].IsBeacon = true } @@ -530,7 +532,8 @@ func (ln *localNetwork) addNode(nodeConfig node.Config) (node.Node, error) { return nil, fmt.Errorf("couldn't generate new signing key: %w", err) } keyBytes := bls.SecretKeyToBytes(key) - nodeConfig.StakingSigningKey = string(keyBytes) + encodedKey := base64.StdEncoding.EncodeToString(keyBytes) + nodeConfig.StakingSigningKey = encodedKey } if err := ln.setNodeName(&nodeConfig); err != nil { From 307691bbfcf0eb450a515357b9ec5a06bf78ab09 Mon Sep 17 00:00:00 2001 From: fm Date: Fri, 25 Nov 2022 17:47:00 -0300 Subject: [PATCH 06/26] simplify README sections for install and build --- README.md | 78 ++++++++++--------------------------------------------- 1 file changed, 13 insertions(+), 65 deletions(-) diff --git a/README.md b/README.md index 9dc143e9..f741d49d 100644 --- a/README.md +++ b/README.md @@ -11,74 +11,36 @@ This tool may be especially useful for development and testing. ## Installation -### Using install script +This instructions will install the binary into `$GOPATH/bin`. Be sure that `$GOPATH` is defined +in your environment, and that `$GOPATH/bin` is in your `$PATH`. -This is the preferred way. Does not require golang to be installed on the system. - -To download a binary for the latest release, run: - -```sh -curl -sSfL https://raw.githubusercontent.com/ava-labs/avalanche-network-runner/main/scripts/install.sh | sh -s -``` - -The binary will be installed inside the `./bin` directory (relative to where the install command was run). - -_Downloading binaries from the Github UI will cause permission errors on Mac._ - -To add the binary to your path, run - -```sh -cd bin -export PATH=$PWD:$PATH -``` - -To add it to your path permanently, add an export command to your shell initialization script (ex: .bashrc). - -#### Installing in Custom Location - -To download the binary into a specific directory, run: - -```sh -curl -sSfL https://raw.githubusercontent.com/ava-labs/avalanche-network-runner/main/scripts/install.sh | sh -s -- -b -``` - -### Install using golang - -Requires golang to be installed on the system ([https://go.dev/doc/install](https://go.dev/doc/install)). +To install the latest binary locally, run: ```sh -go install github.com/ava-labs/avalanche-network-runner@latest +curl -sSfL https://raw.githubusercontent.com/ava-labs/avalanche-network-runner/main/scripts/install.sh | sh -s -- -b $GOPATH/bin ``` -After that, the `avalanche-network-runner` binary should be present under the `$HOME/go/bin/` directory. Consider adding this directory to the `PATH` environment variable. - -### Install by release download +## Build from source code -Does not require golang to be installed on the system. +This is only needed by advanced users that want to modify or test Avalanche Network Runner is specific ways. -Download the desired distribution from [https://github.com/ava-labs/avalanche-network-runner/releases](https://github.com/ava-labs/avalanche-network-runner/releases). - -Uncompress and locate where is convenient. Consider adding the target bin directory to the `PATH` environment variable. - -### Install from source code and execute tests - -#### Download +### Download ```sh git clone https://github.com/ava-labs/avalanche-network-runner.git ``` -#### Install +### Build From inside the cloned directory: ```sh -go install +./scripts/build.sh ``` -After that, `avalanche-network-runner` binary should be present under `$HOME/go/bin/` directory. Consider adding this directory to the `PATH` environment variable. +After that, `avalanche-network-runner` binary should be present under the `./bin/` directory, inside the cloned one. The user may consider to add this directory to the `$PATH` environment variable. -#### Run Unit Tests +### Run Unit Tests Inside the directory cloned above: @@ -86,7 +48,7 @@ Inside the directory cloned above: go test ./... ``` -#### Run E2E tests +### Run E2E tests The E2E test checks `avalanche-network-runner` RPC communication and control. It starts a network against a fresh RPC server and executes a set of query and control operations on it. @@ -94,23 +56,9 @@ server and executes a set of query and control operations on it. To start it, execute inside the cloned directory: ```sh -./scripts/tests.e2e.sh AVALANCHEGO_VERSION1 AVALANCHEGO_VERSION2 +./scripts/tests.e2e.sh ``` -The E2E test checks whether a node can be restarted with a different binary version. Provide two -different versions as arguments. For Example: - -```sh -./scripts/tests.e2e.sh 1.7.9 1.7.10 -``` - -##### `RUN_E2E` environment variable - -To specify that the E2E test should be run with `go test`, set environment variable `RUN_E2E` to any non-empty value. - -This environment variable is correctly set when executing `./scripts/tests.e2e.sh`, but the user should consider -setting it if trying to execute E2E tests without using that script. - ## Using `avalanche-network-runner` You can import this repository as a library in your Go program, but we recommend running `avalanche-network-runner` as a binary. This creates an RPC server that you can send requests to in order to start a network, add nodes to the network, remove nodes from the network, restart nodes, etc.. You can make requests through the `avalanche-network-runner` command or by making API calls. Requests are "translated" into gRPC and sent to the server. From be09b82f924704afb8a4745c3baa21c4e2f1a5cf Mon Sep 17 00:00:00 2001 From: fm Date: Fri, 25 Nov 2022 17:50:12 -0300 Subject: [PATCH 07/26] nit --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f741d49d..09cfbe12 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ This tool may be especially useful for development and testing. ## Installation -This instructions will install the binary into `$GOPATH/bin`. Be sure that `$GOPATH` is defined -in your environment, and that `$GOPATH/bin` is in your `$PATH`. +The binary will be installed into `$GOPATH/bin`. Be sure that `$GOPATH` is defined in your environment, +and that `$GOPATH/bin` is in your `$PATH`. To install the latest binary locally, run: From ba1aef4c6418010aab39aefd35d5a4c1e75c36eb Mon Sep 17 00:00:00 2001 From: fm Date: Fri, 25 Nov 2022 17:51:07 -0300 Subject: [PATCH 08/26] nit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 09cfbe12..1fa3ac0a 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ curl -sSfL https://raw.githubusercontent.com/ava-labs/avalanche-network-runner/m ## Build from source code -This is only needed by advanced users that want to modify or test Avalanche Network Runner is specific ways. +This is only needed by advanced users who want to modify or test Avalanche Network Runner is specific ways. ### Download From 974dcadfde1148eedb7d81b49b6be7d258ac0eb7 Mon Sep 17 00:00:00 2001 From: fm Date: Fri, 25 Nov 2022 17:51:37 -0300 Subject: [PATCH 09/26] nit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1fa3ac0a..72e21fec 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ curl -sSfL https://raw.githubusercontent.com/ava-labs/avalanche-network-runner/m ## Build from source code -This is only needed by advanced users who want to modify or test Avalanche Network Runner is specific ways. +This is only needed by advanced users who want to modify or test Avalanche Network Runner in specific ways. ### Download From 157f7085e93dad7298bf74ebb1899cc0f0f62e93 Mon Sep 17 00:00:00 2001 From: Felipe Madero Date: Mon, 28 Nov 2022 15:53:12 -0300 Subject: [PATCH 10/26] address PR comments --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 72e21fec..e9fc5f8d 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,13 @@ To install the latest binary locally, run: curl -sSfL https://raw.githubusercontent.com/ava-labs/avalanche-network-runner/main/scripts/install.sh | sh -s -- -b $GOPATH/bin ``` +The user should permanently add `$GOPATH/bin` to the `$PATH` variable by adding this to the shell initialization +script (eg `$HOME/.bashrc` for `bash` shell): + +```sh +export PATH=$PATH:$GOPATH/bin +``` + ## Build from source code This is only needed by advanced users who want to modify or test Avalanche Network Runner in specific ways. @@ -38,7 +45,14 @@ From inside the cloned directory: ./scripts/build.sh ``` -After that, `avalanche-network-runner` binary should be present under the `./bin/` directory, inside the cloned one. The user may consider to add this directory to the `$PATH` environment variable. +After that, `avalanche-network-runner` binary should be present under the `./bin/` directory, inside the cloned one. + +The user may consider to permanently add this directory to the `$PATH` environment variable by including a line in the shell +initialization script (eg `%HOME/.bashrc` for `bash` shell), replacing `CLONED_DIRECTORY` with the real one: + +```sh +export PATH=$PATH:CLONED_DIRECTORY/bin +``` ### Run Unit Tests From 52bb7c4e352f1d46cffb38ecd2b92f045626d3b9 Mon Sep 17 00:00:00 2001 From: Felipe Madero Date: Mon, 28 Nov 2022 16:09:00 -0300 Subject: [PATCH 11/26] use ~/bin in doc --- README.md | 19 ++++++++----------- scripts/install.sh | 2 +- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e9fc5f8d..6f26a9d1 100644 --- a/README.md +++ b/README.md @@ -11,22 +11,21 @@ This tool may be especially useful for development and testing. ## Installation -The binary will be installed into `$GOPATH/bin`. Be sure that `$GOPATH` is defined in your environment, -and that `$GOPATH/bin` is in your `$PATH`. - To install the latest binary locally, run: ```sh -curl -sSfL https://raw.githubusercontent.com/ava-labs/avalanche-network-runner/main/scripts/install.sh | sh -s -- -b $GOPATH/bin +curl -sSfL https://raw.githubusercontent.com/ava-labs/avalanche-network-runner/main/scripts/install.sh | sh -s ``` -The user should permanently add `$GOPATH/bin` to the `$PATH` variable by adding this to the shell initialization -script (eg `$HOME/.bashrc` for `bash` shell): +Add `~/bin` to the `$PATH` environment variable so the shell can find the `avalanche-network-runner` command: ```sh -export PATH=$PATH:$GOPATH/bin +export PATH=$PATH:~/bin ``` +To have the shell always find the command, add that same `export` line to the +shell initialization script (`~/.bashrc` for the `bash` shell): + ## Build from source code This is only needed by advanced users who want to modify or test Avalanche Network Runner in specific ways. @@ -38,7 +37,6 @@ git clone https://github.com/ava-labs/avalanche-network-runner.git ``` ### Build - From inside the cloned directory: ```sh @@ -47,11 +45,10 @@ From inside the cloned directory: After that, `avalanche-network-runner` binary should be present under the `./bin/` directory, inside the cloned one. -The user may consider to permanently add this directory to the `$PATH` environment variable by including a line in the shell -initialization script (eg `%HOME/.bashrc` for `bash` shell), replacing `CLONED_DIRECTORY` with the real one: +Add `./bin` to the `$PATH` environment variable so the shell can find the `avalanche-network-runner` command: ```sh -export PATH=$PATH:CLONED_DIRECTORY/bin +export PATH=$PATH:$P:WD/bin ``` ### Run Unit Tests diff --git a/scripts/install.sh b/scripts/install.sh index 9af0a705..c3217a8f 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -29,7 +29,7 @@ parse_args() { #BINDIR is ./bin unless set be ENV # over-ridden by flag below - BINDIR=${BINDIR:-~/bin} + BINDIR=${BINDIR:-$DEFAULT_INSTALL} while getopts "b:dh?x" arg; do case "$arg" in b) BINDIR="$OPTARG" ;; From f817d310def8b3ab5467084e2f25c4e9e4b2ad5d Mon Sep 17 00:00:00 2001 From: Felipe Madero Date: Mon, 28 Nov 2022 16:11:29 -0300 Subject: [PATCH 12/26] nit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f26a9d1..7eb878c5 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ export PATH=$PATH:~/bin ``` To have the shell always find the command, add that same `export` line to the -shell initialization script (`~/.bashrc` for the `bash` shell): +shell initialization script (`~/.bashrc` for the `bash` shell). ## Build from source code From 424f53693a94e9ca74369abc4b05288c5dc3a117 Mon Sep 17 00:00:00 2001 From: Felipe Madero Date: Mon, 28 Nov 2022 16:12:17 -0300 Subject: [PATCH 13/26] nit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7eb878c5..7eecd055 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ After that, `avalanche-network-runner` binary should be present under the `./bin Add `./bin` to the `$PATH` environment variable so the shell can find the `avalanche-network-runner` command: ```sh -export PATH=$PATH:$P:WD/bin +export PATH=$PATH:$PWD/bin ``` ### Run Unit Tests From ea434c4491568e38e38905281b405d41f88918a8 Mon Sep 17 00:00:00 2001 From: Felipe Madero Date: Mon, 28 Nov 2022 16:14:15 -0300 Subject: [PATCH 14/26] nit --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7eecd055..22b764d8 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ To install the latest binary locally, run: curl -sSfL https://raw.githubusercontent.com/ava-labs/avalanche-network-runner/main/scripts/install.sh | sh -s ``` +After that, `avalanche-network-runner` binary should be present under the `~/bin` directory. + Add `~/bin` to the `$PATH` environment variable so the shell can find the `avalanche-network-runner` command: ```sh @@ -43,7 +45,7 @@ From inside the cloned directory: ./scripts/build.sh ``` -After that, `avalanche-network-runner` binary should be present under the `./bin/` directory, inside the cloned one. +After that, `avalanche-network-runner` binary should be present under the `./bin` directory, inside the cloned one. Add `./bin` to the `$PATH` environment variable so the shell can find the `avalanche-network-runner` command: From dff8a928df9b656b6dcf5b460481dc55559bfe5b Mon Sep 17 00:00:00 2001 From: Felipe Madero Date: Mon, 28 Nov 2022 16:15:38 -0300 Subject: [PATCH 15/26] last nit --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 22b764d8..d4b718c3 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,12 @@ This tool may be especially useful for development and testing. ## Installation -To install the latest binary locally, run: +To install the latest binary locally into `~/bin`, run: ```sh curl -sSfL https://raw.githubusercontent.com/ava-labs/avalanche-network-runner/main/scripts/install.sh | sh -s ``` -After that, `avalanche-network-runner` binary should be present under the `~/bin` directory. - Add `~/bin` to the `$PATH` environment variable so the shell can find the `avalanche-network-runner` command: ```sh @@ -39,6 +37,7 @@ git clone https://github.com/ava-labs/avalanche-network-runner.git ``` ### Build + From inside the cloned directory: ```sh From 064a7a81abc84badfa0c2c09e0ffa392caf50a62 Mon Sep 17 00:00:00 2001 From: Felipe Madero Date: Mon, 28 Nov 2022 16:24:20 -0300 Subject: [PATCH 16/26] mimic CLI doc --- README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d4b718c3..2ac0625a 100644 --- a/README.md +++ b/README.md @@ -11,20 +11,21 @@ This tool may be especially useful for development and testing. ## Installation -To install the latest binary locally into `~/bin`, run: +To download a binary for the latest release, run: ```sh curl -sSfL https://raw.githubusercontent.com/ava-labs/avalanche-network-runner/main/scripts/install.sh | sh -s ``` -Add `~/bin` to the `$PATH` environment variable so the shell can find the `avalanche-network-runner` command: +The binary will be installed inside the `~/bin` directory. + +To add the binary to your path, run ```sh -export PATH=$PATH:~/bin +export PATH=~/bin:$PATH ``` -To have the shell always find the command, add that same `export` line to the -shell initialization script (`~/.bashrc` for the `bash` shell). +To add it to your path permanently, add an export command to your shell initialization script (ex: .bashrc). ## Build from source code @@ -44,12 +45,12 @@ From inside the cloned directory: ./scripts/build.sh ``` -After that, `avalanche-network-runner` binary should be present under the `./bin` directory, inside the cloned one. +The binary will be installed inside the `./bin` directory. -Add `./bin` to the `$PATH` environment variable so the shell can find the `avalanche-network-runner` command: +To add the binary to your path, run ```sh -export PATH=$PATH:$PWD/bin +export PATH=$PWD/bin:$PATH ``` ### Run Unit Tests From 088a25a12357cae474a913f31499863773f87efe Mon Sep 17 00:00:00 2001 From: Felipe Madero Date: Mon, 28 Nov 2022 16:33:59 -0300 Subject: [PATCH 17/26] add golang requirement --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 2ac0625a..fe0b3757 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ To add it to your path permanently, add an export command to your shell initiali This is only needed by advanced users who want to modify or test Avalanche Network Runner in specific ways. +Requires golang to be installed on the system ([https://go.dev/doc/install](https://go.dev/doc/install)). + ### Download ```sh From c1fb74aa634be379ca2e94fc9873b63ee946074c Mon Sep 17 00:00:00 2001 From: Connor Daly Date: Mon, 28 Nov 2022 17:00:42 -0500 Subject: [PATCH 18/26] Don't run issue workflow for dependabot --- .github/workflows/issues.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml index f3fbeb73..926d9746 100644 --- a/.github/workflows/issues.yml +++ b/.github/workflows/issues.yml @@ -12,8 +12,9 @@ jobs: add-to-project: name: Add issue to project runs-on: ubuntu-latest + if: ${{ github.actor != 'dependabot[bot]' }} steps: - uses: actions/add-to-project@v0.3.0 with: project-url: https://github.com/orgs/ava-labs/projects/3 - github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} \ No newline at end of file + github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} From ccaea73bfb690c8e000b1ef616cf985cc9355cd8 Mon Sep 17 00:00:00 2001 From: Felipe Madero Date: Wed, 7 Dec 2022 19:20:00 -0300 Subject: [PATCH 19/26] bump to avago 1.9.4 --- go.mod | 11 +++++------ go.sum | 21 ++++++++++----------- local/blockchain.go | 5 +++-- local/node.go | 28 ++++++++++------------------ 4 files changed, 28 insertions(+), 37 deletions(-) diff --git a/go.mod b/go.mod index a132d143..9b7ca835 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/ava-labs/avalanche-network-runner go 1.18 require ( - github.com/ava-labs/avalanchego v1.9.2 - github.com/ava-labs/coreth v0.11.2 + github.com/ava-labs/avalanchego v1.9.4 + github.com/ava-labs/coreth v0.11.4 github.com/ethereum/go-ethereum v1.10.26 github.com/grpc-ecosystem/grpc-gateway/v2 v2.13.0 github.com/onsi/ginkgo/v2 v2.5.1 @@ -15,7 +15,7 @@ require ( github.com/spf13/cobra v1.6.1 github.com/stretchr/testify v1.8.1 go.uber.org/zap v1.23.0 - golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f + golang.org/x/sync v0.1.0 google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c google.golang.org/grpc v1.52.0-dev google.golang.org/protobuf v1.28.1 @@ -27,8 +27,7 @@ require ( github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/VictoriaMetrics/fastcache v1.10.0 // indirect github.com/aead/siphash v1.0.1 // indirect - github.com/ava-labs/avalanche-ledger-go v0.0.11 // indirect - github.com/benbjohnson/clock v1.3.0 // indirect + github.com/ava-labs/avalanche-ledger-go v0.0.13 // 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 @@ -127,7 +126,7 @@ require ( go.opentelemetry.io/otel/sdk v1.11.0 // indirect go.opentelemetry.io/otel/trace v1.11.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect - go.uber.org/atomic v1.9.0 // indirect + go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.8.0 // indirect golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5 // indirect diff --git a/go.sum b/go.sum index 9a361e73..5949f8b7 100644 --- a/go.sum +++ b/go.sum @@ -58,14 +58,13 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5 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/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -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/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 h1:ncjeAG9QSQcg2q27NLCNQmT6hRJ9pqC7z76bqfD0np0= -github.com/ava-labs/coreth v0.11.2/go.mod h1:gLc+jBTJXfoSyhBP6x6BU7/Tq1K4ptj5/y6T7qgmyyA= +github.com/ava-labs/avalanche-ledger-go v0.0.13 h1:YTdaSuaZS/1ct1RGirBEJeo2tiSfVeJGaE12XtUSGnE= +github.com/ava-labs/avalanche-ledger-go v0.0.13/go.mod h1:LolCV2cdtkD67V/BSfy/ELUqleG1sbVyNdo5qe1u4y4= +github.com/ava-labs/avalanchego v1.9.4 h1:z5tE/vUGzUQflqv3mn6X5E1VTCZHYhuD36idOyPNRrc= +github.com/ava-labs/avalanchego v1.9.4/go.mod h1:H4pMTYzgudfPs9WX+KXI0nCiUGNkdgPWOwm1nqzGibQ= +github.com/ava-labs/coreth v0.11.4 h1:WIP3LcDvag8h1ydyGsMIHhVjyRaNHEFd673jcE9z+vo= +github.com/ava-labs/coreth v0.11.4/go.mod h1:HFu7INBEQh2Zv/pc50nIMAqYFJKJLqYVtTtPMwZu6N4= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= -github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= 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= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -521,8 +520,8 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= +go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= @@ -643,8 +642,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/local/blockchain.go b/local/blockchain.go index 4a26d3b9..2da35aa5 100644 --- a/local/blockchain.go +++ b/local/blockchain.go @@ -22,6 +22,7 @@ import ( "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/utils/constants" "github.com/ava-labs/avalanchego/utils/logging" + "github.com/ava-labs/avalanchego/utils/set" "github.com/ava-labs/avalanchego/utils/units" "github.com/ava-labs/avalanchego/vms/platformvm" "github.com/ava-labs/avalanchego/vms/platformvm/txs" @@ -590,7 +591,7 @@ func (ln *localNetwork) addSubnetValidators( if err != nil { return err } - subnetValidators := ids.NodeIDSet{} + subnetValidators := set.Set[ids.NodeID]{} for _, v := range vs { subnetValidators.Add(v.NodeID) } @@ -646,7 +647,7 @@ func (ln *localNetwork) waitSubnetValidators( if err != nil { return err } - subnetValidators := ids.NodeIDSet{} + subnetValidators := set.Set[ids.NodeID]{} for _, v := range vs { subnetValidators.Add(v.NodeID) } diff --git a/local/node.go b/local/node.go index 30da4872..b855e0e0 100644 --- a/local/node.go +++ b/local/node.go @@ -25,6 +25,7 @@ import ( "github.com/ava-labs/avalanchego/utils/logging" "github.com/ava-labs/avalanchego/utils/math/meter" "github.com/ava-labs/avalanchego/utils/resource" + "github.com/ava-labs/avalanchego/utils/set" "github.com/ava-labs/avalanchego/version" "github.com/prometheus/client_golang/prometheus" ) @@ -110,10 +111,6 @@ func (node *localNode) AttachPeer(ctx context.Context, router router.InboundHand if err != nil { return nil, err } - ip := ips.IPPort{ - IP: net.IPv6zero, - Port: 0, - } resourceTracker, err := tracker.NewResourceTracker( prometheus.NewRegistry(), resource.NoUsage, @@ -123,29 +120,24 @@ func (node *localNode) AttachPeer(ctx context.Context, router router.InboundHand if err != nil { return nil, err } + signerIP := ips.NewDynamicIPPort(net.IPv6zero, 0) + tls := tlsCert.PrivateKey.(crypto.Signer) config := &peer.Config{ - Metrics: metrics, - MessageCreator: mc, - Log: logging.NoLog{}, - InboundMsgThrottler: throttling.NewNoInboundThrottler(), - Network: peer.NewTestNetwork( - mc, - node.networkID, - ip, - version.CurrentApp, - tlsCert.PrivateKey.(crypto.Signer), - ids.Set{}, - 100, - ), + Metrics: metrics, + MessageCreator: mc, + Log: logging.NoLog{}, + InboundMsgThrottler: throttling.NewNoInboundThrottler(), + Network: peer.TestNetwork, Router: router, VersionCompatibility: version.GetCompatibility(node.networkID), - MySubnets: ids.Set{}, + MySubnets: set.Set[ids.ID]{}, Beacons: validators.NewSet(), NetworkID: node.networkID, PingFrequency: constants.DefaultPingFrequency, PongTimeout: constants.DefaultPingPongTimeout, MaxClockDifference: time.Minute, ResourceTracker: resourceTracker, + IPSigner: peer.NewIPSigner(signerIP, tls), } _, conn, cert, err := clientUpgrader.Upgrade(conn) if err != nil { From 6d9c39e817f3f35e76ace4c557729f40c27e9a6f Mon Sep 17 00:00:00 2001 From: Felipe Madero Date: Wed, 7 Dec 2022 19:53:10 -0300 Subject: [PATCH 20/26] fix unit tests --- local/node.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/local/node.go b/local/node.go index b855e0e0..b121ca63 100644 --- a/local/node.go +++ b/local/node.go @@ -122,6 +122,10 @@ func (node *localNode) AttachPeer(ctx context.Context, router router.InboundHand } signerIP := ips.NewDynamicIPPort(net.IPv6zero, 0) tls := tlsCert.PrivateKey.(crypto.Signer) + gossipTracker, err := peer.NewGossipTracker(prometheus.NewRegistry(), "anr") + if err != nil { + return nil, err + } config := &peer.Config{ Metrics: metrics, MessageCreator: mc, @@ -137,6 +141,7 @@ func (node *localNode) AttachPeer(ctx context.Context, router router.InboundHand PongTimeout: constants.DefaultPingPongTimeout, MaxClockDifference: time.Minute, ResourceTracker: resourceTracker, + GossipTracker: gossipTracker, IPSigner: peer.NewIPSigner(signerIP, tls), } _, conn, cert, err := clientUpgrader.Upgrade(conn) From 3ae465172d8246a5e4cb62ef1f38eb2db8ac69de Mon Sep 17 00:00:00 2001 From: Felipe Madero Date: Wed, 7 Dec 2022 20:03:13 -0300 Subject: [PATCH 21/26] fix CI --- .github/workflows/build-test-release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index 5ae654f2..763357a2 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -71,7 +71,9 @@ jobs: with: go-version: 1.18 - name: Set up arm64 cross compiler - run: sudo apt-get -y install gcc-aarch64-linux-gnu + run: | + sudo apt-get -y update + sudo apt-get -y install gcc-aarch64-linux-gnu - name: Checkout osxcross uses: actions/checkout@v2 with: From 1e3469be15a4226ccf97aa771259d56634763837 Mon Sep 17 00:00:00 2001 From: Felipe Madero Date: Thu, 8 Dec 2022 11:36:19 -0300 Subject: [PATCH 22/26] use ubuntu 20.04 to make releases --- .github/workflows/build-test-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index 5ae654f2..118c4c04 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -59,7 +59,7 @@ jobs: run: scripts/tests.e2e.sh 1.9.2 1.9.2 0.4.3 release: needs: [lint_test, unit_test, e2e_test] - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - name: Git checkout uses: actions/checkout@v2 From 4a7eb005e4aa8ad5e6fb3a9fd3c8cf1d7f35dd5a Mon Sep 17 00:00:00 2001 From: fm Date: Thu, 8 Dec 2022 11:58:43 -0300 Subject: [PATCH 23/26] fix CI --- .github/workflows/build-test-release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index 118c4c04..382657e1 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -71,7 +71,9 @@ jobs: with: go-version: 1.18 - name: Set up arm64 cross compiler - run: sudo apt-get -y install gcc-aarch64-linux-gnu + run: | + sudo apt-get -y update + sudo apt-get -y install gcc-aarch64-linux-gnu - name: Checkout osxcross uses: actions/checkout@v2 with: From 883c7fa5c95267eadb667e7a2554cd6fa42fdac4 Mon Sep 17 00:00:00 2001 From: Felipe Madero Date: Thu, 8 Dec 2022 18:54:09 -0300 Subject: [PATCH 24/26] prepare for release --- .github/workflows/build-test-release.yml | 2 +- VERSION | 2 +- scripts/tests.e2e.sh | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index 382657e1..78575744 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -56,7 +56,7 @@ jobs: go-version: 1.18 - name: Run e2e tests shell: bash - run: scripts/tests.e2e.sh 1.9.2 1.9.2 0.4.3 + run: scripts/tests.e2e.sh 1.9.4 1.9.4 0.4.5 release: needs: [lint_test, unit_test, e2e_test] runs-on: ubuntu-20.04 diff --git a/VERSION b/VERSION index 3a3cd8cc..31e5c843 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3.1 +1.3.3 diff --git a/scripts/tests.e2e.sh b/scripts/tests.e2e.sh index f3d92aca..108d773d 100755 --- a/scripts/tests.e2e.sh +++ b/scripts/tests.e2e.sh @@ -3,15 +3,15 @@ set -e export RUN_E2E="true" # e.g., -# ./scripts/tests.e2e.sh 1.7.12 1.7.13 +# ./scripts/tests.e2e.sh 1.9.4 1.9.4 0.4.5 if ! [[ "$0" =~ scripts/tests.e2e.sh ]]; then echo "must be run from repository root" exit 255 fi -DEFAULT_VERSION_1=1.9.2 -DEFAULT_VERSION_2=1.9.2 -DEFAULT_SUBNET_EVM_VERSION=0.4.3 +DEFAULT_VERSION_1=1.9.4 +DEFAULT_VERSION_2=1.9.4 +DEFAULT_SUBNET_EVM_VERSION=0.4.5 if [ $# == 0 ]; then VERSION_1=$DEFAULT_VERSION_1 From f25902ac0e7e76ce7656ad991e6d315439571850 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Dec 2022 04:14:57 +0000 Subject: [PATCH 25/26] Bump github.com/onsi/ginkgo/v2 from 2.5.1 to 2.6.0 Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.5.1 to 2.6.0. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.5.1...v2.6.0) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9b7ca835..75cf1311 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/ava-labs/coreth v0.11.4 github.com/ethereum/go-ethereum v1.10.26 github.com/grpc-ecosystem/grpc-gateway/v2 v2.13.0 - github.com/onsi/ginkgo/v2 v2.5.1 + github.com/onsi/ginkgo/v2 v2.6.0 github.com/onsi/gomega v1.24.1 github.com/otiai10/copy v1.9.0 github.com/prometheus/client_golang v1.14.0 diff --git a/go.sum b/go.sum index 5949f8b7..0bc465a7 100644 --- a/go.sum +++ b/go.sum @@ -372,8 +372,8 @@ github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vv github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.5.1 h1:auzK7OI497k6x4OvWq+TKAcpcSAlod0doAH72oIN0Jw= -github.com/onsi/ginkgo/v2 v2.5.1/go.mod h1:63DOGlLAH8+REH8jUGdL3YpCpu7JODesutUjdENfUAc= +github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= +github.com/onsi/ginkgo/v2 v2.6.0/go.mod h1:63DOGlLAH8+REH8jUGdL3YpCpu7JODesutUjdENfUAc= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= From 4ebe47d3fa58a3fe477194d33a4870ea85369f73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Dec 2022 17:50:56 +0000 Subject: [PATCH 26/26] Bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.13.0 to 2.14.0 Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.13.0 to 2.14.0. - [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases) - [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/master/.goreleaser.yml) - [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.13.0...v2.14.0) --- updated-dependencies: - dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 75cf1311..7ff2b50c 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/ava-labs/avalanchego v1.9.4 github.com/ava-labs/coreth v0.11.4 github.com/ethereum/go-ethereum v1.10.26 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.13.0 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.14.0 github.com/onsi/ginkgo/v2 v2.6.0 github.com/onsi/gomega v1.24.1 github.com/otiai10/copy v1.9.0 @@ -16,7 +16,7 @@ require ( github.com/stretchr/testify v1.8.1 go.uber.org/zap v1.23.0 golang.org/x/sync v0.1.0 - google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c + google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1 google.golang.org/grpc v1.52.0-dev google.golang.org/protobuf v1.28.1 ) diff --git a/go.sum b/go.sum index 0bc465a7..a8eff132 100644 --- a/go.sum +++ b/go.sum @@ -263,8 +263,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92Bcuy github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.13.0 h1:fi9bGIUJOGzzrHBbP8NWbTfNC5fKO6X7kFw40TOqGB8= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.13.0/go.mod h1:uY3Aurq+SxwQCpdX91xZ9CgxIMT1EsYtcidljXufYIY= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.14.0 h1:t7uX3JBHdVwAi3G7sSSdbsk8NfgA+LnUS88V/2EKaA0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.14.0/go.mod h1:4OGVnY4qf2+gw+ssiHbW+pq4mo2yko94YxxMmXZ7jCA= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-hclog v1.2.2 h1:ihRI7YFwcZdiSD7SIenIhHfQH3OuDvWerAUBZbeQS3M= @@ -854,8 +854,8 @@ google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c h1:QgY/XxIAIeccR+Ca/rDdKubLIU9rcJ3xfy1DC/Wd2Oo= -google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= +google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1 h1:jCw9YRd2s40X9Vxi4zKsPRvSPlHWNqadVkpbMsCPzPQ= +google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=