• 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
        • Mmp-trees
          • Mmp-encode-n/c
          • Mmp-encode-c-max
          • Mmp-encode
          • Mmp-write
          • Mmp-decode
          • Mmp-encode-u-map
          • Nibblelist-bytelist-map-sup-len-key
          • Mmp-encode-c-forall
          • Mmp-read
          • Mmp-encoding-p
          • Bytelist-to-nibblelist-keys
          • Mmp-encode-c-exists
          • Bytelist-bytelist-map
          • Nibblelist-bytelist-map
        • Semaphore
        • Database
        • Cryptography
        • Rlp
        • Transactions
        • Hex-prefix
        • Basics
        • Addresses
      • 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
      • Solidity
      • Paco
      • Concurrent-programs
      • Bls12-377-curves
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Ethereum

Mmp-trees

Modified Merkle Patricia trees.

A Modified Merkle Patricia tree (which we abbreviate as `MMP tree' in the documentation of our Ethereum model) is an Ethereum data structure that combines characteristics of Merkle trees and Patricia (a.k.a. radix) trees. MMP trees are described in [YP:D] and in Page `Patricia Tree' of [Wiki]; we reference that page of [Wiki] as `[Wiki:MMP]'.

MMP trees are not merely implementation-level entities. Their root hashes appear at the interface of Ethereum with the external world, e.g. as the stateRoot component of a block [YP:4.3]. Thus, a formalization of MMP trees, in particular of the calculation of root hashes, belongs to a formal model of Ethereum that covers the interface to the external world, even if the formal model is high-level, declarative, and non-executable.

Subtopics

Mmp-encode-n/c
Definition of n [YP:(193)] and c [YP:(194)].
Mmp-encode-c-max
Value of the maximum operator in the second case of the definition of c [YP:(194)].
Mmp-encode
Encode a finite map into an MMP tree.
Mmp-write
Write a value for a key in an MMP tree.
Mmp-decode
Decode an MMP tree into a finite map.
Mmp-encode-u-map
Submaps used to define u(0),\ldots,u(15) in the third case of the definition of c [YP:(194)].
Nibblelist-bytelist-map-sup-len-key
Natural number supremum of the lengths of the keys in a map from nibble arrays to byte arrays.
Mmp-encode-c-forall
Universally quantified formula in the second case of the definition of c [YP:(194)].
Mmp-read
Read the value associated to a key in an MMP tree.
Mmp-encoding-p
Check if a root and database are an MMP encoding of a finite map from byte arrays to byte arrays.
Bytelist-to-nibblelist-keys
Turn (i) a finite map from byte arrays to byte arrays into (ii) a finite map from nibble arrays to byte arrays.
Mmp-encode-c-exists
Existentially quantified formula in the second case of the definition of c [YP:(194)].
Bytelist-bytelist-map
Finite maps from byte arrays to byte arrays.
Nibblelist-bytelist-map
Finite maps from nibble arrays to byte arrays.