burrow/protobuf at master · hyperledger/burrow
git clone https://github.com/hyperledger/burrow.git /tmp/src/burrow
bash tc.sh --gen-proto-doc /tmp/src/burrow/protobuf /tmp/output.md
Top
Top
Field | Type | Label | Description |
Height | uint64 | | |
Field | Type | Label | Description |
TxHash | bytes | | The hash of the transaction that caused this event to be generated |
Field | Type | Label | Description |
TxType | uint32 | | Transaction type |
TxHash | bytes | | The hash of the transaction that caused this event to be generated |
EventType | uint32 | | The type of event |
EventID | string | | EventID published with event |
Height | uint64 | | The block height at which this event was emitted |
Index | uint64 | | The index of this event relative to other events generated by the same transaction |
Exception | errors.Exception | | If event is exception |
Field | Type | Label | Description |
Address | bytes | | |
Field | Type | Label | Description |
ChainID | string | | The original ChainID from for this transaction |
Height | uint64 | | The original height at which this transaction was committed |
Index | uint64 | | The original index in the block |
Time | google.protobuf.Timestamp | | The original block time for this transaction |
Field | Type | Label | Description |
Address | bytes | | |
Could structure this further if needed - sum type of various results relevant to different transaction types
This message exists purely for framing []StreamEvent
Field | Type | Label | Description |
StreamEvents | StreamEvent | repeated | |
Field | Type | Label | Description |
Height | uint64 | | The block height |
Offset | uint64 | | The offset of the TxExecution in bytes |
Field | Type | Label | Description |
TxType | uint32 | | Transaction type |
TxHash | bytes | | The hash of the transaction that caused this event to be generated |
Height | uint64 | | The block height at which this Tx was included |
Index | uint64 | | The index of this transaction within the block |
Origin | Origin | | The origin information from the chain on which this tx was originally committed (if restored or otherwise imported) |
Top
NameReg provides a global key value store based on Name, Data pairs that are subject to expiry and ownership by an
account.
Field | Type | Label | Description |
Name | string | | registered name for the entry |
Owner | bytes | | address that created the entry |
Data | string | | data to store under this name |
Expires | uint64 | | block at which this entry expires |
Top
For testing
Top
Top
An envelope contains both the signable Tx and the signatures for each input (in signatories)
Field | Type | Label | Description |
Signatories | Signatory | repeated | |
Tx | bytes | | Canonical bytes of the Tx ready to be signed |
BroadcastTx or Transaction receipt
Field | Type | Label | Description |
TxType | uint32 | | Transaction type |
TxHash | bytes | | The hash of the transaction that caused this event to be generated |
CreatesContract | bool | | Whether the transaction creates a contract |
ContractAddress | bytes | | The address of the contract being called |
Signatory contains signature and one or both of Address and PublicKey to identify the signer
Top
Field | Type | Label | Description |
Envelope | txs.Envelope | | An existing Envelope - either signed or unsigned - if the latter will be signed server-side |
Payload | payload.Any | | If no Envelope provided then one will be generated from the provided payload and signed server-side |
Timeout | google.protobuf.Duration | | The amount of time to wait for the transaction to be committed and the TxExecution to be returned (server-side). If zero there wait is unbounded. Timed out transactions return SyncInfo state that may be helpful debugging non-committed transactions - this timeout must be less than client timeout to see such information! |
Transaction Service Definition
Top
BlockGossip determine consensus critical
elements of how blocks are gossiped
Field | Type | Label | Description |
block_part_size_bytes | int32 | | Note: must not be 0 |
BlockSize contains limits on the block size.
Field | Type | Label | Description |
max_bytes | int32 | | |
max_gas | int64 | | |
ConsensusParams contains all consensus-relevant parameters
that can be adjusted by the abci app
commit from validators from the last block |
| data_hash | bytes | | transactions |
| validators_hash | bytes | | hashes from the app output from the prev block
validators for the current block |
| next_validators_hash | bytes | | validators for the next block |
| consensus_hash | bytes | | consensus params for current block |
| app_hash | bytes | | state after txs from the previous block |
| last_results_hash | bytes | | root hash of all results from the txs from the previous block |
| evidence_hash | bytes | | consensus info
evidence included in the block |
| proposer_address | bytes | | original proposer of the block |
NOTE: validators here have empty pubkeys.
Field | Type | Label | Description |
tx | bytes | | |
Field | Type | Label | Description |
tx | bytes | | |
Field | Type | Label | Description |
message | string | | |
Field | Type | Label | Description |
height | int64 | | |
Field | Type | Label | Description |
version | string | | |
nondeterministic
Field | Type | Label | Description |
data | bytes | | reserve 1 |
Field | Type | Label | Description |
message | string | | |
nondeterministic
Field | Type | Label | Description |
error | string | | |
Field | Type | Label | Description |
code | uint32 | | |
log | string | | bytes data = 2; // use "value" instead. |
nondeterministic |
| info | string | | nondeterministic |
| index | int64 | | |
| key | bytes | | |
| value | bytes | | |
| proof | bytes | | |
| height | int64 | | |
nondeterministic
TxSize contains limits on the tx size.
Field | Type | Label | Description |
max_bytes | int32 | | |
max_gas | int64 | | |
Validator
Field | Type | Label | Description |
address | bytes | | |
power | int64 | | PubKey pub_key = 2 [(gogoproto.nullable)=false]; |
ValidatorUpdate
VoteInfo
Field | Type | Label | Description |
validator | Validator | | |
signed_last_block | bool | | |
Top
Define these here for compatibility but use tmlibs/common.KI64Pair.
Define these here for compatibility but use tmlibs/common.KVPair.
Top
Field | Type | Label | Description |
Perms | uint64 | optional | |
SetBit | uint64 | optional | |
Field | Type | Label | Description |
Action | uint64 | optional | The permission function |
Target | bytes | optional | The target of the action |
Permission | uint64 | optional | Possible arguments |
Role | string | optional | |
Value | bool | optional | |
Top
Field | Type | Label | Description |
CodeHash | bytes | | |
MetadataHash | bytes | | |
Metadata | string | | In the dump format we would like the ABI rather than its hash |
Top
Field | Type | Label | Description |
Address | bytes | | |
Field | Type | Label | Description |
Height | uint64 | | |
Field | Type | Label | Description |
Address | bytes | | |
MetadataHash | bytes | | |
Field | Type | Label | Description |
Name | string | | |
Field | Type | Label | Description |
Hash | bytes | | |
Field | Type | Label | Description |
IncludePrevious | int64 | | Use -1 for all available history |
Field | Type | Label | Description |
Query | string | | |
Field | Type | Label | Description |
Query | string | | |
Field | Type | Label | Description |
Proposed | bool | | |
Field | Type | Label | Description |
Metadata | string | | |
Field | Type | Label | Description |
AccountsWithCode | uint64 | | |
AccountsWithoutCode | uint64 | | |
Field | Type | Label | Description |
BlockTimeWithin | string | | |
BlockSeenTimeWithin | string | | |
Field | Type | Label | Description |
Value | bytes | | |
Top
Needed to proto2 rather than proto3 to get pointer field for PermArg
Top
Field | Type | Label | Description |
CurveType | uint32 | | |
PublicKey | bytes | | Note may need initialisation |
PrivateKey | bytes | | |
Field | Type | Label | Description |
CurveType | uint32 | | |
PublicKey | bytes | | |
Field | Type | Label | Description |
CurveType | uint32 | | |
Signature | bytes | | |
Top
This is the object that is stored in the leaves of the commitsTree - it captures the sub-tree hashes so that the
commitsTree's hash becomes a mixture of the hashes of all the sub-trees.
Top
Field | Type | Label | Description |
Inputs | TxInput | repeated | |
Txs | Any | repeated | |
Field | Type | Label | Description |
Input | TxInput | | Input must be the validator that desires to bond |
A instruction to run smart contract code in the EVM
Field | Type | Label | Description |
Input | TxInput | | The caller's input |
Address | bytes | | The contract address to call or nil if we are creating a contract |
GasLimit | uint64 | | The upper bound on the amount of gas (and therefore EVM execution steps) this CallTx may generate |
Fee | uint64 | | Fee to offer validators for processing transaction |
Data | bytes | | EVM bytecode |
WASM | bytes | | WASM bytecode |
ContractMeta | ContractMeta | repeated | Set of contracts this code will deploy |
A request to claim a globally unique name across the entire chain with some optional data storage leased for a fee
Field | Type | Label | Description |
Input | TxInput | | The name updater |
Name | string | | The name to update or create |
Data | string | | The data to store against the name |
Fee | uint64 | | The fee to provide that will determine the length of the name lease |
An update to the on-chain permissions
A payment between two sets of parties
Field | Type | Label | Description |
Inputs | TxInput | repeated | The payers |
Outputs | TxOutput | repeated | The payees |
An input to a transaction that may carry an Amount as a charge and whose sequence number must be one greater than
that associated with the account at Address at the time of being received
Field | Type | Label | Description |
Address | bytes | | The address from which this input flows |
Amount | uint64 | | The amount of native token to transfer from the input address |
Sequence | uint64 | | The sequence number that this transaction will induce (i.e. one greater than the input account's current sequence) |
An output from a transaction that may carry an amount as a charge
Field | Type | Label | Description |
Address | bytes | | The address to which this output flows |
Amount | uint64 | | The amount of native token to transfer to the output address |
Field | Type | Label | Description |
Address | bytes | | |
VotingWeight | int64 | | |
Name | Number | Description |
PROPOSED | 0 | PROPOSED might be expired, if sequence number of any of the input accounts are out of date |
EXECUTED | 1 | |
FAILED | 2 | |
Top
Field | Type | Label | Description |
Address | bytes | | |
Storage | Storage | repeated | |
Top
Field | Type | Label | Description |
height | uint64 | | |
Top
Field | Type | Label | Description |
Address | string | | |
Field | Type | Label | Description |
Hash | string | | |
Field | Type | Label | Description |
Address | string | | |
Field | Type | Label | Description |
Address | string | | |
KeyName | string | repeated | |
Field | Type | Label | Description |
KeyName | string | | |
Field | Type | Label | Description |
key | KeyID | repeated | |
Field | Type | Label | Description |
PublicKey | bytes | | |
CurveType | string | | |
Field | Type | Label | Description |
KeyName | string | | |
Top
Top
Needed to proto2 rather than proto3 to get pointer field for PermArg
Top
An inclusive range of blocks to include in output
Field | Type | Label | Description |
Start | Bound | | Bounds can be set to: absolute: block height relative: block height counting back from latest latest: latest block when call is processed stream: for End keep sending new blocks, for start same as latest |
End | Bound | | |
Field | Type | Label | Description |
BlockRange | BlockRange | | |
Query | string | | Specify a query on which to match the tags of events. Tag |
For example: EventType = 'LogEvent' AND EventID CONTAINS 'bar' AND TxHash = '020304' AND Height >= 34 AND Index < 3 AND Address = 'DEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEF' |
Field | Type | Label | Description |
Height | uint64 | | Height of block required |
Wait | bool | | Whether to wait for the block to become available |
Field | Type | Label | Description |
TxHash | bytes | | Height of block required |
Wait | bool | | Whether to wait for the block to become available |
Name | Number | Description |
ABSOLUTE | 0 | Index is absolute index of an item |
RELATIVE | 1 | Index is an offset relative to last item |
FIRST | 2 | The first block |
LATEST | 3 | Ignore provided index and evaluate to latest index |
STREAM | 4 | Ignore provided index and stream new objects as they are generated |
Execution events
Method Name | Request Type | Response Type | Description |
Stream | BlocksRequest | .exec.StreamEvent stream | Get StreamEvents (including transactions) for a range of block heights |
Tx | TxRequest | .exec.TxExecution | Get a particular TxExecution by hash |
Events | BlocksRequest | EventsResponse stream | GetEvents provides events streaming one block at a time - that is all events emitted in a particular block are guaranteed to be delivered in each GetEventsResponse |
Top
Needed to proto2 rather than proto3 to get pointer field for PermArg
Top
.proto Type | Notes | C++ Type | Java Type | Python Type |
double | | double | double | float |
float | | float | float | float |
int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int |
int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long |
uint32 | Uses variable-length encoding. | uint32 | int | int/long |
uint64 | Uses variable-length encoding. | uint64 | long | int/long |
sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int |
sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long |
fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int |
fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long |
sfixed32 | Always four bytes. | int32 | int | int |
sfixed64 | Always eight bytes. | int64 | long | int/long |
bool | | bool | boolean | boolean |
string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode |
bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |
.
├── acm.proto
├── balance.proto
├── bcm.proto
├── crypto.proto
├── dump.proto
├── encoding.proto
├── errors.proto
├── exec.proto
├── github.com
│ ├── gogo
│ │ └── protobuf
│ │ └── gogoproto
│ │ └── gogo.proto
│ └── tendermint
│ └── tendermint
│ ├── abci
│ │ └── types
│ │ └── types.proto
│ └── libs
│ └── common
│ └── types.proto
├── google
│ └── protobuf
│ ├── descriptor.proto
│ └── timestamp.proto
├── keys.proto
├── names.proto
├── payload.proto
├── permission.proto
├── rpcdump.proto
├── rpcevents.proto
├── rpc.proto
├── rpcquery.proto
├── rpctransact.proto
├── spec.proto
├── storage.proto
├── tendermint.proto
├── txs.proto
└── validator.proto
12 directories, 27 files
syntax = 'proto3';
option go_package = "github.com/hyperledger/burrow/acm/balance";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
package balance;
option (gogoproto.stable_marshaler_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
option (gogoproto.messagename_all) = true;
message Balance {
option (gogoproto.goproto_sizecache) = false;
option (gogoproto.goproto_unkeyed) = false;
option (gogoproto.goproto_stringer) = false;
uint32 Type = 1 [(gogoproto.casttype) = "Type"];
uint64 Amount = 2;
}
syntax = 'proto3';
package exec;
option go_package = "github.com/hyperledger/burrow/execution/exec";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "github.com/tendermint/tendermint/abci/types/types.proto";
import "google/protobuf/timestamp.proto";
import "errors.proto";
import "names.proto";
import "txs.proto";
import "permission.proto";
import "spec.proto";
option (gogoproto.stable_marshaler_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
option (gogoproto.messagename_all) = true;
// This message exists purely for framing []StreamEvent
message StreamEvents {
repeated StreamEvent StreamEvents = 1;
}
message StreamEvent {
option (gogoproto.onlyone) = true;
BeginBlock BeginBlock = 1;
BeginTx BeginTx = 2;
txs.Envelope Envelope = 3 [(gogoproto.customtype) = "github.com/hyperledger/burrow/txs.Envelope"];
Event Event = 4;
EndTx EndTx = 5;
EndBlock EndBlock = 6;
}
message BeginBlock {
// The height of this block
uint64 Height = 1;
types.Header Header = 2;
}
message EndBlock {
uint64 Height = 1;
}
message BeginTx {
TxHeader TxHeader = 1;
// Result of tx execution
Result Result = 2;
// If tx execution was an exception
errors.Exception Exception = 4;
}
message EndTx {
// The hash of the transaction that caused this event to be generated
bytes TxHash = 3 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
}
message TxHeader {
// Transaction type
uint32 TxType = 1 [(gogoproto.casttype) = "github.com/hyperledger/burrow/txs/payload.Type"];
// The hash of the transaction that caused this event to be generated
bytes TxHash = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
// The block height at which this Tx was included
uint64 Height = 3;
// The index of this transaction within the block
uint64 Index = 4;
// The origin information from the chain on which this tx was originally committed (if restored or otherwise imported)
Origin Origin = 5;
}
message BlockExecution {
// The height of this block
uint64 Height = 1;
types.Header Header = 2;
repeated TxExecution TxExecutions = 3;
}
message TxExecutionKey {
// The block height
uint64 Height = 1;
// The offset of the TxExecution in bytes
uint64 Offset = 2;
}
message TxExecution {
TxHeader Header = 1 [(gogoproto.embed) = true];
// Signed Tx that triggered this execution
txs.Envelope Envelope = 6 [(gogoproto.customtype) = "github.com/hyperledger/burrow/txs.Envelope"];
// Execution events
repeated Event Events = 7;
// The execution results
Result Result = 8;
// The transaction receipt
txs.Receipt Receipt = 9;
// If execution was an exception
errors.Exception Exception = 10;
// A proposal may contain other transactions
repeated TxExecution TxExecutions = 11;
}
message Origin {
// The original ChainID from for this transaction
string ChainID = 1;
// The original height at which this transaction was committed
uint64 Height = 2;
// The original index in the block
uint64 Index = 3;
// The original block time for this transaction
google.protobuf.Timestamp Time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
}
message Header {
option (gogoproto.goproto_stringer) = false;
// Transaction type
uint32 TxType = 1 [(gogoproto.casttype) = "github.com/hyperledger/burrow/txs/payload.Type"];
// The hash of the transaction that caused this event to be generated
bytes TxHash = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
// The type of event
uint32 EventType = 3 [(gogoproto.casttype) = "EventType"];
// EventID published with event
string EventID = 4;
// The block height at which this event was emitted
uint64 Height = 5;
// The index of this event relative to other events generated by the same transaction
uint64 Index = 6;
// If event is exception
errors.Exception Exception = 7;
}
message Event {
option (gogoproto.goproto_stringer) = false;
option (gogoproto.onlyone) = true;
Header Header = 1;
InputEvent Input = 2;
OutputEvent Output = 3;
CallEvent Call = 4;
LogEvent Log = 5;
GovernAccountEvent GovernAccount = 6;
}
// Could structure this further if needed - sum type of various results relevant to different transaction types
message Result {
// EVM execution return
bytes Return = 1;
// Gas used in computation
uint64 GasUsed = 2;
// Name entry created
names.Entry NameEntry = 3;
// Permission update performed
permission.PermArgs PermArgs = 4;
}
message LogEvent {
bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false];
bytes Data = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
repeated bytes Topics = 3 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.Word256", (gogoproto.nullable) = false];
}
message CallEvent {
uint32 CallType = 5 [(gogoproto.casttype) = "CallType"];
CallData CallData = 1;
bytes Origin = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false];
uint64 StackDepth = 3;
bytes Return = 4 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
}
message GovernAccountEvent {
spec.TemplateAccount AccountUpdate = 1;
}
message InputEvent {
bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false];
}
message OutputEvent {
bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false];
}
message CallData {
bytes Caller = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false];
bytes Callee = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false];
bytes Data = 3 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
uint64 Value = 4;
uint64 Gas = 5;
}
syntax = 'proto3';
package names;
option go_package = "github.com/hyperledger/burrow/execution/names";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.stable_marshaler_all) = true;
// Enable custom Marshal method.
option (gogoproto.marshaler_all) = true;
// Enable custom Unmarshal method.
option (gogoproto.unmarshaler_all) = true;
// Enable custom Size method (Required by Marshal and Unmarshal).
option (gogoproto.sizer_all) = true;
// Enable registration with golang/protobuf for the grpc-gateway.
option (gogoproto.goproto_registration) = true;
// Enable generation of XXX_MessageName methods for grpc-go/status.
option (gogoproto.messagename_all) = true;
// NameReg provides a global key value store based on Name, Data pairs that are subject to expiry and ownership by an
// account.
message Entry {
option (gogoproto.goproto_stringer) = false;
// registered name for the entry
string Name = 1;
// address that created the entry
bytes Owner = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false];
// data to store under this name
string Data = 3;
// block at which this entry expires
uint64 Expires = 4;
}
syntax = 'proto3';
option go_package = "github.com/hyperledger/burrow/encoding";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
package encoding;
option (gogoproto.stable_marshaler_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
option (gogoproto.messagename_all) = true;
// For testing
message TestMessage {
option (gogoproto.goproto_stringer) = false;
uint32 Type = 1;
uint64 Amount = 2;
}
syntax = 'proto3';
package validator;
option go_package = "github.com/hyperledger/burrow/acm/validator";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "crypto.proto";
option (gogoproto.stable_marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
option (gogoproto.messagename_all) = true;
message Validator {
option (gogoproto.goproto_stringer) = false;
bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address"];
crypto.PublicKey PublicKey = 2 [(gogoproto.nullable) = false];
uint64 Power = 3;
}
syntax = 'proto3';
option go_package = "github.com/hyperledger/burrow/txs";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "crypto.proto";
package txs;
// Enable custom Marshal method.
option (gogoproto.marshaler_all) = true;
// Enable custom Unmarshal method.
option (gogoproto.unmarshaler_all) = true;
// Enable custom Size method (Required by Marshal and Unmarshal).
option (gogoproto.sizer_all) = true;
// Enable registration with golang/protobuf for the grpc-gateway.
option (gogoproto.goproto_registration) = true;
// Enable generation of XXX_MessageName methods for grpc-go/status.
option (gogoproto.messagename_all) = true;
// An envelope contains both the signable Tx and the signatures for each input (in signatories)
message Envelope {
option (gogoproto.goproto_stringer) = false;
repeated Signatory Signatories = 1 [(gogoproto.nullable) = false];
// Canonical bytes of the Tx ready to be signed
bytes Tx = 2 [(gogoproto.customtype) = "Tx"];
}
// Signatory contains signature and one or both of Address and PublicKey to identify the signer
message Signatory {
bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address"];
crypto.PublicKey PublicKey = 2;
crypto.Signature Signature = 4;
}
// BroadcastTx or Transaction receipt
message Receipt {
// Transaction type
uint32 TxType = 1[(gogoproto.casttype) = "github.com/hyperledger/burrow/txs/payload.Type"];
// The hash of the transaction that caused this event to be generated
bytes TxHash = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
// Whether the transaction creates a contract
bool CreatesContract = 3;
// The address of the contract being called
bytes ContractAddress = 4 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false];
}
syntax = 'proto3';
package rpctransact;
option go_package = "github.com/hyperledger/burrow/rpc/rpctransact";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "google/protobuf/duration.proto";
import "exec.proto";
import "payload.proto";
import "txs.proto";
// Enable custom Marshal method.
option (gogoproto.marshaler_all) = true;
// Enable custom Unmarshal method.
option (gogoproto.unmarshaler_all) = true;
// Enable custom Size method (Required by Marshal and Unmarshal).
option (gogoproto.sizer_all) = true;
// Enable registration with golang/protobuf for the grpc-gateway.
option (gogoproto.goproto_registration) = true;
// Enable generation of XXX_MessageName methods for grpc-go/status.
option (gogoproto.messagename_all) = true;
// Transaction Service Definition
service Transact {
// Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side
// and wait for it to be included in block
rpc BroadcastTxSync (TxEnvelopeParam) returns (exec.TxExecution);
// Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side
rpc BroadcastTxAsync (TxEnvelopeParam) returns (txs.Receipt);
// Sign transaction server-side
rpc SignTx (TxEnvelopeParam) returns (TxEnvelope);
// Formulate a transaction from a Payload and retrun the envelop with the Tx bytes ready to sign
rpc FormulateTx (payload.Any) returns (TxEnvelope);
// Formulate and sign a CallTx transaction signed server-side and wait for it to be included in a block, retrieving response
rpc CallTxSync (payload.CallTx) returns (exec.TxExecution);
// Formulate and sign a CallTx transaction signed server-side
rpc CallTxAsync (payload.CallTx) returns (txs.Receipt);
// Perform a 'simulated' call of a contract against the current committed EVM state without any changes been saved
// and wait for the transaction to be included in a block
rpc CallTxSim (payload.CallTx) returns (exec.TxExecution);
// Perform a 'simulated' execution of provided code against the current committed EVM state without any changes been saved
rpc CallCodeSim (CallCodeParam) returns (exec.TxExecution);
// Formulate a SendTx transaction signed server-side and wait for it to be included in a block, retrieving response
rpc SendTxSync (payload.SendTx) returns (exec.TxExecution);
// Formulate and SendTx transaction signed server-side
rpc SendTxAsync (payload.SendTx) returns (txs.Receipt);
// Formualte a NameTx signed server-side and wait for it to be included in a block returning the registered name
rpc NameTxSync (payload.NameTx) returns (exec.TxExecution);
// Formulate a NameTx signed server-side
rpc NameTxAsync (payload.NameTx) returns (txs.Receipt);
}
message CallCodeParam {
bytes FromAddress = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false];
bytes Code = 2;
bytes Data = 3;
}
message TxEnvelope {
txs.Envelope Envelope = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/txs.Envelope"];
}
message TxEnvelopeParam {
// An existing Envelope - either signed or unsigned - if the latter will be signed server-side
txs.Envelope Envelope = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/txs.Envelope"];
// If no Envelope provided then one will be generated from the provided payload and signed server-side
payload.Any Payload = 2;
// The amount of time to wait for the transaction to be committed and the TxExecution to be returned (server-side).
// If zero there wait is unbounded. Timed out transactions return SyncInfo state that may be helpful debugging
// non-committed transactions - this timeout must be less than client timeout to see such information!
google.protobuf.Duration Timeout = 3 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
}
syntax = "proto3";
package types;
// For more information on gogo.proto, see:
// https://github.com/gogo/protobuf/blob/master/extensions.md
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "google/protobuf/timestamp.proto";
import "github.com/tendermint/tendermint/libs/common/types.proto";
// This file is copied from http://github.com/tendermint/abci
// NOTE: When using custom types, mind the warnings.
// https://github.com/gogo/protobuf/blob/master/custom_types.md#warnings-and-issues
option (gogoproto.stable_marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
// Generate tests
option (gogoproto.populate_all) = true;
option (gogoproto.equal_all) = true;
option (gogoproto.testgen_all) = true;
//----------------------------------------
// Request types
message Request {
oneof value {
RequestEcho echo = 2;
RequestFlush flush = 3;
RequestInfo info = 4;
RequestSetOption set_option = 5;
RequestInitChain init_chain = 6;
RequestQuery query = 7;
RequestBeginBlock begin_block = 8;
RequestCheckTx check_tx = 9;
RequestDeliverTx deliver_tx = 19;
RequestEndBlock end_block = 11;
RequestCommit commit = 12;
}
}
message RequestEcho {
string message = 1;
}
message RequestFlush {
}
message RequestInfo {
string version = 1;
}
// nondeterministic
message RequestSetOption {
string key = 1;
string value = 2;
}
message RequestInitChain {
google.protobuf.Timestamp time = 1 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true];
string chain_id = 2;
ConsensusParams consensus_params = 3;
repeated ValidatorUpdate validators = 4 [(gogoproto.nullable)=false];
bytes app_state_bytes = 5;
}
message RequestQuery {
bytes data = 1;
string path = 2;
int64 height = 3;
bool prove = 4;
}
// NOTE: validators here have empty pubkeys.
message RequestBeginBlock {
bytes hash = 1;
Header header = 2 [(gogoproto.nullable)=false];
LastCommitInfo last_commit_info = 3 [(gogoproto.nullable)=false];
repeated Evidence byzantine_validators = 4 [(gogoproto.nullable)=false];
}
message RequestCheckTx {
bytes tx = 1;
}
message RequestDeliverTx {
bytes tx = 1;
}
message RequestEndBlock {
int64 height = 1;
}
message RequestCommit {
}
//----------------------------------------
// Response types
message Response {
oneof value {
ResponseException exception = 1;
ResponseEcho echo = 2;
ResponseFlush flush = 3;
ResponseInfo info = 4;
ResponseSetOption set_option = 5;
ResponseInitChain init_chain = 6;
ResponseQuery query = 7;
ResponseBeginBlock begin_block = 8;
ResponseCheckTx check_tx = 9;
ResponseDeliverTx deliver_tx = 10;
ResponseEndBlock end_block = 11;
ResponseCommit commit = 12;
}
}
// nondeterministic
message ResponseException {
string error = 1;
}
message ResponseEcho {
string message = 1;
}
message ResponseFlush {
}
message ResponseInfo {
string data = 1;
string version = 2;
int64 last_block_height = 3;
bytes last_block_app_hash = 4;
}
// nondeterministic
message ResponseSetOption {
uint32 code = 1;
// bytes data = 2;
string log = 3;
string info = 4;
}
message ResponseInitChain {
ConsensusParams consensus_params = 1;
repeated ValidatorUpdate validators = 2 [(gogoproto.nullable)=false];
}
message ResponseQuery {
uint32 code = 1;
// bytes data = 2; // use "value" instead.
string log = 3; // nondeterministic
string info = 4; // nondeterministic
int64 index = 5;
bytes key = 6;
bytes value = 7;
bytes proof = 8;
int64 height = 9;
}
message ResponseBeginBlock {
repeated common.KVPair tags = 1 [(gogoproto.nullable)=false, (gogoproto.jsontag)="tags,omitempty"];
}
message ResponseCheckTx {
uint32 code = 1;
bytes data = 2;
string log = 3; // nondeterministic
string info = 4; // nondeterministic
int64 gas_wanted = 5;
int64 gas_used = 6;
repeated common.KVPair tags = 7 [(gogoproto.nullable)=false, (gogoproto.jsontag)="tags,omitempty"];
}
message ResponseDeliverTx {
uint32 code = 1;
bytes data = 2;
string log = 3; // nondeterministic
string info = 4; // nondeterministic
int64 gas_wanted = 5;
int64 gas_used = 6;
repeated common.KVPair tags = 7 [(gogoproto.nullable)=false, (gogoproto.jsontag)="tags,omitempty"];
}
message ResponseEndBlock {
repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable)=false];
ConsensusParams consensus_param_updates = 2;
repeated common.KVPair tags = 3 [(gogoproto.nullable)=false, (gogoproto.jsontag)="tags,omitempty"];
}
message ResponseCommit {
// reserve 1
bytes data = 2;
}
//----------------------------------------
// Misc.
// ConsensusParams contains all consensus-relevant parameters
// that can be adjusted by the abci app
message ConsensusParams {
BlockSize block_size = 1;
TxSize tx_size = 2;
BlockGossip block_gossip = 3;
}
// BlockSize contains limits on the block size.
message BlockSize {
int32 max_bytes = 1;
int64 max_gas = 2;
}
// TxSize contains limits on the tx size.
message TxSize {
int32 max_bytes = 1;
int64 max_gas = 2;
}
// BlockGossip determine consensus critical
// elements of how blocks are gossiped
message BlockGossip {
// Note: must not be 0
int32 block_part_size_bytes = 1;
}
message LastCommitInfo {
int32 round = 1;
repeated VoteInfo votes = 2 [(gogoproto.nullable)=false];
}
//----------------------------------------
// Blockchain Types
message Header {
// basic block info
string chain_id = 1 [(gogoproto.customname)="ChainID"];
int64 height = 2;
google.protobuf.Timestamp time = 3 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true];
int64 num_txs = 4;
int64 total_txs = 5;
// prev block info
BlockID last_block_id = 6 [(gogoproto.nullable)=false];
// hashes of block data
bytes last_commit_hash = 7; // commit from validators from the last block
bytes data_hash = 8; // transactions
// hashes from the app output from the prev block
bytes validators_hash = 9; // validators for the current block
bytes next_validators_hash = 10; // validators for the next block
bytes consensus_hash = 11; // consensus params for current block
bytes app_hash = 12; // state after txs from the previous block
bytes last_results_hash = 13;// root hash of all results from the txs from the previous block
// consensus info
bytes evidence_hash = 14; // evidence included in the block
bytes proposer_address = 15; // original proposer of the block
}
message BlockID {
bytes hash = 1;
PartSetHeader parts_header = 2 [(gogoproto.nullable)=false];
}
message PartSetHeader {
int32 total = 1;
bytes hash = 2;
}
// Validator
message Validator {
bytes address = 1;
//PubKey pub_key = 2 [(gogoproto.nullable)=false];
int64 power = 3;
}
// ValidatorUpdate
message ValidatorUpdate {
PubKey pub_key = 1 [(gogoproto.nullable)=false];
int64 power = 2;
}
// VoteInfo
message VoteInfo {
Validator validator = 1 [(gogoproto.nullable)=false];
bool signed_last_block = 2;
}
message PubKey {
string type = 1;
bytes data = 2;
}
message Evidence {
string type = 1;
Validator validator = 2 [(gogoproto.nullable)=false];
int64 height = 3;
google.protobuf.Timestamp time = 4 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true];
int64 total_voting_power = 5;
}
//----------------------------------------
// Service Definition
service ABCIApplication {
rpc Echo(RequestEcho) returns (ResponseEcho) ;
rpc Flush(RequestFlush) returns (ResponseFlush);
rpc Info(RequestInfo) returns (ResponseInfo);
rpc SetOption(RequestSetOption) returns (ResponseSetOption);
rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx);
rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx);
rpc Query(RequestQuery) returns (ResponseQuery);
rpc Commit(RequestCommit) returns (ResponseCommit);
rpc InitChain(RequestInitChain) returns (ResponseInitChain);
rpc BeginBlock(RequestBeginBlock) returns (ResponseBeginBlock);
rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock);
}
syntax = "proto3";
package common;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.stable_marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
// Generate tests
option (gogoproto.populate_all) = true;
option (gogoproto.equal_all) = true;
option (gogoproto.testgen_all) = true;
//----------------------------------------
// Abstract types
// Define these here for compatibility but use tmlibs/common.KVPair.
message KVPair {
bytes key = 1;
bytes value = 2;
}
// Define these here for compatibility but use tmlibs/common.KI64Pair.
message KI64Pair {
bytes key = 1;
int64 value = 2;
}
syntax = 'proto2';
package permission;
option go_package = "github.com/hyperledger/burrow/permission";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
// Enable custom Marshal method.
option (gogoproto.marshaler_all) = true;
// Enable custom Unmarshal method.
option (gogoproto.unmarshaler_all) = true;
// Enable custom Size method (Required by Marshal and Unmarshal).
option (gogoproto.sizer_all) = true;
// Enable registration with golang/protobuf for the grpc-gateway.
option (gogoproto.goproto_registration) = true;
// Enable generation of XXX_MessageName methods for grpc-go/status.
option (gogoproto.messagename_all) = true;
message AccountPermissions {
optional BasePermissions Base = 1 [(gogoproto.nullable) = false];
option (gogoproto.goproto_sizecache) = false;
option (gogoproto.goproto_unkeyed) = false;
repeated string Roles = 2;
}
message BasePermissions {
option (gogoproto.goproto_stringer) = false;
option (gogoproto.goproto_sizecache) = false;
option (gogoproto.goproto_unkeyed) = false;
optional uint64 Perms = 1 [(gogoproto.casttype) = "PermFlag", (gogoproto.nullable) = false];
optional uint64 SetBit = 2 [(gogoproto.casttype) = "PermFlag", (gogoproto.nullable) = false];
}
message PermArgs {
option (gogoproto.goproto_unrecognized) = false;
option (gogoproto.goproto_stringer) = false;
// The permission function
optional uint64 Action = 1 [(gogoproto.casttype) = "PermFlag", (gogoproto.nullable) = false];
// The target of the action
optional bytes Target = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address"];
// Possible arguments
optional uint64 Permission = 3 [(gogoproto.casttype) = "PermFlag"];
optional string Role = 4;
optional bool Value = 5;
}
syntax = 'proto3';
package acm;
option go_package = "github.com/hyperledger/burrow/acm";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "permission.proto";
import "crypto.proto";
option (gogoproto.stable_marshaler_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
option (gogoproto.messagename_all) = true;
message Account {
option (gogoproto.goproto_stringer) = false;
bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false];
crypto.PublicKey PublicKey = 2 [(gogoproto.nullable) = false];
uint64 Sequence = 3;
uint64 Balance = 4;
bytes EVMCode = 5 [(gogoproto.customtype) = "Bytecode", (gogoproto.nullable) = false];
permission.AccountPermissions Permissions = 6 [(gogoproto.nullable) = false];
bytes WASMCode = 7 [(gogoproto.customtype) = "Bytecode", (gogoproto.jsontag) = ",omitempty", (gogoproto.nullable) = false];
bytes CodeHash = 8 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false, (gogoproto.jsontag) = "-"];
repeated ContractMeta ContractMeta = 9;
// The metadata is stored in the deployed account. When the deployed account creates new account (from Solidity/EVM), they point to the original deployed
// account where the metadata is stored. This original account is called the forebear.
bytes Forebear = 10 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address"];
}
message ContractMeta {
bytes CodeHash = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
bytes MetadataHash = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
// In the dump format we would like the ABI rather than its hash
string Metadata = 3;
}
syntax = 'proto3';
package rpcquery;
option go_package = "github.com/hyperledger/burrow/rpc/rpcquery";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "github.com/tendermint/tendermint/abci/types/types.proto";
import "names.proto";
import "acm.proto";
import "validator.proto";
import "rpc.proto";
import "payload.proto";
option (gogoproto.stable_marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
option (gogoproto.messagename_all) = true;
service Query {
rpc Status (StatusParam) returns (rpc.ResultStatus);
rpc GetAccount (GetAccountParam) returns (acm.Account);
rpc GetMetadata (GetMetadataParam) returns (MetadataResult);
rpc GetStorage (GetStorageParam) returns (StorageValue);
rpc ListAccounts (ListAccountsParam) returns (stream acm.Account);
rpc GetName (GetNameParam) returns (names.Entry);
rpc ListNames (ListNamesParam) returns (stream names.Entry);
rpc GetValidatorSet (GetValidatorSetParam) returns (ValidatorSet);
rpc GetValidatorSetHistory (GetValidatorSetHistoryParam) returns (ValidatorSetHistory);
rpc GetProposal(GetProposalParam) returns (payload.Ballot);
rpc ListProposals(ListProposalsParam) returns (stream ProposalResult);
rpc GetStats(GetStatsParam) returns (Stats);
rpc GetBlockHeader(GetBlockParam) returns (types.Header);
}
message StatusParam {
string BlockTimeWithin = 1;
string BlockSeenTimeWithin = 2;
}
message GetAccountParam {
bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false];
}
message GetMetadataParam {
bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address"];
bytes MetadataHash = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes"];
}
message MetadataResult {
string Metadata = 1;
}
message GetStorageParam {
bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false];
bytes Key = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.Word256", (gogoproto.nullable) = false];
}
message StorageValue {
bytes Value = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
}
message ListAccountsParam {
string Query = 1;
}
message GetNameParam {
string Name = 1;
}
message ListNamesParam {
string Query = 1;
}
message GetValidatorSetParam {
}
message GetValidatorSetHistoryParam {
// Use -1 for all available history
int64 IncludePrevious = 1;
}
message ValidatorSetHistory {
repeated ValidatorSet History = 1;
}
message ValidatorSet {
uint64 height = 1;
repeated validator.Validator Set = 2;
}
message GetProposalParam {
bytes Hash = 1;
}
message ListProposalsParam {
bool Proposed = 1;
}
message ProposalResult {
bytes Hash = 1;
payload.Ballot Ballot = 2;
}
message GetStatsParam {
}
message Stats {
uint64 AccountsWithCode = 1;
uint64 AccountsWithoutCode = 2;
}
message GetBlockParam {
uint64 Height = 1;
}
// Needed to proto2 rather than proto3 to get pointer field for PermArg
syntax = 'proto3';
option go_package = "github.com/hyperledger/burrow/consensus/tendermint";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
package tendermint;
option (gogoproto.stable_marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
option (gogoproto.messagename_all) = true;
message NodeInfo {
bytes ID = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false];
string ListenAddress = 2;
string Network = 3;
string Version = 4;
bytes Channels = 5 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
string Moniker = 6;
string RPCAddress = 7;
string TxIndex = 8;
}
syntax = 'proto3';
package crypto;
option go_package = "github.com/hyperledger/burrow/crypto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.stable_marshaler_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
option (gogoproto.messagename_all) = true;
message PublicKey {
option (gogoproto.goproto_stringer) = false;
uint32 CurveType = 1 [(gogoproto.casttype) = "CurveType"];
bytes PublicKey = 2[(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
}
message PrivateKey {
option (gogoproto.goproto_stringer) = false;
option (gogoproto.goproto_getters) = false;
uint32 CurveType = 1 [(gogoproto.casttype) = "CurveType"];
// Note may need initialisation
bytes PublicKey = 2;
bytes PrivateKey = 3;
}
message Signature {
option (gogoproto.goproto_stringer) = false;
uint32 CurveType = 1 [(gogoproto.casttype) = "CurveType"];
bytes Signature = 2;
}
syntax = 'proto3';
option go_package = "github.com/hyperledger/burrow/storage";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
package storage;
option (gogoproto.stable_marshaler_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
option (gogoproto.messagename_all) = true;
// This is the object that is stored in the leaves of the commitsTree - it captures the sub-tree hashes so that the
// commitsTree's hash becomes a mixture of the hashes of all the sub-trees.
message CommitID {
option (gogoproto.goproto_stringer) = false;
int64 Version = 1;
bytes Hash = 2;
}
syntax = 'proto3';
option go_package = "github.com/hyperledger/burrow/txs/payload";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "permission.proto";
import "spec.proto";
package payload;
// Enable custom Marshal method.
option (gogoproto.marshaler_all) = true;
// Enable custom Unmarshal method.
option (gogoproto.unmarshaler_all) = true;
// Enable custom Size method (Required by Marshal and Unmarshal).
option (gogoproto.sizer_all) = true;
// Enable registration with golang/protobuf for the grpc-gateway.
option (gogoproto.goproto_registration) = true;
// Enable generation of XXX_MessageName methods for grpc-go/status.
option (gogoproto.messagename_all) = true;
message Any {
option (gogoproto.onlyone) = true;
CallTx CallTx = 1;
SendTx SendTx = 2;
NameTx NameTx = 3;
PermsTx PermsTx = 4;
GovTx GovTx = 5;
BondTx BondTx = 6;
UnbondTx UnbondTx = 7;
BatchTx BatchTx = 8;
ProposalTx ProposalTx = 9;
}
// An input to a transaction that may carry an Amount as a charge and whose sequence number must be one greater than
// that associated with the account at Address at the time of being received
message TxInput {
option (gogoproto.goproto_stringer) = false;
// The address from which this input flows
bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false];
// The amount of native token to transfer from the input address
uint64 Amount = 2;
// The sequence number that this transaction will induce (i.e. one greater than the input account's current sequence)
uint64 Sequence = 3;
}
// An output from a transaction that may carry an amount as a charge
message TxOutput {
option (gogoproto.goproto_stringer) = false;
// The address to which this output flows
bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false];
// The amount of native token to transfer to the output address
uint64 Amount = 2;
}
// A instruction to run smart contract code in the EVM
message CallTx {
option (gogoproto.goproto_stringer) = false;
// The caller's input
TxInput Input = 1;
// The contract address to call or nil if we are creating a contract
bytes Address = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address"];
// The upper bound on the amount of gas (and therefore EVM execution steps) this CallTx may generate
uint64 GasLimit = 3;
// Fee to offer validators for processing transaction
uint64 Fee = 4;
// EVM bytecode
bytes Data = 5 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
// WASM bytecode
bytes WASM = 6 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false, (gogoproto.jsontag)="tags,omitempty"];
// Set of contracts this code will deploy
repeated ContractMeta ContractMeta = 7;
}
message ContractMeta {
bytes CodeHash = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
string Meta = 2;
}
// A payment between two sets of parties
message SendTx {
option (gogoproto.goproto_stringer) = false;
option (gogoproto.goproto_getters) = false;
// The payers
repeated TxInput Inputs = 1;
// The payees
repeated TxOutput Outputs = 2;
}
// An update to the on-chain permissions
message PermsTx {
option (gogoproto.goproto_stringer) = false;
// The permission moderator
TxInput Input = 1;
// The modified permissions
permission.PermArgs PermArgs = 2 [(gogoproto.nullable) = false];
}
// A request to claim a globally unique name across the entire chain with some optional data storage leased for a fee
message NameTx {
option (gogoproto.goproto_stringer) = false;
// The name updater
TxInput Input = 1;
// The name to update or create
string Name = 2;
// The data to store against the name
string Data = 3;
// The fee to provide that will determine the length of the name lease
uint64 Fee = 4;
}
message BondTx {
option (gogoproto.goproto_stringer) = false;
option (gogoproto.goproto_getters) = false;
// Input must be the validator that desires to bond
TxInput Input = 1;
}
message UnbondTx {
option (gogoproto.goproto_stringer) = false;
option (gogoproto.goproto_getters) = false;
TxInput Input = 1;
// Account to unbond
TxOutput Output = 2;
}
message GovTx {
option (gogoproto.goproto_stringer) = false;
option (gogoproto.goproto_getters) = false;
repeated TxInput Inputs = 1;
repeated spec.TemplateAccount AccountUpdates = 2 [(gogoproto.nullable) = true];
}
message ProposalTx {
option (gogoproto.goproto_stringer) = false;
option (gogoproto.goproto_getters) = false;
TxInput Input = 1;
int64 VotingWeight = 2;
bytes ProposalHash = 3 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes"];
Proposal Proposal = 4;
}
message BatchTx {
option (gogoproto.goproto_stringer) = false;
option (gogoproto.goproto_getters) = false;
repeated TxInput Inputs = 1;
repeated Any Txs = 2;
}
message Vote {
option (gogoproto.goproto_stringer) = false;
option (gogoproto.goproto_getters) = false;
bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false];
int64 VotingWeight = 2;
}
message Proposal {
option (gogoproto.goproto_stringer) = false;
option (gogoproto.goproto_getters) = false;
string Name = 1;
string Description = 2;
BatchTx BatchTx = 3;
}
message Ballot {
Proposal Proposal = 1;
bytes FinalizingTx = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes"];
enum ProposalState {
// PROPOSED might be expired, if sequence number of any of the input accounts are out of date
PROPOSED = 0;
EXECUTED = 1;
FAILED = 2;
}
ProposalState proposalState = 4;
repeated Vote Votes = 5;
}
syntax = 'proto3';
option go_package = "github.com/hyperledger/burrow/dump";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "google/protobuf/timestamp.proto";
import "acm.proto";
import "exec.proto";
import "names.proto";
package dump;
option (gogoproto.stable_marshaler_all) = true;
// Enable custom Marshal method.
option (gogoproto.marshaler_all) = true;
// Enable custom Unmarshal method.
option (gogoproto.unmarshaler_all) = true;
// Enable custom Size method (Required by Marshal and Unmarshal).
option (gogoproto.sizer_all) = true;
// Enable registration with golang/protobuf for the grpc-gateway.
option (gogoproto.goproto_registration) = true;
// Enable generation of XXX_MessageName methods for grpc-go/status.
option (gogoproto.messagename_all) = true;
message Storage {
bytes Key = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.Word256", (gogoproto.nullable) = false];
bytes Value = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
}
message AccountStorage {
bytes Address = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false];
repeated Storage Storage = 2;
}
message EVMEvent {
// The original ChainID from for this event
string ChainID = 1;
// The original index for this event
uint64 Index = 4;
// The original block time for this transaction
google.protobuf.Timestamp Time = 2 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true];
// The event itself
exec.LogEvent Event = 3;
}
message Dump {
uint64 Height = 1;
acm.Account Account = 2;
AccountStorage AccountStorage = 3;
EVMEvent EVMEvent = 4;
names.Entry Name = 5;
}
syntax = 'proto3';
package rpcdump;
option go_package = "github.com/hyperledger/burrow/rpc/rpcdump";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "dump.proto";
option (gogoproto.stable_marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
option (gogoproto.messagename_all) = true;
service Dump {
rpc GetDump(GetDumpParam) returns (stream dump.Dump);
}
message GetDumpParam {
uint64 height = 1;
}
syntax = "proto3";
option go_package = "github.com/hyperledger/burrow/keys";
package keys;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "crypto.proto";
option (gogoproto.stable_marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
option (gogoproto.messagename_all) = true;
service Keys {
rpc GenerateKey(GenRequest) returns (GenResponse);
rpc PublicKey(PubRequest) returns (PubResponse);
rpc Sign(SignRequest) returns (SignResponse);
rpc Verify(VerifyRequest) returns (VerifyResponse);
rpc Import(ImportRequest) returns (ImportResponse);
rpc ImportJSON(ImportJSONRequest) returns (ImportResponse);
rpc Export(ExportRequest) returns (ExportResponse);
rpc Hash(HashRequest) returns (HashResponse);
rpc RemoveName(RemoveNameRequest) returns (RemoveNameResponse);
rpc List(ListRequest) returns (ListResponse);
rpc AddName(AddNameRequest) returns (AddNameResponse);
}
// Some empty types we may define later
message ListRequest {
string KeyName = 1;
}
message VerifyResponse {
}
message RemoveNameResponse {
}
message AddNameResponse {
}
message RemoveNameRequest {
string KeyName = 1;
}
message GenRequest {
string Passphrase = 1;
string CurveType = 2;
string KeyName = 3;
}
message GenResponse {
string Address = 1;
}
message PubRequest {
string Address = 1;
string Name = 2;
}
message PubResponse {
bytes PublicKey = 1;
string CurveType = 2;
}
message ImportJSONRequest {
string Passphrase = 1;
string JSON = 2;
}
message ImportResponse {
string Address = 1;
}
message ImportRequest {
string Passphrase = 1;
string Name = 2;
string CurveType = 3;
bytes KeyBytes = 4;
}
message ExportRequest {
string Passphrase = 1;
string Name = 2;
string Address = 3;
}
message ExportResponse {
bytes Publickey = 1;
bytes Privatekey = 2;
bytes Address = 3;
string CurveType = 4;
}
message SignRequest {
string Passphrase = 1;
string Address = 2;
string Name = 3;
bytes Message = 4;
}
message SignResponse {
crypto.Signature Signature = 3;
}
message VerifyRequest {
bytes PublicKey = 2;
bytes Message = 3;
crypto.Signature Signature = 5;
}
message HashRequest {
string Hashtype = 1;
bytes Message = 2;
}
message HashResponse {
string Hash = 1;
}
message KeyID {
string Address = 1;
repeated string KeyName = 2;
}
message ListResponse {
repeated KeyID key = 1;
}
message AddNameRequest {
string Keyname = 1;
string Address = 2;
}
syntax = "proto3";
package errors;
option go_package = "github.com/hyperledger/burrow/execution/errors";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.stable_marshaler_all) = true;
// Enable custom Marshal method.
option (gogoproto.marshaler_all) = true;
// Enable custom Unmarshal method.
option (gogoproto.unmarshaler_all) = true;
// Enable custom Size method (Required by Marshal and Unmarshal).
option (gogoproto.sizer_all) = true;
// Enable registration with golang/protobuf for the grpc-gateway.
option (gogoproto.goproto_registration) = true;
// Enable generation of XXX_MessageName methods for grpc-go/status.
option (gogoproto.messagename_all) = true;
message Exception {
option (gogoproto.goproto_stringer) = false;
uint32 Code = 1 [(gogoproto.casttype) = "Code"];
string Exception = 2;
}
// Needed to proto2 rather than proto3 to get pointer field for PermArg
syntax = 'proto3';
option go_package = "github.com/hyperledger/burrow/rpc";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "tendermint.proto";
import "validator.proto";
import "bcm.proto";
package rpc;
option (gogoproto.stable_marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
option (gogoproto.messagename_all) = true;
message ResultStatus {
string ChainID = 1;
string RunID = 2;
string BurrowVersion = 3;
bytes GenesisHash = 4 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
tendermint.NodeInfo NodeInfo = 5;
bcm.SyncInfo SyncInfo = 6;
// When catching up in fast sync
bool CatchingUp = 8 [(gogoproto.jsontag) = ""];
validator.Validator ValidatorInfo = 7;
}
syntax = 'proto3';
option go_package = "github.com/hyperledger/burrow/rpc/rpcevents";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "exec.proto";
package rpcevents;
// Enable custom Marshal method.
option (gogoproto.marshaler_all) = true;
// Enable custom Unmarshal method.
option (gogoproto.unmarshaler_all) = true;
// Enable custom Size method (Required by Marshal and Unmarshal).
option (gogoproto.sizer_all) = true;
// Enable registration with golang/protobuf for the grpc-gateway.
option (gogoproto.goproto_registration) = true;
// Enable generation of XXX_MessageName methods for grpc-go/status.
option (gogoproto.messagename_all) = true;
//--------------------------------------------------
// Execution events
service ExecutionEvents {
// Get StreamEvents (including transactions) for a range of block heights
rpc Stream (BlocksRequest) returns (stream exec.StreamEvent);
// Get a particular TxExecution by hash
rpc Tx (TxRequest) returns (exec.TxExecution);
// GetEvents provides events streaming one block at a time - that is all events emitted in a particular block
// are guaranteed to be delivered in each GetEventsResponse
rpc Events (BlocksRequest) returns (stream EventsResponse);
}
message GetBlockRequest {
// Height of block required
uint64 Height = 1;
// Whether to wait for the block to become available
bool Wait = 2;
}
message TxRequest {
// Height of block required
bytes TxHash = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
// Whether to wait for the block to become available
bool Wait = 2;
}
message BlocksRequest {
BlockRange BlockRange = 1;
// Specify a query on which to match the tags of events.
// Tag | Match type | Values
// -----------------------------------------
// All events
// -----------------------------------------
// TxType | String | "UnknownTx", "SendTx", "CallTx", "NameTx", "BondTx", "UnbondTx", "PermissionsTx", "GovernanceTx"
// TxHash | String | bytes
// EventType | String | "CallEvent", "LogEvent", "AccountInputEvent", "AccountOutputEvent"
// EventID | String | string
// Height | Integer | uint64
// Index | Integer | uint64
// MessageType | String | Go type name
// -----------------------------------------
// Log event
// -----------------------------------------
// Address | String | Address (hex)
// Log<0-4> | String | Word256 (hex)
// Log<0-4>Text | String | string (trimmed)
// -----------------------------------------
// Call event
// -----------------------------------------
// Origin | String | Address (hex)
// Callee | String | Address (hex)
// Caller | String | Address (hex)
// Value | Integer | uint64
// Gas | Integer | uint64
// StackDepth | Integer | uint64
// Exception | String | string
// -----------------------------------------
// Tx event (input/output)
// -----------------------------------------
// Exception | String | string
//
// For example:
// EventType = 'LogEvent' AND EventID CONTAINS 'bar' AND TxHash = '020304' AND Height >= 34 AND Index < 3 AND Address = 'DEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEF'
string Query = 2;
}
message EventsResponse {
uint64 Height = 1;
repeated exec.Event Events = 2;
}
message GetTxsRequest {
uint64 StartHeight = 1;
uint64 EndHeight = 2;
string Query = 3;
}
message GetTxsResponse {
uint64 Height = 1;
repeated exec.TxExecution TxExecutions = 2;
}
message Bound {
BoundType Type = 1;
uint64 Index = 2;
enum BoundType {
// Index is absolute index of an item
ABSOLUTE = 0;
// Index is an offset relative to last item
RELATIVE = 1;
// The first block
FIRST = 2;
// Ignore provided index and evaluate to latest index
LATEST = 3;
// Ignore provided index and stream new objects as they are generated
STREAM = 4;
}
}
// An inclusive range of blocks to include in output
message BlockRange {
// Bounds can be set to:
// absolute: block height
// relative: block height counting back from latest
// latest: latest block when call is processed
// stream: for End keep sending new blocks, for start same as latest
Bound Start = 1;
Bound End = 2;
}
// Needed to proto2 rather than proto3 to get pointer field for PermArg
syntax = 'proto3';
option go_package = "github.com/hyperledger/burrow/bcm";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";
package bcm;
option (gogoproto.stable_marshaler_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
option (gogoproto.messagename_all) = true;
message SyncInfo {
uint64 LatestBlockHeight = 1 [(gogoproto.jsontag) = ""];
bytes LatestBlockHash = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
bytes LatestAppHash = 3 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
// Timestamp of block as set by the block proposer
google.protobuf.Timestamp LatestBlockTime = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
// Time at which we committed the last block
google.protobuf.Timestamp LatestBlockSeenTime = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
// Time elapsed since last commit
google.protobuf.Duration LatestBlockDuration = 6 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
}
message PersistedState {
bytes AppHashAfterLastBlock = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
google.protobuf.Timestamp LastBlockTime = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
uint64 LastBlockHeight = 3;
bytes GenesisHash = 4 [(gogoproto.customtype) = "github.com/hyperledger/burrow/binary.HexBytes", (gogoproto.nullable) = false];
}
syntax = 'proto3';
option go_package = "github.com/hyperledger/burrow/genesis/spec";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "crypto.proto";
import "balance.proto";
package spec;
option (gogoproto.stable_marshaler_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
option (gogoproto.messagename_all) = true;
message TemplateAccount {
option (gogoproto.goproto_sizecache) = false;
option (gogoproto.goproto_unkeyed) = false;
string Name = 1;
bytes Address = 2 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.jsontag) = ",omitempty", (gogoproto.moretags) = "toml:\",omitempty\""];
crypto.PublicKey PublicKey = 3 [(gogoproto.jsontag) = ",omitempty", (gogoproto.moretags) = "toml:\",omitempty\""];
repeated balance.Balance Amounts = 4 [(gogoproto.nullable) = false, (gogoproto.jsontag) = ",omitempty", (gogoproto.moretags) = "toml:\",omitempty\""];
repeated string Permissions = 5 [(gogoproto.jsontag) = ",omitempty", (gogoproto.moretags) = "toml:\",omitempty\""];
repeated string Roles = 6 [(gogoproto.jsontag) = ",omitempty", (gogoproto.moretags) = "toml:\",omitempty\""];
bytes Code = 7 [(gogoproto.nullable) = true, (gogoproto.customtype) = "github.com/hyperledger/burrow/acm.Bytecode"];
}