Represents keys in the cache of precompiled ErgoTrees for repeated evaluation.
A family of hints which are about a correspondence between a public image of a secret image and prover's commitment to randomness ("a" in a sigma protocol).
User-defined variables to be put into context.
User-defined variables to be put into context.
Each variable is identified by id: Byte
and can be accessed from a script
using getVar[T](id)
operation.
The value of the variable is represented by sigmastate.Values.Constant instance,
which contains both data value and SType descriptor. The descriptor is checked
against the type T
expected in the script operation. If the types don't match,
exception is thrown and the box spending (protected by the script) fails.
internal container of the key-value pairs
A hint for a prover which helps the prover to prove a statement.
A hint for a prover which helps the prover to prove a statement. For example, if the statement is "pk1 && pk2", and the prover knows only a secret for the public key pk1, the prover fails on proving without a hint. But if the prover knows that pk2 is known to another party, the prover may prove the statement (with an empty proof for "pk2").
Collection of hints to be used by a prover
Collection of hints to be used by a prover
- hints stored in the bag
Base class of the context passed to verifier and prover.
Base class of the context passed to verifier and prover.
A hint which a commitment to randomness associated with a public image of a secret, as well as randomness itself.
A hint which a commitment to randomness associated with a public image of a secret, as well as randomness itself. Please note that this randomness should be kept in secret by the prover.
- image of a secret
- randomness
- commitment to randomness used while proving knowledge of the secret
Script processor which holds pre-compiled reducers for the given scripts.
Script processor which holds pre-compiled reducers for the given scripts. This class is thread-safe.
This class implements optimized reduction of the given pre-compiled script.
This class implements optimized reduction of the given pre-compiled script. Pre-compilation of the necessary graphs is performed as part of constructor and the graphs are stored in the given IR instance.
The code make the following assumptions: 1) the given script doesn't contain both sigmastate.utxo.DeserializeContext and sigmastate.utxo.DeserializeRegister
The code should correspond to reduceToCrypto method, but some operations may be optimized due to assumptions above.
Statistics of ScriptProcessor operations.
Statistics of ScriptProcessor operations.
cache statistics such as hits and misses
one hit counter for each predefined script
Interpreter with enhanced functionality to prove statements.
Proof of correctness of tx spending
A hint which contains a commitment to randomness associated with a public image of a secret.
A hint which contains a commitment to randomness associated with a public image of a secret.
- image of a secret
- commitment to randomness used while proving knowledge of the secret
A hint which contains a proof-of-knowledge for a secret associated with its public image "image", with also the mark that the proof is real.
Settings to configure script processor.
Settings to configure script processor.
collection of scripts to ALWAYS pre-compile (each given by ErgoTree bytes)
maximum number of entries in the cache
if true, then cache statistics is recorded
number of cache load operations between two reporting events
A reducer which represents precompiled script reduction function.
A reducer which represents precompiled script reduction function. The function takes script execution context and produces the ReductionResult, which contains both sigma proposition and the approximation of the cost taken by the reduction.
A hint which is indicating that a secret associated with its public image "image" is already proven.
A hint which contains a commitment to randomness associated with a public image of a secret.
A hint which contains a commitment to randomness associated with a public image of a secret.
- image of a secret
- commitment to randomness used while proving knowledge of the secret
A hint which contains a proof-of-knowledge for a secret associated with its public image "image", with also the mark that the proof is real.
Used as a fallback reducer when precompilation failed due to soft-fork condition.
Represents keys in the cache of precompiled ErgoTrees for repeated evaluation. Note, SigmaValidationSettings are part of the key, which is important, because the output of compilation depends on validation settings.
serialized bytes of ErgoTree instance (returned by ErgoTreeSerializer)
validation settings which where used for soft-forkable compilation.