pub trait ORAMDebug<ValueSize: ArrayLength<u8>> {
    // Required method
    fn check_invariants(&self) -> Vec<A64Bytes<ValueSize>>;
}
Expand description

Trait that helps to debug ORAM. This should only be used in tests.

This should never be called in production. IMO the best practice is that implementations of this trait should be gated by #[cfg(test)], or perhaps #[cfg(debug_assertions)].

Required Methods§

source

fn check_invariants(&self) -> Vec<A64Bytes<ValueSize>>

Systematically check the data structure invariants, asserting that they hold. Also, produce an array representation of the logical state of the ORAM.

This should not change the ORAM.

This is returned so that recursive path ORAM can implement check_invariants by first asking recursive children to check their invariants.

Implementors§