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

[Feature]: Expose ConvertSubnetToL1 cmd #2527

Open
owenwahlgren opened this issue Jan 7, 2025 · 3 comments
Open

[Feature]: Expose ConvertSubnetToL1 cmd #2527

owenwahlgren opened this issue Jan 7, 2025 · 3 comments
Assignees
Labels
enhancement New feature or request Etna

Comments

@owenwahlgren
Copy link
Collaborator

Issue Description

Existing Subnets need an upgrade path to L1. The ConvertSubnetToL1 functionality exists when creating a new chain, but is not exposed independently.

Solution

Expose ConvertSubnetToL1 under blockchain cmd.

avalanche blockchain convertSubnetToL1
  1. Ensure ValidatorManager is properly deployed
  2. Select subnet's control keys (Ledger signing needed for mainnet)
  3. Submit P-Chain ConvertSubnetToL1 txn with current validator set as bootstrap
  4. Ensure P-Chain PAYG balance for validators
@owenwahlgren owenwahlgren added the bug Something isn't working label Jan 7, 2025
@owenwahlgren owenwahlgren added enhancement New feature or request Etna and removed bug Something isn't working labels Jan 7, 2025
@meaghanfitzgerald
Copy link
Collaborator

Current validator set cannot be submitted as bootstrap, since their NodeID is already actively associated with that SubnetID. In order for an existing Subnet to be converted to an L1, they need to bootstrap new node infrastructure, include these new nodes as part of the L1Validator[] struct in ConvertSubnetToL1Tx, and after successful conversion, let existing Subnet nodes expire, or remove with Owner Key using RemoveSubnetValidatorTx.

@owenwahlgren owenwahlgren changed the title [Bug]: Expose ConvertSubnetToL1 cmd [Feature]: Expose ConvertSubnetToL1 cmd Jan 7, 2025
@meaghanfitzgerald
Copy link
Collaborator

Conversion from Subnet to L1 could be accomplished utilizing a similar ingestion of Subnet information to that proposed in #2378. Once the CLI has the Subnet's necessary configurations, it could spin up however many bootstrap nodes the Owner wants, and once they are bootstrapped, the user would only need to broadcast the ConvertSubnetToL1Tx, restart their L1 validator nodes, and remove their Subnet validator nodes.

This could potentially be a CLI command, but ConvertSubnetToL1Tx could also be broadcast using a script written with the sdk. Additionally, very few users will rely on the CLI for an end-to-end existing Subnet to L1 conversion, given that (once importing subnet configs is supported) all other steps will be executable with the CLI.

@github-project-automation github-project-automation bot moved this from Backlog 🗄️ to Done ✅ in Platform Engineering Group Jan 7, 2025
@meaghanfitzgerald
Copy link
Collaborator

Alternatively, we could have a command like your original suggestion:

avalanche blockchain convert

that builds and signs the transaction given the user provides valid:

  1. Subnet Configuration with working RPC
  2. Owner Key with P-Chain Avax
  3. Node Credentials for L1Validators[]
  4. Staking token if converting to PoS
  5. Address of VMC on Subnet Chain (unless ACP 99 has been activated)

This command cannot be added until #2378 is completed.

@sukantoraymond sukantoraymond self-assigned this Jan 29, 2025
@sukantoraymond sukantoraymond moved this from Done ✅ to In Progress 🏗 in Platform Engineering Group Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Etna
Projects
Status: In Progress 🏗
Development

No branches or pull requests

3 participants