-
Notifications
You must be signed in to change notification settings - Fork 413
docs: tw351-arbchain-stake-validator-config #2528
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
Draft
pete-vielhaber
wants to merge
25
commits into
master
Choose a base branch
from
tw351-arbchain-stake-and-validator-config
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.
Draft
Changes from 2 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
e618c66
adding stake-and-validator-configs
pete-vielhaber 81e75fc
adding to sidebars.js
pete-vielhaber f083376
Update docs/launch-arbitrum-chain/02-configure-your-chain/common-conf…
pete-vielhaber 149232c
Update docs/launch-arbitrum-chain/02-configure-your-chain/common-conf…
pete-vielhaber 1d46ada
Update docs/launch-arbitrum-chain/02-configure-your-chain/common-conf…
pete-vielhaber 0daf5ad
Update docs/launch-arbitrum-chain/02-configure-your-chain/common-conf…
pete-vielhaber bd961a5
Update docs/launch-arbitrum-chain/02-configure-your-chain/common-conf…
pete-vielhaber 06c1de5
Update docs/launch-arbitrum-chain/02-configure-your-chain/common-conf…
pete-vielhaber dd6c2c5
Update docs/launch-arbitrum-chain/02-configure-your-chain/common-conf…
pete-vielhaber 7ccbe8a
Update docs/launch-arbitrum-chain/02-configure-your-chain/common-conf…
pete-vielhaber 1770776
Update docs/launch-arbitrum-chain/02-configure-your-chain/common-conf…
pete-vielhaber 19ddc33
Update docs/launch-arbitrum-chain/02-configure-your-chain/common-conf…
pete-vielhaber f0636e5
Update docs/launch-arbitrum-chain/02-configure-your-chain/common-conf…
pete-vielhaber 1204dad
Update docs/launch-arbitrum-chain/02-configure-your-chain/common-conf…
pete-vielhaber 11a7a34
resolving sidebars.js issue
pete-vielhaber 53bdd73
Merge branch 'master' into tw351-arbchain-stake-and-validator-config
pete-vielhaber 57601e5
Added quicklooks
pete-vielhaber df3c95a
Merge branch 'tw351-arbchain-stake-and-validator-config' of github.co…
pete-vielhaber c906b72
yarn format
pete-vielhaber a65e565
fixing sidebars; and stake-and-validator-config
pete-vielhaber 84e2d34
removing a quicklook for arbone as it continues to give formatting is…
pete-vielhaber 3cd9d19
Minor edits for readability
pete-vielhaber a6164a9
Editing for readability
pete-vielhaber 1749843
Merge branch 'master' into tw351-arbchain-stake-and-validator-config
pete-vielhaber 40bad6e
Merge branch 'master' into tw351-arbchain-stake-and-validator-config
pete-vielhaber 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
133 changes: 129 additions & 4 deletions
133
...gure-your-chain/common-configurations/04-stake-and-validator-configurations.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 |
---|---|---|
@@ -1,12 +1,137 @@ | ||
--- | ||
title: 'Stake and validator configurations' | ||
description: 'Learn how to configure your Arbitrum chain with a custom stake and validator configurations' | ||
author: | ||
author: pete-vielhaber | ||
sme: | ||
content_type: how-to | ||
tags: ['hide-from-search'] | ||
--- | ||
|
||
- **Base Stake**: Minimum bond required for validators. | ||
- **Stake Token**: Token used for staking. | ||
- **Loser Stake Escrow**: Address for escrowed funds from losing validators. | ||
Arbitrum Orbit chains are customizable Layer 3 (L3) chains that settle to an Arbitrum Layer 2 (L2) chain, such as Arbitrum One. They support validator configurations to ensure chain security through bonding (staking) and assertion challenges. Validators post assertions about the chain's state on the parent L2 chain and can challenge incorrect assertions. Orbit chains can be permissioned, meaning validators must be whitelisted. | ||
|
||
Staking is required for active validation, where validators bond funds to participate. If a validator loses a challenge (e.g., due to a faulty assertion), their bonded stake is escrowed or burned. Configurations such as stake token, base stake, and loser stake escrow are configurable during chain deployment or post-deployment via contract calls. | ||
pete-vielhaber marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
Orbit chains may utilize the BoLD (Bounded Liquidity Delay) protocol for efficient dispute resolution, which affects staking tokens (e.g., `WETH` for BoLD-enabled chains like Arbitrum One/Nova, or `ETH`/native for other chains). | ||
pete-vielhaber marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
## Key concepts | ||
|
||
- **Validators**: Nodes that monitor and assert the chain's state. They can follow strategies from passive monitoring to active assertion creation. Validation adds overhead but enhances security. | ||
- **Staking/Bonding**: Validators deposit a bond (stake) to post assertions. The bond disincentivizes malicious behavior, as forfeiting the stake results in lost challenges. | ||
- **Permissioned Validation**: Validators must get added to an allowlist in the chain's Rollup contract. | ||
- **Tradeoffs**: A lower base stake reduces entry barriers but increases attack risks (e.g., spam challenges halting the chain). Higher stakes promote honesty but limit participation. | ||
|
||
## Stake token configuration | ||
|
||
The stake token is the asset that validators must bond to participate in asserting the chain's state on the parent L2 chain. It serves as collateral for challenges. | ||
|
||
### Details | ||
|
||
- Can be `ETH` (native gas token) or an `ERC-20` token. | ||
- **For BoLD-enabled chains** (e.g., settling to Arbitrum One or Nova), it defaults to `WETH`. | ||
- **For non-BoLD chains**, it defaults to the parent chain's native token (usually `ETH`). | ||
- Currently, it's often hardcoded to `ETH` in basic deployments, but customizable to an `ERC-20` contract address in advanced setups. Future updates will expand `ERC-20` support. | ||
|
||
### How to Configure | ||
|
||
- During deployment in the [Arbitrum Orbit deployment portal](https://orbit.arbitrum.io/): | ||
1. Connect your wallet (may require switching to Arbitrum Sepolia for testnets). | ||
2. In the configuration form, enter the stake token's contract address on the parent L2 chain. | ||
3. Use `0x0000000000000000000000000000000000000000` for `ETH`. | ||
- **Post-deployment**: Not directly modifiable; set during initial Rollup contract creation. | ||
|
||
### Default | ||
|
||
`ETH` (or parent chain native token). | ||
pete-vielhaber marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
## Base stake configuration | ||
|
||
The base stake is the minimum amount of the stake token that validators must deposit to bond and post assertions. | ||
|
||
### Details | ||
|
||
- Specified as a float value (e.g., in `wei` for `ETH`). | ||
- Must be greater than 0. | ||
- **Balances security**: Low values ease entry but risk malicious challenges; high values deter attacks but exclude smaller validators. | ||
|
||
### How to Configure | ||
pete-vielhaber marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
- During deployment in the Orbit portal: | ||
1. In the configuration form, enter the base stake amount as a float. | ||
2. Review and deploy the chain (submits transactions to the parent chain). | ||
- **Post-deployment**: Adjustable via the Rollup contract if permissions allow (e.g., as chain owner). | ||
|
||
### Default | ||
|
||
No specific default; must be set >0 during deployment. | ||
|
||
## Loser stake escrow configuration | ||
|
||
The loser stake escrow is the address where a validator's bonded funds are sent if they lose a challenge (e.g., due to an incorrect assertion). This mechanism acts as a penalty. | ||
|
||
### Details | ||
|
||
- Funds are escrowed (held) rather than immediately burned, allowing potential recovery or governance decisions. | ||
- Recommended: Set to an address controlled by chain owners for management, or a burn address (e.g., `0x000000000000000000000000000000000000dEaD`) if funds should be permanently removed. | ||
|
||
### How to configure | ||
|
||
- **During deployment**: Set in the `loserStakeEscrow` field of the `RollupCreator` configuration. | ||
- **Post-deployment**: | ||
1. As the chain owner or upgrade executor, call the `Rollup.setLoserStakeEscrow(address newEscrow)` function on the Rollup contract. | ||
2. Use tools like Etherscan or a wallet (e.g., MetaMask) to interact with the contract on the parent chain. | ||
pete-vielhaber marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Default | ||
|
||
No default specified; must be configured. | ||
|
||
## Validator configurations and how to setup them up | ||
|
||
Validators are configured during chain deployment and can be run post-launch. Orbit chains support permissioned validators, added to an allowlist. | ||
pete-vielhaber marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
### During Deployment (Initial Setup) | ||
pete-vielhaber marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
1. In the Orbit deployment portal: | ||
- Specify the number of initial validators (e.g., 1 for devnets, more for production). | ||
- The first validator address is auto-generated with a private key (stored in downloaded JSON configs). | ||
- Add additional validator addresses (e.g., your wallet addresses); they get whitelisted in the Rollup contract. | ||
2. Download `nodeConfig.json` and `orbitSetupScriptConfig.json` (these files contain validator private keys—back them up securely). | ||
3. Clone the [orbit-setup-script repo](https://github.com/OffchainLabs/orbit-setup-script). | ||
4. Move configs to the `config` directory. | ||
5. Run the setup script (e.g., via Docker or locally) to fund and initialize validators: | ||
|
||
pete-vielhaber marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Example command to fund: `yarn run fund-bonder --privateKey 0xYourPrivateKey --l2rpc https://sepolia.arbitrum.io/rpc --l3rpc http://localhost:8449`. | ||
|
||
6. Deploy the chain; validators are now bonded with the base stake. | ||
|
||
### Adding Validators Post-Deployment (Permissioned Chains) | ||
pete-vielhaber marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
1. As the upgrade executor (chain admin), call `setValidator(address[] calldata validators, bool[] calldata isValidator)` on the Rollup contract to update the allowlist. | ||
2. Ensure the new validator has a wallet funded with the base stake amount in the stake token. | ||
|
||
### Running a Validator Node | ||
pete-vielhaber marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
Validators run as enhanced full nodes. Prerequisites: A funded wallet for bonding (base stake in stake token) and gas (parent chain native token). | ||
|
||
1. Set up a full node (see Arbitrum docs for base config). | ||
2. **Add Orbit chain info**: `--chain.info-json=<Orbit chain's info JSON>`. | ||
3. **Enable validation**: `--node.staker.enable=true`. | ||
4. **Choose a strategy** (via `--node.staker.strategy` or `--node.bold.strategy` for BoLD): | ||
|
||
| Strategy | Description | Gas Usage | Bonding Required? | Recommended For | | ||
| ------------ | --------------------------------------------------------------------------- | ----------------------------- | ----------------- | ----------------------------------------------------------------------------------------- | | ||
| Watchtower | Monitors and logs errors; no onchain actions. | None | No | Low-risk monitoring (default). | | ||
| Defensive | Bonds and challenges bad assertions if detected. | Only on disputes | Yes | Balanced security. | | ||
| StakeLatest | Bonds on latest correct assertion; moves bond for new ones (pre-BoLD only). | Per new assertion | Yes | Active but gas-intensive. | | ||
| ResolveNodes | Bonds on latest; resolves unconfirmed assertions. | Per new/resolution | Yes | Efficient for confirmations. | | ||
| MakeNodes | Creates new assertions periodically; competes with others. | High (creations, resolutions) | Yes | Full active validation; set interval >1 hour via `--node.staker.make-assertion-interval`. | | ||
|
||
5. **Configure wallet**: `--node.staker.parent-chain-wallet.private-key=0xPrivateKey`. | ||
6. **For BoLD**: Enable with `--node.bold.enable=true` (if on older Nitro versions). | ||
7. **Verify**: Check logs for "running as validator" and "validation succeeded". | ||
8. **Bond**: The node will automatically bond the base stake when active; ensure the wallet has funds. | ||
|
||
### Assertion Interval | ||
pete-vielhaber marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
Default one hour for new assertions (via `--node.staker.make-assertion-interval`); must exceed the Rollup's `minimumAssertionPeriod` (~15 minutes). | ||
pete-vielhaber marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
For production, run multiple validators in a network. Test on devnets first. Always back up keys, as they're needed to withdraw bonds. If issues arise, refer to the official Arbitrum docs for updates, as configurations evolve. |
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.
Uh oh!
There was an error while loading. Please reload this page.