Interface WorldStatePreimageStorage.Updater

Enclosing interface:
WorldStatePreimageStorage

public static interface WorldStatePreimageStorage.Updater
A write transaction for batching preimage insertions into world state preimage storage.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Atomically persists all staged preimage mappings to the underlying storage.
    putAccountTrieKeyPreimage(org.apache.tuweni.bytes.Bytes32 trieKey, org.hyperledger.besu.datatypes.Address preimage)
    Stages a mapping from an account trie key to its original address preimage.
    putStorageTrieKeyPreimage(org.apache.tuweni.bytes.Bytes32 trieKey, org.apache.tuweni.units.bigints.UInt256 preimage)
    Stages a mapping from a storage trie key to its original slot index preimage.
    void
    Discards all staged preimage mappings without writing to the underlying storage.
  • Method Details

    • putStorageTrieKeyPreimage

      WorldStatePreimageStorage.Updater putStorageTrieKeyPreimage(org.apache.tuweni.bytes.Bytes32 trieKey, org.apache.tuweni.units.bigints.UInt256 preimage)
      Stages a mapping from a storage trie key to its original slot index preimage.
      Parameters:
      trieKey - the hash of the slot index
      preimage - the original UInt256 storage slot index
      Returns:
      this updater, to allow method chaining
    • putAccountTrieKeyPreimage

      WorldStatePreimageStorage.Updater putAccountTrieKeyPreimage(org.apache.tuweni.bytes.Bytes32 trieKey, org.hyperledger.besu.datatypes.Address preimage)
      Stages a mapping from an account trie key to its original address preimage.
      Parameters:
      trieKey - the hash of the address
      preimage - the original Address
      Returns:
      this updater, to allow method chaining
    • commit

      void commit()
      Atomically persists all staged preimage mappings to the underlying storage.
    • rollback

      void rollback()
      Discards all staged preimage mappings without writing to the underlying storage.