Closed nud3l closed 1 year ago
We have chosen to use the production ready tBTC-v2 (summa / keep-network) relay contracts and supporting libraries to support the initial development of the BOB stack. The contracts are already well-optimized for gas consumption and have been used on mainnet Ethereum for quite some time.
A specific advantage of using the Simple Payment Verification (SPV) "Light Relay" developed for tBTC is that we do not need to store all block headers from the genesis / initialization height. It uses stateless SPV proofs and provides some recency guarantee using Bitcoin's difficulty adjustment based on the latest retarget.
proofLength
block headers before and after the retargettxProofDifficultyFactor
There was only one issue highlighted in the Least Authority audit related to the SPV client which was also identified in the interBTC (Substrate / Polkadot) code here. We can solve this issue by checking the coinbase proof as was implemented there. Since BOB will be deployed as a rollup we can make some tradeoffs with regard to gas consumption.
interlay/btc-relay-solidity
This is a Bitcoin chain relay we (Interlay) built a few years ago. It makes use of the summa libraries and provides additional tooling for alternate script types. The relay itself is a "full" SPV client which requires us to validate and store all blocks. It is not gas efficient and contains several notable bugs including reorging the chain based on the height alone - not considering work accumulated. We made the same mistake in the interBTC (Substrate / Polkadot) code here.
ethereum/btcrelay
The "official" Ethereum BTC Relay which has mostly been abandoned by this point. The code has not been updated in several years and the deployment is also unmaintained. It was built using serpent an assembly language with high-level features that compiles to EVM code - the tooling is also not maintained.
@gregdhill as a follow up, can you create a new issue on deploying the BTC relay and figuring out our open questions? Then we can close this issue.
Abstract
Develop a PoC for the BOB stack that allows:
Motivation
The Late Middle Age was a period in Europe preceding the Renaissance. It was characterized by many crisis but saw great progress in the arts and sciences. We chose this name for BOB to reflect the many decisions that will have to be made for the stack and at the same time, the new achievements we will be able to make.
BOB is a large project, and having a PoC will allow us to understand the difficulties in bringing it to the testnet and mainnet readiness.
Goals
Target completion: End of September 2023
Specification
Deliver a proof of concept implementation of the BOB stack rollup and builder platform.
Organizational
Research
Chain
Smart Contracts
Solidity/EVM
UI