// Copyright (c) The Libra Core Contributors // SPDX-License-Identifier: Apache-2.0 syntax = "proto3"; package types; import "access_path.proto"; import "events.proto"; import "proof.proto"; import "transaction_info.proto"; import "google/protobuf/wrappers.proto"; // An argument to the transaction if the transaction takes arguments message TransactionArgument { enum ArgType { U64 = 0; ADDRESS = 1; STRING = 2; BYTEARRAY = 3; } } // A generic structure that represents signed RawTransaction message SignedTransaction { // LCS byte code representation of a SignedTransaction bytes signed_txn = 5; } message SignedTransactionWithProof { // The version of the returned signed transaction. uint64 version = 1; // The transaction itself. SignedTransaction signed_transaction = 2; // The proof authenticating the signed transaction. SignedTransactionProof proof = 3; // The events yielded by executing the transaction, if requested. EventsList events = 4; } // A generic structure that represents a block of transactions originated from a // particular validator instance. message SignedTransactionsBlock { // Set of Signed Transactions repeated SignedTransaction transactions = 1; // Public key of the validator that created this block bytes validator_public_key = 2; // Signature of the validator that created this block bytes validator_signature = 3; } // Account state as a whole. // After execution, updates to accounts are passed in this form to storage for // persistence. message AccountState { // Account address bytes address = 1; // Account state blob bytes blob = 2; } // Transaction struct to commit to storage message TransactionToCommit { // The signed transaction which was executed SignedTransaction signed_txn = 1; // State db updates repeated AccountState account_states = 2; // Events yielded by the transaction. repeated Event events = 3; // The amount of gas used. uint64 gas_used = 4; // The major status of executing the transaction. uint64 major_status = 5; } // A list of consecutive transactions with proof. This is mainly used for state // synchronization when a validator would request a list of transactions from a // peer, verify the proof, execute the transactions and persist them. Note that // the transactions are supposed to belong to the same epoch E, otherwise // verification will fail. message TransactionListWithProof { // The list of transactions. repeated SignedTransaction transactions = 1; // The list of corresponding TransactionInfo objects. repeated TransactionInfo infos = 2; // The list of corresponding Event objects (only present if fetch_events was set to true in req) EventsForVersions events_for_versions = 3; // If the list is not empty, the version of the first transaction. google.protobuf.UInt64Value first_transaction_version = 4; // The proofs of the first and last transaction in this chunk. When this is // used for state synchronization, the validator who requests the transactions // will provide a version in the request and the proofs will be relative to // the given version. When this is returned in GetTransactionsResponse, the // proofs will be relative to the ledger info returned in // UpdateToLatestLedgerResponse. AccumulatorProof proof_of_first_transaction = 5; AccumulatorProof proof_of_last_transaction = 6; }