From d0b43f2cd7bef56c5c9d76f7c9304b0b7e3d32ae Mon Sep 17 00:00:00 2001 From: Quentin Mc Gaw Date: Thu, 3 Apr 2025 17:50:48 +0200 Subject: [PATCH 01/10] docs: add releasing document --- README.md | 4 ++ docs/releasing/README.md | 117 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 docs/releasing/README.md diff --git a/README.md b/README.md index 30fe373..4afcf3e 100644 --- a/README.md +++ b/README.md @@ -86,3 +86,7 @@ In order to upgrade the Subnet-EVM version, you need to change the version in `g [v0.2.5] AvalancheGo@v1.11.13-v1.12.1 (Protocol Version: 38) [v0.3.0] AvalancheGo@v1.12.2 (Protocol Version: 39) ``` + +## Release Process + +Please refer to the [Releasing document](docs/releasing/README.md) for more information on how to release a new version of Precompile-EVM. diff --git a/docs/releasing/README.md b/docs/releasing/README.md new file mode 100644 index 0000000..386c34f --- /dev/null +++ b/docs/releasing/README.md @@ -0,0 +1,117 @@ +# Releasing + +## When to release + +- When a [Subnet-EVM](https://github.com/ava-labs/avalanchego/releases) release is made +- If there is a significant code change or bugfix in this repository + +## Procedure + +In this section, we create a release `v0.4.0`. We therefore assign these environment variables to simplify copying instructions: + +```bash +export VERSION=v0.4.0 +export GITHUB_USER=username +``` + +`GITHUB_USER` is the username of the person creating the release. This is simply used to prefix branches. + +1. Create your branch, usually from the tip of the `main` branch: + + ```bash + git fetch origin main:main + git checkout main + git checkout -b "$GITHUB_USER/releases/$VERSION" + ``` + +1. Modify the [plugin/main.go](../../plugin/main.go) `Version` global string constant and set it to the desired `$VERSION`. +1. Upgrade the [subnet-evm Go dependency](https://github.com/ava-labs/subnet-evm/releases), which will likely also upgrade the AvalancheGo dependency version: + + ```bash + go get github.com/ava-labs/subnet-evm + go mod tidy + ``` + +1. Add an entry in the object in [compatibility.json](../../compatibility.json), adding the target release `$VERSION` as key and the AvalancheGo RPC chain VM protocol version as value, to the `"rpcChainVMProtocolVersion"` JSON object. For example, we would add: + + ```json + "v0.4.0": 39, + ``` + + 💁 If you are unsure about the RPC chain VM protocol version: + + 1. Check [go.mod](../../go.mod) and spot the version used for `github.com/ava-labs/avalanchego`. For example `v1.13.0`. + 1. Refer to the [Avalanchego repository `version/compatibility.json` file](https://github.com/ava-labs/avalanchego/blob/main/version/compatibility.json) to find the RPC chain VM protocol version matching the AvalancheGo version we use here. In our case, we use an AvalancheGo version `v1.13.0`, so the RPC chain VM protocol version is `39`: + + ```json + { + "39": [ + "v1.12.2", + "v1.13.0" + ], + } + ``` + + Finally, check the RPC chain VM protocol version compatibility is setup properly by running: + + ```bash + go test -run ^TestCompatibility$ github.com/ava-labs/precompile-evm/plugin + ``` + +1. Specify the AvalancheGo compatibility in the [README.md relevant section](../../README.md#avalanchego-compatibility). For example we would add: + + ```text + ... + [v0.4.0] AvalancheGo@v1.12.2/1.13.0-fuji/1.13.0 (Protocol Version: 39) + ``` + +1. Commit your changes and push the branch + + ```bash + git add . + git commit -S -m "chore: release $VERSION" + git push -u origin "$GITHUB_USER/releases/$VERSION" + ``` + +1. Create a pull request (PR) from your branch targeting main, for example using [`gh`](https://cli.github.com/): + + ```bash + gh pr create --repo github.com/ava-labs/precompile-evm --base main --title "chore: release $VERSION" + ``` + +1. Wait for the PR checks to pass +1. Update the `hello-world-example` branch to be rebased on your release branch: + + ```bash + git fetch origin hello-world-example:hello-world-example + git checkout hello-world-example + git rebase "$GITHUB_USER/releases/$VERSION" + # Fix eventual conflicts + git push --force hello-world-example + ``` + +1. [Wait for the checks](https://github.com/ava-labs/precompile-evm/pull/12/checks) of the `hello-world-example` branch [PR](https://github.com/ava-labs/precompile-evm/pull/12) to pass. **Never merge this PR**. +1. Squash and merge your release branch into `main`: + + ```bash + git checkout main + git merge --squash "$GITHUB_USER/releases/$VERSION" + git commit -S -m "chore: release $VERSION" + git push + ``` + +1. Create a release branch from the `main` branch, this time without your username prefix: + + ```bash + git checkout -b "releases/$VERSION" + ``` + + This is to avoid creating a release targeting the `main` branch, which may contain new commits merged whilst the release is being created. +1. Create a new release through the [Github web interface](https://github.com/ava-labs/subnet-evm/releases/new) + 1. In the "Choose a tag" box, enter `$VERSION` (`v0.4.0`) + 1. In the "Target", pick the branch `releases/$VERSION` (`releases/v0.4.0`) + 1. Pick the previous release, for example as `v0.3.0`. + 1. Set the "Release title" to `$VERSION` (`v0.4.0`) + 1. Set the description (breaking changes, features, fixes, documentation) + 1. Only tick the box "Set as the latest release" + 1. Click on the "Create release" button From 8c807c596000dc68beb43e1ad4e513a3ee56baca Mon Sep 17 00:00:00 2001 From: Quentin Mc Gaw Date: Thu, 3 Apr 2025 17:51:01 +0200 Subject: [PATCH 02/10] Remove release_checklist issue template --- .github/ISSUE_TEMPLATE/release_checklist.md | 28 --------------------- 1 file changed, 28 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/release_checklist.md diff --git a/.github/ISSUE_TEMPLATE/release_checklist.md b/.github/ISSUE_TEMPLATE/release_checklist.md deleted file mode 100644 index 32bdc93..0000000 --- a/.github/ISSUE_TEMPLATE/release_checklist.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Release Checklist -about: Create a ticket to track a release -title: "" -labels: release -assignees: "" ---- - -## Release - -The release version and a description of the planned changes to be included in the release. - -## Issues - -Link the major issues planned to be included in the release. - -## Documentation - -Link the relevant documentation PRs for this release. - -## Checklist - -- [ ] Update Precompile-EVM version in plugin/main.go -- [ ] Bump AvalancheGo dependency for RPCChainVM Compatibility in go.mod and versions.sh -- [ ] Bump Subnet-EVM version in go.mod and versions.sh -- [ ] Add new entry in compatibility.json for RPCChainVM Compatibility -- [ ] Update AvalancheGo compatibility in README -- [ ] Update hello-world-example branch with latest master, run CI tests From 4d5f8f48ba6d6d55f2f62edc65e2a727da5b762e Mon Sep 17 00:00:00 2001 From: Quentin Mc Gaw Date: Fri, 4 Apr 2025 10:45:09 +0200 Subject: [PATCH 03/10] Add .devcontainer updates steps --- docs/releasing/README.md | 42 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/docs/releasing/README.md b/docs/releasing/README.md index 386c34f..8a5d1b5 100644 --- a/docs/releasing/README.md +++ b/docs/releasing/README.md @@ -32,6 +32,40 @@ export GITHUB_USER=username go mod tidy ``` +1. Get the Go version from the `go.mod` file: + + ```bash + cat go.mod | grep -oE "^go 1\.\d+" | grep -oE "1\.\d+" + ``` + + and update the [.devcontainer/devcontainer.json](../../.devcontainer/devcontainer.json) file with the Go version at `.features.["ghcr.io/devcontainers/features/go:1.version"].version`, for example: + + ```json + { + "features": { + "ghcr.io/devcontainers/features/go:1": {"version": 1.23}, + } + } + ``` + +1. Get the AvalancheGo version from the `go.mod` file: + + ```bash + go list -m all | grep github.com/ava-labs/avalanchego | awk '{print $2}' + ``` + + and update the [.devcontainer/devcontainer.json](../../.devcontainer/devcontainer.json) file with it at `.build.args.AVALANCHEGO_VERSION`, for example: + + ```json + { + "build": { + "args": { + "AVALANCHEGO_VERSION": "v1.13.0" + } + }, + } + ``` + 1. Add an entry in the object in [compatibility.json](../../compatibility.json), adding the target release `$VERSION` as key and the AvalancheGo RPC chain VM protocol version as value, to the `"rpcChainVMProtocolVersion"` JSON object. For example, we would add: ```json @@ -40,7 +74,13 @@ export GITHUB_USER=username 💁 If you are unsure about the RPC chain VM protocol version: - 1. Check [go.mod](../../go.mod) and spot the version used for `github.com/ava-labs/avalanchego`. For example `v1.13.0`. + 1. Find the AvalancheGo version used in [go.mod](../../go.mod): + + ```bash + go list -m all | grep github.com/ava-labs/avalanchego | awk '{print $2}' + ``` + + For example `v1.13.0`. 1. Refer to the [Avalanchego repository `version/compatibility.json` file](https://github.com/ava-labs/avalanchego/blob/main/version/compatibility.json) to find the RPC chain VM protocol version matching the AvalancheGo version we use here. In our case, we use an AvalancheGo version `v1.13.0`, so the RPC chain VM protocol version is `39`: ```json From 3a2da342b1cc898f98331b5c236a368e3ce2c37f Mon Sep 17 00:00:00 2001 From: Quentin Mc Gaw Date: Mon, 7 Apr 2025 09:36:32 +0200 Subject: [PATCH 04/10] Simplify finding rpc chain vm protocol using test --- docs/releasing/README.md | 29 ++++++++--------------------- plugin/version_test.go | 17 ++++++++++++----- 2 files changed, 20 insertions(+), 26 deletions(-) diff --git a/docs/releasing/README.md b/docs/releasing/README.md index 8a5d1b5..58a7266 100644 --- a/docs/releasing/README.md +++ b/docs/releasing/README.md @@ -72,32 +72,19 @@ export GITHUB_USER=username "v0.4.0": 39, ``` - 💁 If you are unsure about the RPC chain VM protocol version: - - 1. Find the AvalancheGo version used in [go.mod](../../go.mod): - - ```bash - go list -m all | grep github.com/ava-labs/avalanchego | awk '{print $2}' - ``` - - For example `v1.13.0`. - 1. Refer to the [Avalanchego repository `version/compatibility.json` file](https://github.com/ava-labs/avalanchego/blob/main/version/compatibility.json) to find the RPC chain VM protocol version matching the AvalancheGo version we use here. In our case, we use an AvalancheGo version `v1.13.0`, so the RPC chain VM protocol version is `39`: - - ```json - { - "39": [ - "v1.12.2", - "v1.13.0" - ], - } - ``` - - Finally, check the RPC chain VM protocol version compatibility is setup properly by running: + 💁 If you are unsure about the RPC chain VM protocol version, set the version to `0`, for exampple `"v0.4.0": 0`, and then run: ```bash go test -run ^TestCompatibility$ github.com/ava-labs/precompile-evm/plugin ``` + This will fail with an error similar to: + + ```text + compatibility.json has precompile-evm version v0.4.0 stated as compatible with RPC chain VM protocol version 0 but AvalancheGo protocol version is 39 + ``` + + This message can help you figure out what the correct RPC chain VM protocol version (here `39`) has to be in compatibility.json for your current release. 1. Specify the AvalancheGo compatibility in the [README.md relevant section](../../README.md#avalanchego-compatibility). For example we would add: ```text diff --git a/plugin/version_test.go b/plugin/version_test.go index 39b42db..5cb88a1 100644 --- a/plugin/version_test.go +++ b/plugin/version_test.go @@ -3,10 +3,11 @@ package main import ( "encoding/json" "os" + "path/filepath" "testing" "github.com/ava-labs/avalanchego/version" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) type rpcChainCompatibility struct { @@ -17,13 +18,19 @@ const compatibilityFile = "../compatibility.json" func TestCompatibility(t *testing.T) { compat, err := os.ReadFile(compatibilityFile) - assert.NoError(t, err) + require.NoError(t, err, "reading compatibility file") var parsedCompat rpcChainCompatibility err = json.Unmarshal(compat, &parsedCompat) - assert.NoError(t, err) + require.NoError(t, err, "json decoding compatibility file") rpcChainVMVersion, valueInJSON := parsedCompat.RPCChainVMProtocolVersion[Version] - assert.True(t, valueInJSON) - assert.Equal(t, rpcChainVMVersion, version.RPCChainVMProtocol) + if !valueInJSON { + t.Fatalf("%s has precompile-evm version %s missing from rpcChainVMProtocolVersion object", + filepath.Base(compatibilityFile), Version) + } + if rpcChainVMVersion != version.RPCChainVMProtocol { + t.Fatalf("%s has precompile-evm version %s stated as compatible with RPC chain VM protocol version %d but AvalancheGo protocol version is %d", + filepath.Base(compatibilityFile), Version, rpcChainVMVersion, version.RPCChainVMProtocol) + } } From 5ef5cd3a689792fae5ed4552a92465dd15122239 Mon Sep 17 00:00:00 2001 From: Quentin Mc Gaw Date: Mon, 7 Apr 2025 09:55:26 +0200 Subject: [PATCH 05/10] Specify release description format --- docs/releasing/README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/releasing/README.md b/docs/releasing/README.md index 58a7266..5dcd1ce 100644 --- a/docs/releasing/README.md +++ b/docs/releasing/README.md @@ -139,6 +139,22 @@ export GITHUB_USER=username 1. In the "Target", pick the branch `releases/$VERSION` (`releases/v0.4.0`) 1. Pick the previous release, for example as `v0.3.0`. 1. Set the "Release title" to `$VERSION` (`v0.4.0`) - 1. Set the description (breaking changes, features, fixes, documentation) + 1. Set the description using this format: + + ```markdown + # AvalancheGo Compatibility + + The plugin version is unchanged at 39 and is compatible with AvalancheGo version v1.13.0. + + # Breaking changes + + # Features + + # Fixes + + # Documentation + + ``` + 1. Only tick the box "Set as the latest release" 1. Click on the "Create release" button From 3cfc996e1a08bc5730d463bbab0eeecc872209d6 Mon Sep 17 00:00:00 2001 From: Quentin Mc Gaw Date: Mon, 7 Apr 2025 09:57:38 +0200 Subject: [PATCH 06/10] Give gh command to merge release branch given git commands won't work --- docs/releasing/README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/releasing/README.md b/docs/releasing/README.md index 5dcd1ce..9f8c82b 100644 --- a/docs/releasing/README.md +++ b/docs/releasing/README.md @@ -118,13 +118,10 @@ export GITHUB_USER=username ``` 1. [Wait for the checks](https://github.com/ava-labs/precompile-evm/pull/12/checks) of the `hello-world-example` branch [PR](https://github.com/ava-labs/precompile-evm/pull/12) to pass. **Never merge this PR**. -1. Squash and merge your release branch into `main`: +1. Squash and merge your release branch into `main`, for example: ```bash - git checkout main - git merge --squash "$GITHUB_USER/releases/$VERSION" - git commit -S -m "chore: release $VERSION" - git push + gh pr merge "$GITHUB_USER/releases/$VERSION" --squash --delete-branch --subject "chore: release $VERSION" --body "\n- Bump subnet-evm from v0.7.3 to v0.7.4\n- Update AvalancheGo from v1.12.3 to v1.13.0" ``` 1. Create a release branch from the `main` branch, this time without your username prefix: From 58e344fbf30b488e1713128d9e268f995b7267ab Mon Sep 17 00:00:00 2001 From: Quentin Mc Gaw Date: Mon, 7 Apr 2025 09:57:56 +0200 Subject: [PATCH 07/10] Give gh command to watch status of hello-world PR --- docs/releasing/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/releasing/README.md b/docs/releasing/README.md index 9f8c82b..3d28257 100644 --- a/docs/releasing/README.md +++ b/docs/releasing/README.md @@ -117,7 +117,12 @@ export GITHUB_USER=username git push --force hello-world-example ``` -1. [Wait for the checks](https://github.com/ava-labs/precompile-evm/pull/12/checks) of the `hello-world-example` branch [PR](https://github.com/ava-labs/precompile-evm/pull/12) to pass. **Never merge this PR**. +1. [Wait for the checks](https://github.com/ava-labs/precompile-evm/pull/12/checks) of the `hello-world-example` branch [PR](https://github.com/ava-labs/precompile-evm/pull/12) to pass. **Never merge this PR**. You can also use `gh` with: + + ```bash + gh pr checks 12 --watch + ``` + 1. Squash and merge your release branch into `main`, for example: ```bash From dd521e8d84afea47080f3935a21564b4fadbb2dd Mon Sep 17 00:00:00 2001 From: Quentin Mc Gaw Date: Mon, 7 Apr 2025 09:58:12 +0200 Subject: [PATCH 08/10] Add command to create release using gh --- docs/releasing/README.md | 42 +++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/docs/releasing/README.md b/docs/releasing/README.md index 3d28257..5d68fc8 100644 --- a/docs/releasing/README.md +++ b/docs/releasing/README.md @@ -136,15 +136,36 @@ export GITHUB_USER=username ``` This is to avoid creating a release targeting the `main` branch, which may contain new commits merged whilst the release is being created. -1. Create a new release through the [Github web interface](https://github.com/ava-labs/subnet-evm/releases/new) - 1. In the "Choose a tag" box, enter `$VERSION` (`v0.4.0`) - 1. In the "Target", pick the branch `releases/$VERSION` (`releases/v0.4.0`) - 1. Pick the previous release, for example as `v0.3.0`. - 1. Set the "Release title" to `$VERSION` (`v0.4.0`) - 1. Set the description using this format: +1. Create a new release on Github, either using: + - the [Github web interface](https://github.com/ava-labs/subnet-evm/releases/new) + 1. In the "Choose a tag" box, enter `$VERSION` (`v0.4.0`) + 1. In the "Target", pick the branch `releases/$VERSION` (`releases/v0.4.0`) + 1. Pick the previous release, for example as `v0.3.0`. + 1. Set the "Release title" to `$VERSION` (`v0.4.0`) + 1. Set the description using this format: - ```markdown - # AvalancheGo Compatibility + ```markdown + # AvalancheGo Compatibility + + The plugin version is unchanged at 39 and is compatible with AvalancheGo version v1.13.0. + + # Breaking changes + + # Features + + # Fixes + + # Documentation + + ``` + + 1. Only tick the box "Set as the latest release" + 1. Click on the "Create release" button + - the Github CLI `gh`: + + ```bash + PREVIOUS_VERSION=v0.3.1 + NOTES="# AvalancheGo Compatibility The plugin version is unchanged at 39 and is compatible with AvalancheGo version v1.13.0. @@ -156,7 +177,6 @@ export GITHUB_USER=username # Documentation + " + gh release create "$VERSION" --target "releases/$VERSION" --title "$VERSION" --notes-start-tag "$PREVIOUS_VERSION" --notes "$NOTES" ``` - - 1. Only tick the box "Set as the latest release" - 1. Click on the "Create release" button From a093f9047832f9af7e345a7bb0c34605e5aaadc1 Mon Sep 17 00:00:00 2001 From: Quentin Mc Gaw Date: Wed, 9 Apr 2025 16:46:30 +0200 Subject: [PATCH 09/10] Push tag then create release --- docs/releasing/README.md | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/docs/releasing/README.md b/docs/releasing/README.md index 5d68fc8..d547bb2 100644 --- a/docs/releasing/README.md +++ b/docs/releasing/README.md @@ -11,17 +11,14 @@ In this section, we create a release `v0.4.0`. We therefore assign these environ ```bash export VERSION=v0.4.0 -export GITHUB_USER=username ``` -`GITHUB_USER` is the username of the person creating the release. This is simply used to prefix branches. - 1. Create your branch, usually from the tip of the `main` branch: ```bash git fetch origin main:main git checkout main - git checkout -b "$GITHUB_USER/releases/$VERSION" + git checkout -b "releases/$VERSION" ``` 1. Modify the [plugin/main.go](../../plugin/main.go) `Version` global string constant and set it to the desired `$VERSION`. @@ -97,7 +94,7 @@ export GITHUB_USER=username ```bash git add . git commit -S -m "chore: release $VERSION" - git push -u origin "$GITHUB_USER/releases/$VERSION" + git push -u origin "releases/$VERSION" ``` 1. Create a pull request (PR) from your branch targeting main, for example using [`gh`](https://cli.github.com/): @@ -112,7 +109,7 @@ export GITHUB_USER=username ```bash git fetch origin hello-world-example:hello-world-example git checkout hello-world-example - git rebase "$GITHUB_USER/releases/$VERSION" + git rebase "releases/$VERSION" # Fix eventual conflicts git push --force hello-world-example ``` @@ -126,21 +123,25 @@ export GITHUB_USER=username 1. Squash and merge your release branch into `main`, for example: ```bash - gh pr merge "$GITHUB_USER/releases/$VERSION" --squash --delete-branch --subject "chore: release $VERSION" --body "\n- Bump subnet-evm from v0.7.3 to v0.7.4\n- Update AvalancheGo from v1.12.3 to v1.13.0" + gh pr merge "releases/$VERSION" --squash --delete-branch --subject "chore: release $VERSION" --body "\n- Bump subnet-evm from v0.7.3 to v0.7.4\n- Update AvalancheGo from v1.12.3 to v1.13.0" ``` -1. Create a release branch from the `main` branch, this time without your username prefix: +1. Create and push a tag from the `main` branch: ```bash - git checkout -b "releases/$VERSION" + git fetch origin main:main + git checkout main + # Double check the tip of the main branch is the expected commit + # of the squashed release branch + git log -1 + git tag -s "$VERSION" + git push origin "$VERSION" ``` - This is to avoid creating a release targeting the `main` branch, which may contain new commits merged whilst the release is being created. 1. Create a new release on Github, either using: - the [Github web interface](https://github.com/ava-labs/subnet-evm/releases/new) - 1. In the "Choose a tag" box, enter `$VERSION` (`v0.4.0`) - 1. In the "Target", pick the branch `releases/$VERSION` (`releases/v0.4.0`) - 1. Pick the previous release, for example as `v0.3.0`. + 1. In the "Choose a tag" box, select the tag previously created `$VERSION` (`v0.4.0`) + 1. Pick the previous tag, for example as `v0.3.1`. 1. Set the "Release title" to `$VERSION` (`v0.4.0`) 1. Set the description using this format: @@ -178,5 +179,5 @@ export GITHUB_USER=username # Documentation " - gh release create "$VERSION" --target "releases/$VERSION" --title "$VERSION" --notes-start-tag "$PREVIOUS_VERSION" --notes "$NOTES" + gh release create "$VERSION" --notes-start-tag "$PREVIOUS_VERSION" --notes-from-tag "$VERSION" --title "$VERSION" --notes "$NOTES" --verify-tag ``` From e101f5dd383213b9bded13c759a0a2bcba71a1be Mon Sep 17 00:00:00 2001 From: Quentin Mc Gaw Date: Wed, 9 Apr 2025 17:10:46 +0200 Subject: [PATCH 10/10] Apply PR feedback --- docs/releasing/README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/releasing/README.md b/docs/releasing/README.md index d547bb2..723f219 100644 --- a/docs/releasing/README.md +++ b/docs/releasing/README.md @@ -7,10 +7,13 @@ ## Procedure -In this section, we create a release `v0.4.0`. We therefore assign these environment variables to simplify copying instructions: +In this section, we create a release `v0.4.0`, upgrading the subnet-evm Go dependency to `v0.7.4` and the AvalancheGo version to the one used by subnet-evm, `v1.13.0`. + +We therefore assign these environment variables to simplify copying instructions: ```bash export VERSION=v0.4.0 +export SUBNET_EVM_VERSION=v0.7.4 ``` 1. Create your branch, usually from the tip of the `main` branch: @@ -22,13 +25,14 @@ export VERSION=v0.4.0 ``` 1. Modify the [plugin/main.go](../../plugin/main.go) `Version` global string constant and set it to the desired `$VERSION`. -1. Upgrade the [subnet-evm Go dependency](https://github.com/ava-labs/subnet-evm/releases), which will likely also upgrade the AvalancheGo dependency version: +1. Upgrade the [subnet-evm Go dependency](https://github.com/ava-labs/subnet-evm/releases), for example to version `v0.7.4`: ```bash - go get github.com/ava-labs/subnet-evm + go get "github.com/ava-labs/subnet-evm@$SUBNET_EVM_VERSION" go mod tidy ``` + This will also upgrade the AvalancheGo version to the one used by subnet-evm. 1. Get the Go version from the `go.mod` file: ```bash @@ -69,7 +73,7 @@ export VERSION=v0.4.0 "v0.4.0": 39, ``` - 💁 If you are unsure about the RPC chain VM protocol version, set the version to `0`, for exampple `"v0.4.0": 0`, and then run: + 💁 If you are unsure about the RPC chain VM protocol version, set the version to `0`, for example `"v0.4.0": 0`, and then run: ```bash go test -run ^TestCompatibility$ github.com/ava-labs/precompile-evm/plugin @@ -81,7 +85,7 @@ export VERSION=v0.4.0 compatibility.json has precompile-evm version v0.4.0 stated as compatible with RPC chain VM protocol version 0 but AvalancheGo protocol version is 39 ``` - This message can help you figure out what the correct RPC chain VM protocol version (here `39`) has to be in compatibility.json for your current release. + This message can help you figure out what the correct RPC chain VM protocol version (here `39`) has to be in compatibility.json for your current release. Alternatively, you can refer to the [Avalanchego repository `version/compatibility.json` file](https://github.com/ava-labs/avalanchego/blob/main/version/compatibility.json) to find the RPC chain VM protocol version matching the AvalancheGo version we use here. 1. Specify the AvalancheGo compatibility in the [README.md relevant section](../../README.md#avalanchego-compatibility). For example we would add: ```text