# Running BOLD Challenges on Sepolia This guide will set you up to perform BOLD challenges on Ethereum Sepolia. Sepolia endpoint (keep internal): ``` export SEPOLIA_ENDPOINT=https://sepolia-geth.arbitrum.io/bold8c7987d041065bf04de03d19ba50 ``` Honest validator priv key (keep internal): ``` export HONEST=ee3c0bf39d962a78dba87aee083cae443cabc814f93677f302cbabde844237db ``` Evil validator priv key (keep internal): ``` export EVIL=93690ac9d039285ed00f874a2694d951c1777ac3a165732f36ea773f16179a89 ``` **I recommend running your own Sepolia node**. It is fast to sync and less error prone than using a external RPC. ## Building the Testnode and Deploying Contracts Ensure you have [docker compose]() installed. Clone `https://github.com/OffchainLabs/nitro` and checkout `sepolia-tooling`. Then `git submodule update --init --recursive`. Next, navigate to `nitro-testnode` and modify the `l1conn` value in `sepolia-bold.bash` to [https://sepolia-geth.arbitrum.io/bold8c7987d041065bf04de03d19ba50 ](https://sepolia-geth.arbitrum.io/bold8c7987d041065bf04de03d19ba50 ) Then, you can run the testnode setup to build the docker image and deploy the contracts to Sepolia: ``` ./sepolia-bold.bash --init --dev --detach --no-tokenbridge --validate ``` After everything is setup, you should see something like this: ``` [+] Running 2/2 ✔ Container nitro-testnode-poster-1 Running 0.0s ✔ Container nitro-testnode-sequencer-1 Running ``` You can then view the logs for your batch poster and sequencer with `docker logs -f nitro-testnode-poster-1` and `docker logs -f nitro-testnode-sequencer-1` to ensure they are operational. ## Funding and Approving Validators' Stake Tokens The next step is to fund two validators with **stake tokens** needed for participating in challenges. The deployment from the last step also deployed a stake token at an address. As a first step, you'll need to extract the `l2` ![Screen Shot 2023-11-17 at 20.28.52](https://hackmd.io/_uploads/Hy06K7SNT.png) then click on `nitro-testnode_config` and find the `l2_chain_info.json` file: ![Screen Shot 2023-11-17 at 20.28.57](https://hackmd.io/_uploads/S1KR7NHVa.png) Copy it somewhere - you'll need it later. Within, find the `rollup` and `stake-token` addresses. Set them as env vars: ``` export ROLLUP_ADDR=... export STAKE_TOKEN_ADDR=... ``` Next, in the Nitro repo, navigate to `bold/` and run: ``` go run tools/fund-weth/main.go \ -validator-priv-keys=$HONEST,$EVIL \ -l1-endpoint=$SEPOLIA_ENDPOINT \ -rollup-address=$ROLLUP_ADDR \ -stake-token-address=$STAKE_TOKEN_ADDR ``` ## Send out Arbitrum Deposits Next, send out some Arbitrum deposits of different values. Avoid sending 0.001 ETH deposits, as those will kick off a challenge. The evil validator is configured to intercept all deposits of 0.001 ETH. Find the `inbox` address in the `l2_chain_info.json` and send out Arbitrum deposits via a tool such as metamask. Send to the `inbox` address any value **except for 0.001 ETH**. Send it the hex data: ``` 0x0f4d14e9000000000000000000000000000000000000000000000000000082f79cd90000 ``` After 6-7 minutes, the batch poster will post a batch containing your deposits. ## Run your Validator(s) The validator docker compose files and configs are contained in a separate repo. Clone the repo: ``` git clone https://github.com/rauljordan/bold-validator-starter-kit && cd bold-validator-starter-kit ``` Copy your `l2_chain_info.json` file into both `honest-validator` and `evil-validators` folders. Run your honest validator: ``` ./validator.sh --private-key $HONEST --eth-rpc-endpoint $SEPOLIA_ENDPOINT ``` Run your evil validator in a separate window ``` ./validator.sh --evil --private-key $HONEST --eth-rpc-endpoint $SEPOLIA_ENDPOINT ``` ## Send out a Deposit Value to Kick-Off a Challenge Next, send out a deposit for `0.001` ETH using metamask to the `inbox` address. After 6-7 mins, a batch will be posted, and your validators will disagree. A challenge will then begin.