Get desktop application:
View/edit binary Protocol Buffers messages
Used in:
, ,Account state as a whole. After execution, updates to accounts are passed in this form to storage for persistence.
Used in:
Account address
Account state blob
Used in:
The complete proof used to authenticate an account state.
Used in:
Used in:
, ,Used in:
, , ,The bitmap indicating which siblings are default. 1 means non-default and 0 means default. The LSB corresponds to the sibling at the bottom of the accumulator. The leftmost 1-bit corresponds to the sibling at the level just below root level in the accumulator, since this one is always non-default.
The non-default siblings. The ones near the root are at the beginning of the list.
Used in:
Used in:
Fill with more later
user-defined assertion error code number
Used in:
Errors that can arise from binary decoding (deserialization)
Used in:
Used in:
Used in:
Fill with with more later
An event emitted from a smart contract
Used in:
, ,The complete proof used to authenticate an event.
Used in:
An event along with the proof for the event
Used in:
,A list of EventList's, each representing all events for a transaction.
Used in:
A list of events.
Used in:
,Used in:
Gets latest state for an account.
Used in:
Account for which we are fetching the state.
State information returned by a get account state query.
Used in:
Blob value representing the account state together with proof the client can utilize to verify it.
----------------------------------------------------------------------------- ---------------- 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:
Account for which to query transactions
Set to true to fetch events for the transaction at this version
Transaction information for transactions requested by GetAccountTransactionsRequest
Used in:
When the transaction requested is committed, return the committed transaction with proof.
When the transaction requested is not committed, we give a proof that shows the current sequence number is smaller than what would have been if the transaction was committed.
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:
The sequence number of the event to start with for this query. Use a sequence number of MAX_INT to represent the latest.
If ascending is true this query will return up to `limit` events that were emitted after `start_event_seq_num`. Otherwise it will return up to `limit` events before the offset. Both cases are inclusive.
Limit number of results
Used in:
Returns an event and proof of each of the events in the request. The first element of proofs will be the closest to `start_event_seq_num`.
If the number of events returned is less than `limit` for an ascending query or if start_event_seq_num > the latest seq_num for a descending query, returns the state of the account containing the given access path in the latest state. This allows the client to verify that there are in fact no extra events. The LedgerInfoWithSignatures which is on the main UpdateToLatestLedgerResponse can be used to validate this.
Get up to limit transactions starting from start_version.
Used in:
The version of the transaction to start with for this query. Use a version of MAX_INT to represent the latest.
Limit number of results
Set to true to fetch events for the transaction at each version
Used in:
/ 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:
Current latest version of the system
Root hash of transaction accumulator at this version
Hash of consensus-specific data that is opaque to all parts of the system other than consensus. This is needed to verify signatures because consensus signing includes this hash
The block id of the last committed block corresponding to this ledger info. This field is not particularly interesting to the clients, but can be used by the validators for synchronization.
Epoch number corresponds to the set of validators that are active for this ledger info. The main motivation for keeping the epoch number in the LedgerInfo is to ensure that the client has enough information to verify that the signatures for this info are coming from the validators that indeed form a quorum. Without epoch number a potential attack could reuse the signatures from the validators in one epoch in order to sign the wrong info belonging to another epoch, in which these validators do not form a quorum. The very first epoch number is 0.
Timestamp that represents the microseconds since the epoch (unix time) that is generated by the proposer of the block. This is strictly increasing with every block. If a client reads a timestamp > the one they specified for transaction expiration time, they can be certain that their transaction will never be included in a block in the future (assuming that their transaction has not yet been included)
/ 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:
,Signatures of the root node from each validator
/ The unique identifier for a module on the chain.
Used in:
The code for the transaction to execute
Used in:
A generic structure that describes a transaction that a client submits
Sender's account address
Sequence number of this transaction corresponding to sender's account.
The transaction script to execute.
A write set, used for genesis blocks and other magic transactions. This bypasses the rules for regular transactions so will typically be rejected. Only under special circumstances will it be accepted.
Maximal total gas specified by wallet to spend for this transaction.
The price to be paid for each unit of gas.
Expiration time for this transaction. If storage is queried and the time returned is greater than or equal to this time and this transaction has not been included, you can be certain that it will never be included. If set to 0, there will be no expiration time
Used in:
Individual response items to the queries posed by the requests
Used in:
Used in:
We tried to access a resource that does not exist under the account.
We tried to create a resource under an account where that resource already exists.
We accessed an account that is evicted.
We tried to create an account at an address where an account already exists.
The sender is trying to publish a module named `M`, but the sender's account already contains a module with this name.
A generic structure that represents signed RawTransaction
Used in:
, , , , ,The serialized Protobuf bytes for RawTransaction, for which the signature was signed. Protobuf doesn't guarantee the serialized bytes is canonical across different language implementations, but for our use cases for transaction it is not necessary because the client is the only one to produce this bytes, which is then persisted in storage.
public key that corresponds to RawTransaction::sender_account
signature for the hash
The complete proof used to authenticate a signed transaction.
Used in:
Used in:
The version of the returned signed transaction.
The transaction itself.
The proof authenticating the signed transaction.
The events yielded by executing the transaction, if requested.
A generic structure that represents a block of transactions originated from a particular validator instance.
Used in:
Set of Signed Transactions
Public key of the validator that created this block
Signature of the validator that created this block
Used in:
This proof can be used to authenticate whether a given leaf exists in the tree or not. In Rust: - If this is `Some(HashValue, HashValue)` - If the first `HashValue` equals requested key, this is an inclusion proof and the second `HashValue` equals the hash of the corresponding account blob. - Otherwise this is a non-inclusion proof. The first `HashValue` is the only key that exists in the subtree and the second `HashValue` equals the hash of the corresponding account blob. - If this is `None`, this is also a non-inclusion proof which indicates the subtree is empty. In protobuf, this leaf field should either be - empty, which corresponds to None in the Rust structure. - exactly 64 bytes, which corresponds to Some<(HashValue, HashValue)> in the Rust structure.
The bitmap indicating which siblings are default. 1 means non-default and 0 means default. The MSB of the first byte corresponds to the sibling at the top of the Sparse Merkle Tree. The rightmost 1-bit of the last byte corresponds to the sibling at the bottom, since this one is always non-default.
The non-default siblings. The ones near the root are at the beginning of the list.
An argument to the transaction if the transaction takes arguments
Used in:
Used in:
`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:
, , ,Hash of the signed transaction that is stored
The root hash of Sparse Merkle Tree describing the world state at the end of this transaction
The root hash of Merkle Accumulator storing all events emitted during this transaction.
The amount of gas used by this transaction.
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:
The list of transactions.
The list of corresponding TransactionInfo objects.
The list of corresponding Event objects (only present if fetch_events was set to true in req)
If the list is not empty, the version of the first transaction.
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.
Transaction struct to commit to storage
The signed transaction which was executed
State db updates
Events yielded by the transaction.
The amount of gas used.
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
This is the version the client already trusts. Usually the client should set this to the version it obtained the last time it synced with the chain. If this is the first time ever the client sends a request, it must use the waypoint hard-coded in its software.
The items for which we are requesting data in this API call.
Response from getting latest ledger
Used as response type in: admission_control.AdmissionControl.UpdateToLatestLedger
Responses to the queries posed by the requests. The proofs generated will be relative to the version of the latest ledger provided below.
The latest ledger info this node has. It will come with at least 2f+1 validator signatures as well as a proof that shows the latest ledger extends the old ledger the client had.
Validator change events from what the client last knew. This is used to inform the client of validator changes from the client's last known version until the current version
These are errors that the VM might raise if a violation of internal invariants takes place.
Used in:
The status of the VM
Used in:
Used in:
The status of a transaction as determined by the prologue.
Used in:
We don't want the default value to be valid
The transaction has a bad signature
Bad account authentication key
Sequence number is too old
Sequence number is too new
Insufficient balance to pay minimum transaction fee
The transaction has expired
The sending account does not exist
This write set transaction was rejected because it did not meet the requirements for one.
This write set transaction cannot be applied to the current state.
Length of program field in raw transaction exceeded max length
This script is not on our whitelist of script.
Transaction is trying to publish a new module.
Max gas units submitted with transaction exceeds max gas units bound in VM
Max gas units submitted with transaction not enough to cover the intrinsic cost of the transaction.
Gas unit price submitted with transaction is below minimum gas price set in the VM.
Gas unit price submitted with the transaction is above the maximum gas price set in the VM.
When a code module/script is published it is verified. These are the possible errors that can arise from the verification process.
Used in:
Likewise default to a unknown verification error
The self address of a module the transaction is publishing is not the sender address
The module does not have any module handles. Each module or script must have at least one module handle.
Used in:
For StatusKind::SCRIPT and DEPENDENCY this is ignored.
For StatusKind::SCRIPT and MODULE this is ignored.
Used in:
Used in:
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). This message represents a single validator change event and the proof that corresponds to it
Used in:
Protobuf definition for the Rust struct ValidatorPublicKeys
Used in:
Validator account address
Consensus public key
Network signing publick key
/ Network identity publick key
Protobuf definition for the Rust struct ValidatorSet.
Used in:
The account address of the validator, which can be used for retrieving its public key during the given epoch.
Write Operation on underlying storage.
Used in:
AccessPath of the write set.
The value of the write op. Empty if `type` is Delete.
WriteOp type.
Type of write operation
Used in:
The WriteOp is to create/update the field from storage.
The WriteOp is to delete the field from storage.
Set of WriteOps to save to storage.
Used in:
Set of WriteOp for storage update.