Skip to content

Commit c3761fc

Browse files
committed
Generate snark worker rpc types
1 parent b6bb170 commit c3761fc

File tree

2 files changed

+163
-0
lines changed

2 files changed

+163
-0
lines changed

mina-p2p-messages/src/v2/generated.rs

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,60 @@ pub struct BlockchainSnarkBlockchainStableV2 {
244244
pub proof: MinaBaseProofStableV2,
245245
}
246246

247+
/// **OCaml name**: `Transaction_witness.Stable.V2`
248+
///
249+
/// Gid: `990`
250+
/// Location: [src/lib/transaction_witness/transaction_witness.ml:54:4](https://github.com/MinaProtocol/mina/blob/bfd1009/src/lib/transaction_witness/transaction_witness.ml#L54)
251+
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, BinProtRead, BinProtWrite)]
252+
pub struct TransactionWitnessStableV2 {
253+
pub transaction: MinaTransactionTransactionStableV2,
254+
pub first_pass_ledger: MinaBaseSparseLedgerBaseStableV2,
255+
pub second_pass_ledger: MinaBaseSparseLedgerBaseStableV2,
256+
pub protocol_state_body: MinaStateProtocolStateBodyValueStableV2,
257+
pub init_stack: MinaBasePendingCoinbaseStackVersionedStableV1,
258+
pub status: MinaBaseTransactionStatusStableV2,
259+
pub block_global_slot: MinaNumbersGlobalSlotSinceGenesisMStableV1,
260+
}
261+
262+
/// **OCaml name**: `Snark_worker.Worker.Rpcs_versioned.Get_work.V2.T.response`
263+
///
264+
/// Gid: `1111`
265+
/// Location: [src/lib/snark_worker/snark_worker.ml:29:10](https://github.com/MinaProtocol/mina/blob/bfd1009/src/lib/snark_worker/snark_worker.ml#L29)
266+
///
267+
///
268+
/// Gid: `169`
269+
/// Location: [src/std_internal.ml:137:2](https://github.com/MinaProtocol/mina/blob/bfd1009/src/std_internal.ml#L137)
270+
/// Args: (SnarkWorkerWorkerRpcsVersionedGetWorkV2TResponseA0 , NonZeroCurvePoint ,)
271+
///
272+
///
273+
/// Gid: `60`
274+
/// Location: [src/option.ml:4:0](https://github.com/MinaProtocol/mina/blob/bfd1009/src/option.ml#L4)
275+
/// Args: (SnarkWorkerWorkerRpcsVersionedGetWorkV2TResponseA0 , NonZeroCurvePoint ,)
276+
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, BinProtRead, BinProtWrite, Deref)]
277+
pub struct SnarkWorkerWorkerRpcsVersionedGetWorkV2TResponse(
278+
pub Option<(
279+
SnarkWorkerWorkerRpcsVersionedGetWorkV2TResponseA0,
280+
NonZeroCurvePoint,
281+
)>,
282+
);
283+
284+
/// **OCaml name**: `Snark_worker.Worker.Rpcs_versioned.Submit_work.V2.T.query`
285+
///
286+
/// Gid: `1112`
287+
/// Location: [src/lib/snark_worker/snark_worker.ml:59:10](https://github.com/MinaProtocol/mina/blob/bfd1009/src/lib/snark_worker/snark_worker.ml#L59)
288+
///
289+
///
290+
/// Gid: `1057`
291+
/// Location: [src/lib/snark_work_lib/work.ml:90:6](https://github.com/MinaProtocol/mina/blob/bfd1009/src/lib/snark_work_lib/work.ml#L90)
292+
/// Args: SnarkWorkerWorkerRpcsVersionedGetWorkV2TResponseA0 , LedgerProofProdStableV2
293+
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, BinProtRead, BinProtWrite)]
294+
pub struct SnarkWorkerWorkerRpcsVersionedSubmitWorkV2TQuery {
295+
pub proofs: TransactionSnarkWorkTStableV2Proofs,
296+
pub metrics: SnarkWorkerWorkerRpcsVersionedSubmitWorkV2TQueryMetrics,
297+
pub spec: SnarkWorkerWorkerRpcsVersionedGetWorkV2TResponseA0,
298+
pub prover: NonZeroCurvePoint,
299+
}
300+
247301
/// **OCaml name**: `Mina_base__Zkapp_account.Zkapp_uri.Stable.V1`
248302
///
249303
/// Gid: `73`
@@ -434,6 +488,36 @@ pub struct PicklesProofProofsVerified2ReprStableV2Proof {
434488
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, BinProtRead, BinProtWrite, Deref)]
435489
pub struct Blake2MakeStableV1(pub crate::string::ByteString);
436490

491+
/// Derived name: `Snark_worker.Worker.Rpcs_versioned.Submit_work.V2.T.query.metrics`
492+
///
493+
/// Gid: `506`
494+
/// Location: [src/lib/one_or_two/one_or_two.ml:7:4](https://github.com/MinaProtocol/mina/blob/bfd1009/src/lib/one_or_two/one_or_two.ml#L7)
495+
/// Args: (crate :: number :: Float64 , SnarkWorkerWorkerRpcsVersionedSubmitWorkV2TQueryMetricsA1 ,)
496+
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, BinProtRead, BinProtWrite)]
497+
#[polymorphic_variant]
498+
pub enum SnarkWorkerWorkerRpcsVersionedSubmitWorkV2TQueryMetrics {
499+
#[allow(non_camel_case_types)]
500+
One(
501+
(
502+
crate::number::Float64,
503+
SnarkWorkerWorkerRpcsVersionedSubmitWorkV2TQueryMetricsA1,
504+
),
505+
),
506+
#[allow(non_camel_case_types)]
507+
Two(
508+
(
509+
(
510+
crate::number::Float64,
511+
SnarkWorkerWorkerRpcsVersionedSubmitWorkV2TQueryMetricsA1,
512+
),
513+
(
514+
crate::number::Float64,
515+
SnarkWorkerWorkerRpcsVersionedSubmitWorkV2TQueryMetricsA1,
516+
),
517+
),
518+
),
519+
}
520+
437521
/// Derived name: `Transaction_snark_work.T.Stable.V2.proofs`
438522
///
439523
/// Gid: `506`
@@ -448,6 +532,25 @@ pub enum TransactionSnarkWorkTStableV2Proofs {
448532
Two((LedgerProofProdStableV2, LedgerProofProdStableV2)),
449533
}
450534

535+
/// Derived name: `Snark_worker.Worker.Rpcs_versioned.Get_work.V2.T.response.a.0.instances`
536+
///
537+
/// Gid: `506`
538+
/// Location: [src/lib/one_or_two/one_or_two.ml:7:4](https://github.com/MinaProtocol/mina/blob/bfd1009/src/lib/one_or_two/one_or_two.ml#L7)
539+
/// Args: SnarkWorkerWorkerRpcsVersionedGetWorkV2TResponseA0Single
540+
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, BinProtRead, BinProtWrite)]
541+
#[polymorphic_variant]
542+
pub enum SnarkWorkerWorkerRpcsVersionedGetWorkV2TResponseA0Instances {
543+
#[allow(non_camel_case_types)]
544+
One(SnarkWorkerWorkerRpcsVersionedGetWorkV2TResponseA0Single),
545+
#[allow(non_camel_case_types)]
546+
Two(
547+
(
548+
SnarkWorkerWorkerRpcsVersionedGetWorkV2TResponseA0Single,
549+
SnarkWorkerWorkerRpcsVersionedGetWorkV2TResponseA0Single,
550+
),
551+
),
552+
}
553+
451554
/// **OCaml name**: `Pickles_base__Proofs_verified.Stable.V1`
452555
///
453556
/// Gid: `512`
@@ -2074,6 +2177,22 @@ pub struct MinaBaseFeeWithProverStableV1 {
20742177
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, BinProtRead, BinProtWrite, Deref)]
20752178
pub struct NetworkPeerPeerIdStableV1(pub crate::string::ByteString);
20762179

