In order to emulate multiple searchers locally and testing your setup, systemctl files have been included. The Boost repository also contains a dummy searcher implementation, a useful tool for validating your local configuration and monitoring for uptime. The searcher implementation can be found in the searcher directory, with the binary accessible in the root directory upon successful project build.
- A browser wallet with two accounts
- For testing, one account will be used to emulate the searcher (this account will need to hold funds to deposit)
- The other account will be used to for the builder (this account will needs sufficient funds to send a transaction to the contract)
- Start by funding a few accounts with sepolia ETH
- Download a wallet provider, you can find the one we will use for this demo here, proceed to hit install. Follow any steps requested.
- Once your metmask extention has been added to the browswer, click on the icon and proceed to create a new wallet. It will ask you for a password and provide you with a seed phrase that you will want to keep safe.
- Once you have created your wallet, you will need to add the sepolia network to your wallet. To do this, click on the network dropdown and you should see show/hide Testnets. Hit the link, and toggle testnets. You should now see sepolia and other testnets in the network dropdown.
- Now go ahead and click the profile picture circle on the top right of your wallet interface and hit create account and name it "searcher emulator".
- Now switch back to account 1 and hit account details and rename it "builder". Now click export private key from the account details page and copy the private key. You will need this later.
- Connect to the searcher account in your wallet and get some sepolia ETH from the faucet here. Once you've acquired enough seploia eth, send a transaction with 5-10% of the sepolia eth to the Builder Account. You can get the builder account address that you will need from the wallet, it will appear representation, similar to the following: 0x9f2...5E40
A contract is currently deployed here:
You can find the current deployed contract address in cmd/boost.go
as the default value of ROLLUP_CONTRACT
Step 1. Build boost
command:
$ make all
Step 2. Run boost
command:
$ ./boost --addr :8080 --rollupkey `<builder-private-key>` --buildertoken `<builder-auth-token>`
You can get the builder private key from step 6 in the wallet setup section.
You come up with you're own builder auth token, you will want to set this value as a header X-Builder-Token
in your Builder instance while posting data to Boost.
Step 3. Go here and click on the updateBuilder
. Here you can connect the wallet associated with the builder and set the minimal stake needed to connect to you to get execution hints.
Step 4. Disconnect your builder wallet, this can be done by going to the wallet and clicking on the "Connected" indicator next to your account name in the wallet modal. Now click the 3 dots to the right of the account and press disconnect.
Step 5. Receive commitment hash from builder:
$ curl "http://localhost:8080/commitment?searcherAddress=<searcher-address>"
Step 6. Connect any wallet (to preserve privacy, do not use searcher address) and add the required funds to the deposit
function. In commitment field input hash returned from Step 5. The amount should be equal to or greater than the minimum amount you set in Step 3.
Step 7. Connect as a searcher:
$ ./searcher --boostaddr localhost:8080 --searcherkey <searcher-private-key>
Step 8. Connect to the local env in this postman workspace and send the request under create a block