-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Protobuf] Support validator transaction type in protobuf #13897
Changes from all commits
dc2c74f
d66cfe5
36a27ee
e8f60c5
5e1981d
9662384
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -621,6 +621,13 @@ impl ValidatorTransaction { | |
ValidatorTransaction::DkgResult(t) => t.timestamp, | ||
} | ||
} | ||
|
||
pub fn events(&self) -> &[Event] { | ||
match self { | ||
ValidatorTransaction::ObservedJwkUpdate(t) => &t.events, | ||
ValidatorTransaction::DkgResult(t) => &t.events, | ||
} | ||
} | ||
} | ||
|
||
impl | ||
|
@@ -690,9 +697,9 @@ impl From<QuorumCertifiedUpdate> for ExportedQuorumCertifiedUpdate { | |
/// A more API-friendly representation of the on-chain `aptos_types::aggregate_signature::AggregateSignature`. | ||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, Object)] | ||
pub struct ExportedAggregateSignature { | ||
signer_indices: Vec<usize>, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. only the visibility change below in this file. |
||
pub signer_indices: Vec<usize>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
sig: Option<HexEncodedBytes>, | ||
pub sig: Option<HexEncodedBytes>, | ||
} | ||
|
||
impl From<AggregateSignature> for ExportedAggregateSignature { | ||
|
@@ -744,9 +751,9 @@ pub struct DKGResultTransaction { | |
|
||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, Object)] | ||
pub struct ExportedDKGTranscript { | ||
epoch: U64, | ||
author: Address, | ||
payload: HexEncodedBytes, | ||
pub epoch: U64, | ||
pub author: Address, | ||
pub payload: HexEncodedBytes, | ||
} | ||
|
||
impl From<DKGTranscript> for ExportedDKGTranscript { | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ import "aptos/transaction/v1/transaction.proto"; | |
// This is for storage only. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Proto format |
||
message TransactionsInStorage { | ||
// Required; transactions data. | ||
repeated aptos.transaction.v1.Transaction transactions = 1; | ||
repeated aptos.transaction.v1.Transaction transactions = 1; | ||
// Required; chain id. | ||
optional uint64 starting_version = 2; | ||
} | ||
|
@@ -30,14 +30,14 @@ message GetTransactionsRequest { | |
|
||
// TransactionsResponse is a batch of transactions. | ||
message TransactionsResponse { | ||
// Required; transactions data. | ||
repeated aptos.transaction.v1.Transaction transactions = 1; | ||
// Required; chain id. | ||
optional uint64 chain_id = 2 [jstype = JS_STRING]; | ||
// Required; transactions data. | ||
repeated aptos.transaction.v1.Transaction transactions = 1; | ||
|
||
// Required; chain id. | ||
optional uint64 chain_id = 2 [jstype = JS_STRING]; | ||
} | ||
|
||
service RawData { | ||
// Get transactions batch without any filtering from starting version and end if transaction count is present. | ||
rpc GetTransactions(GetTransactionsRequest) returns (stream TransactionsResponse); | ||
} | ||
// Get transactions batch without any filtering from starting version and end if transaction count is present. | ||
rpc GetTransactions(GetTransactionsRequest) returns (stream TransactionsResponse); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To future proof, we should include the write sets too. There's nothing to index in it now, but there could be in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is handled in TransactionInfo parsing, which is shared among all transaction types.