Struct akd::directory::Directory

source ·
pub struct Directory<S: Database + Sync + Send, V> { /* private fields */ }
Expand description

The representation of a auditable key directory

Implementations§

Creates a new (stateless) instance of a auditable key directory. Takes as input a pointer to the storage being used for this instance. The state is stored in the storage.

Updates the directory to include the updated key-value pairs.

Provides proof for correctness of latest version

Allows efficient batch lookups by preloading necessary nodes for the lookups.

Takes in the current state of the server and a label. If the label is present in the current state, this function returns all the values ever associated with it, and the epoch at which each value was first committed to the server state. It also returns the proof of the latest version being served at all times.

Poll for changes in the epoch number of the AZKS struct stored in the storage layer. If an epoch change is detected, the object cache (if present) is flushed immediately so that new objects are retrieved from the storage layer against the “latest” epoch. There is a “special” flow in the storage layer to do a storage-layer retrieval which ignores the cache

NOTE: Due to the use of std::thread::sleep(.) this will BLOCK the polling thread, and should be allocated it’s own thread since it won’t yield

Returns an AppendOnlyProof for the leaves inserted into the underlying tree between the epochs audit_start_ep and audit_end_ep.

Retrieves the current azks

HELPERS /// Use this function to retrieve the VRF public key for this AKD.

Gets the root hash of the tree at the latest epoch if the passed epoch is equal to the latest epoch. Will return an error otherwise.

Gets the azks root hash at the current epoch.

Updates the directory to include the updated key-value pairs with possible issues.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.