• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Pfcs
      • Wp-gen
      • Dimacs-reader
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Riscv
      • Bitcoin
      • 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
      • Aleo
        • Aleobft
          • Correctness
          • Definition
            • Initialization
            • Transitions
            • States
              • Committees
              • System-states
              • Certificates
              • Messages
              • Transactions
              • Proposals
              • Validator-states
                • Validator-state
                  • Validator-state-fix
                  • Validator-statep
                  • Validator-state-equiv
                  • Make-validator-state
                    • Validator-state->committed
                    • Validator-state->endorsed
                    • Validator-state->blockchain
                    • Change-validator-state
                    • Validator-state->round
                    • Validator-state->last
                    • Validator-state->dag
                  • Address+pos-pairs-with-address
                  • Address+pos
                  • Address+pos-set
                • Blocks
                • Addresses
              • Events
              • Reachability
            • Library-extensions
          • Aleovm
          • Leo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Validator-state

    Make-validator-state

    Basic constructor macro for validator-state structures.

    Syntax
    (make-validator-state [:round <round>] 
                          [:dag <dag>] 
                          [:endorsed <endorsed>] 
                          [:last <last>] 
                          [:blockchain <blockchain>] 
                          [:committed <committed>]) 
    

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

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

    Definition

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

    Macro: make-validator-state

    (defmacro make-validator-state (&rest args)
      (std::make-aggregate 'validator-state
                           args
                           '((:round)
                             (:dag)
                             (:endorsed)
                             (:last)
                             (:blockchain)
                             (:committed))
                           'make-validator-state
                           nil))

    Function: validator-state

    (defun validator-state
           (round dag endorsed last blockchain committed)
      (declare (xargs :guard (and (posp round)
                                  (certificate-setp dag)
                                  (address+pos-setp endorsed)
                                  (natp last)
                                  (block-listp blockchain)
                                  (certificate-setp committed))))
      (declare (xargs :guard t))
      (let ((__function__ 'validator-state))
        (declare (ignorable __function__))
        (b* ((round (mbe :logic (pos-fix round)
                         :exec round))
             (dag (mbe :logic (certificate-set-fix dag)
                       :exec dag))
             (endorsed (mbe :logic (address+pos-set-fix endorsed)
                            :exec endorsed))
             (last (mbe :logic (nfix last) :exec last))
             (blockchain (mbe :logic (block-list-fix blockchain)
                              :exec blockchain))
             (committed (mbe :logic (certificate-set-fix committed)
                             :exec committed)))
          (list (cons 'round round)
                (cons 'dag dag)
                (cons 'endorsed endorsed)
                (cons 'last last)
                (cons 'blockchain blockchain)
                (cons 'committed committed)))))