From ea7cbf41a64a263b59d36db0786addb6d536b670 Mon Sep 17 00:00:00 2001 From: just_ppe <84311757+ppedziwiatr@users.noreply.github.com> Date: Thu, 30 Jan 2025 13:31:21 +0100 Subject: [PATCH] prod avs docs (#92) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * prod avs docs * docs: depositing stake on strategy * docs: avs - registration parameters * docs: avs - move deposit step after registration * docs: avs small fixes * docs: domain change * docs: avs consensus and controller key * docs: avs info about restricted attesters for task definition * fixes after review --------- Co-authored-by: Michał Szynwelski --- docs/avs/redstone-avs.md | 4 - docs/avs/running-avs-operator-mainnet.md | 187 ++++++++++++++++++ ...tor.md => running-avs-operator-testnet.md} | 2 +- docs/avs/service-components.md | 2 +- docusaurus.config.js | 4 + 5 files changed, 193 insertions(+), 6 deletions(-) create mode 100644 docs/avs/running-avs-operator-mainnet.md rename docs/avs/{running-avs-operator.md => running-avs-operator-testnet.md} (99%) diff --git a/docs/avs/redstone-avs.md b/docs/avs/redstone-avs.md index 3d89b8c4..ad261b6c 100644 --- a/docs/avs/redstone-avs.md +++ b/docs/avs/redstone-avs.md @@ -32,7 +32,3 @@ This streamlined process greatly enhances the scalability of the solution, as it In the traditional implementation, the relayer typically selects a specific subset of prices closest to the median and transmits only that subset to the blockchain. However, with the AVS approach, only the final median price and timestamp are directly submitted to the blockchain, meaning the gas consumption does not scale with the number of oracle nodes used to calculate the median. This approach not only reduces the cost associated with on-chain operations but also enables the system to handle a larger volume of data inputs without compromising efficiency. - -:::info -In the initial phase, AVS will provide the ETH/USD price feed to the Polygon network. -::: diff --git a/docs/avs/running-avs-operator-mainnet.md b/docs/avs/running-avs-operator-mainnet.md new file mode 100644 index 00000000..1a675df1 --- /dev/null +++ b/docs/avs/running-avs-operator-mainnet.md @@ -0,0 +1,187 @@ +--- +sidebar_position: 5 +sidebar_label: "🛠️ Running AVS Operator (Mainnet)" +--- + +# Running AVS Operator + +Becoming an operator in the RedStone AVS ecosystem is a unique opportunity to play a crucial role in a cutting-edge, decentralized oracle network. +As an operator, you will contribute directly to the security and accuracy of data that powers smart contracts and decentralized applications across the blockchain. +Not only will you be helping to maintain the integrity of this innovative system, but you’ll also have the chance to earn rewards for your participation. + +:::info +The following instructions apply to setting up an operator in the mainnet environment running on Ethereum [Mainnet](https://etherscan.io/) (L1), where the EigenLayer contracts +and Othenic contracts responsible for operator rewards are deployed. Additionally, the L2 Base [Base](https://basescan.org/) network hosts contracts that validate attester signatures +and store the current price and its timestamp. +::: + +To become an operator in the RedStone AVS network, you’ll need to follow the four steps outlined below. + +## Step 1: Getting Whitelisted as an Operator + +In order to register as an Operator, you must be first added to the operator whitelist. + +Currently, we are in Phase 1, during which only selected operators are being whitelisted. This process may change in Phase 2, allowing for broader participation. + +## Step 2: Registering as an Operator + +After being whitelisted, the next step in becoming an operator involves registering with both the AVS and EigenLayer systems. +This registration process is essential for establishing an identity and enabling participation in the RedStone AVS network. + +To register, the following command should be executed in the terminal: + +```bash +docker run --platform linux/amd64 -it public.ecr.aws/y7v2w8b2/avs-othentic-client:fc63f951 \ + operator register \ + --l1-chain mainnet +``` + +After executing the command, the following information will be required: + +- **Operator's Private Key** (The [Controller Key](https://docs.othentic.xyz/main/avs-framework/othentic-cli/operator-registration#controller-key-and-consensus-key)): This is the key used to sign up with the Othentic shared security protocol and is the account to which restakers delegate their staked assets. +- **Use a different private key for Consensus?** (The [Consensus Key](https://docs.othentic.xyz/main/avs-framework/othentic-cli/operator-registration#controller-key-and-consensus-key)): Choose "Yes" if you want to use a separate key for signing consensus messages, otherwise select "No" to use the same key. +- **AVS Governance Contract Address**: the following contract address should be entered: `0x6f943318b05AD7c6EE596A220510A6D64B518dd8` +- **Rewards Receiver Address** – Optional. If left blank, it defaults to the operator's address. +- If you are not yet registered with EigenLayer, you will be prompted to provide additional details, such as your operator name, description, website, logo URL, and Twitter profile. + +:::important +After registering, please inform us so we can add you to the [restricted attesters list](https://docs.othentic.xyz/main/avs-framework/othentic-consensus/task-and-task-definitions#set-restricted-operator-set-for-a-task) for the task definition. +::: + +## Step 3: Depositing Stake on a Supported Strategy + +After registering as an operator in EigenLayer, you must deposit stake on one or more of the supported staking strategies. +This stake ensures that the operator has a financial commitment to the network. + +:::info +Having a non-zero stake is essential to obtain voting power in the RedStone AVS ecosystem. Without it, your operator is inactive and will not be able to participate effectively in consensus and governance. +::: + +Below, you'll find the list of currently supported staking strategies. +You can either use the deposit command provided for each strategy or perform a restake manually via the EigenLayer application ([Restake](https://app.eigenlayer.xyz/restake)). + +### EIGEN Strategy + +**Strategy Address:** [0x7079A4277eAF578cbe9682ac7BC3EfFF8635ebBf](https://etherscan.io/address/0x7079A4277eAF578cbe9682ac7BC3EfFF8635ebBf) + +**Restake:** https://app.eigenlayer.xyz/restake/EIGEN + +**Deposit Command:** + +```bash +docker run --platform linux/amd64 -it public.ecr.aws/y7v2w8b2/avs-othentic-client:fc63f951 \ + operator deposit \ + --l1-chain mainnet \ + --staking-contract EIGENETH +``` + +### ether.fi Strategy + +**Strategy Address:** [0x83E9115d334D248Ce39a6f36144aEaB5b3456e75](https://etherscan.io/address/0x83E9115d334D248Ce39a6f36144aEaB5b3456e75) + +**Deposit Command:** + +```bash +docker run --platform linux/amd64 -it public.ecr.aws/y7v2w8b2/avs-othentic-client:fc63f951 \ + operator deposit \ + --l1-chain mainnet \ + --staking-contract-address 0x7079A4277eAF578cbe9682ac7BC3EfFF8635ebBf +``` + +### RATT (RedStoneAVSTestToken) Strategy + +This is a temporary staking strategy. It will be replaced with the RedStone token in the future. + +**Strategy Address:** [0x8a0386043D03EFAd02c992B77F60c0dDc3dBaaaE](https://etherscan.io/address/0x8a0386043D03EFAd02c992B77F60c0dDc3dBaaaE) + +**Deposit Command:** + +```bash +docker run --platform linux/amd64 -it public.ecr.aws/y7v2w8b2/avs-othentic-client:fc63f951 \ + operator deposit \ + --l1-chain mainnet \ + --staking-contract-address 0x8a0386043D03EFAd02c992B77F60c0dDc3dBaaaE +``` + +## Step 4: Preparing the Configuration File + +The next step involves creating a configuration file that will define the essential parameters needed for the operator to function correctly within the RedStone AVS network. +This configuration file, named `.env`, should contain the following content: + +```bash +PRIVATE_KEY = # the Consensus Key of the operator +OPERATOR_ADDRESS = # the public address of the Controller Key. + +L1_RPC= # ethereum mainnet RPC endpoint +L2_RPC= # base RPC endpoint + +AVS_GOVERNANCE_ADDRESS=0x6f943318b05AD7c6EE596A220510A6D64B518dd8 +ATTESTATION_CENTER_ADDRESS=0x2B766957ce3dbab9eC4b227f5086855CeE7a1ad6 +``` + +Below is an explanation of each field and information on which fields need to be filled out: + +| Parameter | Description | +| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `PRIVATE_KEY` | The [Consensus Key](https://docs.othentic.xyz/main/avs-framework/othentic-cli/private-key-management#consensus-key) | +| `OPERATOR_ADDRESS` | The public address of the [Controller Key](https://docs.othentic.xyz/main/avs-framework/othentic-cli/private-key-management#controller-key) (optional if both private keys are the same) | +| `L1_RPC` / `L2_RPC` | The RPC endpoint addresses for the L1 (Ethereum) and L2 (Base) networks, respectively | + +:::tip + +- The fields marked with comments (#) need to be filled in with the appropriate values specific to the operator’s setup. +- Instead of using a `.env` file, you can set these values as system-wide environment variables. + ::: + +## Step 5: Running the Operator + +To operate within the RedStone AVS network, two Docker images are required: [Attester](/docs/avs/service-components#attester) and [Validation API](/docs/avs/service-components#validation-api). +These images can be launched using the following Docker Compose configuration: + +```yaml +services: + operator-attester: + image: public.ecr.aws/y7v2w8b2/avs-othentic-client:fc63f951 + platform: linux/amd64 + command: + [ + "node", + "attester", + "/dns/prod-aggregator1-p2p.a.redstone.finance/tcp/3000/p2p/12D3KooWSBMPURmCU5B8nuXkUw1Tq26FuvDg5LsEcs4WX8dqAxWJ", + "--avs-webapi", + "http://operator-validation-api", + "--avs-webapi-port", + "4002", + "--p2p.port", + "3000", + "--l1-chain", + "mainnet", + "--l2-chain", + "base", + ] + env_file: + - .env + operator-validation-api: + image: public.ecr.aws/y7v2w8b2/avs-validation-api:fc63f951 + platform: linux/amd64 +``` + +To start the operator, simply run the following command in the directory containing the `docker-compose.yml` file: + +```sh +docker compose up +``` + +This will initiate both the Attester and the Validation API services as defined in the Docker Compose file. + +:::tip +The above two Docker images do not necessarily need to be run using Docker Compose. +Depending on the chosen hosting environment, they can be deployed in a variety of other ways that best suit the operational setup. +::: + +### Hardware Requirements + +- CPU: 1 vCPU +- RAM: 2 GB +- Storage: 1 GB +- Internet: Stable and fast connection is recommended diff --git a/docs/avs/running-avs-operator.md b/docs/avs/running-avs-operator-testnet.md similarity index 99% rename from docs/avs/running-avs-operator.md rename to docs/avs/running-avs-operator-testnet.md index a7dbf01f..047d6e5e 100644 --- a/docs/avs/running-avs-operator.md +++ b/docs/avs/running-avs-operator-testnet.md @@ -1,6 +1,6 @@ --- sidebar_position: 4 -sidebar_label: "🛠️ Running AVS Operator" +sidebar_label: "🛠️ Running AVS Operator (Testnet)" --- # Running AVS Operator diff --git a/docs/avs/service-components.md b/docs/avs/service-components.md index f1e804f8..560e0dc5 100644 --- a/docs/avs/service-components.md +++ b/docs/avs/service-components.md @@ -53,4 +53,4 @@ Additionally, the Attesters are credited with an appropriate reward in the contr RedStone will kickstart the network by managing the Task Performer and Aggregator. However, we encourage external operators to join and contribute to the network's decentralization. To participate, operators need to set up an Attester and a corresponding Validation API. -For detailed instructions on how to configure, register, and run an operator, please refer to our [guide](/docs/avs/running-avs-operator). +For detailed instructions on how to configure, register, and run an operator, please refer to our [guide](/docs/avs/running-avs-operator-mainnet). diff --git a/docusaurus.config.js b/docusaurus.config.js index c97289a6..4aff823e 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -160,6 +160,10 @@ const config = { from: "/docs/get-started/lombard", to: "/docs/get-started/price-feeds/types-of-feeds/lombard", }, + { + from: "/docs/avs/running-avs-operator", + to: "/docs/avs/running-avs-operator-testnet", + }, ], }, ],