Skip to content

Improve RPC Chain version mismatch error message #2021

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

Merged
merged 3 commits into from
Sep 15, 2023

Conversation

martineckardt
Copy link
Contributor

@martineckardt martineckardt commented Sep 14, 2023

Why this should be merged

A significant number of developers, especially those new to Subnet-EVM or Precompile-EVM, encounter the following error:

"error while creating vm: handshake failed: protocol version mismatch avalanchego: 28, vm: 27"

Feedback from developer chats indicates confusion and uncertainty about how to address this error. It's particularly prevalent when a new version of AvalancheGo is released, but a corresponding update for Subnet-EVM that supports the latest RPC Chain version hasn't been rolled out yet.

How this works

Extend the error message:

error while creating vm: handshake failed: RPCChainVM protocol version mismatch between AvalancheGo and Virtual Machine plugin. AvalancheGo version v1.10.9 implements RPCChainVM protocol version 28. The VM implements RPCChainVM protocol version 27. Please make sure that there is an exact match of the protocol versions. This can be achieved by updating your VM or running an older/newer version of AvalancheGo. Please be advised that some virtual machines may not yet support the latest RPCChainVM protocol version

This PR enhances the error message by providing:

  • Clearer context about the nature of the issue.
  • Actionable guidance on potential steps to resolve or work around the problem.

By doing so, we aim to reduce developer friction and improve their experience when encountering version mismatches.

How this was tested

To ensure the effectiveness of this change, we tested AvalancheGo using VM binaries that had differing RPC Chain versions.

@StephenButtolph StephenButtolph changed the base branch from master to dev September 15, 2023 20:38
@StephenButtolph StephenButtolph added this to the v1.10.10 milestone Sep 15, 2023
@StephenButtolph StephenButtolph added the documentation Improvements or additions to documentation or examples label Sep 15, 2023
@aaronbuchwald
Copy link
Collaborator

Great PR description 🙌

@StephenButtolph StephenButtolph merged commit c85e0f2 into dev Sep 15, 2023
@StephenButtolph StephenButtolph deleted the rpcchainvm-version-mismatch branch September 15, 2023 21:27
ashucoder9 added a commit to ava-labs/builders-hub that referenced this pull request Oct 4, 2023
This PR presents a solution to the following error message: ava-labs/avalanchego#2021

Signed-off-by: Ashutosh Tripathi <39340292+ashucoder9@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation or examples
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants