Arbitrum
Summary
Arbitrum (opens in a new tab) is an EVM compatible Optimistic rollup.
- Arbiscan (opens in a new tab) is its chain explorer.
- The deployment addresses for its smart contract are found here (opens in a new tab).
- The gateway and verifier solution developed for the mainnet (Arbitrum One) chain can also be used for other Nitro stack chains (including AnyTrust and Orbit (opens in a new tab) chains).
High level overview
The Arbitrum rollup contract (opens in a new tab) is called by the ValidatorWallet
(opens in a new tab) (e.g. this transaction (opens in a new tab)) to update the latest created and committed nodes.
Arbitrum has a fully implemented disection based dispute resolution process refereed by an L1 contract. It is not neccesarily the case that a RBlock
posted to L1 is verified and finalised, but if the challenge period passes without a dispute being initiated the RBlock
is considered confirmed.
Context
The context used is returned from the latestConfirmed()
method of the Arbitrum rollup contract. The integer returned is the ID of the latest confirmed RBlock
which represents a batch of transactions or state transitions that are bundled together and committed to Ethereum mainnet.
Commit
The commit body contains the RLP encoded block data as well as the sendRoot
(The Merkle root of the outbox tree state) for the latest confirmed RBlock
(the context).
This process of fetching the sendRoot
is outlined in the Arbitrum documentation: How can I verify that an L2 block has been processed as part of a specific RBlock? (opens in a new tab).
We filter the NodeCreated
event for the latest confirmed RBlock
event NodeCreated(
uint64 indexed nodeNum,
bytes32 indexed parentNodeHash,
bytes32 indexed nodeHash,
bytes32 executionHash,
Assertion assertion,
bytes32 afterInboxBatchAcc,
bytes32 wasmModuleRoot,
uint256 inboxMaxCount
);
The latest L2 blockHash
and sendRoot
is contained (heavily nested) in the RBlock
(event.args.assertion.afterState.globalState.bytes32Vals
) in the GlobalState
struct (opens in a new tab) nested in the Assertion
struct (opens in a new tab) emitted with the event.
Verification
The Unruggable gateway Typescript prover implementation used for Arbitrum Nitro stack chains is EthProver.ts
.
The on-chain verification of Nitro proofs is handled by the NitroVerifier.sol
which fetches the node data from the rollup contract (getNode
) and verifies that it matches the data returned with the commit.
Arbitrum utilises the same Patricia Merkle Trie structure as Layer 1 Ethereum for its storage and account tries. As such proof verification utilises SecureMerkleTrie.sol
by proxy of our EthTrieHooks.sol
library.