pub struct PrivateKernelOracle<'a, N: AztecNode> { /* private fields */ }Expand description
Oracle for private kernel circuit interactions with state trees.
Provides hints and data lookups needed during kernel circuit execution:
- Contract address and class preimages
- Function membership witnesses
- VK membership witnesses in the protocol VK tree
- Note hash and nullifier tree membership witnesses
- Master secret keys for key verification
Implementations§
Source§impl<'a, N: AztecNode> PrivateKernelOracle<'a, N>
impl<'a, N: AztecNode> PrivateKernelOracle<'a, N>
pub fn new( node: &'a N, contract_store: &'a ContractStore, key_store: &'a KeyStore, block_hash: Fr, ) -> Self
Sourcepub async fn get_contract_address_preimage(
&self,
address: &AztecAddress,
) -> Result<Value, Error>
pub async fn get_contract_address_preimage( &self, address: &AztecAddress, ) -> Result<Value, Error>
Get the contract address preimage (instance data including salted init hash).
Returns the contract instance data needed to verify the contract address derivation inside the kernel circuit.
Sourcepub async fn get_contract_class_id_preimage(
&self,
class_id: &Fr,
) -> Result<Value, Error>
pub async fn get_contract_class_id_preimage( &self, class_id: &Fr, ) -> Result<Value, Error>
Get the contract class ID preimage (artifact hash, bytecode commitment).
Returns the contract class data needed to verify class ID derivation.
Sourcepub async fn get_function_membership_witness(
&self,
class_id: &Fr,
function_selector: &Fr,
) -> Result<Value, Error>
pub async fn get_function_membership_witness( &self, class_id: &Fr, function_selector: &Fr, ) -> Result<Value, Error>
Get function membership witness in the contract’s private function tree.
Proves that a function selector belongs to a specific contract class.
Sourcepub async fn get_vk_membership_witness(
&self,
vk_hash: &Fr,
) -> Result<Value, Error>
pub async fn get_vk_membership_witness( &self, vk_hash: &Fr, ) -> Result<Value, Error>
Get VK membership witness in the protocol VK indexed merkle tree.
Proves that a verification key is part of the protocol’s VK tree.
Sourcepub async fn get_note_hash_membership_witness(
&self,
note_hash: &Fr,
) -> Result<Option<Value>, Error>
pub async fn get_note_hash_membership_witness( &self, note_hash: &Fr, ) -> Result<Option<Value>, Error>
Get note hash membership witness at the current block.
Sourcepub async fn get_nullifier_membership_witness(
&self,
nullifier: &Fr,
) -> Result<Option<Value>, Error>
pub async fn get_nullifier_membership_witness( &self, nullifier: &Fr, ) -> Result<Option<Value>, Error>
Get nullifier membership witness at the current block.
Sourcepub async fn get_note_hash_tree_root(&self) -> Result<Fr, Error>
pub async fn get_note_hash_tree_root(&self) -> Result<Fr, Error>
Get the note hash tree root from the block header.
Sourcepub async fn get_master_secret_key(
&self,
pk_hash: &Fr,
) -> Result<Option<Fr>, Error>
pub async fn get_master_secret_key( &self, pk_hash: &Fr, ) -> Result<Option<Fr>, Error>
Get the master secret key (sk_m) for key verification in the kernel.
Sourcepub async fn get_block_hash_membership_witness(
&self,
block_hash: &Fr,
) -> Result<Option<Value>, Error>
pub async fn get_block_hash_membership_witness( &self, block_hash: &Fr, ) -> Result<Option<Value>, Error>
Get block hash membership witness in the archive tree.
Sourcepub async fn get_updated_class_id_hints(
&self,
address: &AztecAddress,
) -> Result<Value, Error>
pub async fn get_updated_class_id_hints( &self, address: &AztecAddress, ) -> Result<Value, Error>
Get updated class ID hints (public data witnesses for class ID updates).
Sourcepub async fn get_debug_function_name(
&self,
contract_address: &AztecAddress,
function_selector: &FunctionSelector,
) -> Result<Option<String>, Error>
pub async fn get_debug_function_name( &self, contract_address: &AztecAddress, function_selector: &FunctionSelector, ) -> Result<Option<String>, Error>
Get debug function name from selector (for error messages).
Sourcepub fn block_hash(&self) -> &Fr
pub fn block_hash(&self) -> &Fr
Get the block hash used for consistent state reads.
Auto Trait Implementations§
impl<'a, N> Freeze for PrivateKernelOracle<'a, N>
impl<'a, N> !RefUnwindSafe for PrivateKernelOracle<'a, N>
impl<'a, N> Send for PrivateKernelOracle<'a, N>
impl<'a, N> Sync for PrivateKernelOracle<'a, N>
impl<'a, N> Unpin for PrivateKernelOracle<'a, N>
impl<'a, N> !UnwindSafe for PrivateKernelOracle<'a, N>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more