# Functions
DefaultPebbleOptions returns an optimized set of pebble options.
IsBootstrapped returns true if the db is bootstrapped otherwise return false it returns error if the db is corrupted or other exceptions.
No description provided by the author
NewBootstrappedRegistersWithPath initializes a new Registers instance with a pebble db if the database is not initialized, it close the database and return storage.ErrNotBootstrapped.
No description provided by the author
No description provided by the author
No description provided by the author
NewRegisterBootstrap creates the bootstrap object for reading checkpoint data and the height tracker in pebble This object must be initialized and RegisterBootstrap.IndexCheckpointFile must be run to have the pebble db instance in the correct state to initialize a Registers store.
NewRegisters takes a populated pebble instance with LatestHeight and FirstHeight set.
NewRegistersCache wraps a read cache around Get requests to a underlying Registers object.
OpenDefaultPebbleDB opens a pebble database using default options, such as cache size and comparer.
OpenRegisterPebbleDB opens the database The difference between OpenDefaultPebbleDB is that it uses a customized comparer (NewMVCCComparer) which is needed to implement finding register values at any given height using pebble's SeekPrefixGE function.
No description provided by the author
ReadHeightsFromBootstrappedDB reads the first and latest height from a bootstrapped register db If the register db is not bootstrapped, it returns storage.ErrNotBootstrapped If the register db is corrupted, it returns an error.
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MinLookupKeyLen defines the minimum length for a valid lookup key
Lookup keys use the following format: [code] [owner] / [key] / [height] Where: - code: 1 byte indicating the type of data stored - owner: optional variable length field - key: optional variable length field - height: 8 bytes representing the block height (uint64) - separator: '/' is used to separate variable length fields (required 2)
Therefore the minimum key would be 3 bytes + # of bytes for height [code] / / [height].
# Variables
ErrAlreadyBootstrapped is the sentinel error for an already bootstrapped pebble instance.
# Structs
No description provided by the author
Cache is a read-through cache for underlying storage layer.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Registers library that implements pebble storage for registers given a pebble instance with root block and root height populated.
No description provided by the author
# Interfaces
No description provided by the author
# Type aliases
No description provided by the author