Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tmpnet] Add support for checking rpcchainvm version compatibility #3276

Merged
merged 7 commits into from
Aug 15, 2024

Conversation

marun
Copy link
Contributor

@marun marun commented Aug 6, 2024

Why this should be merged

Previously, if the rpcchainvm version differed between avalanchego and a VM that a node was configured to support, the node would never become healthy and discovering this would require examining log output. This PR adds support for optionally checking the rpcchainvm version of a VM against the version supported by the configured avalanchego binary.

How this works

  • enables configuring VersionArgs for each chain to specify arguments that output version info in json format from a vm binary
  • updates the vm binary check to use a chain's version args to retrieve the rpcchain version and compare against that reported by avalanchego
  • adds a json-capable version command to xsvm and configures its use in e2e

How this was tested

Positive coverage: CI, negative coverage: manual:

/home/me/src/avalanchego/master/tests/e2e/e2e_test.go:41

  [FAILED]
        Error Trace:    /home/me/src/avalanchego/master/tests/fixture/e2e/helpers.go:197
                                                /home/me/src/avalanchego/master/tests/fixture/e2e/env.go:119
                                                /home/me/src/avalanchego/master/tests/e2e/e2e_test.go:60
                                                /home/me/go/pkg/mod/golang.org/[email protected]/src/reflect/value.go:596
                                                /home/me/go/pkg/mod/golang.org/[email protected]/src/reflect/value.go:380
                                                /home/me/go/pkg/mod/github.com/onsi/ginkgo/[email protected]/internal/node.go:486
                                                /home/me/go/pkg/mod/github.com/onsi/ginkgo/[email protected]/internal/suite.go:642
                                                /home/me/go/pkg/mod/github.com/onsi/ginkgo/[email protected]/internal/suite.go:889
                                                /home/me/go/pkg/mod/golang.org/[email protected]/src/runtime/asm_arm64.s:1197
        Error:          Received unexpected error:
                        unexpected rpcchainvm version for VM binary of subnet "xsvm-a": "/home/me/src/avalanchego/master/build/avalanchego" reports 35, but "/home/me/.avalanchego/plugins/v3m4wPxaHpvGr8qfMeyK6PRW3idZrPHmYcMTt7oXdK47yurVH" reports 36
                        unexpected rpcchainvm version for VM binary of subnet "xsvm-b": "/home/me/src/avalanchego/master/build/avalanchego" reports 35, but "/home/me/.avalanchego/plugins/v3m4wPxaHpvGr8qfMeyK6PRW3idZrPHmYcMTt7oXdK47yurVH" reports 36

  In [SynchronizedBeforeSuite] at: /home/me/go/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:1495 @ 08/06/24 13:31:05.61

TODO

@marun marun added the testing This primarily focuses on testing label Aug 6, 2024
@marun marun self-assigned this Aug 6, 2024
@marun marun force-pushed the tmpnet-check-rpcchain-version branch from 4559366 to 30c27f9 Compare August 6, 2024 21:20
Base automatically changed from tmpnet-vm-binaries-exist to master August 12, 2024 17:42
@marun marun force-pushed the tmpnet-check-rpcchain-version branch from 7840ff3 to 0978d1c Compare August 12, 2024 17:54
Copy link
Contributor

@StephenButtolph StephenButtolph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - 2 small comments

vms/example/xsvm/cmd/versionjson/cmd.go Outdated Show resolved Hide resolved
vms/example/xsvm/cmd/versionjson/cmd.go Show resolved Hide resolved
Previously, if the rpcchainvm version differed between avalanchego and
a VM that a node was configured to support, the node would never
become healthy and discovering this would require examining log
output. This commit adds support for optionally checking the
rpcchainvm version of a VM against the version supported by the
configured avalanchego binary.
@marun marun force-pushed the tmpnet-check-rpcchain-version branch from f8d5078 to bd85c1d Compare August 13, 2024 23:30
@StephenButtolph StephenButtolph added this to the v1.11.11 milestone Aug 15, 2024
@StephenButtolph StephenButtolph added this pull request to the merge queue Aug 15, 2024
Merged via the queue into master with commit d7d5345 Aug 15, 2024
21 checks passed
@StephenButtolph StephenButtolph deleted the tmpnet-check-rpcchain-version branch August 15, 2024 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing This primarily focuses on testing
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants