• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Bigmems
      • Builtins
      • Execloader
      • Aleo
        • Aleobft
          • Aleobft-static
          • Aleobft-stake2
          • Aleobft-dynamic
          • Aleobft-stake
          • Aleobft-proposals
            • Correctness
            • Definition
              • Initialization
              • Transitions
              • States
                • Committees
                • System-states
                • Certificates
                • Transactions
                • Proposals
                • Messages
                • Validator-states
                • Blocks
                  • Blocks-last-round
                  • Blocks-orderedp
                  • Block
                    • Block-fix
                    • Block-equiv
                    • Make-block
                      • Block->transactions
                      • Change-block
                      • Block->round
                      • Blockp
                    • Block-list
                  • Addresses
                • Events
                • Reachability
            • Library-extensions
          • Leo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Block

    Make-block

    Basic constructor macro for block structures.

    Syntax
    (make-block [:transactions <transactions>] 
                [:round <round>]) 
    

    This is the usual way to construct block structures. It simply conses together a structure with the specified fields.

    This macro generates a new block structure from scratch. See also change-block, which can "change" an existing structure, instead.

    Definition

    This is an ordinary make- macro introduced by fty::defprod.

    Macro: make-block

    (defmacro make-block (&rest args)
      (std::make-aggregate 'block
                           args '((:transactions) (:round))
                           'make-block
                           nil))

    Function: block

    (defun block (transactions round)
     (declare (xargs :guard (and (transaction-listp transactions)
                                 (posp round))))
     (declare (xargs :guard (evenp round)))
     (let ((__function__ 'block))
      (declare (ignorable __function__))
      (b* ((transactions (mbe :logic (transaction-list-fix transactions)
                              :exec transactions))
           (round (mbe :logic (pos-fix round)
                       :exec round)))
        (let ((round (mbe :logic (if (evenp round) round 2)
                          :exec round)))
          (list (cons 'transactions transactions)
                (cons 'round round))))))