You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the Batch proof commits to L1 hashes added to Citrea (see #1771), we must make sure in the batch proof that these hashes are correct.
Along with the block hash, the BitcoinLightClient contract is supplied with the merkle root of the wtxid's of bitcoin transactions. We'll also add depth of txid merkle proof for the coinbase transaction later on (issue to be created).
Making sure L1 hash is correct is easy, just supply headers, hash and check for equality.
To make sure wtxid root and coinbase txid merkle proof depth is correct, we'll have to supply a smaller version of our BitcoinDa InclusionProof for each L1 block added to the BitcoinLightClient contract, and verify it before allowing for the system transaction that will insert these L1 block information to the contract.
This way, the light client proof can be sure that the state transition extracted from a batch proof is valid.
This "short-form" proof struct will have 3 fields (name due change):
fnverify(&self) -> (Da::SlotHash,[u8;32],u8){// first verify coinbase tx inclusion with respect to header// extract wtxid commitment from coinbase tx assert it is equal to self.wtxid_commitment// return hash(header), wtxid commitment, len(coinbase_tx_tx_id_merkle_proof)}
The text was updated successfully, but these errors were encountered:
Since the Batch proof commits to L1 hashes added to Citrea (see #1771), we must make sure in the batch proof that these hashes are correct.
Along with the block hash, the
BitcoinLightClient
contract is supplied with the merkle root of the wtxid's of bitcoin transactions. We'll also add depth of txid merkle proof for the coinbase transaction later on (issue to be created).Making sure L1 hash is correct is easy, just supply headers, hash and check for equality.
To make sure wtxid root and coinbase txid merkle proof depth is correct, we'll have to supply a smaller version of our
BitcoinDa InclusionProof
for each L1 block added to theBitcoinLightClient
contract, and verify it before allowing for the system transaction that will insert these L1 block information to the contract.This way, the light client proof can be sure that the state transition extracted from a batch proof is valid.
This "short-form" proof struct will have 3 fields (name due change):
It will implement a verify function aslo:
The text was updated successfully, but these errors were encountered: