@dashevo/dapi-grpc 5.0.3 → 5.1.0-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -72,6 +72,11 @@ service Platform {
72
72
  returns (GetIdentityByNonUniquePublicKeyHashResponse);
73
73
  rpc waitForStateTransitionResult(WaitForStateTransitionResultRequest)
74
74
  returns (WaitForStateTransitionResultResponse);
75
+ // What the node answering knows of a state transition, by hash, without
76
+ // waiting: committed, in its mempool, or unknown to it. Unproved and per node
77
+ // (protocol version 15 and later)
78
+ rpc getRecentStateTransitionStatus(GetRecentStateTransitionStatusRequest)
79
+ returns (GetRecentStateTransitionStatusResponse);
75
80
  // @sdk-ignore: Consensus params fetched via Tenderdash RPC
76
81
  rpc getConsensusParams(GetConsensusParamsRequest)
77
82
  returns (GetConsensusParamsResponse);
@@ -100,6 +105,14 @@ service Platform {
100
105
  // What vote polls will end soon?
101
106
  rpc getVotePollsByEndDate(GetVotePollsByEndDateRequest)
102
107
  returns (GetVotePollsByEndDateResponse);
108
+ // Where is a yes/no vote poll: open, or finished with what result, and its
109
+ // tallies (protocol version 15 and later)
110
+ rpc getYesNoVotePollState(GetYesNoVotePollStateRequest)
111
+ returns (GetYesNoVotePollStateResponse);
112
+ // How did a masternode answer a yes/no vote poll? (protocol version 15 and
113
+ // later)
114
+ rpc getMasternodeYesNoVote(GetMasternodeYesNoVoteRequest)
115
+ returns (GetMasternodeYesNoVoteResponse);
103
116
  rpc getPrefundedSpecializedBalance(GetPrefundedSpecializedBalanceRequest)
104
117
  returns (GetPrefundedSpecializedBalanceResponse);
105
118
  rpc getTotalCreditsInPlatform(GetTotalCreditsInPlatformRequest)
@@ -159,6 +172,16 @@ service Platform {
159
172
  returns (GetShieldedNotesCountResponse);
160
173
  rpc getShieldedNullifiers(GetShieldedNullifiersRequest)
161
174
  returns (GetShieldedNullifiersResponse);
175
+ rpc getPrivateDocumentEntries(GetPrivateDocumentEntriesRequest)
176
+ returns (GetPrivateDocumentEntriesResponse);
177
+ // The state transitions one owner has in the Tenderdash block at a height.
178
+ // DAPI answers it from Tenderdash. Without `prove` the client trusts the node.
179
+ rpc getOwnerTransactionsInBlock(GetOwnerTransactionsInBlockRequest)
180
+ returns (GetOwnerTransactionsInBlockResponse);
181
+ // Up to 10 consecutive Tenderdash blocks. DAPI answers it from Tenderdash; without
182
+ // `prove` the client trusts the node. This is for looking blocks up, not for
183
+ // syncing a chain: the gateway allows each IP very few of these requests.
184
+ rpc getBlocks(GetBlocksRequest) returns (GetBlocksResponse);
162
185
  }
163
186
 
164
187
  // Proof message includes cryptographic proofs for validating responses
@@ -2486,7 +2509,31 @@ message GetDocumentHistoryRequest {
2486
2509
  ]; // Only return results after this time in milliseconds
2487
2510
  bool prove = 7; // Flag to request a proof as the response
2488
2511
  }
2489
- oneof version { GetDocumentHistoryRequestV0 v0 = 1; }
2512
+ // Reads the retained revisions of a historical document (a type with
2513
+ // documentsKeepHistory), selected by time, revision, or a composite cursor.
2514
+ message GetDocumentHistoryRequestV1 {
2515
+ // Exclusive cursor returned with a page. Several revisions can share a
2516
+ // block time, so resuming needs the revision as well as the time.
2517
+ message Cursor {
2518
+ uint64 time_ms = 1 [ jstype = JS_STRING ];
2519
+ uint64 revision = 2 [ jstype = JS_STRING ];
2520
+ }
2521
+ bytes data_contract_id = 1;
2522
+ string document_type_name = 2;
2523
+ bytes document_id = 3;
2524
+ google.protobuf.UInt32Value limit = 4;
2525
+ bool prove = 5;
2526
+ oneof filter {
2527
+ uint64 start_at_ms = 6 [ jstype = JS_STRING ];
2528
+ Cursor start_after = 7;
2529
+ uint64 start_at_revision = 8 [ jstype = JS_STRING ];
2530
+ uint64 revision = 9 [ jstype = JS_STRING ];
2531
+ }
2532
+ }
2533
+ oneof version {
2534
+ GetDocumentHistoryRequestV0 v0 = 1;
2535
+ GetDocumentHistoryRequestV1 v1 = 2;
2536
+ }
2490
2537
  }
