Expand description

A model to test properties of common Diem transactions.

The structs and functions in this module together form a simplified model of how common Diem transactions should behave. This model is then used as an oracle for property-based tests – the results of executing transactions through the VM should match the results computed using this model.

For examples of property-based tests written against this model, see the tests/account_universe directory.

Structs

  • Represents the current state of account in a universe, possibly after its state has been updated by running transactions against the universe.
  • Mutable references to a pair of distinct accounts picked from a universe.
  • Allows pairs of accounts to be uniformly randomly selected from an account universe.
  • A set of accounts that has been set up and can now be used to conduct transactions on.
  • A set of accounts which can be used to construct an initial state.
  • Represents a create-account transaction performed in the account universe.
  • Represents a create-account transaction in the account universe where the destination already exists.
  • Represents a insufficient balance transaction
  • Represents a authkey mismatch transaction
  • Represents a peer-to-peer transaction performed in the account universe.
  • Represents a rotate-key transaction performed in the account universe.
  • Represents a sequence number mismatch transaction

Enums

  • Determines the sampling algorithm used to pick accounts from the universe.

Traits

  • Represents any sort of transaction that can be done in an account universe.

Functions