Anoma.Node.Transaction.Backends (Anoma v0.34.0)
I am the Transaction Backend module.
I define a set of backends for the execution of the given transaction candidate. Currently, I support transparent resource machine (RM) execution as well as the following debug executions: read-only, key-value store, and blob store executions.
Public API
I have the following public functionality:
Summary
Functions
I execute the specified transaction candidate using the designated backend.
If the transaction is provided as a jam
med noun atom, I first attempt
to apply cue/1
in order to unpack the transaction code.
Types
Functions
@spec execute(node_id, {back, Noun.t()}, id) :: :ok when id: binary(), node_id: String.t(), back: backend()
I execute the specified transaction candidate using the designated backend.
If the transaction is provided as a jam
med noun atom, I first attempt
to apply cue/1
in order to unpack the transaction code.
First, I execute the transaction code on the Anoma VM. Next, I apply processing logic to the resulting value, dependent on the selected backend.
- For read-only backend, the value is sent directly to specified recepient.
- For the key-value and blob store executions, the obtained value is stored and a Complete Event is issued.
- For the transparent Resource Machine (RM) execution, I verify the transaction's validity and compute the corresponding set of nullifiers, which is transmitted as a Nullifier Event.
@spec nullifier_existence_check( Anoma.CairoResource.Transaction.t(), String.t(), binary() ) :: true | {:error, String.t()}
@spec root_existence_check(Anoma.CairoResource.Transaction.t(), String.t(), binary()) :: true | {:error, String.t()}