package types

Mouse Melon logoGet desktop application:
View/edit binary Protocol Buffers messages

message AccessPath

access_path.proto:8

Used in: GetEventsByEventAccessPathRequest

message AccountState

transaction.proto:64

Account state as a whole. After execution, updates to accounts are passed in this form to storage for persistence.

Used in: TransactionToCommit

message AccountStateBlob

account_state_blob.proto:10

Used in: AccountStateWithProof

message AccountStateProof

proof.proto:69

The complete proof used to authenticate an account state.

Used in: AccountStateWithProof

message AccountStateWithProof

account_state_blob.proto:12

Used in: GetAccountStateResponse, GetAccountTransactionBySequenceNumberResponse, GetEventsByEventAccessPathResponse

message AccumulatorConsistencyProof

proof.proto:42

Used in: UpdateToLatestLedgerResponse

message AccumulatorProof

proof.proto:10

Used in: AccountStateProof, EventProof, TransactionProof

message AccumulatorRangeProof

proof.proto:48

Used in: TransactionListProof

message Event

events.proto:16

An event emitted from a smart contract

Used in: EventWithProof, EventsList, TransactionToCommit

message EventProof

proof.proto:76

The complete proof used to authenticate an event.

Used in: EventWithProof

message EventWithProof

events.proto:24

An event along with the proof for the event

Used in: GetEventsByEventAccessPathResponse

message EventsForVersions

events.proto:37

A list of EventList's, each representing all events for a transaction.

Used in: TransactionListWithProof

message EventsList

events.proto:32

A list of events.

Used in: EventsForVersions, TransactionWithProof

message GetAccountStateRequest

get_with_proof.proto:197

Gets latest state for an account.

Used in: RequestItem

message GetAccountStateResponse

get_with_proof.proto:203

State information returned by a get account state query.

Used in: ResponseItem

message GetAccountTransactionBySequenceNumberRequest

get_with_proof.proto:235

----------------------------------------------------------------------------- ---------------- Get single transaction by account + sequence number ----------------------------------------------------------------------------- Get transactions that altered an account - this includes both sent and received. A user of this should check that the data returned matches what they expect. As an example, a potential attack vector would be something like the following: Alice is buying an apple from Bob. Alice's phone signs a transaction X with sequence number N that pays coins to Bob. Alice transmits this signature to Bob's payment terminal which then submits the transaction and checks its status to see if Alice can be given the apple. However, as Bob is doing this Alice constructs a second transaction X' also with sequence number N. Alice gets that transaction inserted in the blockchain. If Bob isn't thoughtful about how he uses this API he may assume that if he asks for the N'th transaction on Alice's account that when the API returns that this means the transaction has gone through. The point here is that one should be careful in reading too much into "transaction X is on the chain" and focus on the logs, which tell you what the transaction did. If a client submitted a transaction, they should also verify that the hash of the returned transaction matches what they submitted. As an example, if a client has two wallets that share the same account, they may both submit a transaction at the same sequence number and only one will be committed. A client should never assume that if they receive the response that this transaction was included that it means that this is definitely the transaction that was submitted. They should check that the hash matches what they sent

Used in: RequestItem

message GetAccountTransactionBySequenceNumberResponse

get_with_proof.proto:247

Transaction information for transactions requested by GetAccountTransactionsRequest

Used in: ResponseItem

message GetEventsByEventAccessPathRequest

get_with_proof.proto:264

Get events that exist on an event access path. In the current world, a user may specify events that were received, events that were sent, or any event that modifies their account

Used in: RequestItem

message GetEventsByEventAccessPathResponse

get_with_proof.proto:280

Used in: ResponseItem

message GetTransactionsRequest

get_with_proof.proto:301

Get up to limit transactions starting from start_version.

Used in: RequestItem

message GetTransactionsResponse

get_with_proof.proto:313

Used in: ResponseItem

message LedgerInfo

ledger_info.proto:32

/ Even though we don't always need all hashes, we pass them in and return them / always so that we keep them in sync on the client and don't make the client / worry about which one(s) to pass in which cases / / This structure serves a dual purpose. / / First, if this structure is signed by 2f+1 validators it signifies the state / of the ledger at version `version` -- it contains the transaction / accumulator at that version which commits to all historical transactions. / This structure may be expanded to include other information that is derived / from that accumulator (e.g. the current time according to the time contract) / to reduce the number of proofs a client must get. / / Second, the structure contains a `consensus_data_hash` value. This is the / hash of an internal data structure that represents a block that is voted on / by consensus. / / Combining these two concepts when the consensus algorithm votes on a block B / it votes for a LedgerInfo with the `version` being the latest version that / will be committed if B gets 2f+1 votes. It sets `consensus_data_hash` to / represent B so that if those 2f+1 votes are gathered, the block is valid to / commit

