Skip to content

Commit a4c9462

Browse files
committed
tmp (not done yet)
1 parent 1235cdb commit a4c9462

File tree

13 files changed

+676
-570
lines changed

13 files changed

+676
-570
lines changed
Lines changed: 48 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,59 @@
1-
// Copyright (c) 2025 IOTA Stiftung
1+
// Copyright (c) Mysten Labs, Inc.
2+
// Modifications Copyright (c) 2025 IOTA Stiftung
23
// SPDX-License-Identifier: Apache-2.0
34

45
syntax = "proto3";
56

6-
package iota.grpc.v0.checkpoints;
7+
package iota.grpc.v0.checkpoint;
78

8-
import "common.proto";
9+
import "iota/grpc/v0/checkpoint_contents.proto";
10+
import "iota/grpc/v0/checkpoint_summary.proto";
11+
import "iota/grpc/v0/executed_transaction.proto";
12+
import "iota/grpc/v0/object.proto";
13+
import "iota/grpc/v0/signature.proto";
914

10-
service CheckpointService {
11-
// Checkpoint operations
12-
rpc StreamCheckpoints (CheckpointStreamRequest) returns (stream Checkpoint);
13-
rpc GetEpochFirstCheckpointSequenceNumber (EpochRequest) returns (CheckpointSequenceNumberResponse);
14-
}
15-
16-
message CheckpointStreamRequest {
17-
optional uint64 start_sequence_number = 1;
18-
optional uint64 end_sequence_number = 2;
19-
// If true, stream the full CheckpointData (not just the summary).
20-
bool full = 3;
21-
}
15+
/// An aggregated signature from multiple validators.
16+
message ValidatorAggregatedSignature {
17+
// The epoch when this signature was produced.
18+
//
19+
// This can be used to lookup the `ValidatorCommittee` from this epoch
20+
// to verify this signature.
21+
optional uint64 epoch = 1;
2222

23-
message EpochRequest {
24-
uint64 epoch = 1;
25-
}
23+
// The 48-byte Bls12381 aggregated signature.
24+
optional bytes signature = 2;
2625

27-
message CheckpointSequenceNumberResponse {
28-
uint64 sequence_number = 1;
26+
// Bitmap indicating which members of the committee contributed to
27+
// this signature.
28+
optional bytes bitmap = 3;
2929
}
3030

3131
message Checkpoint {
32-
uint64 sequence_number = 1;
33-
// Indicates whether bcs_data contains full CheckpointData (true) or just CertifiedCheckpointSummary (false)
34-
bool is_full = 2;
35-
// BCS-encoded CertifiedCheckpointSummary (default) or CheckpointData (if full=true)
36-
iota.grpc.v0.common.BcsData bcs_data = 3;
37-
}
32+
// The height of this checkpoint.
33+
optional uint64 sequence_number = 1;
34+
35+
// The digest of this Checkpoint's CheckpointSummary.
36+
optional string digest = 2;
37+
38+
// The `CheckpointSummary` for this checkpoint.
39+
optional CheckpointSummary summary = 3;
40+
41+
// An aggregated quorum signature from the validator committee that
42+
// certified this checkpoint.
43+
optional ValidatorAggregatedSignature signature = 4;
44+
45+
// The `CheckpointContents` for this checkpoint.
46+
optional CheckpointContents contents = 5;
47+
48+
// List of transactions included in this checkpoint.
49+
repeated ExecutedTransaction transactions = 6;
50+
51+
// Set of objects either referenced as inputs or produced as
52+
// outputs by transactions included in this checkpoint.
53+
//
54+
// In order to benefit from deduplication of objects that
55+
// appear in multiple transactions in this checkpoint, objects
56+
// will only be present here and the `transactions.objects`
57+
// field will not be populated.
58+
optional ObjectSet objects = 7;
59+
}

crates/iota-grpc-types/proto/iota/grpc/v0/coin.proto

Lines changed: 0 additions & 111 deletions
This file was deleted.

crates/iota-grpc-types/proto/iota/grpc/v0/common.proto

Lines changed: 8 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,18 @@ message Digest {
2424
bytes digest = 1;
2525
}
2626

27-
// Container for the BcsData and the name of the type
28-
message Bcs {
29-
// Name that identifies the type of the serialized value.
30-
string name = 1;
31-
32-
// The BCS-serialized data.
33-
BcsData value = 2;
34-
}
35-
3627
// ============================================================================
3728
// Object-related types
3829
// ============================================================================
3930

