pub struct Directory<S, 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.

Takes in the current state of the server and a label along with a “top” number of key updates to generate a proof for.

If the label is present in the current state, this function returns all the values & proof of validity up to top_n_updates results.

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

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 azks root hash at the provided epoch. Note that the root hash should exist at any epoch that the azks existed, so as long as epoch >= 0, we should be fine.

Gets the azks root hash at the current epoch.

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.