Skip to content

feat: support custom VM IDs in create-l1 and Ansible#8

Open
owenwahlgren wants to merge 1 commit intomainfrom
feature/custom-vm-support
Open

feat: support custom VM IDs in create-l1 and Ansible#8
owenwahlgren wants to merge 1 commit intomainfrom
feature/custom-vm-support

Conversation

@owenwahlgren
Copy link
Copy Markdown
Collaborator

Summary

  • Add --vm-id flag to tools/create-l1 so it can deploy chains with any AvalancheGo VM plugin, not just SubnetEVM
  • Add Ansible support for installing custom VM plugin binaries on validator nodes

Motivation

The create-l1 tool currently hardcodes constants.SubnetEVMID. This makes it impossible to deploy custom VMs (DAML VM, MoveVM, etc.) without forking the tool. This PR makes the VM ID configurable while keeping SubnetEVM as the default.

Changes

  • tools/create-l1/main.go: Add --vm-id flag, parse with ids.FromString(), pass to IssueCreateChainTx
  • ansible/roles/avalanchego/defaults/main.yml: Add custom_vm_id and custom_vm_binary_path variables
  • ansible/roles/avalanchego/tasks/main.yml: Add task to copy custom VM binary to plugins directory

Usage

# Default (SubnetEVM, unchanged behavior):
./create-l1 --network=fuji --validators=1.2.3.4

# Custom VM:
./create-l1 --network=fuji --vm-id=nNQ83pDiUEV1sobcMFWiJK1QZD38Rm56TC5SU2eKMqmnYZsdF --genesis=daml-genesis.json --validators=1.2.3.4

Test plan

  • go build compiles with no errors
  • Default behavior unchanged (SubnetEVM when --vm-id omitted)
  • Custom VM ID accepted and passed to IssueCreateChainTx
  • Ansible custom VM installation tested with DAML VM deployment to Fuji

Closes #7

Add `--vm-id` flag to the create-l1 tool so it can deploy chains with
any AvalancheGo VM plugin, not just SubnetEVM. Also add Ansible support
for installing custom VM plugin binaries on validator nodes.

Changes:
- tools/create-l1/main.go: Add --vm-id flag, parse with ids.FromString,
  pass to IssueCreateChainTx instead of hardcoded constants.SubnetEVMID
- ansible/roles/avalanchego/defaults/main.yml: Add custom_vm_id and
  custom_vm_binary_path variables
- ansible/roles/avalanchego/tasks/main.yml: Add task to copy custom VM
  binary to the plugins directory when variables are set

Closes #7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support custom VM IDs in create-l1 tool

1 participant