mina
mina copied to clipboard
Optional signatures and proofs in archive db
Signatures and proofs can be added when archiving precomputed blocks, not when adding blocks from daemon.
We also discussed adding a commitment to the transaction hashes into blocks, so that we can verify the contents of all blocks in the chain by verifying the proof of the best tip. If we don't do this, we have to replay all transactions to check that the chain stored in the archive is correct.
The simplest way to do this is to add transactions_commitment
to the block, and compute the merkle list hash of the block's transactions. We can then check this outside of the snark; we don't need to worry about it inside the snark.
We can do more if e.g. we want to accumulate the same commitment in the transaction snark (effectively building a global receipt-chain hash), but it doesn't seem necessary.
Add optional fields for proofs and signatures. Can be done post hard fork