github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/protobuf/exec.proto (about) 1 syntax = 'proto3'; 2 3 package exec; 4 5 option go_package = "github.com/hyperledger/burrow/execution/exec"; 6 7 import "gogoproto/gogo.proto"; 8 import "tendermint/types/types.proto"; 9 import "google/protobuf/timestamp.proto"; 10 11 import "errors.proto"; 12 import "names.proto"; 13 import "txs.proto"; 14 import "permission.proto"; 15 import "spec.proto"; 16 17 option (gogoproto.stable_marshaler_all) = true; 18 option (gogoproto.marshaler_all) = true; 19 option (gogoproto.unmarshaler_all) = true; 20 option (gogoproto.sizer_all) = true; 21 option (gogoproto.goproto_registration) = true; 22 option (gogoproto.messagename_all) = true; 23 24 // This message exists purely for framing []StreamEvent 25 message StreamEvents { 26 repeated StreamEvent StreamEvents = 1; 27 } 28 29 message StreamEvent { 30 option (gogoproto.onlyone) = true; 31 BeginBlock BeginBlock = 1; 32 BeginTx BeginTx = 2; 33 txs.Envelope Envelope = 3 [(gogoproto.customtype) = "github.com/hyperledger/burrow/txs.Envelope"]; 34 Event Event = 4; 35 EndTx EndTx = 5; 36 EndBlock EndBlock = 6; 37 } 38 39 message BeginBlock { 40 // The height of this block 41 uint64 Height = 1; 42 // The number of transactions in the block (used as a checksum when consuming StreamEvents) 43 uint64 NumTxs = 3; 44 // The height of the most recent block we stored in state (which is the last non-empty block in current implementation) 45 uint64 PredecessorHeight = 4; 46 tendermint.types.Header Header = 2; 47 } 48 49 message EndBlock { 50 uint64 Height = 1; 51 } 52 53 message BeginTx { 54 TxHeader TxHeader = 1; 55 // The number of events generated by this transaction execution (used as a checksum when consuming StreamEvents) 56 uint64 NumEvents = 5; 57 // Result of tx execution 58 Result Result = 2; 59 // If tx execution was an exception 60 errors.Exception Exception = 4; 61 } 62 63 message EndTx { 64 // The hash of the transaction that caused this event to be generated 65 bytes TxHash = 3 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false]; 66 } 67 68 message TxHeader { 69 // Transaction type 70 uint32 TxType = 1 [(gogoproto.casttype) = "github.com/hyperledger/burrow/txs/payload.Type"]; 71 // The hash of the transaction that caused this event to be generated 72 bytes TxHash = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false]; 73 // The block height at which this transaction was included 74 uint64 Height = 3; 75 // The index of this transaction within the block 76 uint64 Index = 4; 77 // The origin information from the chain on which this tx was originally committed (if restored or otherwise imported) 78 Origin Origin = 5; 79 } 80 81 message BlockExecution { 82 // The height of this block 83 uint64 Height = 1; 84 // The height of the most recent block we stored in state (which is the last non-empty block in current implementation) 85 uint64 PredecessorHeight = 4; 86 tendermint.types.Header Header = 2; 87 repeated TxExecution TxExecutions = 3; 88 } 89 90 message TxExecutionKey { 91 // The block height 92 uint64 Height = 1; 93 // The offset of the TxExecution in bytes 94 uint64 Offset = 2; 95 } 96 97 message TxExecution { 98 TxHeader Header = 1 [(gogoproto.embed) = true]; 99 // Signed Tx that triggered this execution 100 txs.Envelope Envelope = 6 [(gogoproto.customtype) = "github.com/hyperledger/burrow/txs.Envelope"]; 101 // Execution events 102 repeated Event Events = 7; 103 // The execution results 104 Result Result = 8; 105 // The transaction receipt 106 txs.Receipt Receipt = 9; 107 // If execution was an exception 108 errors.Exception Exception = 10; 109 // A proposal may contain other transactions 110 repeated TxExecution TxExecutions = 11; 111 } 112 113 message Origin { 114 // The original ChainID from for this transaction 115 string ChainID = 1; 116 // The original height at which this transaction was committed 117 uint64 Height = 2; 118 // The original index in the block 119 uint64 Index = 3; 120 // The original block time for this transaction 121 google.protobuf.Timestamp Time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; 122 } 123 124 message Header { 125 option (gogoproto.goproto_stringer) = false; 126 // Transaction type 127 uint32 TxType = 1 [(gogoproto.casttype) = "github.com/hyperledger/burrow/txs/payload.Type"]; 128 // The hash of the transaction that caused this event to be generated 129 bytes TxHash = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false]; 130 // The type of event 131 uint32 EventType = 3 [(gogoproto.casttype) = "EventType"]; 132 // EventID published with event 133 string EventID = 4; 134 // The block height at which this event was emitted 135 uint64 Height = 5; 136 // The index of this event relative to other events generated by the same transaction 137 uint64 Index = 6; 138 // If event is exception 139 errors.Exception Exception = 7; 140 } 141 142 message Event { 143 option (gogoproto.goproto_stringer) = false; 144 option (gogoproto.onlyone) = true; 145 Header Header = 1; 146 InputEvent Input = 2; 147 OutputEvent Output = 3; 148 CallEvent Call = 4; 149 LogEvent Log = 5; 150 GovernAccountEvent GovernAccount = 6; 151 PrintEvent Print = 7; 152 } 153 154 // Could structure this further if needed - sum type of various results relevant to different transaction types 155 message Result { 156 // EVM execution return 157 bytes Return = 1; 158 // Gas used in computation 159 uint64 GasUsed = 2; 160 // Name entry created 161 names.Entry NameEntry = 3; 162 // Permission update performed 163 permission.PermArgs PermArgs = 4; 164 } 165 166 message LogEvent { 167 bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false]; 168 bytes Data = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false]; 169 repeated bytes Topics = 3 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.Word256", (gogoproto.nullable) = false]; 170 } 171 172 message CallEvent { 173 uint32 CallType = 5 [(gogoproto.casttype) = "CallType"]; 174 CallData CallData = 1; 175 bytes Origin = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false]; 176 uint64 StackDepth = 3; 177 bytes Return = 4 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false]; 178 } 179 180 message PrintEvent { 181 bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false]; 182 bytes Data = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false]; 183 } 184 185 message GovernAccountEvent { 186 spec.TemplateAccount AccountUpdate = 1; 187 } 188 189 message InputEvent { 190 bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false]; 191 } 192 193 message OutputEvent { 194 bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false]; 195 } 196 197 message CallData { 198 bytes Caller = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false]; 199 bytes Callee = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false]; 200 bytes Data = 3 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false]; 201 // Bytes of a big integer value 202 bytes Value = 4; 203 bytes Gas = 5; 204 }