Skip to main content
Version: pre-release (v0.78)

transaction.proto

path vega/commands/v1/transaction.proto

package vega.commands.v1


Messages

InputData

Input data for a transaction containing a network command for the Vega network to execute. Once populated the protobuf message should be marshalled into a byte array and included in a transaction message.

NameTypeDescription
nonceuint64Arbitrary number used to provide uniqueness to the signature of two otherwise identical input data, preventing replay attacks. Must be set to a different value for all new transactions sent by a party. It is advised to generate this number randomly.
block_heightuint64Block height which has been used to calculate the transaction proof-of-work.
order_submissionOrderSubmissionCommand to submit 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 cancel a liquidity commitment.
liquidity_provision_amendmentLiquidityProvisionAmendmentCommand to amend a liquidity commitment.
transferTransferCommand to submit a transfer.
cancel_transferCancelTransferCommand to cancel 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.
stop_orders_submissionStopOrdersSubmissionCommand to submit a pair of stop orders.
stop_orders_cancellationStopOrdersCancellationCommand to cancel stop orders.
create_referral_setCreateReferralSetCommand to create a referral set.
update_referral_setUpdateReferralSetCommand to update a referral set.
apply_referral_codeApplyReferralCodeCommand to apply a referral code.
update_margin_modeUpdateMarginModeCommand to update the margin mode of a party in a market.
join_teamJoinTeamCommand to join a team.
batch_proposal_submissionBatchProposalSubmissionCommand to submit a batch governance proposal.
update_party_profileUpdatePartyProfileCommand to update a party's profile.
submit_ammSubmitAMMCommand to submit an AMM pool to a market
amend_ammAmendAMMCommand to amend an AMM pool on a market
cancel_ammCancelAMMCommand to cancel an AMM pool on a market
node_voteNodeVoteValidator command sent automatically to vote on that validity of an external resource.
node_signatureNodeSignatureValidator command sent automatically to provide signatures for the Ethereum bridge.
chain_eventChainEventValidator command sent automatically to notify the Vega chain of an off-chain event.
key_rotate_submissionKeyRotateSubmissionValidator command sent manually by a node operator to rotate their node's Vega keys.
state_variable_proposalStateVariableProposalValidator command sent automatically to reach consensus on floating point values.
validator_heartbeatValidatorHeartbeatValidator command sent automatically to signal regular participation in the network.
ethereum_key_rotate_submissionEthereumKeyRotateSubmissionValidator command sent manually by a node operator to rotate their node's Ethereum keys.
protocol_upgrade_proposalProtocolUpgradeProposalValidator command sent manually to propose a protocol upgrade.
issue_signaturesIssueSignaturesCommand to request signatures to amend the multisig-control contract.
oracle_data_submissionOracleDataSubmissionCommand to submit external oracle data.
delayed_transactions_wrapperDelayedTransactionsWrapperInternal transactions used to convey delayed transactions to be included in the next block.

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

Transaction containing a command that can be sent to instruct the network to execute an action. A transaction contains a byte string representation of the input data which must then be signed, with the signature added to the transaction.

NameTypeDescription
input_databytesProtobuf message of type `InputData` marshalled into bytes. If the transaction version is V3 or higher then this bytes string must be prepended with `chain_id_as_byes + \0`.
signatureSignatureSignature of the input data field, signed by the sender of this transaction.
addressstringHex-encoded address of the sender. Not supported yet.
pub_keystringHex-encoded public key of the sender.
versionTxVersionVersion of the transaction.
powProofOfWorkProof-of-work containing the random transaction ID used by the client and the nonce.

Enums

TxVersion

Transaction versions to maintain backwards compatibility of transaction formats.

NameNumberDescription
TX_VERSION_UNSPECIFIED0Transaction version is unspecified.
TX_VERSION_V22Transaction requires the addition of a proof-of-work calculation.
TX_VERSION_V33Transaction input data contains a prepended chain ID to prevent use of a single transaction across multiple networks.