2180+
/// **OCaml name**: `Mina_transaction__Transaction.Stable.V2`
2181+
///
2182+
/// Gid: `882`
2183+
/// Location: [src/lib/transaction/transaction.ml:46:4](https://github.com/MinaProtocol/mina/blob/bfd1009/src/lib/transaction/transaction.ml#L46)
2184+
///
2185+
///
2186+
/// Gid: `880`
2187+
/// Location: [src/lib/transaction/transaction.ml:8:6](https://github.com/MinaProtocol/mina/blob/bfd1009/src/lib/transaction/transaction.ml#L8)
2188+
/// Args: MinaBaseUserCommandStableV2
2189+
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, BinProtRead, BinProtWrite)]
2190+
pub enum MinaTransactionTransactionStableV2 {
2191+
Command(Box<MinaBaseUserCommandStableV2>),
2192+
FeeTransfer(MinaBaseFeeTransferStableV2),
2193+
Coinbase(MinaBaseCoinbaseStableV1),
2194+
}
2195+
20772196
/// **OCaml name**: `Mina_transaction_logic__Zkapp_command_logic.Local_state.Value.Stable.V1`
20782197
///
20792198
/// Gid: `890`
@@ -2559,6 +2678,37 @@ pub struct ProtocolVersionStableV1 {
25592678
pub patch: crate::number::Int64,
25602679
}
25612680

2681+
/// Derived name: `Snark_worker.Worker.Rpcs_versioned.Get_work.V2.T.response.a.0.single`
2682+
///
2683+
/// Gid: `1055`
2684+
/// Location: [src/lib/snark_work_lib/work.ml:12:8](https://github.com/MinaProtocol/mina/blob/bfd1009/src/lib/snark_work_lib/work.ml#L12)
2685+
/// Args: TransactionWitnessStableV2 , LedgerProofProdStableV2
2686+
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, BinProtRead, BinProtWrite)]
2687+
pub enum SnarkWorkerWorkerRpcsVersionedGetWorkV2TResponseA0Single {
2688+
Transition(
2689+
MinaStateSnarkedLedgerStateStableV2,
2690+
TransactionWitnessStableV2,
2691+
),
2692+
Merge(
2693+
Box<(
2694+
MinaStateSnarkedLedgerStateStableV2,
2695+
LedgerProofProdStableV2,
2696+
LedgerProofProdStableV2,
2697+
)>,
2698+
),
2699+
}
2700+
2701+
/// Derived name: `Snark_worker.Worker.Rpcs_versioned.Get_work.V2.T.response.a.0`
2702+
///
2703+
/// Gid: `1056`
2704+
/// Location: [src/lib/snark_work_lib/work.ml:61:6](https://github.com/MinaProtocol/mina/blob/bfd1009/src/lib/snark_work_lib/work.ml#L61)
2705+
/// Args: SnarkWorkerWorkerRpcsVersionedGetWorkV2TResponseA0Single
2706+
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, BinProtRead, BinProtWrite)]
2707+
pub struct SnarkWorkerWorkerRpcsVersionedGetWorkV2TResponseA0 {
2708+
pub instances: SnarkWorkerWorkerRpcsVersionedGetWorkV2TResponseA0Instances,
2709+
pub fee: CurrencyFeeStableV1,
2710+
}
2711+
25622712
/// **OCaml name**: `Parallel_scan.Sequence_number.Stable.V1`
25632713
///
25642714
/// Gid: `1058`
@@ -2711,6 +2861,16 @@ pub struct NetworkPoolSnarkPoolDiffVersionedStableV2AddSolvedWork1 {
27112861
pub fee: MinaBaseFeeWithProverStableV1,
27122862
}
27132863

2864+
/// Derived name: `Snark_worker.Worker.Rpcs_versioned.Submit_work.V2.T.query.metrics.a.1`
2865+
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, BinProtRead, BinProtWrite)]
2866+
#[polymorphic_variant]
2867+
pub enum SnarkWorkerWorkerRpcsVersionedSubmitWorkV2TQueryMetricsA1 {
2868+
#[allow(non_camel_case_types)]
2869+
Transition,
2870+
#[allow(non_camel_case_types)]
2871+
Merge,
2872+
}
2873+
27142874
/// Derived name: `Transaction_snark_scan_state.Stable.V2.previous_incomplete_zkapp_updates.1`
27152875
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, BinProtRead, BinProtWrite)]
27162876
#[polymorphic_variant]

mina-p2p-messages/types-v2.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ Consensus__Proof_of_stake.Make_str.Data.Consensus_state.Value.Stable.V2.t
1414
Sync_status.T.Stable.V1.t
1515
Trust_system__Peer_status.Stable.V1.t
1616
Blockchain_snark__Blockchain.Stable.V2.t
17+
Transaction_witness.Stable.V2.t
18+
Snark_worker.Worker.Rpcs_versioned.Get_work.V2.T.response
19+
Snark_worker.Worker.Rpcs_versioned.Submit_work.V2.T.query

0 commit comments

Comments
 (0)