2491
2538
 
2492
2539
  message GetDocumentHistoryResponse {
@@ -2512,7 +2559,57 @@ message GetDocumentHistoryResponse {
2512
2559
 
2513
2560
  ResponseMetadata metadata = 3; // Metadata about the blockchain state
2514
2561
  }
2515
- oneof version { GetDocumentHistoryResponseV0 v0 = 1; }
2562
+ // A page of a historical document's retained revisions, with the
2563
+ // document's lifecycle as of the same block. Only document types with
2564
+ // documentsKeepHistory retain history; every field here describes such a
2565
+ // historical document.
2566
+ message GetDocumentHistoryResponseV1 {
2567
+ // One retained revision of the historical document.
2568
+ message Entry {
2569
+ uint64 time_ms = 1 [ jstype = JS_STRING ];
2570
+ uint64 revision = 2 [ jstype = JS_STRING ];
2571
+ bytes document = 3;
2572
+ }
2573
+ // Whether the document is current, deleted with retained revisions,
2574
+ // undergoing erasure, or absent with nothing retained.
2575
+ message Lifecycle {
2576
+ enum State {
2577
+ ACTIVE = 0;
2578
+ ABSENT = 1;
2579
+ DELETED = 2;
2580
+ ERASING = 3;
2581
+ }
2582
+ State state = 1;
2583
+ // Revisions the history still retains for the document.
2584
+ uint64 remaining_revisions = 2 [ jstype = JS_STRING ];
2585
+ // Zero unless the document has been deleted.
2586
+ uint64 deleted_at_ms = 3 [ jstype = JS_STRING ];
2587
+ // Zero unless an authorized erasure has started.
2588
+ uint64 erasing_started_at_ms = 4 [ jstype = JS_STRING ];
2589
+ // Timestamp of the newest revision retained when the erasure started.
2590
+ uint64 erasing_from_time_ms = 5 [ jstype = JS_STRING ];
2591
+ // History sequence of the newest revision retained when the erasure
2592
+ // started.
2593
+ uint64 erasing_from_revision = 6 [ jstype = JS_STRING ];
2594
+ }
2595
+ // A page of retained revisions and the document's lifecycle as of the
2596
+ // same block.
2597
+ message History {
2598
+ repeated Entry entries = 1;
2599
+ Lifecycle lifecycle = 2;
2600
+ }
2601
+ oneof result {
2602
+ History history = 1;
2603
+ // One GroveDB proof authenticates the offset-paginated history page,
2604
+ // current pointer, lifecycle reservation, and retained revision count.
2605
+ Proof proof = 2;
2606
+ }
2607
+ ResponseMetadata metadata = 3;
2608
+ }
2609
+ oneof version {
2610
+ GetDocumentHistoryResponseV0 v0 = 1;
2611
+ GetDocumentHistoryResponseV1 v1 = 2;
2612
+ }
2516
2613
  }
2517
2614
 
2518
2615
  message GetIdentityByPublicKeyHashRequest {
@@ -2629,6 +2726,49 @@ message WaitForStateTransitionResultResponse {
2629
2726
  oneof version { WaitForStateTransitionResultResponseV0 v0 = 1; }
2630
2727
  }
2631
2728
 
2729
+ // The answering node's own view of a state transition, read from its Tenderdash
2730
+ // at once, with nothing re-broadcast. Nothing in the answer is proved: mempools
2731
+ // differ between nodes, anyone who saw the signed transition can broadcast it
2732
+ // again, and a node can answer anything. Use it to decide whether waiting longer
2733
+ // makes sense, never to decide that a transition cannot execute: a client that
2734
+ // must know that reads the transition's inputs with proofs (the SDK's proven
2735
+ // transition outcome). A shielded or private document client should ask only the
2736
+ // node it broadcast to, since asking several nodes about one transition spreads
2737
+ // the link between the client's address and the transition.
2738
+ message GetRecentStateTransitionStatusRequest {
2739
+ message GetRecentStateTransitionStatusRequestV0 {
2740
+ bytes state_transition_hash = 1; // The 32-byte hash of the state transition
2741
+ }
2742
+ oneof version { GetRecentStateTransitionStatusRequestV0 v0 = 1; }
2743
+ }
2744
+
2745
+ message GetRecentStateTransitionStatusResponse {
2746
+ message GetRecentStateTransitionStatusResponseV0 {
2747
+ // In a block of this node's chain, from its transaction index
2748
+ message Committed {
2749
+ uint64 height = 1 [ jstype = JS_STRING ]; // Height of the block that holds it
2750
+ // Set only when its result code is not 0: the code and the error, as
2751
+ // waitForStateTransitionResult reports a committed transition's error
2752
+ StateTransitionBroadcastError error = 2;
2753
+ }
2754
+ // In this node's mempool
2755
+ message Pending {}
2756
+ // Neither in this node's mempool nor in its chain. It may be in another
2757
+ // node's mempool, may have been dropped, or may never have been broadcast.
2758
+ // Tenderdash reads no RPC from its mempool cache, so a hash it saw and
2759
+ // dropped also answers this.
2760
+ message Unknown {}
2761
+ oneof status {
2762
+ Committed committed = 1;
2763
+ Pending pending = 2;
2764
+ Unknown unknown = 3;
2765
+ }
2766
+ // The node's latest block when it answered, unproved
2767
+ ResponseMetadata metadata = 4;
2768
+ }
2769
+ oneof version { GetRecentStateTransitionStatusResponseV0 v0 = 1; }
2770
+ }
2771
+
2632
2772
  message GetConsensusParamsRequest {
2633
2773
  message GetConsensusParamsRequestV0 {
2634
2774
  int32 height =
@@ -2924,6 +3064,150 @@ message GetVotePollsByEndDateResponse {
2924
3064
  oneof version { GetVotePollsByEndDateResponseV0 v0 = 1; }
2925
3065
  }
2926
3066
 
3067
+ // The state of a yes/no vote poll, by its id. A node refuses it before
3068
+ // protocol version 15.
3069
+ message GetYesNoVotePollStateRequest {
3070
+ message GetYesNoVotePollStateRequestV0 {
3071
+ // The poll's id (32 bytes), as YesNoVotePoll::unique_id derives it from the
3072
+ // poll
3073
+ bytes vote_poll_id = 1;
3074
+ bool prove = 2;
3075
+ }
3076
+
3077
+ oneof version { GetYesNoVotePollStateRequestV0 v0 = 1; }
3078
+ }
3079
+
3080
+ message GetYesNoVotePollStateResponse {
3081
+ message GetYesNoVotePollStateResponseV0 {
3082
+ // A block a poll opened or closed in
3083
+ message YesNoVotePollBlock {
3084
+ uint64 height = 1 [ jstype = JS_STRING ];
3085
+ uint32 core_height = 2;
3086
+ uint64 time_ms = 3 [ jstype = JS_STRING ];
3087
+ uint32 epoch = 4;
3088
+ }
3089
+
3090
+ // The result a finished poll records
3091
+ message FinishedYesNoVotePoll {
3092
+ bool passed = 1;
3093
+ uint32 yes_voting_power = 2;
3094
+ uint32 no_voting_power = 3;
3095
+ uint32 abstain_voting_power = 4;
3096
+ // The least yes plus no voting power the poll needed
3097
+ uint32 required_voting_power = 5;
3098
+ YesNoVotePollBlock start_block = 6;
3099
+ YesNoVotePollBlock finalization_block = 7;
3100
+ }
3101
+
3102
+ // The poll as it was opened: what it decides and the rule that decides it.
3103
+ // A vote names the poll by id only, so this is where the rule is read.
3104
+ message YesNoVotePoll {
3105
+ // A question anyone puts to the masternodes, asked by a proposal
3106
+ // document
3107
+ message DecisionProposal {
3108
+ // The proposal document's id (32 bytes)
3109
+ bytes document_id = 1;
3110
+ }
3111
+
3112
+ // How a share of the total voting power rounds to a whole voting power
3113
+ enum VotingPowerRounding {
3114
+ DOWN = 0;
3115
+ UP = 1;
3116
+ DOWN_PLUS_ONE = 2;
3117
+ UP_MINUS_ONE = 3;
3118
+ }
3119
+
3120
+ // A share of the total voting power of the masternode list in the
3121
+ // block that closes the poll, PoSe-banned masternodes left out
3122
+ message FractionOfTotal {
3123
+ uint32 numerator = 1;
3124
+ uint32 denominator = 2;
3125
+ VotingPowerRounding rounding = 3;
3126
+ }
3127
+
3128
+ // What the poll decides; its id is derived from this alone
3129
+ oneof purpose { DecisionProposal decision_proposal = 1; }
3130
+ // Yes must be strictly more than numerator / denominator of yes plus no
3131
+ uint32 supermajority_numerator = 2;
3132
+ uint32 supermajority_denominator = 3;
3133
+ // The least yes plus no voting power for the poll to pass
3134
+ oneof minimum_voting_power {
3135
+ uint32 absolute = 4;
3136
+ FractionOfTotal fraction_of_total = 5;
3137
+ }
3138
+ }
3139
+
3140
+ message YesNoVotePollState {
3141
+ // Neither is set when no poll was ever opened with this id
3142
+ oneof status {
3143
+ // Open since this block
3144
+ YesNoVotePollBlock started = 1;
3145
+ FinishedYesNoVotePoll finished = 2;
3146
+ }
3147
+ // The voting power cast so far; zero once the poll is finished and its
3148
+ // votes are removed
3149
+ uint32 yes_voting_power = 3;
3150
+ uint32 no_voting_power = 4;
3151
+ uint32 abstain_voting_power = 5;
3152
+ // The poll, set whenever a status is
3153
+ YesNoVotePoll vote_poll = 6;
3154
+ }
3155
+
3156
+ oneof result {
3157
+ YesNoVotePollState state = 1;
3158
+ Proof proof = 2;
3159
+ }
3160
+ ResponseMetadata metadata = 3;
3161
+ }
3162
+
3163
+ oneof version { GetYesNoVotePollStateResponseV0 v0 = 1; }
3164
+ }
3165
+
3166
+ // A masternode's answer on a yes/no vote poll, by the poll's id. A node refuses
3167
+ // it before protocol version 15.
3168
+ message GetMasternodeYesNoVoteRequest {
3169
+ message GetMasternodeYesNoVoteRequestV0 {
3170
+ // The masternode's pro tx hash (32 bytes)
3171
+ bytes pro_tx_hash = 1;
3172
+ // The poll's id (32 bytes), as YesNoVotePoll::unique_id derives it from the
3173
+ // poll
3174
+ bytes vote_poll_id = 2;
3175
+ bool prove = 3;
3176
+ }
3177
+
3178
+ oneof version { GetMasternodeYesNoVoteRequestV0 v0 = 1; }
3179
+ }
3180
+
3181
+ message GetMasternodeYesNoVoteResponse {
3182
+ message GetMasternodeYesNoVoteResponseV0 {
3183
+ message MasternodeYesNoVote {
3184
+ enum Choice {
3185
+ YES = 0;
3186
+ NO = 1;
3187
+ ABSTAIN = 2;
3188
+ }
3189
+ Choice choice = 1;
3190
+ // How many times the masternode has voted on the poll, its first vote
3191
+ // included
3192
+ uint32 times_voted = 2;
3193
+ }
3194
+
3195
+ message MasternodeYesNoVoteEntry {
3196
+ // Not set when the masternode has not voted on the poll, or its votes
3197
+ // were removed when the poll finished
3198
+ MasternodeYesNoVote vote = 1;
3199
+ }
3200
+
3201
+ oneof result {
3202
+ MasternodeYesNoVoteEntry entry = 1;
3203
+ Proof proof = 2;
3204
+ }
3205
+ ResponseMetadata metadata = 3;
3206
+ }
3207
+
3208
+ oneof version { GetMasternodeYesNoVoteResponseV0 v0 = 1; }
3209
+ }
3210
+
2927
3211
  // What's the state of a contested resource vote? (ie who is winning?)
2928
3212
  message GetContestedResourceVoteStateRequest {
2929
3213
  message GetContestedResourceVoteStateRequestV0 {
@@ -4260,3 +4544,172 @@ message GetShieldedNullifiersResponse {
4260
4544
  }
4261
4545
  oneof version { GetShieldedNullifiersResponseV0 v0 = 1; }
4262
4546
  }
4547
+
4548
+ // A page of the entries of a private document type's store (protocol version 15): the type's
4549
+ // fixed-size encrypted entries in append order, each with the height and time of the block that
4550
+ // appended it. Earlier protocol versions answer that the feature is not active.
4551
+ message GetPrivateDocumentEntriesRequest {
4552
+ message GetPrivateDocumentEntriesRequestV0 {
4553
+ reserved 4;
4554
+ reserved "count";
4555
+ bytes data_contract_id = 1;
4556
+ string document_type_name = 2;
4557
+ // The page's first position; the page reads to the end of the store's chunk holding it
4558
+ // (2^chunk_power entries to a chunk)
4559
+ uint64 start_position = 3 [ jstype = JS_STRING ];
4560
+ bool prove = 5;
4561
+ }
4562
+ oneof version { GetPrivateDocumentEntriesRequestV0 v0 = 1; }
4563
+ }
4564
+
4565
+ message GetPrivateDocumentEntriesResponse {
4566
+ message GetPrivateDocumentEntriesResponseV0 {
4567
+ message PrivateDocumentEntry {
4568
+ uint64 position = 1 [ jstype = JS_STRING ]; // position in the store, from 0 in append order
4569
+ uint64 block_height = 2 [ jstype = JS_STRING ]; // height of the block that appended it
4570
+ uint64 block_time_ms = 3 [ jstype = JS_STRING ]; // time of that block, in milliseconds
4571
+ bytes data = 4; // the entry: entrySize bytes
4572
+ }
4573
+ message PrivateDocumentEntries {
4574
+ repeated PrivateDocumentEntry entries = 1;
4575
+ uint64 total_count = 2 [ jstype = JS_STRING ]; // entries the store holds
4576
+ }
4577
+ oneof result {
4578
+ PrivateDocumentEntries entries = 1;
4579
+ Proof proof = 2;
4580
+ }
4581
+ ResponseMetadata metadata = 3;
4582
+ }
4583
+ oneof version { GetPrivateDocumentEntriesResponseV0 v0 = 1; }
4584
+ }
4585
+
4586
+ // Ties a Tenderdash block to the signature of the quorum that committed it. To
4587
+ // check it, recompute the block hash and the state id from `header`, compare
4588
+ // them with `block_id.hash` and `block_id.state_id`, and verify `signature`
4589
+ // over the precommit vote for `block_id`. `header.data_hash` and
4590
+ // `header.results_hash` then vouch for the block's transactions and their
4591
+ // results.
4592
+ message TenderdashBlockProof {
4593
+ message BlockId {
4594
+ bytes hash = 1;
4595
+ uint32 part_set_total = 2;
4596
+ bytes part_set_hash = 3;
4597
+ bytes state_id = 4;
4598
+ }
4599
+ // The signed block header. The block hash covers every field except
4600
+ // `core_chain_locked_height`. The state id covers that one, with
4601
+ // `app_version`, `height`, `app_hash` and the time in milliseconds.
4602
+ message Header {
4603
+ uint64 block_version = 1 [ jstype = JS_STRING ];
4604
+ uint64 app_version = 2 [ jstype = JS_STRING ];
4605
+ string chain_id = 3;
4606
+ uint64 height = 4 [ jstype = JS_STRING ];
4607
+ uint32 core_chain_locked_height = 5;
4608
+ int64 time_seconds = 6 [ jstype = JS_STRING ];
4609
+ int32 time_nanos = 7;
4610
+ BlockId last_block_id = 8;
4611
+ bytes last_commit_hash = 9;
4612
+ bytes data_hash = 10; // Merkle root of the block's transactions
4613
+ bytes validators_hash = 11;
4614
+ bytes next_validators_hash = 12;
4615
+ bytes consensus_hash = 13;
4616
+ bytes next_consensus_hash = 14;
4617
+ bytes app_hash = 15; // the state after this block's transactions
4618
+ bytes results_hash = 16; // Merkle root of the block's execution results
4619
+ bytes evidence_hash = 17;
4620
+ bytes proposer_pro_tx_hash = 18;
4621
+ uint64 proposed_app_version = 19 [ jstype = JS_STRING ];
4622
+ }
4623
+ Header header = 1;
4624
+ BlockId block_id = 2;
4625
+ uint32 round = 3; // the consensus round that committed the block
4626
+ bytes quorum_hash = 4; // the quorum that signed
4627
+ uint32 quorum_type = 5; // the LLMQ type of that quorum
4628
+ bytes signature = 6; // its threshold signature over the block
4629
+ }
4630
+
4631
+ // Merkle paths of one transaction in its block. Each path runs from the leaf's
4632
+ // sibling up to a child of the root.
4633
+ message TenderdashTransactionProof {
4634
+ uint32 index = 1; // the transaction's position in the block
4635
+ uint32 total = 2; // how many transactions the block holds
4636
+ // Path from the SHA-256 of the transaction to `data_hash`
4637
+ repeated bytes transaction_path = 3;
4638
+ // Path to `results_hash`, from the protobuf encoding of the transaction's
4639
+ // `code`, `result_data` and `gas_used` as Tenderdash's ExecTxResult
4640
+ repeated bytes result_path = 4;
4641
+ }
4642
+
4643
+ message GetOwnerTransactionsInBlockRequest {
4644
+ message GetOwnerTransactionsInBlockRequestV0 {
4645
+ uint64 height = 1 [ jstype = JS_STRING ]; // the Tenderdash block height, from 1
4646
+ // The 32-byte id of the owner: the identity that a state transition reports
4647
+ // as its owner. A recipient is not an owner, and transitions funded from
4648
+ // addresses or the shielded pool have no owner, so they never match.
4649
+ bytes owner_id = 2;
4650
+ // Also return what proves the answer's transactions. When a block holds so
4651
+ // many of the owner's transactions that the proved answer would pass about
4652
+ // 4 MB, the request fails with FAILED_PRECONDITION: read the block with
4653
+ // getBlocks instead.
4654
+ bool prove = 3;
4655
+ }
4656
+ oneof version { GetOwnerTransactionsInBlockRequestV0 v0 = 1; }
4657
+ }
4658
+
4659
+ message GetOwnerTransactionsInBlockResponse {
4660
+ message GetOwnerTransactionsInBlockResponseV0 {
4661
+ message OwnerTransaction {
4662
+ bytes state_transition = 1; // the serialized state transition
4663
+ bytes hash = 2; // its SHA-256, the hash Tenderdash knows it by
4664
+ uint32 code = 3; // 0 if it executed, otherwise the code of the error it paid for
4665
+ bytes result_data = 4; // the data of its execution result
4666
+ int64 gas_used = 5 [ jstype = JS_STRING ]; // the gas of its execution result
4667
+ TenderdashTransactionProof proof = 6; // only when asked to prove
4668
+ }
4669
+ repeated OwnerTransaction transactions = 1; // in block order
4670
+ // Only when asked to prove. This proves each returned transaction is in the
4671
+ // block. It does not prove the list is complete: to be sure of that, read the
4672
+ // whole block with getBlocks.
4673
+ TenderdashBlockProof proof = 2;
4674
+ }
4675
+ oneof version { GetOwnerTransactionsInBlockResponseV0 v0 = 1; }
4676
+ }
4677
+
4678
+ message GetBlocksRequest {
4679
+ message GetBlocksRequestV0 {
4680
+ uint64 start_height = 1 [ jstype = JS_STRING ]; // the first Tenderdash height, from 1
4681
+ uint32 count = 2; // how many blocks, from 1 to 10
4682
+ bool prove = 3; // also return what proves each block
4683
+ }
4684
+ oneof version { GetBlocksRequestV0 v0 = 1; }
4685
+ }
4686
+
4687
+ message GetBlocksResponse {
4688
+ message GetBlocksResponseV0 {
4689
+ message Transaction {
4690
+ bytes state_transition = 1; // the serialized state transition
4691
+ bytes hash = 2; // its SHA-256, the hash Tenderdash knows it by
4692
+ uint32 code = 3; // 0 if it executed, otherwise the code of the error it paid for
4693
+ bytes result_data = 4; // the data of its execution result
4694
+ int64 gas_used = 5 [ jstype = JS_STRING ]; // the gas of its execution result
4695
+ }
4696
+ message Block {
4697
+ uint64 height = 1 [ jstype = JS_STRING ];
4698
+ bytes hash = 2;
4699
+ uint64 time_ms = 3 [ jstype = JS_STRING ]; // the block time, in milliseconds since the Unix epoch
4700
+ uint32 core_chain_locked_height = 4;
4701
+ bytes app_hash = 5; // the state after this block's transactions
4702
+ bytes proposer_pro_tx_hash = 6;
4703
+ repeated Transaction transactions = 7; // in block order
4704
+ // Only when asked to prove. A block holds all its transactions, so recompute
4705
+ // `data_hash` and `results_hash` from them; no Merkle paths are needed.
4706
+ // Compare the fields above with `proof.header` too: only the header is signed.
4707
+ TenderdashBlockProof proof = 8;
4708
+ }
4709
+ // Consecutive blocks from the start height. There can be fewer than the count
4710
+ // when the node's chain ends or the response reaches its size limit; ask from
4711
+ // the height after the last one to continue.
4712
+ repeated Block blocks = 1;
4713
+ }
4714
+ oneof version { GetBlocksResponseV0 v0 = 1; }
4715
+ }