Replies: 5 comments 7 replies
-
I read about #221. thanks for sharing @tynes! I am wondering how we can leverage it.
|
Beta Was this translation helpful? Give feedback.
-
Amazing RFC. Does finality provider does some verification on blocks before signing EOTS signatures over the block ? |
Beta Was this translation helpful? Give feedback.
-
Is fast finality required for L2s ? |
Beta Was this translation helpful? Give feedback.
-
Hey @bap2pecs, had a doubt correct me if I am wrong. If finality providers (FPs) sign blocks without validation, and the op stack sequencer is centralised, a malicious block could be included in a batch and posted on L1 (like Bitcoin) without fraud detection. In the absence of fraud proofs, this becomes a security risk. However, adding fraud proofs would require to add a challenge period, which seems to defeat the purpose of fast finality? |
Beta Was this translation helpful? Give feedback.
-
This is OP side's design and implementation. By the way, where is the implementation of finality provider for OP ? |
Beta Was this translation helpful? Give feedback.
-
Context
Babylon provides the Bitcoin staking protocol that allows Bitcoin holders to stake their BTCs natively on the Bitcoin chain to protect any PoS chains. The staking is trustless in the sense that the BTC resides in a self-custodian vault on the native Bitcoin network, without being bridged elsewhere. The litepaper and this thread provide more details.
OP-stack chains can benefit from the Babylon BTC staking protocol in the following aspects:
We are proposing this solution for all OP-stack chains, especially new ones that are still bootstrapping security, with slow batch submission interval and low trust. Imagine there is a new L2 that submits batches every 30 minutes. It’s very risky for the users to trust the sequencer and accept fast tx confirmation.
This blog post explained in detail how Bitcoin staking can be used to benefit rollups.
Design
How BTC staking works. In Babylon’s BTC staking protocol, finality providers (FP) are responsible for signing and submitting finality signatures over data that they want to finalize, e.g., L2 blocks. Stakers can delegate their native BTC to finality providers, such that finality providers will have voting power according to the amount of BTC delegated to them. Finality signatures are signed by using the extractable one-time signature (EOTS) algorithm. EOTS allows the signer to promise that he will only sign a single message under a certain context (i.e. block height related public randomness), otherwise, his private key can be extracted by anyone.
BTC staking for L2 blocks. The Babylon finality provider network will sign every L2 block. Each FP represents some amount of staked BTC thus having different voting power. Those signatures will be periodically sent to the Babylon Chain to verify. So instead of considering an L2 block
finalized
as soon as it can be derived from the currently finalized part of the L1 chain, the sequencer also needs to wait for the block’s EOTS signatures to be verified on the Babylon chain.This requires changing the derivation logic to rely on some external data on the Babylon Chain. This also implies changes in the fault proof system to get the same data. All other parts of the system are external to OP Stack, to meet the modular and minimal design goals of the OP spec. The system in this proposal is deliberately designed as a finality gadget to work on any existing PoS systems.
How the system works:
unsafe
block.unsafe
block containing the tx from L2 RPC nodes. Then Bob queries the Babylon Chain to see whether the block has received votes of more than 2/3 voting power from the FP network. This happens very fast, likely in just a few seconds at most.unsafe
block will eventually becomefinalized
, Bob can accept the tx. Thus fast confirmation is achieved.In the diagram above, the red boxes represent OP-stack components and the yellow boxes represent Babylon components. The only changes we will make in the OP codebase are to let the derivation and fault proof depend on the data from the Babylon system. Thus, this finality gadget is minimally intrusive to the OP codebase.
Implementation
Per spec, an L2 block has three statuses:
finalized
: derived from the currently finalized part of the L1 chainsafe
: derived from the currently canonical L1 chainunsafe
: not derived from L1In our plan, we will change the
finalized
to be: derived from the currently finalized part of the L1 chain and the block is EOTS verified.So we will fork the OP repo and add additional logic in the
EngineQueue
before marking a block asfinalized
:Draft implementation: babylonlabs-io/optimism#5
Fault proof will be modified at a later stage to incorporate similar checks. We will wait for the fault proof to be launched in mainnet and update the fault proof system later. Without the modification, our current change in the derivation pipeline will break the fault proof.
op-program
will be modified by then.Beta Was this translation helpful? Give feedback.
All reactions