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.
Name | Type | Description |
---|---|---|
nonce | uint64 | Arbitrary 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_height | uint64 | Block height which has been used to calculate the transaction proof-of-work. |
order_submission | OrderSubmission | Command to submit an order. |
order_cancellation | OrderCancellation | Command to cancel an order. |
order_amendment | OrderAmendment | Command to amend an order. |
withdraw_submission | WithdrawSubmission | Command to submit a withdrawal. |
proposal_submission | ProposalSubmission | Command to submit a governance proposal. |
vote_submission | VoteSubmission | Command to submit a vote on a governance proposal. |
liquidity_provision_submission | LiquidityProvisionSubmission | Command to submit a liquidity commitment. |
delegate_submission | DelegateSubmission | Command to delegate tokens to a validator. |
undelegate_submission | UndelegateSubmission | Command to remove tokens delegated to a validator. |
liquidity_provision_cancellation | LiquidityProvisionCancellation | Command to cancel a liquidity commitment. |
liquidity_provision_amendment | LiquidityProvisionAmendment | Command to amend a liquidity commitment. |
transfer | Transfer | Command to submit a transfer. |
cancel_transfer | CancelTransfer | Command to cancel a recurring transfer. |
announce_node | AnnounceNode | Command used by a node operator to announce its node as a pending validator. |
batch_market_instructions | BatchMarketInstructions | Command to submit a batch of order instructions. |
stop_orders_submission | StopOrdersSubmission | Command to submit a pair of stop orders. |
stop_orders_cancellation | StopOrdersCancellation | Command to cancel stop orders. |
create_referral_set | CreateReferralSet | Command to create a referral set. |
update_referral_set | UpdateReferralSet | Command to update a referral set. |
apply_referral_code | ApplyReferralCode | Command to apply a referral code. |
update_margin_mode | UpdateMarginMode | Command to update the margin mode of a party in a market. |
join_team | JoinTeam | Command to join a team. |
batch_proposal_submission | BatchProposalSubmission | Command to submit a batch governance proposal. |
update_party_profile | UpdatePartyProfile | Command to update a party's profile. |
node_vote | NodeVote | Validator command sent automatically to vote on that validity of an external resource. |
node_signature | NodeSignature | Validator command sent automatically to provide signatures for the Ethereum bridge. |
chain_event | ChainEvent | Validator command sent automatically to notify the Vega chain of an off-chain event. |
key_rotate_submission | KeyRotateSubmission | Validator command sent manually by a node operator to rotate their node's Vega keys. |
state_variable_proposal | StateVariableProposal | Validator command sent automatically to reach consensus on floating point values. |
validator_heartbeat | ValidatorHeartbeat | Validator command sent automatically to signal regular participation in the network. |
ethereum_key_rotate_submission | EthereumKeyRotateSubmission | Validator command sent manually by a node operator to rotate their node's Ethereum keys. |
protocol_upgrade_proposal | ProtocolUpgradeProposal | Validator command sent manually to propose a protocol upgrade. |
issue_signatures | IssueSignatures | Command to request signatures to amend the multisig-control contract. |
oracle_data_submission | OracleDataSubmission | Command to submit external oracle data. |
ProofOfWork
Components needed for the network to verify proof-of-work.
Name | Type | Description |
---|---|---|
tid | string | Unique transaction identifier used to seed the proof-of-work hash. |
nonce | uint64 | Number 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.
Name | Type | Description |
---|---|---|
input_data | bytes | Protobuf 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`. |
signature | Signature | Signature of the input data field, signed by the sender of this transaction. |
address | string | Hex-encoded address of the sender. Not supported yet. |
pub_key | string | Hex-encoded public key of the sender. |
version | TxVersion | Version of the transaction. |
pow | ProofOfWork | Proof-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.
Name | Number | Description |
---|---|---|
TX_VERSION_UNSPECIFIED | 0 | Transaction version is unspecified. |
TX_VERSION_V2 | 2 | Transaction requires the addition of a proof-of-work calculation. |
TX_VERSION_V3 | 3 | Transaction input data contains a prepended chain ID to prevent use of a single transaction across multiple networks. |