Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ The reward minting flow involves multiple contracts working together to distribu
note over SM: Calculate rewards minus<br/>delegation fees
SM->>NTSM: _reward(recipient, delegatorRewards)
NTSM->>NM: mintNativeCoin(recipient, amount)
NM->>RR: Native tokens minted


NM->>RR: Native tokens minted
"
/>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
title: Create Your L1
description: Quick guide to creating a subnet and converting it to an L1 with required precompiles
updated: 2025-03-13
authors: [nicolasarnedo]
icon: Terminal
---

import { Step, Steps } from 'fumadocs-ui/components/steps';
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
import ToolboxMdxWrapper from "@/components/toolbox/academy/wrapper/ToolboxMdxWrapper.tsx"
import ConvertSubnetToL1 from "@/components/toolbox/console/layer-1/create/ConvertSubnetToL1.tsx"
import CreateChain from "@/components/toolbox/console/layer-1/create/CreateChain";
import CreateManagedTestnetNode from "@/components/toolbox/console/testnet-infra/ManagedTestnetNodes/CreateManagedTestnetNode";
import AvalancheGoDocker from "@/components/toolbox/console/layer-1/AvalancheGoDockerL1";

This section provides a streamlined walkthrough for creating a new L1 from scratch.

You should already have a created L1 from the [Permissioned L1 course](/academy/permissioned-l1s) with the Validator Manager Contract correctly set up that you can use to transform into a Permissionless L1. But just in case you lost access to that one or want to start fresh, this guide is for you!

<Steps>
<Step>

### Create Subnet with necessary Precompiles

When creating your subnet, you **must** enable the Native Minter and Reward Manager precompiles in your genesis configuration. These are essential for native token staking:

- **Native Minter**: Allows the staking manager to mint reward tokens
- **Reward Manager**: Automates reward distribution to validators

<ToolboxMdxWrapper walletMode="c-chain">
<CreateChain embedded={true} />
</ToolboxMdxWrapper>

</Step>
<Step>

### Set Up Validator Node

Launch a validator node for your subnet using our free managed testnet infrastructure (no Docker required):

<ToolboxMdxWrapper walletMode="testnet-mainnet">
<CreateManagedTestnetNode />
</ToolboxMdxWrapper>

### Production & Extended Testing Environments

After creating nodes, you can view and manage them at the [Testnet Infrastructure Console](/console/testnet-infra/nodes). **Managed nodes automatically shut down after 3 days**. For production or extended testing, see the self-hosted option below.

For production environments or extended testing periods, you should use Docker to run your nodes.

<Accordions>
<Accordion title="Docker Setup Guide (Optional)">

<ToolboxMdxWrapper walletMode="testnet-mainnet">
<AvalancheGoDocker />
</ToolboxMdxWrapper>

</Accordion>
</Accordions>

</Step>
<Step>

### Convert Subnet to L1

Once your subnet is running with a validator, convert it to a sovereign L1. This process:

- **Establishes Sovereignty**: Your blockchain becomes independent
- **Transfers Authority**: Validator management shifts from P-Chain to your Validator Manager Contract
- **Is Irreversible**: Once converted, you cannot revert to subnet status

#### Key Conversion Parameters

1. **Subnet ID**: Your subnet's unique identifier
2. **Validator Manager Blockchain ID**: Where your VMC will be deployed (typically your L1)
3. **Validator Manager Address**: The proxy address (pre-deployed to `0xfacade0000000000000000000000000000000000`)
4. **Initial Validators**: The validator(s) from your subnet

<ToolboxMdxWrapper walletMode="c-chain">
<ConvertSubnetToL1 />
</ToolboxMdxWrapper>

</Step>
</Steps>

## Next Steps

Now that your L1 is created with the required precompiles, you're ready to deploy and configure your Validator Manager Contract so that it **becomes a Permissioned L1**.
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
title: Setup Permissioned L1
description: Deploy and set up your Validator Manager Contract to create a Proof of Authority blockchain
updated: 2025-03-13
authors: [nicolasarnedo]
icon: Terminal
---

