Closed eyusufatik closed 3 weeks ago
Remove validity condition
Figure out if prev batch hash is asserted in stf to be equal to the first soft confirmation run
figure out if initial state root passed is actually the one used in verifying merkle proofs (it's passed as hint)
remove final state root from input
assert_eq!(
soft_confirmations[index_soft_confirmation].prev_hash(),
previous_batch_hash,
"Soft confirmation previous hash must match the hash of the block before"
);
Yes, it is asserted: assert_eq!( soft_confirmations[index_soft_confirmation].prev_hash(), previous_batch_hash, "Soft confirmation previous hash must match the hash of the block before" );
if so, cant we use the prev hash from soft confirmation instead of giving it as an input :D
prev_soft_confirmation_hash
from input and outputWe already verify sequencer pubkeys in fullnodes:
let batch_proof_output = Vm::extract_output::<
<Da as DaService>::Spec,
BatchProofCircuitOutputV2<<Da as DaService>::Spec, StateRoot>,
>(&proof)
.expect("Proof should be deserializable");
if batch_proof_output.sequencer_da_public_key != self.sequencer_da_pub_key
|| batch_proof_output.sequencer_public_key != self.sequencer_pub_key
{
return Err(anyhow!(
"Proof verification: Sequencer public key or sequencer da public key mismatch. Skipping proof."
).into());
}
On full nodes we verify the ZK proofs on DA, however, some of the outputs has to be checked against known data as these are trusted inputs to the ZK circuit.
These are:
initial_state_root
initial_batch_hash
validity condition
-- i still don't know if this is relevant to our rollup system