Snark_pool_diff.Makemodule Pool :
Intf.Snark_resource_pool_intf
with type transition_frontier := Transition_frontier.ttype t = Mina_wire_types.Network_pool.Snark_pool.Diff_versioned.V2.t = | Add_solved_work of Transaction_snark_work.Statement.t
* Ledger_proof.t One_or_two.t Priced_proof.t |
| Empty |
type verified = tval sexp_of_verified : verified -> Ppx_sexp_conv_lib.Sexp.tval verified_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> verifiedtype compact = {work : Transaction_snark_work.Statement.t; |
fee : Currency.Fee.t; |
prover : Signature_lib.Public_key.Compressed.t; |
}val compact_to_yojson : compact -> Yojson.Safe.tval compact_of_yojson :
Yojson.Safe.t ->
compact Ppx_deriving_yojson_runtime.error_orval hash_fold_compact :
Ppx_hash_lib.Std.Hash.state ->
compact ->
Ppx_hash_lib.Std.Hash.stateval hash_compact : compact -> Ppx_hash_lib.Std.Hash.hash_valuetype Structured_log_events.t += | Snark_work_received of {
} |
val snark_work_received_structured_events_id : Structured_log_events.idval snark_work_received_structured_events_repr : Structured_log_events.reprinclude Intf.Resource_pool_diff_intf
with type t := t
and type verified := t
and type pool := Pool.tval to_yojson : t -> Yojson.Safe.tval verified_to_yojson : t -> Yojson.Safe.tval sexp_of_verified : t -> Ppx_sexp_conv_lib.Sexp.tval verified_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> tval rejected_to_yojson : rejected -> Yojson.Safe.tval sexp_of_rejected : rejected -> Ppx_sexp_conv_lib.Sexp.tval rejected_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> rejectedval empty : tval size : t -> intUsed to check whether or not information was filtered out of diffs * during diff application. Assumes that diff size will be the equal or * smaller after application is completed.
val score : t -> intHow big to consider this diff for purposes of metering.
val summary : t -> stringval verify :
Pool.t ->
t Network_peer.Envelope.Incoming.t ->
t Network_peer.Envelope.Incoming.t Async_kernel.Deferred.Or_error.tWarning: It must be safe to call this function asynchronously!
val unsafe_apply :
Pool.t ->
t Network_peer.Envelope.Incoming.t ->
( [ `Accept | `Reject ] * t * rejected,
[ `Locally_generated of t * rejected | `Other of Core_kernel.Error.t ] )
Async_kernel.Deferred.Result.tWarning: Using this directly could corrupt the resource pool if it conincides with applying locally generated diffs or diffs from the network or diffs from transition frontier extensions.
val is_empty : t -> boolval update_metrics :
t Network_peer.Envelope.Incoming.t ->
Mina_net2.Validation_callback.t ->
Logger.t option ->
unitval compact_json : t -> Yojson.Safe.t optionval of_result :
( ( _, _ ) Snark_work_lib.Work.Single.Spec.t Snark_work_lib.Work.Spec.t,
Ledger_proof.t )
Snark_work_lib.Work.Result.t ->
t