import { Step, Steps } from 'fumadocs-ui/components/steps';
import ToolboxMdxWrapper from "@/components/toolbox/academy/wrapper/ToolboxMdxWrapper.tsx"
import DeployValidatorManager from "@/components/toolbox/console/permissioned-l1s/validator-manager-setup/DeployValidatorManager.tsx"
import UpgradeProxy from "@/components/toolbox/console/permissioned-l1s/validator-manager-setup/UpgradeProxy.tsx"
import Initialize from "@/components/toolbox/console/permissioned-l1s/validator-manager-setup/Initialize.tsx"
import InitValidatorSet from "@/components/toolbox/console/permissioned-l1s/validator-manager-setup/InitValidatorSet.tsx"

This section walks through deploying and configuring your Validator Manager Contract (VMC) on your new L1.

This is a multi-step process that establishes the necessary infrastructure to run a Permissioned L1 chain. This process is made (we hope) simple through the console, but in order to run and maintain this in a Production environment please be sure to complete the [Permissioned L1](/academy/permissioned-l1s) course.

<Steps>
<Step>

### Deploy most recent implementation of the Validator Manager Contract

<ToolboxMdxWrapper walletMode="l1">
<DeployValidatorManager />
</ToolboxMdxWrapper>

</Step>
<Step>

### Upgrade Proxy

Link your proxy to the ValidatorManager implementation by upgrading the TransparentUpgradeableProxy at `0xfacade...` to point to your newly deployed contract.

<Callout type="info">
Make sure you have your L1 selected in the wallet component
</Callout>

<ToolboxMdxWrapper walletMode="l1">
<UpgradeProxy />
</ToolboxMdxWrapper>

</Step>
<Step>

### Set Initial Configuration

Configure your ValidatorManager with essential parameters through the `initialize()` function:

- **Admin Address**: Your wallet address (controls validator operations)
- **Subnet ID**: Your L1's subnet identifier
- **Churn Period**: Time window for validator changes (≤ 86400 seconds)
- **Maximum Churn Percentage**: Weight change limit per period (1-20%)

<ToolboxMdxWrapper walletMode="l1">
<Initialize />
</ToolboxMdxWrapper>

</Step>
<Step>

### Initialize Validator Set

Bridge P-Chain subnet creation with L1 validator management using cryptographically verified conversion data.

#### How It Works

The initialization:
1. Verifies P-Chain signed conversion data via Avalanche Warp Messaging
2. Registers each validator with their weight and node ID
3. Marks the validator set as initialized (permanent, one-time operation)

#### Required Information

You'll need:
- **Conversion Data**: Validator information from your subnet-to-L1 conversion
- **Message Index**: Position in the Warp message queue

<ToolboxMdxWrapper walletMode="l1">
<InitValidatorSet />
</ToolboxMdxWrapper>

</Step>
</Steps>

## Next Steps

Congratulations! Your Validator Manager is now fully configured. In the next section, you'll deploy and configure a Staking Manager to enable permissionless participation, which we will be transitioning to a Permissionless L1.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"title": "Permissioned L1 Setup Speedrun",
"pages": [
"01-create-l1-speedrun",
"02-permissioned-l1-speedrun"
]
}
3 changes: 3 additions & 0 deletions content/academy/permissionless-l1s/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"...02-proof-of-stake",
"---Transformation Requirements---",
"...03-transformation-requirements",
"---Staking Manager Setup---",
"04-speedrun-base-l1",
"...05-staking-manager-setup",
"---More coming soon...---"
]
}
8 changes: 4 additions & 4 deletions scripts/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"avaplatform/icm-relayer": "v1.7.4"
},
"testnet": {
"avaplatform/avalanchego": "v1.14.0",
"avaplatform/subnet-evm_avalanchego": "v0.8.0_v1.14.0",
"avaplatform/icm-relayer": "v1.7.4"
"avaplatform/avalanchego": "v1.14.0-fuji",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'll be using the mainnet versions release here afaik. you may check the discussion thread here: #3275

"avaplatform/subnet-evm_avalanchego": "v0.8.0-fuji_v1.14.0-fuji",
"avaplatform/icm-relayer": "v1.7.2-fuji"
},
"ava-labs/icm-contracts": "4d5ab0b6dbc653770cfe9709878c9406eb28b71c"
}
}