Mavryk_benchmarks_proto_001_PtAtLas.Sapling_generation
val default_sapling_gen_options : sapling_gen_options
type sapling_transition = {
state_seed : int64;
nullifier_count : int64;
commitment_count : int64;
sapling_tx : Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Sapling.transaction;
}
type forge_info = {
rcm : Mavryk_sapling.Core.Client.Rcm.t;
position : int64;
amount : int64;
address : Mavryk_sapling.Core.Client.Viewing_key.address;
nf : Mavryk_sapling.Core.Client.Nullifier.t;
}
val pp_rpc_diff :
Stdlib.Format.formatter ->
Mavryk_protocol_001_PtAtLas.Protocol.Sapling_repr.diff ->
unit
val gen_rcm : Stdlib.Random.State.t -> Mavryk_sapling.Core.Client.Rcm.t
val add_input :
Mavryk_protocol_001_PtAtLas.Protocol.Sapling_repr.diff ->
Mavryk_sapling.Core.Client.Viewing_key.t ->
Mavryk_sapling.Core.Client.Viewing_key.index ->
int64 ->
int64 ->
Stdlib.Random.State.t ->
(Mavryk_protocol_001_PtAtLas.Protocol.Sapling_repr.diff
* forge_info
* Mavryk_sapling.Core.Client.Viewing_key.index,
'a)
Stdlib.result
Lwt.t
val generate_commitments :
vk:Mavryk_sapling.Core.Client.Viewing_key.t ->
nb_input:int ->
nb_cm:int ->
nb_nf:int ->
diff:Mavryk_protocol_001_PtAtLas.Protocol.Sapling_repr.diff ->
index:Mavryk_sapling.Core.Client.Viewing_key.index ->
Stdlib.Random.State.t ->
(Mavryk_protocol_001_PtAtLas.Protocol.Sapling_repr.diff * forge_info list,
'a)
Stdlib.result
Lwt.t
val add_root :
int ->
Mavryk_raw_protocol_001_PtAtLas.Raw_context.t ->
Mavryk_raw_protocol_001_PtAtLas.Lazy_storage_kind.Sapling_state.Id.t ->
Mavryk_sapling.Core.Client.Viewing_key.t ->
Mavryk_sapling.Core.Client.Viewing_key.index ->
int64 ->
Mavryk_protocol_001_PtAtLas.Protocol.Sapling_repr.diff ->
Stdlib.Random.State.t ->
(Mavryk_raw_protocol_001_PtAtLas.Raw_context.t
* Mavryk_protocol_001_PtAtLas.Protocol.Sapling_repr.diff,
Mavryk_base.TzPervasives.tztrace)
Stdlib.result
Lwt.t
val state_from_rpc_diff :
Mavryk_protocol_001_PtAtLas.Protocol.Sapling_repr.diff ->
Mavryk_sapling.Storage.state
val output :
Mavryk_sapling.Core.Client.Proving.t ->
Mavryk_sapling__Core.Client.Viewing_key.t ->
int64 ->
Stdlib.Random.State.t ->
Mavryk_sapling.Core.Validator.UTXO.output * Stdlib.Int64.t
val outputs :
int ->
Mavryk_sapling.Core.Client.Proving.t ->
Mavryk_sapling__Core.Client.Viewing_key.t ->
Stdlib.Random.State.t ->
int64 * Mavryk_sapling.Core.Validator.UTXO.output list
val make_inputs :
forge_info list ->
Mavryk_sapling.Storage.state ->
Mavryk_sapling.Core.Client.Proving.t ->
Mavryk_sapling__Core.Client.Spending_key.t ->
Mavryk_sapling__Core.Client.Viewing_key.t ->
Mavryk_sapling__Core.Client.Hash.t ->
string ->
(Mavryk_sapling.Core.Validator.UTXO.input list,
'a Mavryk_error_monad.TzTrace.trace)
Stdlib.result
Lwt.t
val init_fresh_sapling_state :
Mavryk_raw_protocol_001_PtAtLas.Raw_context.t ->
(Mavryk_raw_protocol_001_PtAtLas.Raw_context.t
* Mavryk_protocol_001_PtAtLas.Protocol.Lazy_storage_kind.Sapling_state.Id.t,
Mavryk_protocol_environment_001_PtAtLas.Error_monad.error
Mavryk_protocol_environment_001_PtAtLas.Error_monad.trace)
Stdlib.result
Lwt.t
val generate_spending_and_viewing_keys :
Stdlib.Random.State.t ->
Mavryk_sapling.Core.Client.Spending_key.t
* Mavryk_sapling.Core.Client.Viewing_key.t
val prepare_seeded_state_internal :
nb_input:int ->
nb_nf:int ->
nb_cm:int ->
Mavryk_protocol_001_PtAtLas.Protocol.Raw_context.t ->
Stdlib.Random.State.t ->
(Mavryk_protocol_001_PtAtLas.Protocol.Sapling_repr.diff
* forge_info list
* Mavryk_sapling.Core.Client.Spending_key.t
* Mavryk_sapling.Core.Client.Viewing_key.t
* Mavryk_protocol_001_PtAtLas.Protocol.Raw_context.t
* Mavryk_protocol_001_PtAtLas.Protocol.Lazy_storage_kind.Sapling_state.Id.t)
Mavryk_base.TzPervasives.tzresult
Lwt.t
val prepare_seeded_state :
sapling_transition ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.t ->
(Mavryk_protocol_001_PtAtLas.Protocol.Sapling_repr.diff
* forge_info list
* Mavryk_sapling.Core.Client.Spending_key.t
* Mavryk_sapling.Core.Client.Viewing_key.t
* Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.t
* Mavryk_protocol_environment_001_PtAtLas.Z.t,
Mavryk_base.TzPervasives.tztrace)
Stdlib.result
Lwt.t
val sapling_transition_encoding :
sapling_transition Mavryk_base.TzPervasives.Data_encoding.encoding
val sapling_dataset_encoding :
sapling_transition list Mavryk_base.TzPervasives.Data_encoding.encoding
val save : filename:string -> txs:sapling_transition list -> unit
val load_file : string -> (string * sapling_transition) list
val load :
filename:string ->
type_transaction ->
(string * sapling_transition) list
val generate : string -> int -> sapling_gen_options -> unit
val apply_diff :
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.t ->
Mavryk_raw_protocol_001_PtAtLas.Lazy_storage_kind.Sapling_state.Id.t ->
Mavryk_raw_protocol_001_PtAtLas.Sapling_repr.diff ->
(Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.t
* Mavryk_protocol_environment_001_PtAtLas.Z.t,
Mavryk_protocol_environment_001_PtAtLas.Error_monad.error
Mavryk_protocol_environment_001_PtAtLas.Error_monad.trace)
Stdlib.result
Lwt.t