- Introduction
- Downloading the Client
- Minting the Node Key
- Delegating the Key
- Getting a Gelato Relay API Key
- Running the Node Client on a Personal Computer
- Running the Node Client on a Server
- Claiming rewards
- Smart Contracts
A Node Client verifies the accuracy of the data posted by the sequencer on the settlement layer to secure the rollup. It serves as an observation node that monitors the rollup protocol. Follow this guide to run a Node Client on Arbitrum Blueberry.
To begin, download the appropriate client based on your operating system:
verifier-linux.zip
verifier-macos.zip
verifier-win.zip
Unzip the downloaded file to get a folder containing the verifier node application:
verifier-linux/verifier-node-app-linux
verifier-macos/verifier-node-app-macos
verifier-win/verifier-node-app-win.exe
Before running a node, an ERC2771 node key is required.
To mint the node key, you need the custom gas token of the chain. Go to the Arbitrum Blueberry public page and request the custom gas token from the faucet. After receiving it on Arbitrum Sepolia, bridge it to the Arbitrum Blueberry chain following the instructions on the page.
Once you have the gas token, mint the node key by calling the mint function on the contract:
- Navigate to
MockNodeKey.mint
. - Fill in the required parameters:
_to
: Address to mint to_amount
: Number of NFTs to mint
Info: Projects can build a frontend page to make this process seamless and customized for users.
After minting your node key, delegate rights to an Operator
to sign attestation transactions on your behalf. This ensures secure and efficient operation of your node.
- Navigate to
DelegateRegistry.delegateERC721
. - Fill in the required parameters:
to
: Operator addresscontract_
:0xf4D4a4f8B3F4799E7206511F1A2E112cB2329687
(MockNodeKey address)tokenId
: ID of node key NFTrights
:0x0000000000000000000000000000000000000000000000000000000000000000
enable
: truesend native CGT
: 0
Info: For production projects, this step will be done on delegate.xyz.
The Gelato API Key is crucial for running the node as it allows the node to use Gelato Relay for transaction fees. This simplifies the process by enabling the use of various tokens (like USDC) to pay for gas fees.
To obtain the Gelato API Key:
- Go to Gelato Relay.
- Connect your wallet to create your account.
- Click "Create App" and complete the basic details.
- After creating the app, go to the details and copy the API key.
For a detailed tutorial, watch this video.
Follow these steps to run the verifier node.
-
Open the terminal or command prompt.
-
Navigate to the directory containing the verifier node application.
-
Execute the application:
- For Linux:
./verifier-node-app-linux
- For macOS:
./verifier-node-app-macos
- For Windows:
verifier-node-app-win.exe
- For Linux:
-
When prompted, enter the required details:
- Operator private key
- Gelato Relay API Key
- Node key IDs
If you follow all the correct steps, you should see a confirmation screen like this one:
To avoid entering settings each time you launch the application, you can use a .env
file. Follow these steps:
-
Create a
.env
file in the folder containing the node application (e.g.,/verifier-macos
). -
Add the following environment variables to the
.env
file:OPERATOR_PK= RELAY_API_KEY= # Set either one #------------1------------- NODE_KEY_IDS= # [1,2,3] #------------2------------- AUTO_KEY_IDS=true WALLETS=[] # [] (Use all fetched node key IDs delegated to operator) or # ["0x...","0x..."] (Use fetched node key IDs that are delegated to operator and owned by defined wallets) #------------------------- # Optionals DEBUG= # true/false ONCE= # true/false INTERVAL= # In ms (Must be > 60000) L1_RPC_URL= # Your personal RPC URL of settlement chain (Arbitrum Sepolia RPC) # Setting `L1_RPC_URL` is highly recommended for better reliability and performance
For a detailed tutorial, watch this video.
The verifier node is also available as a Docker image. Follow these steps to run it on a server, for example, on GCP:
- Create a Cloud Run job pulling the
gelatodigital/blueberry-verifier
image. - Set up the environment variables.
- Add a scheduler trigger to execute the container every hour.
To claim rewards, call the claimReward
function on the Referee smart contract.
function claimReward(uint256 nodeKeyId,uint256 numberOfBatches) external
With foundry cast:
$ cast calldata "claimReward(claimReward(uint256,uint256))" ${nodeKeyId} 50
You will get the payload to call that looks like 0x86bb8f3700000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000032
Send a transaction with the payload:
$ cast send --rpc-url https://rpc.arb-blueberry.gelato.digital --private-key ${privateKey} 0xC7767767121Ec2cB831EF299b9F6db201cEAac8a ${payload}
As part of the Verifier Node package, Gelato provides 3 smart contracts essential for this service. Read the specs of the smart contracts here.
This guide should help you set up and run the Arbitrum Blueberry Verifier Node. If you have any further questions or issues, please reach out to the team.