How to Deploy an AnyTrust chain using the Orbit SDK
This section explains how to initiate an AnyTrust Orbit chain using Arbitrum's Orbit SDK.
This document is under construction and may change significantly as we incorporate style guidance and feedback from readers. Feel free to request specific clarifications by clicking the Request an update button at the top of this document.
See the "set-valid-keyset" example in the Orbit SDK repository for additional guidance.
About AnyTrust Orbit
AnyTrust chains implement the Arbitrum AnyTrust protocol, an alternative to the Arbitrum Rollup protocol. AnyTrust reduces transaction fees by introducing a minor trust assumption in the form of a permissioned set of parties responsible for managing data availability. For an overview of Orbit chain types, please refer to the Orbit SDK introduction.
Deployment steps
The deployment process of AnyTrust chains is very similar to that of Rollup chains, but with some differences that we'll discuss in this guide.
Here are the steps involved in the deployment process:
- Setting up the chain parameters
- Deploying your AnyTrust chain
- Getting the AnyTrust Orbit chain information after deployment
- Setting valid keyset on parent chain
The deployment of an AnyTrust Orbit chain involves defining and setting up the Data Availability Committee (DAC) keyset. This keyset includes keys from the appointed members of the DAC. They are required to ensure the chain's data availability and integrity. Once you have selected your committee members and gathered their keys, the Orbit SDK helps you configure these keys into a keyset.
This keyset is then embedded into the chain, serving as a verification mechanism.
Let's go through each deployment step:
1. Setting up the chain parameters
Similarly to the Rollup chain, you'll need to prepare the AnyTrust chain configuration, including the core contracts and operational parameters that govern the chain's functionality, focusing on parameters specific to AnyTrust chains.
struct Config {
uint64 confirmPeriodBlocks;
uint64 extraChallengeTimeBlocks;
address stakeToken;
uint256 baseStake;
bytes32 wasmModuleRoot;
address owner;
address loserStakeEscrow;
uint256 chainId;
string chainConfig;
uint64 genesisBlockNum;
ISequencerInbox.MaxTimeVariation sequencerInboxMaxTimeVariation;
}
You can create the chainConfig parameter within the Config using prepareChainConfig. You can find more details on that function here.
import { prepareChainConfig } from '@arbitrum/orbit-sdk';
const chainConfig = prepareChainConfig({
chainId: 123_456,
arbitrum: {
InitialChainOwner: deployer,
DataAvailabilityCommittee: true,
},
});
Other than the required chainId and arbitrum.InitialChainOwner params, arbitrum.DataAvailabilityCommittee needs to be set to true for AnyTrust.