pub struct DynNode { /* private fields */ }Expand description
A Dyn node specifies that the node to be executed next is defined dynamically via the stack.
Implementations§
Source§impl DynNode
Constants
impl DynNode
Constants
Sourcepub const DYN_DOMAIN: Felt
pub const DYN_DOMAIN: Felt
The domain of the Dyn block (used for control block hashing).
Sourcepub const DYNCALL_DOMAIN: Felt
pub const DYNCALL_DOMAIN: Felt
The domain of the Dyncall block (used for control block hashing).
Source§impl DynNode
Public accessors
impl DynNode
Public accessors
Sourcepub fn new_dyncall() -> Self
pub fn new_dyncall() -> Self
Creates a new DynNode representing a dyncall operation.
Sourcepub fn is_dyncall(&self) -> bool
pub fn is_dyncall(&self) -> bool
Returns true if the DynNode represents a dyncall operation, and false for dynexec.
Sourcepub fn digest(&self) -> RpoDigest
pub fn digest(&self) -> RpoDigest
Returns a commitment to a Dyn node.
The commitment is computed by hashing two empty words ([ZERO; 4]) in the domain defined by Self::DYN_DOMAIN or Self::DYNCALL_DOMAIN, i.e.:
Hasher::merge_in_domain(&[Digest::default(), Digest::default()], DynNode::DYN_DOMAIN);
Hasher::merge_in_domain(&[Digest::default(), Digest::default()], DynNode::DYNCALL_DOMAIN);Sourcepub fn before_enter(&self) -> &[DecoratorId]
pub fn before_enter(&self) -> &[DecoratorId]
Returns the decorators to be executed before this node is executed.
Sourcepub fn after_exit(&self) -> &[DecoratorId]
pub fn after_exit(&self) -> &[DecoratorId]
Returns the decorators to be executed after this node is executed.
Source§impl DynNode
Mutators
impl DynNode
Mutators
Sourcepub fn set_before_enter(&mut self, decorator_ids: Vec<DecoratorId>)
pub fn set_before_enter(&mut self, decorator_ids: Vec<DecoratorId>)
Sets the list of decorators to be executed before this node.
Sourcepub fn set_after_exit(&mut self, decorator_ids: Vec<DecoratorId>)
pub fn set_after_exit(&mut self, decorator_ids: Vec<DecoratorId>)
Sets the list of decorators to be executed after this node.