40-
// Object reference
41-
message ObjectRef {
31+
// Reference to an object.
32+
message ObjectReference {
33+
// The object id of this object.
4234
Address object_id = 1;
43-
uint64 version = 2;
44-
Digest digest = 3;
35+
// The version of this object.
36+
optional uint64 version = 2;
37+
// The digest of this object.
38+
optional Digest digest = 3;
4539
}
4640

4741
// Owner types
@@ -60,58 +54,14 @@ message SharedOwner {
6054

6155
message ImmutableOwner {}
6256

63-
// ============================================================================
64-
// Filter types (for events and queries)
65-
// ============================================================================
66-
67-
// Match all events (catch-all filter)
68-
message AllFilter {
69-
}
70-
71-
// Filter by address (sender, package, etc.)
72-
message AddressFilter {
73-
Address address = 1;
74-
}
75-
76-
// Filter by transaction digest
77-
message TransactionDigestFilter {
78-
Digest tx_digest = 1;
79-
}
80-
81-
// Filter by Move module (package + module)
82-
message MoveModuleFilter {
83-
Address package_id = 1; // Package ID
84-
string module = 2; // Module name
85-
}
86-
87-
// Filter by Move event type (package + module + event name)
88-
message MoveEventTypeFilter {
89-
Address package_id = 1; // Package ID
90-
string module = 2; // Module name
91-
string name = 3; // Event name
92-
}
93-
94-
// Filter by Move event module (package + module)
95-
message MoveEventModuleFilter {
96-
Address package_id = 1; // Package ID
97-
string module = 2; // Module name
98-
}
99-
100-
// Filter by Move function (package + module + function)
101-
message MoveFunctionFilter {
102-
Address package_id = 1; // Package ID
103-
optional string module = 2; // Module name (optional)
104-
optional string function = 3; // Function name (optional)
105-
}
106-
10757
// ============================================================================
10858
// Transaction-related types
10959
// ============================================================================
11060

11161
// Gas data for transactions
11262
message GasData {
11363
// Payment objects
114-
repeated ObjectRef payment = 1;
64+
repeated ObjectReference payment = 1;
11565
// Gas owner
11666
Address owner = 2;
11767
// Gas price
@@ -193,67 +143,3 @@ message ObjectCreated {
193143
uint64 version = 5;
194144
Digest digest = 6;
195145
}
196-
197-
// BalanceChange represents balance changes during transaction execution
198-
message BalanceChange {
199-
// Owner of the balance change
200-
Owner owner = 1;
201-
// Type of the Coin
202-
string coin_type = 2;
203-
// Amount as string to support i128 (can be negative)
204-
// Format: decimal string representation of i128
205-
string amount = 3;
206-
}
207-
208-
// ============================================================================
209-
// Event-related types
210-
// ============================================================================
211-
212-
// Event represents a transaction event
213-
message Event {
214-
EventID event_id = 1;
215-
Address package_id = 2;
216-
string transaction_module = 3;
217-
Address sender = 4;
218-
string type_name = 5;
219-
optional uint64 timestamp_ms = 6;
220-
Bcs event_data = 7; // BCS-encoded event data, name should be the event type from type_name, or we remove type_name? (To discuss)
221-
}
222-
223-
// Event identifier
224-
message EventID {
225-
uint64 event_seq = 1;
226-
Digest tx_digest = 2;
227-
}
228-
229-
// ============================================================================
230-
// Coin-related types
231-
// ============================================================================
232-
233-
// Coin information for individual coin objects
234-
message CoinInfo {
235-
// Coin type as TypeTag string (e.g., "0x2::iota::IOTA")
236-
string coin_type = 1;
237-
238-
// Object reference (ID + version + digest)
239-
ObjectRef object_ref = 2;
240-
241-
// Balance value extracted for convenience (avoids BCS deserialization)
242-
uint64 balance = 3;
243-
244-
/// BCS-encoded iota_types::object::Object
245-
Bcs object = 4;
246-
}
247-
248-
// Balance information aggregated across all coin objects of a type
249-
message BalanceInfo {
250-
// Coin type as TypeTag string (e.g., "0x2::iota::IOTA")
251-
string coin_type = 1;
252-
253-
// Number of coin objects owned (each returned by GetCoins)
254-
uint64 coin_object_count = 2;
255-
256-
// Total balance across all coin objects (as string to support u128)
257-
// Sum of all individual coin balances for this coin type
258-
string total_balance = 3;
259-
}

0 commit comments

Comments
 (0)