From f27b3f99672ac93645d67a5495bca4d7cde9afe6 Mon Sep 17 00:00:00 2001 From: owenwahlgren Date: Thu, 7 Nov 2024 11:59:34 -0500 Subject: [PATCH] validatormanager overview, remove index for evm-l1s --- content/docs/evm-l1s/meta.json | 1 - content/docs/evm-l1s/validator-manager/contract.mdx | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/content/docs/evm-l1s/meta.json b/content/docs/evm-l1s/meta.json index d8a33df6f54..764e41c3354 100644 --- a/content/docs/evm-l1s/meta.json +++ b/content/docs/evm-l1s/meta.json @@ -2,7 +2,6 @@ "title": "evm-l1s", "root": true, "pages": [ - "index", "---Validator Manager---", "validator-manager/contract", "validator-manager/add-validator", diff --git a/content/docs/evm-l1s/validator-manager/contract.mdx b/content/docs/evm-l1s/validator-manager/contract.mdx index a52be87c015..32169256111 100644 --- a/content/docs/evm-l1s/validator-manager/contract.mdx +++ b/content/docs/evm-l1s/validator-manager/contract.mdx @@ -42,6 +42,12 @@ PoSValidatorManager <|-- NativeTokenStakingManager The contracts for ValidatorManager can be found in the Teleporter repository [here](https://github.com/ava-labs/teleporter/tree/main/contracts/validator-manager) + +## Overview +The `ValidatorManager` contract is used to create and operate a soverign L1. When converting to a soverign L1, the address of the `ValidatorManager` contract is specified in the `ConvertSubnetToL1Tx` transaction to the P-Chain. The `ValidatorManager` contract is then initialized with the initial validator set, and the subnet is converted to an L1 with the initial validators registered to the P-Chain. + +All operations to adding and removing validators after `ConvertSubnetToL1Tx` must be processed through the `ValidatorManager` contract. If the `ValidatorManager` contract is upgradeable, and can be replaced with a new implementation contract if necessary. + ## Deploying Three concrete `ValidatorManager` contracts are provided - `PoAValidatorManager`, `NativeTokenStakingManager`, and `ERC20TokenStakingManager`. `NativeTokenStakingManager` and `ERC20TokenStakingManager` implement `PoSValidatorManager`, which itself implements `ValidatorManager`. These are implemented as [upgradeable](https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/master/contracts/proxy/utils/Initializable.sol) contracts. There are numerous [guides](https://blog.chain.link/upgradable-smart-contracts/) for deploying upgradeable smart contracts, but the general steps are as follows: