Collect all the transactions from a set of certficates.
(transactions-from-certificates certs) → transs
When an anchor is committed, a new block is added to the blockchain, containing all the transactions from the anchor's causal history (which includes the anchor itself), except for the certificates whose transactions have already been added to the blockchain. After computing the set of certificates whose transactions must be included in a block, we call this function to put all those transactions together. We put them together according to the ACL2 total order on certificates; the exact order does not matter, so long as all validators use the same order.
Function:
(defun transactions-from-certificates (certs) (declare (xargs :guard (certificate-setp certs))) (let ((__function__ 'transactions-from-certificates)) (declare (ignorable __function__)) (cond ((emptyp certs) nil) (t (append (certificate->transactions (head certs)) (transactions-from-certificates (tail certs)))))))
Theorem:
(defthm transaction-listp-of-transactions-from-certificates (b* ((transs (transactions-from-certificates certs))) (transaction-listp transs)) :rule-classes :rewrite)