Used in: LedgerInfoWithSignatures

message LedgerInfoWithSignatures

ledger_info.proto:81

/ The validator node returns this structure which includes signatures / from each validator to confirm the state. The client needs to only pass / back the LedgerInfo element since the validator node doesn't need to know / the signatures again when the client performs a query, those are only there / for the client to be able to verify the state

Used in: UpdateToLatestLedgerResponse, ValidatorChangeEventWithProof

message ModuleId

language_storage.proto:9

/ The unique identifier for a module on the chain.

message RequestItem

get_with_proof.proto:145

Used in: UpdateToLatestLedgerRequest

message ResponseItem

get_with_proof.proto:182

Individual response items to the queries posed by the requests

Used in: UpdateToLatestLedgerResponse

message SignedTransaction

transaction.proto:25

A generic structure that represents signed RawTransaction

Used in: admission_control.SubmitTransactionRequest, mempool.AddTransactionWithValidationRequest, SignedTransactionsBlock

message SignedTransactionsBlock

transaction.proto:52

A generic structure that represents a block of transactions originated from a particular validator instance.

Used in: mempool.GetBlockResponse

message SparseMerkleProof

proof.proto:17

Used in: AccountStateProof

message Transaction

transaction.proto:32

A generic structure that represents a transaction, covering all possible variants.

Used in: TransactionListWithProof, TransactionToCommit, TransactionWithProof

message TransactionArgument

transaction.proto:15

An argument to the transaction if the transaction takes arguments

(message has no fields)

enum TransactionArgument.ArgType

transaction.proto:16

message TransactionInfo

transaction_info.proto:12

`TransactionInfo` is the object we store in the transaction accumulator. It consists of the transaction as well as the execution result of this transaction. This are later returned to the client so that a client can validate the tree

Used in: AccountStateProof, EventProof, TransactionListProof, TransactionProof

message TransactionListProof

proof.proto:83

The complete proof used to authenticate a list of transactions.

Used in: TransactionListWithProof

message TransactionListWithProof

transaction.proto:90

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.

Used in: GetTransactionsResponse

message TransactionProof

proof.proto:63

The complete proof used to authenticate a transaction.

Used in: TransactionWithProof

message TransactionToCommit

transaction.proto:72

Transaction struct to commit to storage

message TransactionWithProof

transaction.proto:36

Used in: GetAccountTransactionBySequenceNumberResponse

message UpdateToLatestLedgerRequest

get_with_proof.proto:134

This API is used to update the client to the latest ledger version and optionally also request 1..n other pieces of data. This allows for batch queries. All queries return proofs that a client should check to validate the data. Note that if a client only wishes to update to the latest LedgerInfo and receive the proof that this latest ledger extends the client_known_version ledger the client had, they can simply set the requested_items to an empty list.

Used as request type in: admission_control.AdmissionControl.UpdateToLatestLedger

message UpdateToLatestLedgerResponse

get_with_proof.proto:161

Response from getting latest ledger

Used as response type in: admission_control.AdmissionControl.UpdateToLatestLedger

message VMStatus

vm_errors.proto:27

The statuses and errors produced by the VM can be categorized into a couple different types: 1. Validation Statuses: all the errors that can (/should) be the result of executing the prologue -- these are primarily used by the vm validator and AC. 2. Verification Errors: errors that are the result of performing bytecode verification (happens at the time of publishing). 3. VM Invariant Errors: errors that arise from an internal invariant of the VM being violated. These signify a problem with either the VM or bytecode verifier. 4. Binary Errors: errors that can occur during the process of deserialization of a transaction. 5. Runtime Statuses: errors that can arise from the execution of a transaction (assuming the prologue executes without error). These are errors that can occur during execution due to things such as division by zero, running out of gas, etc. These do not signify an issue with the VM.

Used in: admission_control.SubmitTransactionResponse

message ValidatorChangeEventWithProof

validator_change.proto:21

This is used to prove validator changes. When a validator is changing, it triggers an event on /validator_change_account/events/sent. To tell the client about validator changes, we query /validator_change_account/events/sent to get all versions that contain validator changes after the version that we are trying to update from. For each of these versions, the old validator set would have signed the ledger info at that version. The client needs this as well as the event results + proof. The client can then verify that these events were under the current tree and that the changes were signed by the old validators (and that the events correctly show which validators are the new validators).

Used in: UpdateToLatestLedgerResponse

message ValidatorPublicKeys

validator_public_keys.proto:9

Protobuf definition for the Rust struct ValidatorPublicKeys

Used in: ValidatorSet

message ValidatorSet

validator_set.proto:11

Protobuf definition for the Rust struct ValidatorSet.

Used in: LedgerInfo

message ValidatorSignature

ledger_info.proto:88

Used in: LedgerInfoWithSignatures