Skip to main content
Version: testnet (v0.71)

transaction.proto

path vega/commands/v1/transaction.proto

package vega.commands.v1


Messages

InputData

NameTypeDescription
nonceuint64Number to provide uniqueness to prevent accidental replays and, in combination with `block_height`, deliberate attacks. A nonce provides uniqueness for otherwise identical transactions, ensuring that the transaction hash uniquely identifies a specific transaction. Granted all other fields are equal, the nonce can either be a counter or generated at random to submit multiple transactions within the same block (see below), without being identified as replays. Please note that Protocol Buffers do not have a canonical, unique encoding and therefore different libraries or binaries may encode the same message slightly differently, causing a different hash.
block_heightuint64Block height at which the transaction was made. This should be the current block height. The transaction will be valid from the block and up to the `tolerance` block height. Example: If the network has a tolerance of 150 blocks and `block_height` is set to `200`, then the transaction will be valid until block `350`. Note that a `block_height` that is ahead of the real block height will be rejected. The tolerance can be queried from the chain's network parameters. `block_height` prevents replay attacks in conjunction with `nonce` (see above).
order_submissionOrderSubmissionCommand for submitting an order.
order_cancellationOrderCancellationCommand to cancel an order.
order_amendmentOrderAmendmentCommand to amend an order.
withdraw_submissionWithdrawSubmissionCommand to submit a withdrawal.
proposal_submissionProposalSubmissionCommand to submit a governance proposal.
vote_submissionVoteSubmissionCommand to submit a vote on a governance proposal.
liquidity_provision_submissionLiquidityProvisionSubmissionCommand to submit a liquidity commitment.
delegate_submissionDelegateSubmissionCommand to delegate tokens to a validator.
undelegate_submissionUndelegateSubmissionCommand to remove tokens delegated to a validator.
liquidity_provision_cancellationLiquidityProvisionCancellationCommand to request cancelling a liquidity commitment.
liquidity_provision_amendmentLiquidityProvisionAmendmentCommand to request amending a liquidity commitment.
transferTransferCommand to submit a transfer.
cancel_transferCancelTransferCommand to request cancelling a recurring transfer.
announce_nodeAnnounceNodeCommand used by a node operator to announce its node as a pending validator.
batch_market_instructionsBatchMarketInstructionsCommand to submit a batch of order instructions to a market.
node_voteNodeVoteCommand used by a validator when a node votes for validating that a given resource exists or is valid, for example, an ERC20 deposit is valid and exists on ethereum.
node_signatureNodeSignatureCommand used by a validator to submit a signature, to be used by a foreign chain to recognise a decision taken by the Vega network.
chain_eventChainEventCommand used by a validator to submit an event forwarded to the Vega network to provide information on events happening on other networks, to be used by a foreign chain to recognise a decision taken by the Vega network.
key_rotate_submissionKeyRotateSubmissionCommand used by a validator to allow given validator to rotate their Vega keys.
state_variable_proposalStateVariableProposalCommand used by a validator to submit a floating point value.
validator_heartbeatValidatorHeartbeatCommand used by a validator to signal they are still online and validating blocks or ready to validate blocks when they are still a pending validator.
ethereum_key_rotate_submissionEthereumKeyRotateSubmissionCommand used by a validator to allow given validator to rotate their Ethereum keys.
protocol_upgrade_proposalProtocolUpgradeProposalCommand used by a validator to propose a protocol upgrade.
issue_signaturesIssueSignaturesCommand used by a validator to submit signatures to a smart contract.
oracle_data_submissionOracleDataSubmissionCommand to submit new oracle data from third party providers.

ProofOfWork

Components needed for the network to verify proof-of-work

NameTypeDescription
tidstringUnique transaction identifier used to seed the proof-of-work hash.
nonceuint64Number which, combined with the transaction identifier, will produce a hash with the required number of leading zeros to be accepted by the network.

Transaction

Represents a transaction to be sent to Vega.

NameTypeDescription
input_databytesOne of the set of Vega commands. These bytes are should be built as follows: chain_id_as_bytes + \0 character as delimiter + proto_marshalled_command.
signatureSignatureSignature of the input data.
addressstringHex-encoded address of the sender. Not supported yet.
pub_keystringHex-encoded public key of the sender.
versionTxVersionVersion of the transaction, to be used in the future in case changes are implemented to the transaction format.
powProofOfWorkProof of work contains the random transaction id used by the client and the nonce.

Enums

TxVersion

Current supported version of the transaction inside the network.

NameNumberDescription
TX_VERSION_UNSPECIFIED0Represents an unspecified or missing value from the input
TX_VERSION_V22This version requires the proof-of-work added to the transaction.
TX_VERSION_V33This version requires the chain ID to be appended in front of the input data byte, with a `\0` delimiter.