Skip to content

Support custom VM IDs in create-l1 tool #7

Description

@owenwahlgren

Problem

The create-l1 tool hardcodes constants.SubnetEVMID when calling IssueCreateChainTx. This means the tool can only deploy Subnet-EVM chains — any custom VM (e.g. a DAML VM, MoveVM, or other custom AvalancheGo plugin) requires forking the tool.

Proposed Solution

Add a --vm-id flag to tools/create-l1 that accepts a CB58-encoded VM ID string. When provided, use it instead of constants.SubnetEVMID. Default behavior unchanged (SubnetEVM if flag is omitted).

Also add Ansible support for installing custom VM plugins on validator nodes:

  • New variables: custom_vm_id, custom_vm_binary_path
  • New task in ansible/roles/avalanchego/tasks/main.yml to copy the custom VM binary to the plugins directory

Use Case

We have a custom AvalancheGo VM (block.ChainVM implementation) that runs DAML smart contracts natively. VM ID: nNQ83pDiUEV1sobcMFWiJK1QZD38Rm56TC5SU2eKMqmnYZsdF. We need to deploy this to Fuji using the existing avalanche-deploy infrastructure.

Changes Required

  1. tools/create-l1/main.go — Add --vm-id flag, parse with ids.FromString(), pass to IssueCreateChainTx
  2. ansible/roles/avalanchego/tasks/main.yml — Add custom VM plugin installation task
  3. ansible/roles/avalanchego/defaults/main.yml — Add custom_vm_id and custom_vm_binary_path variables
  4. Documentation update

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions