HOW TOs 15: Run a Verifier Node
Repo Here:
github.com/gel...
Introduction
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.
Downloading the Client
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
Minting the Node Key
Before running a node, an ERC2771 node key is required.
Getting the Gas Token
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.
Minting the Key
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.
Delegating the Key
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 address
contract_: 0xf4D4a4f8B3F4799E7206511F1A2E112cB2329687 (MockNodeKey address)
tokenId: ID of node key NFT
rights: 0x0000000000000000000000000000000000000000000000000000000000000000
enable: true
send native CGT: 0
Info: For production projects, this step will be done on delegate.xyz.
Getting a Gelato Relay API Key
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.
Running the Node Client on a Personal Computer
Follow these steps to run the verifier node.
Using the CLI
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
When prompted, enter the required details:
Operator private key
Gelato Relay API Key
Node key IDs
Claiming rewards
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 rpc.arb-bluebe... --private-key ${privateKey} 0xC7767767121Ec2cB831EF299b9F6db201cEAac8a ${payload}
Smart Contracts
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.
Негізгі бет # HOW TOs 15: Run a Verifier Node
No video
Пікірлер