code.vegaprotocol.io/vega@v0.79.0/protos/sources/vega/commands/v1/transaction.proto (about) 1 syntax = "proto3"; 2 3 package vega.commands.v1; 4 5 import "vega/commands/v1/commands.proto"; 6 import "vega/commands/v1/data.proto"; 7 import "vega/commands/v1/signature.proto"; 8 import "vega/commands/v1/validator_commands.proto"; 9 10 option go_package = "code.vegaprotocol.io/vega/protos/vega/commands/v1"; 11 12 // Input data for a transaction containing a network command for the Vega network to execute. 13 // Once populated the protobuf message should be marshalled into a byte array and included in a transaction message. 14 message InputData { 15 // This was the old restore checkpoint command 16 reserved 4001; 17 // Arbitrary number used to provide uniqueness to the signature of two otherwise identical input data, preventing replay attacks. 18 // Must be set to a different value for all new transactions sent by a party. It is advised to generate this number randomly. 19 uint64 nonce = 1; 20 // Block height which has been used to calculate the transaction proof-of-work. 21 uint64 block_height = 2; 22 23 oneof command { 24 // Command to submit an order. 25 OrderSubmission order_submission = 1001; 26 // Command to cancel an order. 27 OrderCancellation order_cancellation = 1002; 28 // Command to amend an order. 29 OrderAmendment order_amendment = 1003; 30 // Command to submit a withdrawal. 31 WithdrawSubmission withdraw_submission = 1004; 32 // Command to submit a governance proposal. 33 ProposalSubmission proposal_submission = 1005; 34 // Command to submit a vote on a governance proposal. 35 VoteSubmission vote_submission = 1006; 36 // Command to submit a liquidity commitment. 37 LiquidityProvisionSubmission liquidity_provision_submission = 1007; 38 // Command to delegate tokens to a validator. 39 DelegateSubmission delegate_submission = 1008; 40 // Command to remove tokens delegated to a validator. 41 UndelegateSubmission undelegate_submission = 1009; 42 // Command to cancel a liquidity commitment. 43 LiquidityProvisionCancellation liquidity_provision_cancellation = 1010; 44 // Command to amend a liquidity commitment. 45 LiquidityProvisionAmendment liquidity_provision_amendment = 1011; 46 // Command to submit a transfer. 47 Transfer transfer = 1012; 48 // Command to cancel a recurring transfer. 49 CancelTransfer cancel_transfer = 1013; 50 // Command used by a node operator to announce its node as a pending validator. 51 AnnounceNode announce_node = 1014; 52 // Command to submit a batch of order instructions. 53 BatchMarketInstructions batch_market_instructions = 1015; 54 // Command to submit a pair of stop orders. 55 StopOrdersSubmission stop_orders_submission = 1016; 56 // Command to cancel stop orders. 57 StopOrdersCancellation stop_orders_cancellation = 1017; 58 // Command to create a referral set. 59 CreateReferralSet create_referral_set = 1018; 60 // Command to update a referral set. 61 UpdateReferralSet update_referral_set = 1019; 62 // Command to apply a referral code. 63 ApplyReferralCode apply_referral_code = 1020; 64 // Command to update the margin mode of a party in a market. 65 UpdateMarginMode update_margin_mode = 1021; 66 // Command to join a team. 67 JoinTeam join_team = 1022; 68 // Command to submit a batch governance proposal. 69 BatchProposalSubmission batch_proposal_submission = 1023; 70 // Command to update a party's profile. 71 UpdatePartyProfile update_party_profile = 1024; 72 // Command to submit an AMM pool to a market 73 SubmitAMM submit_amm = 1025; 74 // Command to amend an AMM pool on a market 75 AmendAMM amend_amm = 1026; 76 // Command to cancel an AMM pool on a market 77 CancelAMM cancel_amm = 1027; 78 79 // Validator command sent automatically to vote on that validity of an external resource. 80 NodeVote node_vote = 2002; 81 // Validator command sent automatically to provide signatures for the Ethereum bridge. 82 NodeSignature node_signature = 2003; 83 // Validator command sent automatically to notify the Vega chain of an off-chain event. 84 ChainEvent chain_event = 2004; 85 // Validator command sent manually by a node operator to rotate their node's Vega keys. 86 KeyRotateSubmission key_rotate_submission = 2005; 87 // Validator command sent automatically to reach consensus on floating point values. 88 StateVariableProposal state_variable_proposal = 2006; 89 // Validator command sent automatically to signal regular participation in the network. 90 ValidatorHeartbeat validator_heartbeat = 2007; 91 // Validator command sent manually by a node operator to rotate their node's Ethereum keys. 92 EthereumKeyRotateSubmission ethereum_key_rotate_submission = 2008; 93 // Validator command sent manually to propose a protocol upgrade. 94 ProtocolUpgradeProposal protocol_upgrade_proposal = 2009; 95 // Command to request signatures to amend the multisig-control contract. 96 IssueSignatures issue_signatures = 2010; 97 // Command to submit external oracle data. 98 OracleDataSubmission oracle_data_submission = 3001; 99 // Internal transactions used to convey delayed transactions to be included in the next block. 100 DelayedTransactionsWrapper delayed_transactions_wrapper = 4000; 101 } 102 } 103 104 // Transaction versions to maintain backwards compatibility of transaction formats. 105 enum TxVersion { 106 reserved 1; 107 // Transaction version is unspecified. 108 TX_VERSION_UNSPECIFIED = 0; 109 // Transaction requires the addition of a proof-of-work calculation. 110 TX_VERSION_V2 = 2; 111 // Transaction input data contains a prepended chain ID to prevent use of a single transaction across multiple networks. 112 TX_VERSION_V3 = 3; 113 } 114 115 // Transaction containing a command that can be sent to instruct the network to execute an action. 116 // A transaction contains a byte string representation of the input data which must then be signed, with the signature added to the transaction. 117 message Transaction { 118 // Protobuf message of type `InputData` marshalled into bytes. If the transaction version is V3 or higher then this bytes 119 // string must be prepended with `chain_id_as_byes + \0`. 120 bytes input_data = 1; 121 // Signature of the input data field, signed by the sender of this transaction. 122 Signature signature = 2; 123 // Sender of the transaction. 124 oneof from { 125 // Hex-encoded address of the sender. Not supported yet. 126 string address = 1001; 127 // Hex-encoded public key of the sender. 128 string pub_key = 1002; 129 } 130 // Version of the transaction. 131 TxVersion version = 2000; 132 // Proof-of-work containing the random transaction ID used by the client and the nonce. 133 ProofOfWork pow = 3000; 134 } 135 136 // Components needed for the network to verify proof-of-work. 137 message ProofOfWork { 138 // Unique transaction identifier used to seed the proof-of-work hash. 139 string tid = 1; 140 // Number which, combined with the transaction identifier, will produce a hash with the required number of leading zeros to be accepted by the network. 141 uint64 nonce = 2; 142 }