op-proposer sends tx to L2OO for state commitment, along with the EOTS sig/pub rand/proof of inclusion for verification.
L2OO calls the BabylonController contract which calls the EOTS verifier contract (https://github.com/parketh/babylon-eots-verifier) which gets the voting power data from the Babylon BTC staking oracle contract.
It's designed in this way to minimize the changes in the OP codebase. For example, now we don't need to store the consumer chain ID which is required by the EOTS verifier contract for security purpose. We can init the data in the BabylonController contract.
Test
follow the official tutorial, install dependencies such as direnv and hook it in shell. run ./scripts/getting-started/versions.sh and upgrade deps (e.g. pnpm) if some are less than the min version.
create .envrc file and add required ENVs. add a new one as well:
Summary
op-proposer sends tx to L2OO for state commitment, along with the EOTS sig/pub rand/proof of inclusion for verification.
L2OO calls the BabylonController contract which calls the EOTS verifier contract (https://github.com/parketh/babylon-eots-verifier) which gets the voting power data from the Babylon BTC staking oracle contract.
It's designed in this way to minimize the changes in the OP codebase. For example, now we don't need to store the consumer chain ID which is required by the EOTS verifier contract for security purpose. We can init the data in the BabylonController contract.
Test
follow the official tutorial, install dependencies such as
direnv
and hook it in shell. run./scripts/getting-started/versions.sh
and upgrade deps (e.g. pnpm) if some are less than the min version.create
.envrc
file and add required ENVs. add a new one as well:then run
direnv allow
run
make submodules
to install submodules as well.then run
./scripts/getting-started/config.sh
to createpackages/contracts-bedrock/deploy-config/getting-started.json
last run
npm run snapshots
to generate abi, run tests and perform formal verificationNow, let's test by deploying the contract (see
packages/contracts-bedrock/README.md
):add to
.envrc
and load it:then run:
it's successfully deployed at https://sepolia.etherscan.io/address/0xbb40F5B141B2219181DFd804826d5b8233c8B156
then load the contract in remix using some fake code to verify the state var is added correctly: