ava-labs / ava-labs/avalanche-deploy

Support custom VM IDs in create-l1 tool

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
5
Forks
3
PR merge metrics
No merged PRs in 30d

Description

## 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

Contributor guide

Open the contributing guide

Research direction

Start with tools/create-l1/main.go and trace the IssueCreateChainTx call, then inspect the avalanchego role defaults and tasks. Add the optional VM ID handling while preserving the Subnet-EVM default, install the configured custom plugin on validator nodes, and update the documentation to cover the new variables and flag.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, go
Domain
blockchain, devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.