-
Notifications
You must be signed in to change notification settings - Fork 523
Permissionless L1s: Optional Base L1 Setup chapter
#3222
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
Open
navillanueva
wants to merge
9
commits into
master
Choose a base branch
from
permissioned-l1s-collapsible-menu
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3e49fca
content
navillanueva 40b63c3
extendable content
navillanueva 5cc89a3
Merge remote-tracking branch 'origin/permissionless-l1s-necessary-pre…
navillanueva 8604bd4
Merge branch 'master' into permissioned-l1s-collapsible-menu
navillanueva 738c44c
Merge remote-tracking branch 'origin/master' into permissioned-l1s-co…
navillanueva db1619a
create speedrun base
navillanueva ff8a52a
teesting push
navillanueva 36ef66f
testing quick creation
navillanueva b06e223
Merge branch 'master' into permissioned-l1s-collapsible-menu
ashucoder9 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 89 additions & 0 deletions
89
content/academy/permissionless-l1s/04-speedrun-base-l1/01-create-l1-speedrun.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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**. |
89 changes: 89 additions & 0 deletions
89
.../academy/permissionless-l1s/04-speedrun-base-l1/02-permissioned-l1-speedrun.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
7 changes: 7 additions & 0 deletions
7
content/academy/permissionless-l1s/04-speedrun-base-l1/meta.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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