• 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
            • Correctness
            • Definition
              • Transitions
              • Operations
              • States
                • Certificates
                • System-states
                • Messages
                • Validator-states
                  • Validator-state
                    • Validator-state-fix
                    • Validator-statep
                    • Make-validator-state
                    • Validator-state-equiv
                    • Validator-state->committed
                    • Change-validator-state
                    • Validator-state->endorsed
                    • Validator-state->buffer
                    • Validator-state->blockchain
                    • Validator-state->timer
                    • Validator-state->round
                    • Validator-state->last
                    • Validator-state->dag
                  • Validator-state-option
                  • Timer
                  • Address+pos
                  • Address+pos-set
                • Transactions
                • Addresses
                • Blocks
              • Initialization
              • Events
          • Aleobft-stake2
          • Aleobft-dynamic
          • Aleobft-stake
          • Aleobft-proposals
          • 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
  • Validator-states

Validator-state

Fixtype of states of a (correct) validator.

This is a product type introduced by fty::defprod.

Fields
round — posp
dag — certificate-set
buffer — certificate-set
endorsed — address+pos-set
last — natp
blockchain — block-list
committed — certificate-set
timer — timer

As explained in validator-states, faulty validators are modeled with no internal state. This justifies the generic name validator-state for this fixtype, as opposed to something like correct-validator-state.

We model the state of a correct validator as consisting of:

  1. The current round number that the validator is at.
  2. The DAG of certificates, modeled as a set. Invariants about the uniqueness of author and round combinations are stated later.
  3. A buffer of certificates that the validator has received but has not been able to put into the DAG yet because some of its causal history is missing. Certificates move from the buffer to the DAG once their causal history is in the DAG. The buffer is modeled as a set, since ordering does not matter, given the way we formalize (later) certificate movement.
  4. A set of pairs, each consisting of an address and a positive integer, which represents the author-round combinations for which the validator has endorsed proposals by signing them. When a (correct) validator receives a (valid) proposal, not only it signs the proposal and sends the signature back to the sender, but also it keeps track of which proposals it has signed to avoid signing different proposals for the same combination of author and round (such different proposals would come from a faulty validator): this is a critical property to guarantee non-equivocation. Here we model the exchange of proposals and signatures at a more abstract level, but we need to model this aspect to enforce that there will not be different certificates, in the system, with the same combination of author and round number. The use of this component of the state of a correct validator is explained in the definition of which events are possible and which new states they lead to.
  5. The number of the last round at which this validator has committed an anchor.
  6. The blockchain as seen by the validator. We model it as a list of blocks from right to left, i.e. the rightmost block is the oldest one and the leftmost block is the newest one. We leave the genesis block implicit: the rightmost block in our list is actually the block just after the genesis block. This blockchain state component of the validator should be redundant, calculable from the DAG state component and from information about the committed rounds. This is the case also because we do not model garbage collection. However, it is more convenient to explicate the blockchain in order to define the state transition system, and then to prove its redundancy as an invariant, since the proof may require a bit of work.
  7. The set of all the certificates that have been committed so far, i.e. whose transactions have been included in the blockchain. These include not just the anchors, but also the nodes reachable from the anchors via the DAG edges. This state component serves to calculate the new certificates to be committed the next time anchors are committed, by computing the full causal history but removing the already committed certificates. This state component should be redundant, calculable from other state components, but for now we model it explicitly, because that is closer to the implementation.
  8. The state of the timer; see timer.

The address of the validator, which never changes, is captured outside this fixtype, in the map from validator addresses to validator states in system-state.

Invariants on validator states, such as the aforementioned uniqueness of author and round combinations in the DAG certificates, as well as others like disjointness of DAG and buffer, are formalized later.

Subtopics

Validator-state-fix
Fixing function for validator-state structures.
Validator-statep
Recognizer for validator-state structures.
Make-validator-state
Basic constructor macro for validator-state structures.
Validator-state-equiv
Basic equivalence relation for validator-state structures.
Validator-state->committed
Get the committed field from a validator-state.
Change-validator-state
Modifying constructor for validator-state structures.
Validator-state->endorsed
Get the endorsed field from a validator-state.
Validator-state->buffer
Get the buffer field from a validator-state.
Validator-state->blockchain
Get the blockchain field from a validator-state.
Validator-state->timer
Get the timer field from a validator-state.
Validator-state->round
Get the round field from a validator-state.
Validator-state->last
Get the last field from a validator-state.
Validator-state->dag
Get the dag field from a validator-state.