diff --git a/Makefile b/Makefile index 649eb0996a05b3c240751e5e99f8da386b1a8a18..9ebc4982f16910ecfa71e009fdaacc66ba49c814 100644 --- a/Makefile +++ b/Makefile @@ -62,9 +62,16 @@ megacheck: @go get honnef.co/go/tools/cmd/megacheck @for pkg in ${PACKAGES_NOVENDOR}; do megacheck "$$pkg"; done +# Protobuffing +.PHONY: protobuf_deps +protobuf_deps: + @go get -u github.com/golang/protobuf/protoc-gen-go + keys/pbkeys/keys.pb.go: keys/pbkeys/keys.proto @protoc -I ./keys/pbkeys keys/pbkeys/keys.proto --go_out=plugins=grpc:keys/pbkeys +rpc/grpc/burrow.pb.go: rpc/burrow + @protoc -I ./rpc/grpc rpc/grpc/burrow.proto --go_out=plugins=grpc:rpc/grpc ### Dependency management for github.com/hyperledger/burrow # erase vendor wipes the full vendor directory diff --git a/account/account.go b/account/account.go index 0985f38d77905b3c4280b1529f4106678ce80251..98053e91c768668cf5bcd671b759e0f15469e523 100644 --- a/account/account.go +++ b/account/account.go @@ -19,10 +19,11 @@ import ( "encoding/json" "fmt" + "encoding/gob" + "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" ptypes "github.com/hyperledger/burrow/permission/types" - "github.com/tendermint/go-wire" ) var GlobalPermissionsAddress = crypto.Address(binary.Zero160) @@ -96,12 +97,6 @@ func NewConcreteAccount(pubKey crypto.PublicKey) ConcreteAccount { return ConcreteAccount{ Address: pubKey.Address(), PublicKey: pubKey, - // Since nil slices and maps compare differently to empty ones - Code: Bytecode{}, - StorageRoot: []byte{}, - Permissions: ptypes.AccountPermissions{ - Roles: []string{}, - }, } } @@ -119,17 +114,6 @@ func (acc ConcreteAccount) MutableAccount() MutableAccount { return concreteAccountWrapper{&acc} } -func (acc *ConcreteAccount) Encode() ([]byte, error) { - buf := new(bytes.Buffer) - var n int - var err error - wire.WriteBinary(acc, buf, &n, &err) - if err != nil { - return nil, err - } - return buf.Bytes(), nil -} - func (acc *ConcreteAccount) Copy() *ConcreteAccount { accCopy := *acc return &accCopy @@ -315,12 +299,19 @@ func (caw concreteAccountWrapper) Copy() MutableAccount { return concreteAccountWrapper{caw.ConcreteAccount.Copy()} } -var _ = wire.RegisterInterface(struct{ Account }{}, wire.ConcreteType{concreteAccountWrapper{}, 0x01}) - // concreteAccount Wrapper //---------------------------------------------- // Encoding/decoding +func (acc *ConcreteAccount) Encode() ([]byte, error) { + buf := new(bytes.Buffer) + err := gob.NewEncoder(buf).Encode(acc) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} + func Decode(accBytes []byte) (Account, error) { ca, err := DecodeConcrete(accBytes) if err != nil { @@ -330,10 +321,11 @@ func Decode(accBytes []byte) (Account, error) { } func DecodeConcrete(accBytes []byte) (*ConcreteAccount, error) { - ca := new(concreteAccountWrapper) - err := wire.ReadBinaryBytes(accBytes, ca) + ca := new(ConcreteAccount) + buf := bytes.NewBuffer(accBytes) + err := gob.NewDecoder(buf).Decode(ca) if err != nil { return nil, fmt.Errorf("could not convert decoded account to *ConcreteAccount: %v", err) } - return ca.ConcreteAccount, nil + return ca, nil } diff --git a/account/account_test.go b/account/account_test.go index 68a5b1eef23b67083ce9295953ca06700763ce50..5e8f0ed3df8fb4f254e6e09f202b2c80776e18c9 100644 --- a/account/account_test.go +++ b/account/account_test.go @@ -25,7 +25,6 @@ import ( ptypes "github.com/hyperledger/burrow/permission/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/tendermint/go-wire" ) func TestAddress(t *testing.T) { @@ -49,33 +48,6 @@ func TestAddress(t *testing.T) { assert.Equal(t, addr, addrFromWord256) } -func TestAccountSerialise(t *testing.T) { - type AccountContainingStruct struct { - Account Account - ChainID string - } - - // This test is really testing this go wire declaration in account.go - - acc := NewConcreteAccountFromSecret("Super Semi Secret") - - // Go wire cannot serialise a top-level interface type it needs to be a field or sub-field of a struct - // at some depth. i.e. you MUST wrap an interface if you want it to be decoded (they do not document this) - var accStruct = AccountContainingStruct{ - Account: acc.Account(), - ChainID: "TestChain", - } - - // We will write into this - accStructOut := AccountContainingStruct{} - - // We must pass in a value type to read from (accStruct), but provide a pointer type to write into (accStructout - err := wire.ReadBinaryBytes(wire.BinaryBytes(accStruct), &accStructOut) - require.NoError(t, err) - - assert.Equal(t, accStruct, accStructOut) -} - func TestDecodeConcrete(t *testing.T) { concreteAcc := NewConcreteAccountFromSecret("Super Semi Secret") concreteAcc.Permissions = ptypes.AccountPermissions{ @@ -118,8 +90,8 @@ func TestMarshalJSON(t *testing.T) { bs, err := json.Marshal(acc) expected := fmt.Sprintf(`{"Address":"%s","PublicKey":{"CurveType":"ed25519","PublicKey":"%s"},`+ - `"Sequence":0,"Balance":0,"Code":"3C172D","StorageRoot":"",`+ - `"Permissions":{"Base":{"Perms":0,"SetBit":0},"Roles":[]}}`, + `"Sequence":0,"Balance":0,"Code":"3C172D","StorageRoot":null,`+ + `"Permissions":{"Base":{"Perms":0,"SetBit":0},"Roles":null}}`, concreteAcc.Address, concreteAcc.PublicKey) assert.Equal(t, expected, string(bs)) assert.NoError(t, err) diff --git a/account/private_account.go b/account/private_account.go index 8f76a5c41c049b8de1761e1ea9c5aca53b34cc96..204096c1d61f4675b8c050eb835f06a421e16163 100644 --- a/account/private_account.go +++ b/account/private_account.go @@ -18,7 +18,6 @@ import ( "fmt" "github.com/hyperledger/burrow/crypto" - "github.com/tendermint/go-wire" ) type AddressableSigner interface { @@ -44,8 +43,6 @@ type concretePrivateAccountWrapper struct { var _ PrivateAccount = concretePrivateAccountWrapper{} -var _ = wire.RegisterInterface(struct{ PrivateAccount }{}, wire.ConcreteType{concretePrivateAccountWrapper{}, 0x01}) - func AsConcretePrivateAccount(privateAccount PrivateAccount) *ConcretePrivateAccount { if privateAccount == nil { return nil diff --git a/account/private_account_test.go b/account/private_account_test.go deleted file mode 100644 index 7519a42e56f7b3047f5eccca495774ccad20ef3b..0000000000000000000000000000000000000000 --- a/account/private_account_test.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2017 Monax Industries Limited -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package account - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/tendermint/go-wire" -) - -func TestPrivateAccountSerialise(t *testing.T) { - type PrivateAccountContainingStruct struct { - PrivateAccount PrivateAccount - ChainID string - } - // This test is really testing this go wire declaration in private_account.go - acc := GeneratePrivateAccountFromSecret("Super Secret Secret") - - // Go wire cannot serialise a top-level interface type it needs to be a field or sub-field of a struct - // at some depth. i.e. you MUST wrap an interface if you want it to be decoded (they do not document this) - var accStruct = PrivateAccountContainingStruct{ - PrivateAccount: acc, - ChainID: "TestChain", - } - - // We will write into this - accStructOut := PrivateAccountContainingStruct{} - - // We must pass in a value type to read from (accStruct), but provide a pointer type to write into (accStructout - err := wire.ReadBinaryBytes(wire.BinaryBytes(accStruct), &accStructOut) - require.NoError(t, err) - - assert.Equal(t, accStruct, accStructOut) -} diff --git a/binary/bytes.go b/binary/bytes.go new file mode 100644 index 0000000000000000000000000000000000000000..236ef6d402ff3585e19e9ae6b4c2531f4b61fdaa --- /dev/null +++ b/binary/bytes.go @@ -0,0 +1,18 @@ +package binary + +import "github.com/tmthrgd/go-hex" + +type HexBytes []byte + +func (bs *HexBytes) UnmarshalText(hexBytes []byte) error { + bs2, err := hex.DecodeString(string(hexBytes)) + if err != nil { + return err + } + *bs = bs2 + return nil +} + +func (bs HexBytes) MarshalText() ([]byte, error) { + return []byte(hex.EncodeUpperToString(bs)), nil +} diff --git a/binary/bytes_test.go b/binary/bytes_test.go new file mode 100644 index 0000000000000000000000000000000000000000..7e0aeb5363de4aafbb0a71a103b3deadaffefde4 --- /dev/null +++ b/binary/bytes_test.go @@ -0,0 +1,19 @@ +package binary + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestHexBytes_MarshalText(t *testing.T) { + bs := HexBytes{1, 2, 3, 4, 5} + out, err := json.Marshal(bs) + require.NoError(t, err) + assert.Equal(t, "\"0102030405\"", string(out)) + bs2 := new(HexBytes) + err = json.Unmarshal(out, bs2) + assert.Equal(t, bs, *bs2) +} diff --git a/consensus/tendermint/tendermint.go b/consensus/tendermint/tendermint.go index 3bf235b9777eb6665aed6782a8abec914be95279..00e2ce065f984815d65c9cfb0864b5d3ed42f2de 100644 --- a/consensus/tendermint/tendermint.go +++ b/consensus/tendermint/tendermint.go @@ -1,8 +1,6 @@ package tendermint import ( - "fmt" - "context" "os" @@ -15,8 +13,6 @@ import ( "github.com/hyperledger/burrow/genesis" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/logging/structure" - "github.com/hyperledger/burrow/txs" - abci_types "github.com/tendermint/abci/types" tm_crypto "github.com/tendermint/go-crypto" "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/node" @@ -86,23 +82,6 @@ func NewNode( return nde, nil } -func BroadcastTxAsyncFunc(validator *Node, txEncoder txs.Encoder) func(env *txs.Envelope, - callback func(res *abci_types.Response)) error { - - return func(env *txs.Envelope, callback func(res *abci_types.Response)) error { - txBytes, err := txEncoder.EncodeTx(env) - if err != nil { - return fmt.Errorf("error encoding transaction: %v", err) - } - - err = validator.MempoolReactor().BroadcastTx(txBytes, callback) - if err != nil { - return fmt.Errorf("error broadcasting transaction: %v", err) - } - return nil - } -} - func DeriveGenesisDoc(burrowGenesisDoc *genesis.GenesisDoc) *tm_types.GenesisDoc { validators := make([]tm_types.GenesisValidator, len(burrowGenesisDoc.Validators)) for i, validator := range burrowGenesisDoc.Validators { diff --git a/core/kernel.go b/core/kernel.go index 18f52126913db41dab63b1d77e9511846dbccd39..40d0b809fb14554c2ad6a34f6e2d9d032922b45e 100644 --- a/core/kernel.go +++ b/core/kernel.go @@ -39,6 +39,7 @@ import ( "github.com/hyperledger/burrow/logging/structure" "github.com/hyperledger/burrow/process" "github.com/hyperledger/burrow/rpc" + "github.com/hyperledger/burrow/rpc/burrow" "github.com/hyperledger/burrow/rpc/tm" "github.com/hyperledger/burrow/rpc/v0" v0_server "github.com/hyperledger/burrow/rpc/v0/server" @@ -84,7 +85,7 @@ func NewKernel(ctx context.Context, keyClient keys.KeyClient, privValidator tm_t var state *execution.State // These should be in sync unless we are at the genesis block if blockchain.LastBlockHeight() > 0 { - state, err = execution.LoadState(stateDB, blockchain.AppHashAfterLastBlock()) + state, err = execution.LoadState(stateDB) if err != nil { return nil, fmt.Errorf("could not load persisted execution state at hash 0x%X: %v", blockchain.AppHashAfterLastBlock(), err) @@ -104,7 +105,7 @@ func NewKernel(ctx context.Context, keyClient keys.KeyClient, privValidator tm_t return nil, err } txCodec := txs.NewJSONCodec() - transactor := execution.NewTransactor(blockchain.Tip, emitter, tendermint.BroadcastTxAsyncFunc(tmNode, txCodec), + transactor := execution.NewTransactor(blockchain.Tip, emitter, tmNode.MempoolReactor().BroadcastTx, txCodec, logger) nameReg := state @@ -113,8 +114,8 @@ func NewKernel(ctx context.Context, keyClient keys.KeyClient, privValidator tm_t launchers := []process.Launcher{ { - Name: "Profiling Server", - Disabled: !rpcConfig.Profiler.Enabled, + Name: "Profiling Server", + Enabled: !rpcConfig.Profiler.Enabled, Launch: func() (process.Process, error) { debugServer := &http.Server{ Addr: ":6060", @@ -139,7 +140,8 @@ func NewKernel(ctx context.Context, keyClient keys.KeyClient, privValidator tm_t }, }, { - Name: "Tendermint", + Name: "Tendermint", + Enabled: true, Launch: func() (process.Process, error) { err := tmNode.Start() if err != nil { @@ -172,8 +174,8 @@ func NewKernel(ctx context.Context, keyClient keys.KeyClient, privValidator tm_t }, }, { - Name: "RPC/tm", - Disabled: !rpcConfig.TM.Enabled, + Name: "RPC/tm", + Enabled: rpcConfig.TM.Enabled, Launch: func() (process.Process, error) { listener, err := tm.StartServer(service, "/websocket", rpcConfig.TM.ListenAddress, emitter, logger) if err != nil { @@ -183,8 +185,8 @@ func NewKernel(ctx context.Context, keyClient keys.KeyClient, privValidator tm_t }, }, { - Name: "RPC/V0", - Disabled: !rpcConfig.V0.Enabled, + Name: "RPC/V0", + Enabled: rpcConfig.V0.Enabled, Launch: func() (process.Process, error) { codec := v0.NewTCodec() jsonServer := v0.NewJSONServer(v0.NewJSONService(codec, service, logger)) @@ -203,8 +205,8 @@ func NewKernel(ctx context.Context, keyClient keys.KeyClient, privValidator tm_t }, }, { - Name: "grpc service", - Disabled: !rpcConfig.GRPC.Enabled, + Name: "GRPC service", + Enabled: rpcConfig.GRPC.Enabled, Launch: func() (process.Process, error) { listen, err := net.Listen("tcp", rpcConfig.GRPC.ListenAddress) if err != nil { @@ -224,6 +226,8 @@ func NewKernel(ctx context.Context, keyClient keys.KeyClient, privValidator tm_t pbkeys.RegisterKeysServer(grpcServer, &ks) } + burrow.RegisterTransactionServer(grpcServer, burrow.NewTransactionServer(service)) + go grpcServer.Serve(listen) return process.ShutdownFunc(func(ctx context.Context) error { @@ -248,12 +252,14 @@ func NewKernel(ctx context.Context, keyClient keys.KeyClient, privValidator tm_t // Boot the kernel starting Tendermint and RPC layers func (kern *Kernel) Boot() error { for _, launcher := range kern.Launchers { - srvr, err := launcher.Launch() - if err != nil { - return fmt.Errorf("error launching %s server: %v", launcher.Name, err) - } + if launcher.Enabled { + srvr, err := launcher.Launch() + if err != nil { + return fmt.Errorf("error launching %s server: %v", launcher.Name, err) + } - kern.processes[launcher.Name] = srvr + kern.processes[launcher.Name] = srvr + } } go kern.supervise() return nil diff --git a/crypto/helpers/helpers.go b/crypto/helpers/helpers.go deleted file mode 100644 index deed990ebe07792e3a5d700bad521b46a881da1c..0000000000000000000000000000000000000000 --- a/crypto/helpers/helpers.go +++ /dev/null @@ -1,58 +0,0 @@ -package helpers - -import ( - "bytes" - "fmt" - - "github.com/tendermint/ed25519" - "github.com/tendermint/go-wire" - "golang.org/x/crypto/ripemd160" -) - -type Signature interface { - IsZero() bool -} - -const ( - SignatureTypeEd25519 = byte(0x01) -) - -type SignatureEd25519 [64]byte - -func (sig SignatureEd25519) IsZero() bool { return len(sig) == 0 } - -const ( - PrivKeyTypeEd25519 = byte(0x01) -) - -type PrivKeyEd25519 [64]byte - -const ( - PubKeyTypeEd25519 = byte(0x01) -) - -func (key PrivKeyEd25519) Sign(msg []byte) Signature { - privKeyBytes := [64]byte(key) - signatureBytes := ed25519.Sign(&privKeyBytes, msg) - return SignatureEd25519(*signatureBytes) -} - -// Implements PubKey -type PubKeyEd25519 [32]byte - -func (pubKey PubKeyEd25519) Address() []byte { - w, n, err := new(bytes.Buffer), new(int), new(error) - wire.WriteBinary(pubKey[:], w, n, err) - if *err != nil { - panic(fmt.Sprintf("failed to write tender public key: %v", err)) - } - // append type byte - encodedPubkey := append([]byte{1}, w.Bytes()...) - hasher := ripemd160.New() - hasher.Write(encodedPubkey) // does not error - return hasher.Sum(nil) -} - -type ( - Hash [32]byte -) diff --git a/execution/errors/errors.go b/execution/errors/errors.go index 20248d408272f12abf709fcdc61546b68c27dbff..7c576566c06f2233a43bcfbbfd5d047b9a2a39d2 100644 --- a/execution/errors/errors.go +++ b/execution/errors/errors.go @@ -138,5 +138,8 @@ func (e *Exception) String() string { } func (e *Exception) Error() string { + if e == nil { + return "" + } return fmt.Sprintf("VM Error %v: %s", e.Code, e.Exception) } diff --git a/execution/names/names.go b/execution/names/names.go index 586fb7b3ee77f23131a5aeb165bed566ff033762..1eea378b17d12a53c3cde4a1bb19b7b4661e2ee1 100644 --- a/execution/names/names.go +++ b/execution/names/names.go @@ -14,7 +14,12 @@ package names -import "github.com/hyperledger/burrow/crypto" +import ( + "bytes" + "encoding/gob" + + "github.com/hyperledger/burrow/crypto" +) var ( MinNameRegistrationPeriod uint64 = 5 @@ -44,6 +49,25 @@ type Entry struct { Expires uint64 } +func (e *Entry) Encode() ([]byte, error) { + buf := new(bytes.Buffer) + err := gob.NewEncoder(buf).Encode(e) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} + +func DecodeEntry(entryBytes []byte) (*Entry, error) { + entry := new(Entry) + buf := bytes.NewBuffer(entryBytes) + err := gob.NewDecoder(buf).Decode(entry) + if err != nil { + return nil, err + } + return entry, nil +} + type Getter interface { GetNameEntry(name string) (*Entry, error) } diff --git a/execution/transactor.go b/execution/transactor.go index 042eb11b20f89b2f34595e867a5b316d346e69d0..de732e5d0b959e179be13e2df2df14db65144f8f 100644 --- a/execution/transactor.go +++ b/execution/transactor.go @@ -38,7 +38,8 @@ import ( "github.com/hyperledger/burrow/logging/structure" "github.com/hyperledger/burrow/txs" "github.com/hyperledger/burrow/txs/payload" - abci_types "github.com/tendermint/abci/types" + abciTypes "github.com/tendermint/abci/types" + tmTypes "github.com/tendermint/tendermint/types" ) const BlockingTimeoutSeconds = 30 @@ -52,18 +53,20 @@ type Call struct { type Transactor struct { tip *blockchain.Tip eventEmitter event.Emitter - broadcastTxAsync func(tx *txs.Envelope, callback func(res *abci_types.Response)) error + broadcastTxAsync func(tx tmTypes.Tx, cb func(*abciTypes.Response)) error + txEncoder txs.Encoder logger *logging.Logger } func NewTransactor(tip *blockchain.Tip, eventEmitter event.Emitter, - broadcastTxAsync func(tx *txs.Envelope, callback func(res *abci_types.Response)) error, + broadcastTxAsync func(tx tmTypes.Tx, cb func(*abciTypes.Response)) error, txEncoder txs.Encoder, logger *logging.Logger) *Transactor { return &Transactor{ tip: tip, eventEmitter: eventEmitter, broadcastTxAsync: broadcastTxAsync, + txEncoder: txEncoder, logger: logger.With(structure.ComponentKey, "Transactor"), } } @@ -126,8 +129,20 @@ func (trans *Transactor) CallCode(reader state.Reader, fromAddress crypto.Addres return &Call{Return: ret, GasUsed: gasUsed}, nil } -func (trans *Transactor) BroadcastTxAsync(tx *txs.Envelope, callback func(res *abci_types.Response)) error { - return trans.broadcastTxAsync(tx, callback) +func (trans *Transactor) BroadcastTxAsyncRaw(txBytes []byte, callback func(res *abciTypes.Response)) error { + return trans.broadcastTxAsync(txBytes, callback) +} + +func (trans *Transactor) BroadcastTxAsync(txEnv *txs.Envelope, callback func(res *abciTypes.Response)) error { + err := txEnv.Validate() + if err != nil { + return err + } + txBytes, err := trans.txEncoder.EncodeTx(txEnv) + if err != nil { + return fmt.Errorf("error encoding transaction: %v", err) + } + return trans.BroadcastTxAsyncRaw(txBytes, callback) } // Broadcast a transaction and waits for a response from the mempool. Transactions to BroadcastTx will block during @@ -136,8 +151,20 @@ func (trans *Transactor) BroadcastTx(txEnv *txs.Envelope) (*txs.Receipt, error) trans.logger.Trace.Log("method", "BroadcastTx", "tx_hash", txEnv.Tx.Hash(), "tx", txEnv.String()) - responseCh := make(chan *abci_types.Response, 1) - err := trans.BroadcastTxAsync(txEnv, func(res *abci_types.Response) { + err := txEnv.Validate() + if err != nil { + return nil, err + } + txBytes, err := trans.txEncoder.EncodeTx(txEnv) + if err != nil { + return nil, err + } + return trans.BroadcastTxRaw(txBytes) +} + +func (trans *Transactor) BroadcastTxRaw(txBytes []byte) (*txs.Receipt, error) { + responseCh := make(chan *abciTypes.Response, 1) + err := trans.BroadcastTxAsyncRaw(txBytes, func(res *abciTypes.Response) { responseCh <- res }) diff --git a/execution/transactor_test.go b/execution/transactor_test.go deleted file mode 100644 index 7a49f27f548e0cf06b0ec38b961e44820b14d2ad..0000000000000000000000000000000000000000 --- a/execution/transactor_test.go +++ /dev/null @@ -1,46 +0,0 @@ -package execution - -import ( - "testing" - "time" - - "github.com/hyperledger/burrow/account/state" - "github.com/hyperledger/burrow/blockchain" - "github.com/hyperledger/burrow/event" - "github.com/hyperledger/burrow/txs" - "github.com/tendermint/abci/types" -) - -func TestTransactor_TransactAndHold(t *testing.T) { -} - -type testTransactor struct { - ResponseCh chan<- *types.Response - state.IterableWriter - event.Emitter - *Transactor -} - -func newTestTransactor(txProcessor func(txEnv *txs.Envelope) (*types.Response, error)) testTransactor { - st := state.NewMemoryState() - emitter := event.NewEmitter(logger) - trans := NewTransactor(blockchain.NewTip(testChainID, time.Time{}, nil), - emitter, func(txEnv *txs.Envelope, callback func(res *types.Response)) error { - res, err := txProcessor(txEnv) - if err != nil { - return err - } - callback(res) - return nil - }, logger) - - return testTransactor{ - IterableWriter: st, - Emitter: emitter, - Transactor: trans, - } -} - -func TestTransactor_Transact(t *testing.T) { - //trans := newTestTransactor() -} diff --git a/keys/core.go b/keys/core.go index dc003b68eeb35b7596d5a0b914fe60a90e117987..49f660d395a9fa8135cfd7350b71447e4617afbe 100644 --- a/keys/core.go +++ b/keys/core.go @@ -8,8 +8,7 @@ import ( "path/filepath" "strings" - tmint_crypto "github.com/hyperledger/burrow/crypto/helpers" - wire "github.com/tendermint/go-wire" + "encoding/json" ) const ( @@ -51,36 +50,7 @@ func writeKey(keyDir string, addr, keyJson []byte) ([]byte, error) { } func coreExport(key *Key) ([]byte, error) { - type privValidator struct { - Address []byte `json:"address"` - PubKey []interface{} `json:"pub_key"` - PrivKey []interface{} `json:"priv_key"` - LastHeight int `json:"last_height"` - LastRound int `json:"last_round"` - LastStep int `json:"last_step"` - } - - pub := key.Pubkey() - - var pubKeyWithType []interface{} - var pubKey tmint_crypto.PubKeyEd25519 - copy(pubKey[:], pub) - pubKeyWithType = append(pubKeyWithType, tmint_crypto.PubKeyTypeEd25519) - pubKeyWithType = append(pubKeyWithType, pubKey) - - var privKeyWithType []interface{} - var privKey tmint_crypto.PrivKeyEd25519 - copy(privKey[:], key.PrivateKey.RawBytes()) - privKeyWithType = append(privKeyWithType, tmint_crypto.PrivKeyTypeEd25519) - privKeyWithType = append(privKeyWithType, privKey) - - privVal := &privValidator{ - Address: key.Address[:], - PubKey: pubKeyWithType, - PrivKey: privKeyWithType, - } - - return wire.JSONBytes(privVal), nil + return json.Marshal(key) } //---------------------------------------------------------------- diff --git a/process/process.go b/process/process.go index b0058d280388146feeda2b251cc3c2ea2bde3e43..456c88eae3b19d7e2f0745fc8f264496e47de002 100644 --- a/process/process.go +++ b/process/process.go @@ -18,9 +18,9 @@ func (sf ShutdownFunc) Shutdown(ctx context.Context) error { } type Launcher struct { - Name string - Disabled bool - Launch func() (Process, error) + Name string + Enabled bool + Launch func() (Process, error) } type listenersServer struct { diff --git a/rpc/burrow/burrow.pb.go b/rpc/burrow/burrow.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..f4a810590c3ee0ab67ef01497892fa6bf24275bc --- /dev/null +++ b/rpc/burrow/burrow.pb.go @@ -0,0 +1,4858 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: burrow.proto + +package burrow + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +// #BEGIN(common) +// Common Messages +type Empty struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Empty) Reset() { *m = Empty{} } +func (m *Empty) String() string { return proto.CompactTextString(m) } +func (*Empty) ProtoMessage() {} +func (*Empty) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{0} +} +func (m *Empty) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Empty.Unmarshal(m, b) +} +func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Empty.Marshal(b, m, deterministic) +} +func (dst *Empty) XXX_Merge(src proto.Message) { + xxx_messageInfo_Empty.Merge(dst, src) +} +func (m *Empty) XXX_Size() int { + return xxx_messageInfo_Empty.Size(m) +} +func (m *Empty) XXX_DiscardUnknown() { + xxx_messageInfo_Empty.DiscardUnknown(m) +} + +var xxx_messageInfo_Empty proto.InternalMessageInfo + +type InputAccount struct { + PrivateKey []byte `protobuf:"bytes,1,opt,name=privateKey,proto3" json:"privateKey,omitempty"` + Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InputAccount) Reset() { *m = InputAccount{} } +func (m *InputAccount) String() string { return proto.CompactTextString(m) } +func (*InputAccount) ProtoMessage() {} +func (*InputAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{1} +} +func (m *InputAccount) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InputAccount.Unmarshal(m, b) +} +func (m *InputAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InputAccount.Marshal(b, m, deterministic) +} +func (dst *InputAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_InputAccount.Merge(dst, src) +} +func (m *InputAccount) XXX_Size() int { + return xxx_messageInfo_InputAccount.Size(m) +} +func (m *InputAccount) XXX_DiscardUnknown() { + xxx_messageInfo_InputAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_InputAccount proto.InternalMessageInfo + +func (m *InputAccount) GetPrivateKey() []byte { + if m != nil { + return m.PrivateKey + } + return nil +} + +func (m *InputAccount) GetAddress() []byte { + if m != nil { + return m.Address + } + return nil +} + +type FilterData struct { + Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` + Op string `protobuf:"bytes,2,opt,name=op,proto3" json:"op,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FilterData) Reset() { *m = FilterData{} } +func (m *FilterData) String() string { return proto.CompactTextString(m) } +func (*FilterData) ProtoMessage() {} +func (*FilterData) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{2} +} +func (m *FilterData) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FilterData.Unmarshal(m, b) +} +func (m *FilterData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FilterData.Marshal(b, m, deterministic) +} +func (dst *FilterData) XXX_Merge(src proto.Message) { + xxx_messageInfo_FilterData.Merge(dst, src) +} +func (m *FilterData) XXX_Size() int { + return xxx_messageInfo_FilterData.Size(m) +} +func (m *FilterData) XXX_DiscardUnknown() { + xxx_messageInfo_FilterData.DiscardUnknown(m) +} + +var xxx_messageInfo_FilterData proto.InternalMessageInfo + +func (m *FilterData) GetField() string { + if m != nil { + return m.Field + } + return "" +} + +func (m *FilterData) GetOp() string { + if m != nil { + return m.Op + } + return "" +} + +func (m *FilterData) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +type FilterListParam struct { + Filters []*FilterData `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FilterListParam) Reset() { *m = FilterListParam{} } +func (m *FilterListParam) String() string { return proto.CompactTextString(m) } +func (*FilterListParam) ProtoMessage() {} +func (*FilterListParam) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{3} +} +func (m *FilterListParam) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FilterListParam.Unmarshal(m, b) +} +func (m *FilterListParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FilterListParam.Marshal(b, m, deterministic) +} +func (dst *FilterListParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_FilterListParam.Merge(dst, src) +} +func (m *FilterListParam) XXX_Size() int { + return xxx_messageInfo_FilterListParam.Size(m) +} +func (m *FilterListParam) XXX_DiscardUnknown() { + xxx_messageInfo_FilterListParam.DiscardUnknown(m) +} + +var xxx_messageInfo_FilterListParam proto.InternalMessageInfo + +func (m *FilterListParam) GetFilters() []*FilterData { + if m != nil { + return m.Filters + } + return nil +} + +// This is here because it is required by both transactions and namereg +// This situation can be remedied multiple ways +type TxReceipt struct { + TxHash []byte `protobuf:"bytes,1,opt,name=TxHash,proto3" json:"TxHash,omitempty"` + CreatesContract bool `protobuf:"varint,2,opt,name=CreatesContract,proto3" json:"CreatesContract,omitempty"` + ContractAddress []byte `protobuf:"bytes,3,opt,name=ContractAddress,proto3" json:"ContractAddress,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TxReceipt) Reset() { *m = TxReceipt{} } +func (m *TxReceipt) String() string { return proto.CompactTextString(m) } +func (*TxReceipt) ProtoMessage() {} +func (*TxReceipt) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{4} +} +func (m *TxReceipt) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TxReceipt.Unmarshal(m, b) +} +func (m *TxReceipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TxReceipt.Marshal(b, m, deterministic) +} +func (dst *TxReceipt) XXX_Merge(src proto.Message) { + xxx_messageInfo_TxReceipt.Merge(dst, src) +} +func (m *TxReceipt) XXX_Size() int { + return xxx_messageInfo_TxReceipt.Size(m) +} +func (m *TxReceipt) XXX_DiscardUnknown() { + xxx_messageInfo_TxReceipt.DiscardUnknown(m) +} + +var xxx_messageInfo_TxReceipt proto.InternalMessageInfo + +func (m *TxReceipt) GetTxHash() []byte { + if m != nil { + return m.TxHash + } + return nil +} + +func (m *TxReceipt) GetCreatesContract() bool { + if m != nil { + return m.CreatesContract + } + return false +} + +func (m *TxReceipt) GetContractAddress() []byte { + if m != nil { + return m.ContractAddress + } + return nil +} + +// This is here because it is used in both the Account Service (GenPrivAccount) +// And in the transaction service (SignTx) +type PrivateAccount struct { + Address []byte `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"` + PublicKey []byte `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` + PrivateKey []byte `protobuf:"bytes,3,opt,name=PrivateKey,proto3" json:"PrivateKey,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PrivateAccount) Reset() { *m = PrivateAccount{} } +func (m *PrivateAccount) String() string { return proto.CompactTextString(m) } +func (*PrivateAccount) ProtoMessage() {} +func (*PrivateAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{5} +} +func (m *PrivateAccount) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PrivateAccount.Unmarshal(m, b) +} +func (m *PrivateAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PrivateAccount.Marshal(b, m, deterministic) +} +func (dst *PrivateAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_PrivateAccount.Merge(dst, src) +} +func (m *PrivateAccount) XXX_Size() int { + return xxx_messageInfo_PrivateAccount.Size(m) +} +func (m *PrivateAccount) XXX_DiscardUnknown() { + xxx_messageInfo_PrivateAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_PrivateAccount proto.InternalMessageInfo + +func (m *PrivateAccount) GetAddress() []byte { + if m != nil { + return m.Address + } + return nil +} + +func (m *PrivateAccount) GetPublicKey() []byte { + if m != nil { + return m.PublicKey + } + return nil +} + +func (m *PrivateAccount) GetPrivateKey() []byte { + if m != nil { + return m.PrivateKey + } + return nil +} + +// This is hear because it is used by both the Events service (Poll) and the +// Transaction service (TransactAndHold) +type EventDataCall struct { + CallData *CallData `protobuf:"bytes,1,opt,name=CallData,proto3" json:"CallData,omitempty"` + Origin []byte `protobuf:"bytes,2,opt,name=Origin,proto3" json:"Origin,omitempty"` + TxHash []byte `protobuf:"bytes,3,opt,name=TxHash,proto3" json:"TxHash,omitempty"` + StackDepth int64 `protobuf:"varint,4,opt,name=StackDepth,proto3" json:"StackDepth,omitempty"` + Return []byte `protobuf:"bytes,5,opt,name=Return,proto3" json:"Return,omitempty"` + Exception string `protobuf:"bytes,6,opt,name=Exception,proto3" json:"Exception,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EventDataCall) Reset() { *m = EventDataCall{} } +func (m *EventDataCall) String() string { return proto.CompactTextString(m) } +func (*EventDataCall) ProtoMessage() {} +func (*EventDataCall) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{6} +} +func (m *EventDataCall) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EventDataCall.Unmarshal(m, b) +} +func (m *EventDataCall) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EventDataCall.Marshal(b, m, deterministic) +} +func (dst *EventDataCall) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventDataCall.Merge(dst, src) +} +func (m *EventDataCall) XXX_Size() int { + return xxx_messageInfo_EventDataCall.Size(m) +} +func (m *EventDataCall) XXX_DiscardUnknown() { + xxx_messageInfo_EventDataCall.DiscardUnknown(m) +} + +var xxx_messageInfo_EventDataCall proto.InternalMessageInfo + +func (m *EventDataCall) GetCallData() *CallData { + if m != nil { + return m.CallData + } + return nil +} + +func (m *EventDataCall) GetOrigin() []byte { + if m != nil { + return m.Origin + } + return nil +} + +func (m *EventDataCall) GetTxHash() []byte { + if m != nil { + return m.TxHash + } + return nil +} + +func (m *EventDataCall) GetStackDepth() int64 { + if m != nil { + return m.StackDepth + } + return 0 +} + +func (m *EventDataCall) GetReturn() []byte { + if m != nil { + return m.Return + } + return nil +} + +func (m *EventDataCall) GetException() string { + if m != nil { + return m.Exception + } + return "" +} + +type CallData struct { + Caller []byte `protobuf:"bytes,1,opt,name=Caller,proto3" json:"Caller,omitempty"` + Callee []byte `protobuf:"bytes,2,opt,name=Callee,proto3" json:"Callee,omitempty"` + Data []byte `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"` + Value uint64 `protobuf:"varint,4,opt,name=Value,proto3" json:"Value,omitempty"` + Gas uint64 `protobuf:"varint,5,opt,name=Gas,proto3" json:"Gas,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CallData) Reset() { *m = CallData{} } +func (m *CallData) String() string { return proto.CompactTextString(m) } +func (*CallData) ProtoMessage() {} +func (*CallData) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{7} +} +func (m *CallData) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CallData.Unmarshal(m, b) +} +func (m *CallData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CallData.Marshal(b, m, deterministic) +} +func (dst *CallData) XXX_Merge(src proto.Message) { + xxx_messageInfo_CallData.Merge(dst, src) +} +func (m *CallData) XXX_Size() int { + return xxx_messageInfo_CallData.Size(m) +} +func (m *CallData) XXX_DiscardUnknown() { + xxx_messageInfo_CallData.DiscardUnknown(m) +} + +var xxx_messageInfo_CallData proto.InternalMessageInfo + +func (m *CallData) GetCaller() []byte { + if m != nil { + return m.Caller + } + return nil +} + +func (m *CallData) GetCallee() []byte { + if m != nil { + return m.Callee + } + return nil +} + +func (m *CallData) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *CallData) GetValue() uint64 { + if m != nil { + return m.Value + } + return 0 +} + +func (m *CallData) GetGas() uint64 { + if m != nil { + return m.Gas + } + return 0 +} + +// Params +type AddressParam struct { + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AddressParam) Reset() { *m = AddressParam{} } +func (m *AddressParam) String() string { return proto.CompactTextString(m) } +func (*AddressParam) ProtoMessage() {} +func (*AddressParam) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{8} +} +func (m *AddressParam) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AddressParam.Unmarshal(m, b) +} +func (m *AddressParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AddressParam.Marshal(b, m, deterministic) +} +func (dst *AddressParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddressParam.Merge(dst, src) +} +func (m *AddressParam) XXX_Size() int { + return xxx_messageInfo_AddressParam.Size(m) +} +func (m *AddressParam) XXX_DiscardUnknown() { + xxx_messageInfo_AddressParam.DiscardUnknown(m) +} + +var xxx_messageInfo_AddressParam proto.InternalMessageInfo + +func (m *AddressParam) GetAddress() []byte { + if m != nil { + return m.Address + } + return nil +} + +type PrivateKeyParam struct { + PrivateKey []byte `protobuf:"bytes,1,opt,name=privateKey,proto3" json:"privateKey,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PrivateKeyParam) Reset() { *m = PrivateKeyParam{} } +func (m *PrivateKeyParam) String() string { return proto.CompactTextString(m) } +func (*PrivateKeyParam) ProtoMessage() {} +func (*PrivateKeyParam) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{9} +} +func (m *PrivateKeyParam) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PrivateKeyParam.Unmarshal(m, b) +} +func (m *PrivateKeyParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PrivateKeyParam.Marshal(b, m, deterministic) +} +func (dst *PrivateKeyParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_PrivateKeyParam.Merge(dst, src) +} +func (m *PrivateKeyParam) XXX_Size() int { + return xxx_messageInfo_PrivateKeyParam.Size(m) +} +func (m *PrivateKeyParam) XXX_DiscardUnknown() { + xxx_messageInfo_PrivateKeyParam.DiscardUnknown(m) +} + +var xxx_messageInfo_PrivateKeyParam proto.InternalMessageInfo + +func (m *PrivateKeyParam) GetPrivateKey() []byte { + if m != nil { + return m.PrivateKey + } + return nil +} + +type StorageAtParam struct { + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StorageAtParam) Reset() { *m = StorageAtParam{} } +func (m *StorageAtParam) String() string { return proto.CompactTextString(m) } +func (*StorageAtParam) ProtoMessage() {} +func (*StorageAtParam) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{10} +} +func (m *StorageAtParam) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StorageAtParam.Unmarshal(m, b) +} +func (m *StorageAtParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StorageAtParam.Marshal(b, m, deterministic) +} +func (dst *StorageAtParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageAtParam.Merge(dst, src) +} +func (m *StorageAtParam) XXX_Size() int { + return xxx_messageInfo_StorageAtParam.Size(m) +} +func (m *StorageAtParam) XXX_DiscardUnknown() { + xxx_messageInfo_StorageAtParam.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageAtParam proto.InternalMessageInfo + +func (m *StorageAtParam) GetAddress() []byte { + if m != nil { + return m.Address + } + return nil +} + +func (m *StorageAtParam) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +type BasePermissions struct { + Perms uint64 `protobuf:"varint,1,opt,name=Perms,proto3" json:"Perms,omitempty"` + SetBit uint64 `protobuf:"varint,2,opt,name=SetBit,proto3" json:"SetBit,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BasePermissions) Reset() { *m = BasePermissions{} } +func (m *BasePermissions) String() string { return proto.CompactTextString(m) } +func (*BasePermissions) ProtoMessage() {} +func (*BasePermissions) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{11} +} +func (m *BasePermissions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BasePermissions.Unmarshal(m, b) +} +func (m *BasePermissions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BasePermissions.Marshal(b, m, deterministic) +} +func (dst *BasePermissions) XXX_Merge(src proto.Message) { + xxx_messageInfo_BasePermissions.Merge(dst, src) +} +func (m *BasePermissions) XXX_Size() int { + return xxx_messageInfo_BasePermissions.Size(m) +} +func (m *BasePermissions) XXX_DiscardUnknown() { + xxx_messageInfo_BasePermissions.DiscardUnknown(m) +} + +var xxx_messageInfo_BasePermissions proto.InternalMessageInfo + +func (m *BasePermissions) GetPerms() uint64 { + if m != nil { + return m.Perms + } + return 0 +} + +func (m *BasePermissions) GetSetBit() uint64 { + if m != nil { + return m.SetBit + } + return 0 +} + +type AccountPermissions struct { + Base *BasePermissions `protobuf:"bytes,1,opt,name=Base,proto3" json:"Base,omitempty"` + Roles []string `protobuf:"bytes,2,rep,name=Roles,proto3" json:"Roles,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AccountPermissions) Reset() { *m = AccountPermissions{} } +func (m *AccountPermissions) String() string { return proto.CompactTextString(m) } +func (*AccountPermissions) ProtoMessage() {} +func (*AccountPermissions) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{12} +} +func (m *AccountPermissions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AccountPermissions.Unmarshal(m, b) +} +func (m *AccountPermissions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AccountPermissions.Marshal(b, m, deterministic) +} +func (dst *AccountPermissions) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccountPermissions.Merge(dst, src) +} +func (m *AccountPermissions) XXX_Size() int { + return xxx_messageInfo_AccountPermissions.Size(m) +} +func (m *AccountPermissions) XXX_DiscardUnknown() { + xxx_messageInfo_AccountPermissions.DiscardUnknown(m) +} + +var xxx_messageInfo_AccountPermissions proto.InternalMessageInfo + +func (m *AccountPermissions) GetBase() *BasePermissions { + if m != nil { + return m.Base + } + return nil +} + +func (m *AccountPermissions) GetRoles() []string { + if m != nil { + return m.Roles + } + return nil +} + +type Account struct { + Address []byte `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"` + PublicKey []byte `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` + Sequence uint64 `protobuf:"varint,3,opt,name=Sequence,proto3" json:"Sequence,omitempty"` + Balance uint64 `protobuf:"varint,4,opt,name=Balance,proto3" json:"Balance,omitempty"` + Code []byte `protobuf:"bytes,5,opt,name=Code,proto3" json:"Code,omitempty"` + StorageRoot []byte `protobuf:"bytes,6,opt,name=StorageRoot,proto3" json:"StorageRoot,omitempty"` + Permissions *AccountPermissions `protobuf:"bytes,7,opt,name=Permissions,proto3" json:"Permissions,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Account) Reset() { *m = Account{} } +func (m *Account) String() string { return proto.CompactTextString(m) } +func (*Account) ProtoMessage() {} +func (*Account) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{13} +} +func (m *Account) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Account.Unmarshal(m, b) +} +func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Account.Marshal(b, m, deterministic) +} +func (dst *Account) XXX_Merge(src proto.Message) { + xxx_messageInfo_Account.Merge(dst, src) +} +func (m *Account) XXX_Size() int { + return xxx_messageInfo_Account.Size(m) +} +func (m *Account) XXX_DiscardUnknown() { + xxx_messageInfo_Account.DiscardUnknown(m) +} + +var xxx_messageInfo_Account proto.InternalMessageInfo + +func (m *Account) GetAddress() []byte { + if m != nil { + return m.Address + } + return nil +} + +func (m *Account) GetPublicKey() []byte { + if m != nil { + return m.PublicKey + } + return nil +} + +func (m *Account) GetSequence() uint64 { + if m != nil { + return m.Sequence + } + return 0 +} + +func (m *Account) GetBalance() uint64 { + if m != nil { + return m.Balance + } + return 0 +} + +func (m *Account) GetCode() []byte { + if m != nil { + return m.Code + } + return nil +} + +func (m *Account) GetStorageRoot() []byte { + if m != nil { + return m.StorageRoot + } + return nil +} + +func (m *Account) GetPermissions() *AccountPermissions { + if m != nil { + return m.Permissions + } + return nil +} + +type AccountList struct { + BlockHeight uint64 `protobuf:"varint,1,opt,name=BlockHeight,proto3" json:"BlockHeight,omitempty"` + Accounts []*Account `protobuf:"bytes,2,rep,name=Accounts,proto3" json:"Accounts,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AccountList) Reset() { *m = AccountList{} } +func (m *AccountList) String() string { return proto.CompactTextString(m) } +func (*AccountList) ProtoMessage() {} +func (*AccountList) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{14} +} +func (m *AccountList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AccountList.Unmarshal(m, b) +} +func (m *AccountList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AccountList.Marshal(b, m, deterministic) +} +func (dst *AccountList) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccountList.Merge(dst, src) +} +func (m *AccountList) XXX_Size() int { + return xxx_messageInfo_AccountList.Size(m) +} +func (m *AccountList) XXX_DiscardUnknown() { + xxx_messageInfo_AccountList.DiscardUnknown(m) +} + +var xxx_messageInfo_AccountList proto.InternalMessageInfo + +func (m *AccountList) GetBlockHeight() uint64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *AccountList) GetAccounts() []*Account { + if m != nil { + return m.Accounts + } + return nil +} + +type Validator struct { + Address []byte `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"` + PublicKey []byte `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` + Power uint64 `protobuf:"varint,3,opt,name=Power,proto3" json:"Power,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Validator) Reset() { *m = Validator{} } +func (m *Validator) String() string { return proto.CompactTextString(m) } +func (*Validator) ProtoMessage() {} +func (*Validator) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{15} +} +func (m *Validator) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Validator.Unmarshal(m, b) +} +func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Validator.Marshal(b, m, deterministic) +} +func (dst *Validator) XXX_Merge(src proto.Message) { + xxx_messageInfo_Validator.Merge(dst, src) +} +func (m *Validator) XXX_Size() int { + return xxx_messageInfo_Validator.Size(m) +} +func (m *Validator) XXX_DiscardUnknown() { + xxx_messageInfo_Validator.DiscardUnknown(m) +} + +var xxx_messageInfo_Validator proto.InternalMessageInfo + +func (m *Validator) GetAddress() []byte { + if m != nil { + return m.Address + } + return nil +} + +func (m *Validator) GetPublicKey() []byte { + if m != nil { + return m.PublicKey + } + return nil +} + +func (m *Validator) GetPower() uint64 { + if m != nil { + return m.Power + } + return 0 +} + +type ValidatorList struct { + BlockHeight uint64 `protobuf:"varint,1,opt,name=BlockHeight,proto3" json:"BlockHeight,omitempty"` + BondedValidators []*Validator `protobuf:"bytes,2,rep,name=BondedValidators,proto3" json:"BondedValidators,omitempty"` + UnbondingValidators []*Validator `protobuf:"bytes,3,rep,name=UnbondingValidators,proto3" json:"UnbondingValidators,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ValidatorList) Reset() { *m = ValidatorList{} } +func (m *ValidatorList) String() string { return proto.CompactTextString(m) } +func (*ValidatorList) ProtoMessage() {} +func (*ValidatorList) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{16} +} +func (m *ValidatorList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ValidatorList.Unmarshal(m, b) +} +func (m *ValidatorList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ValidatorList.Marshal(b, m, deterministic) +} +func (dst *ValidatorList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorList.Merge(dst, src) +} +func (m *ValidatorList) XXX_Size() int { + return xxx_messageInfo_ValidatorList.Size(m) +} +func (m *ValidatorList) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorList.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorList proto.InternalMessageInfo + +func (m *ValidatorList) GetBlockHeight() uint64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *ValidatorList) GetBondedValidators() []*Validator { + if m != nil { + return m.BondedValidators + } + return nil +} + +func (m *ValidatorList) GetUnbondingValidators() []*Validator { + if m != nil { + return m.UnbondingValidators + } + return nil +} + +type StorageItem struct { + Key []byte `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StorageItem) Reset() { *m = StorageItem{} } +func (m *StorageItem) String() string { return proto.CompactTextString(m) } +func (*StorageItem) ProtoMessage() {} +func (*StorageItem) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{17} +} +func (m *StorageItem) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StorageItem.Unmarshal(m, b) +} +func (m *StorageItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StorageItem.Marshal(b, m, deterministic) +} +func (dst *StorageItem) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageItem.Merge(dst, src) +} +func (m *StorageItem) XXX_Size() int { + return xxx_messageInfo_StorageItem.Size(m) +} +func (m *StorageItem) XXX_DiscardUnknown() { + xxx_messageInfo_StorageItem.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageItem proto.InternalMessageInfo + +func (m *StorageItem) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *StorageItem) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +type StorageDump struct { + StorageRoot []byte `protobuf:"bytes,1,opt,name=StorageRoot,proto3" json:"StorageRoot,omitempty"` + StorageItems []*StorageItem `protobuf:"bytes,2,rep,name=StorageItems,proto3" json:"StorageItems,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StorageDump) Reset() { *m = StorageDump{} } +func (m *StorageDump) String() string { return proto.CompactTextString(m) } +func (*StorageDump) ProtoMessage() {} +func (*StorageDump) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{18} +} +func (m *StorageDump) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StorageDump.Unmarshal(m, b) +} +func (m *StorageDump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StorageDump.Marshal(b, m, deterministic) +} +func (dst *StorageDump) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageDump.Merge(dst, src) +} +func (m *StorageDump) XXX_Size() int { + return xxx_messageInfo_StorageDump.Size(m) +} +func (m *StorageDump) XXX_DiscardUnknown() { + xxx_messageInfo_StorageDump.DiscardUnknown(m) +} + +var xxx_messageInfo_StorageDump proto.InternalMessageInfo + +func (m *StorageDump) GetStorageRoot() []byte { + if m != nil { + return m.StorageRoot + } + return nil +} + +func (m *StorageDump) GetStorageItems() []*StorageItem { + if m != nil { + return m.StorageItems + } + return nil +} + +// Params +type HeightParam struct { + Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HeightParam) Reset() { *m = HeightParam{} } +func (m *HeightParam) String() string { return proto.CompactTextString(m) } +func (*HeightParam) ProtoMessage() {} +func (*HeightParam) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{19} +} +func (m *HeightParam) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HeightParam.Unmarshal(m, b) +} +func (m *HeightParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HeightParam.Marshal(b, m, deterministic) +} +func (dst *HeightParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_HeightParam.Merge(dst, src) +} +func (m *HeightParam) XXX_Size() int { + return xxx_messageInfo_HeightParam.Size(m) +} +func (m *HeightParam) XXX_DiscardUnknown() { + xxx_messageInfo_HeightParam.DiscardUnknown(m) +} + +var xxx_messageInfo_HeightParam proto.InternalMessageInfo + +func (m *HeightParam) GetHeight() uint64 { + if m != nil { + return m.Height + } + return 0 +} + +type BlocksParam struct { + MinHeight uint64 `protobuf:"varint,1,opt,name=minHeight,proto3" json:"minHeight,omitempty"` + MaxHeight uint64 `protobuf:"varint,2,opt,name=maxHeight,proto3" json:"maxHeight,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BlocksParam) Reset() { *m = BlocksParam{} } +func (m *BlocksParam) String() string { return proto.CompactTextString(m) } +func (*BlocksParam) ProtoMessage() {} +func (*BlocksParam) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{20} +} +func (m *BlocksParam) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BlocksParam.Unmarshal(m, b) +} +func (m *BlocksParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BlocksParam.Marshal(b, m, deterministic) +} +func (dst *BlocksParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlocksParam.Merge(dst, src) +} +func (m *BlocksParam) XXX_Size() int { + return xxx_messageInfo_BlocksParam.Size(m) +} +func (m *BlocksParam) XXX_DiscardUnknown() { + xxx_messageInfo_BlocksParam.DiscardUnknown(m) +} + +var xxx_messageInfo_BlocksParam proto.InternalMessageInfo + +func (m *BlocksParam) GetMinHeight() uint64 { + if m != nil { + return m.MinHeight + } + return 0 +} + +func (m *BlocksParam) GetMaxHeight() uint64 { + if m != nil { + return m.MaxHeight + } + return 0 +} + +// Results +type Header struct { + ChainID string `protobuf:"bytes,1,opt,name=ChainID,proto3" json:"ChainID,omitempty"` + Height int64 `protobuf:"varint,2,opt,name=Height,proto3" json:"Height,omitempty"` + Time int64 `protobuf:"varint,3,opt,name=Time,proto3" json:"Time,omitempty"` + NumTxs int64 `protobuf:"varint,4,opt,name=NumTxs,proto3" json:"NumTxs,omitempty"` + LastBlockID []byte `protobuf:"bytes,5,opt,name=LastBlockID,proto3" json:"LastBlockID,omitempty"` + LastCommitHash []byte `protobuf:"bytes,6,opt,name=LastCommitHash,proto3" json:"LastCommitHash,omitempty"` + DataHash []byte `protobuf:"bytes,7,opt,name=DataHash,proto3" json:"DataHash,omitempty"` + ValidatorsHash []byte `protobuf:"bytes,8,opt,name=ValidatorsHash,proto3" json:"ValidatorsHash,omitempty"` + AppHash []byte `protobuf:"bytes,9,opt,name=AppHash,proto3" json:"AppHash,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Header) Reset() { *m = Header{} } +func (m *Header) String() string { return proto.CompactTextString(m) } +func (*Header) ProtoMessage() {} +func (*Header) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{21} +} +func (m *Header) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Header.Unmarshal(m, b) +} +func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Header.Marshal(b, m, deterministic) +} +func (dst *Header) XXX_Merge(src proto.Message) { + xxx_messageInfo_Header.Merge(dst, src) +} +func (m *Header) XXX_Size() int { + return xxx_messageInfo_Header.Size(m) +} +func (m *Header) XXX_DiscardUnknown() { + xxx_messageInfo_Header.DiscardUnknown(m) +} + +var xxx_messageInfo_Header proto.InternalMessageInfo + +func (m *Header) GetChainID() string { + if m != nil { + return m.ChainID + } + return "" +} + +func (m *Header) GetHeight() int64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *Header) GetTime() int64 { + if m != nil { + return m.Time + } + return 0 +} + +func (m *Header) GetNumTxs() int64 { + if m != nil { + return m.NumTxs + } + return 0 +} + +func (m *Header) GetLastBlockID() []byte { + if m != nil { + return m.LastBlockID + } + return nil +} + +func (m *Header) GetLastCommitHash() []byte { + if m != nil { + return m.LastCommitHash + } + return nil +} + +func (m *Header) GetDataHash() []byte { + if m != nil { + return m.DataHash + } + return nil +} + +func (m *Header) GetValidatorsHash() []byte { + if m != nil { + return m.ValidatorsHash + } + return nil +} + +func (m *Header) GetAppHash() []byte { + if m != nil { + return m.AppHash + } + return nil +} + +type Data struct { + Txs [][]byte `protobuf:"bytes,1,rep,name=Txs,proto3" json:"Txs,omitempty"` + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Data) Reset() { *m = Data{} } +func (m *Data) String() string { return proto.CompactTextString(m) } +func (*Data) ProtoMessage() {} +func (*Data) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{22} +} +func (m *Data) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Data.Unmarshal(m, b) +} +func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Data.Marshal(b, m, deterministic) +} +func (dst *Data) XXX_Merge(src proto.Message) { + xxx_messageInfo_Data.Merge(dst, src) +} +func (m *Data) XXX_Size() int { + return xxx_messageInfo_Data.Size(m) +} +func (m *Data) XXX_DiscardUnknown() { + xxx_messageInfo_Data.DiscardUnknown(m) +} + +var xxx_messageInfo_Data proto.InternalMessageInfo + +func (m *Data) GetTxs() [][]byte { + if m != nil { + return m.Txs + } + return nil +} + +func (m *Data) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +type Block struct { + BlockID []byte `protobuf:"bytes,1,opt,name=BlockID,proto3" json:"BlockID,omitempty"` + Header *Header `protobuf:"bytes,2,opt,name=Header,proto3" json:"Header,omitempty"` + Data *Data `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Block) Reset() { *m = Block{} } +func (m *Block) String() string { return proto.CompactTextString(m) } +func (*Block) ProtoMessage() {} +func (*Block) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{23} +} +func (m *Block) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Block.Unmarshal(m, b) +} +func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Block.Marshal(b, m, deterministic) +} +func (dst *Block) XXX_Merge(src proto.Message) { + xxx_messageInfo_Block.Merge(dst, src) +} +func (m *Block) XXX_Size() int { + return xxx_messageInfo_Block.Size(m) +} +func (m *Block) XXX_DiscardUnknown() { + xxx_messageInfo_Block.DiscardUnknown(m) +} + +var xxx_messageInfo_Block proto.InternalMessageInfo + +func (m *Block) GetBlockID() []byte { + if m != nil { + return m.BlockID + } + return nil +} + +func (m *Block) GetHeader() *Header { + if m != nil { + return m.Header + } + return nil +} + +func (m *Block) GetData() *Data { + if m != nil { + return m.Data + } + return nil +} + +type BlockMeta struct { + BlockID []byte `protobuf:"bytes,1,opt,name=BlockID,proto3" json:"BlockID,omitempty"` + Header *Header `protobuf:"bytes,2,opt,name=Header,proto3" json:"Header,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BlockMeta) Reset() { *m = BlockMeta{} } +func (m *BlockMeta) String() string { return proto.CompactTextString(m) } +func (*BlockMeta) ProtoMessage() {} +func (*BlockMeta) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{24} +} +func (m *BlockMeta) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BlockMeta.Unmarshal(m, b) +} +func (m *BlockMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BlockMeta.Marshal(b, m, deterministic) +} +func (dst *BlockMeta) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlockMeta.Merge(dst, src) +} +func (m *BlockMeta) XXX_Size() int { + return xxx_messageInfo_BlockMeta.Size(m) +} +func (m *BlockMeta) XXX_DiscardUnknown() { + xxx_messageInfo_BlockMeta.DiscardUnknown(m) +} + +var xxx_messageInfo_BlockMeta proto.InternalMessageInfo + +func (m *BlockMeta) GetBlockID() []byte { + if m != nil { + return m.BlockID + } + return nil +} + +func (m *BlockMeta) GetHeader() *Header { + if m != nil { + return m.Header + } + return nil +} + +type BlockList struct { + LastHeight uint64 `protobuf:"varint,1,opt,name=LastHeight,proto3" json:"LastHeight,omitempty"` + BlockMetas []*BlockMeta `protobuf:"bytes,2,rep,name=BlockMetas,proto3" json:"BlockMetas,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BlockList) Reset() { *m = BlockList{} } +func (m *BlockList) String() string { return proto.CompactTextString(m) } +func (*BlockList) ProtoMessage() {} +func (*BlockList) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{25} +} +func (m *BlockList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BlockList.Unmarshal(m, b) +} +func (m *BlockList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BlockList.Marshal(b, m, deterministic) +} +func (dst *BlockList) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlockList.Merge(dst, src) +} +func (m *BlockList) XXX_Size() int { + return xxx_messageInfo_BlockList.Size(m) +} +func (m *BlockList) XXX_DiscardUnknown() { + xxx_messageInfo_BlockList.DiscardUnknown(m) +} + +var xxx_messageInfo_BlockList proto.InternalMessageInfo + +func (m *BlockList) GetLastHeight() uint64 { + if m != nil { + return m.LastHeight + } + return 0 +} + +func (m *BlockList) GetBlockMetas() []*BlockMeta { + if m != nil { + return m.BlockMetas + } + return nil +} + +type ChainId struct { + ChainName string `protobuf:"bytes,1,opt,name=ChainName,proto3" json:"ChainName,omitempty"` + ChainId string `protobuf:"bytes,2,opt,name=ChainId,proto3" json:"ChainId,omitempty"` + GenesisHash []byte `protobuf:"bytes,3,opt,name=GenesisHash,proto3" json:"GenesisHash,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ChainId) Reset() { *m = ChainId{} } +func (m *ChainId) String() string { return proto.CompactTextString(m) } +func (*ChainId) ProtoMessage() {} +func (*ChainId) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{26} +} +func (m *ChainId) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ChainId.Unmarshal(m, b) +} +func (m *ChainId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ChainId.Marshal(b, m, deterministic) +} +func (dst *ChainId) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChainId.Merge(dst, src) +} +func (m *ChainId) XXX_Size() int { + return xxx_messageInfo_ChainId.Size(m) +} +func (m *ChainId) XXX_DiscardUnknown() { + xxx_messageInfo_ChainId.DiscardUnknown(m) +} + +var xxx_messageInfo_ChainId proto.InternalMessageInfo + +func (m *ChainId) GetChainName() string { + if m != nil { + return m.ChainName + } + return "" +} + +func (m *ChainId) GetChainId() string { + if m != nil { + return m.ChainId + } + return "" +} + +func (m *ChainId) GetGenesisHash() []byte { + if m != nil { + return m.GenesisHash + } + return nil +} + +type GenesisDoc struct { + GenesisTime uint64 `protobuf:"varint,1,opt,name=GenesisTime,proto3" json:"GenesisTime,omitempty"` + ChainName string `protobuf:"bytes,2,opt,name=ChainName,proto3" json:"ChainName,omitempty"` + Salt []byte `protobuf:"bytes,3,opt,name=Salt,proto3" json:"Salt,omitempty"` + GlobalPermissions uint64 `protobuf:"varint,4,opt,name=GlobalPermissions,proto3" json:"GlobalPermissions,omitempty"` + Accounts []*GenesisDoc_GenesisAccount `protobuf:"bytes,5,rep,name=Accounts,proto3" json:"Accounts,omitempty"` + Validators []*GenesisDoc_GenesisValidator `protobuf:"bytes,6,rep,name=Validators,proto3" json:"Validators,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GenesisDoc) Reset() { *m = GenesisDoc{} } +func (m *GenesisDoc) String() string { return proto.CompactTextString(m) } +func (*GenesisDoc) ProtoMessage() {} +func (*GenesisDoc) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{27} +} +func (m *GenesisDoc) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GenesisDoc.Unmarshal(m, b) +} +func (m *GenesisDoc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GenesisDoc.Marshal(b, m, deterministic) +} +func (dst *GenesisDoc) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisDoc.Merge(dst, src) +} +func (m *GenesisDoc) XXX_Size() int { + return xxx_messageInfo_GenesisDoc.Size(m) +} +func (m *GenesisDoc) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisDoc.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisDoc proto.InternalMessageInfo + +func (m *GenesisDoc) GetGenesisTime() uint64 { + if m != nil { + return m.GenesisTime + } + return 0 +} + +func (m *GenesisDoc) GetChainName() string { + if m != nil { + return m.ChainName + } + return "" +} + +func (m *GenesisDoc) GetSalt() []byte { + if m != nil { + return m.Salt + } + return nil +} + +func (m *GenesisDoc) GetGlobalPermissions() uint64 { + if m != nil { + return m.GlobalPermissions + } + return 0 +} + +func (m *GenesisDoc) GetAccounts() []*GenesisDoc_GenesisAccount { + if m != nil { + return m.Accounts + } + return nil +} + +func (m *GenesisDoc) GetValidators() []*GenesisDoc_GenesisValidator { + if m != nil { + return m.Validators + } + return nil +} + +type GenesisDoc_GenesisAccount struct { + Address []byte `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"` + PublicKey []byte `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` + Amount uint64 `protobuf:"varint,3,opt,name=Amount,proto3" json:"Amount,omitempty"` + Name string `protobuf:"bytes,4,opt,name=Name,proto3" json:"Name,omitempty"` + Permissions *AccountPermissions `protobuf:"bytes,5,opt,name=Permissions,proto3" json:"Permissions,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GenesisDoc_GenesisAccount) Reset() { *m = GenesisDoc_GenesisAccount{} } +func (m *GenesisDoc_GenesisAccount) String() string { return proto.CompactTextString(m) } +func (*GenesisDoc_GenesisAccount) ProtoMessage() {} +func (*GenesisDoc_GenesisAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{27, 0} +} +func (m *GenesisDoc_GenesisAccount) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GenesisDoc_GenesisAccount.Unmarshal(m, b) +} +func (m *GenesisDoc_GenesisAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GenesisDoc_GenesisAccount.Marshal(b, m, deterministic) +} +func (dst *GenesisDoc_GenesisAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisDoc_GenesisAccount.Merge(dst, src) +} +func (m *GenesisDoc_GenesisAccount) XXX_Size() int { + return xxx_messageInfo_GenesisDoc_GenesisAccount.Size(m) +} +func (m *GenesisDoc_GenesisAccount) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisDoc_GenesisAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisDoc_GenesisAccount proto.InternalMessageInfo + +func (m *GenesisDoc_GenesisAccount) GetAddress() []byte { + if m != nil { + return m.Address + } + return nil +} + +func (m *GenesisDoc_GenesisAccount) GetPublicKey() []byte { + if m != nil { + return m.PublicKey + } + return nil +} + +func (m *GenesisDoc_GenesisAccount) GetAmount() uint64 { + if m != nil { + return m.Amount + } + return 0 +} + +func (m *GenesisDoc_GenesisAccount) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *GenesisDoc_GenesisAccount) GetPermissions() *AccountPermissions { + if m != nil { + return m.Permissions + } + return nil +} + +type GenesisDoc_GenesisValidator struct { + Address []byte `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"` + PublicKey []byte `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` + Amount uint64 `protobuf:"varint,3,opt,name=Amount,proto3" json:"Amount,omitempty"` + Name string `protobuf:"bytes,4,opt,name=Name,proto3" json:"Name,omitempty"` + UnbondTo [][]byte `protobuf:"bytes,5,rep,name=UnbondTo,proto3" json:"UnbondTo,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GenesisDoc_GenesisValidator) Reset() { *m = GenesisDoc_GenesisValidator{} } +func (m *GenesisDoc_GenesisValidator) String() string { return proto.CompactTextString(m) } +func (*GenesisDoc_GenesisValidator) ProtoMessage() {} +func (*GenesisDoc_GenesisValidator) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{27, 1} +} +func (m *GenesisDoc_GenesisValidator) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GenesisDoc_GenesisValidator.Unmarshal(m, b) +} +func (m *GenesisDoc_GenesisValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GenesisDoc_GenesisValidator.Marshal(b, m, deterministic) +} +func (dst *GenesisDoc_GenesisValidator) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisDoc_GenesisValidator.Merge(dst, src) +} +func (m *GenesisDoc_GenesisValidator) XXX_Size() int { + return xxx_messageInfo_GenesisDoc_GenesisValidator.Size(m) +} +func (m *GenesisDoc_GenesisValidator) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisDoc_GenesisValidator.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisDoc_GenesisValidator proto.InternalMessageInfo + +func (m *GenesisDoc_GenesisValidator) GetAddress() []byte { + if m != nil { + return m.Address + } + return nil +} + +func (m *GenesisDoc_GenesisValidator) GetPublicKey() []byte { + if m != nil { + return m.PublicKey + } + return nil +} + +func (m *GenesisDoc_GenesisValidator) GetAmount() uint64 { + if m != nil { + return m.Amount + } + return 0 +} + +func (m *GenesisDoc_GenesisValidator) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *GenesisDoc_GenesisValidator) GetUnbondTo() [][]byte { + if m != nil { + return m.UnbondTo + } + return nil +} + +type UnconfirmedTxList struct { + NumTxs uint64 `protobuf:"varint,1,opt,name=NumTxs,proto3" json:"NumTxs,omitempty"` + Txs [][]byte `protobuf:"bytes,2,rep,name=Txs,proto3" json:"Txs,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnconfirmedTxList) Reset() { *m = UnconfirmedTxList{} } +func (m *UnconfirmedTxList) String() string { return proto.CompactTextString(m) } +func (*UnconfirmedTxList) ProtoMessage() {} +func (*UnconfirmedTxList) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{28} +} +func (m *UnconfirmedTxList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnconfirmedTxList.Unmarshal(m, b) +} +func (m *UnconfirmedTxList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnconfirmedTxList.Marshal(b, m, deterministic) +} +func (dst *UnconfirmedTxList) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnconfirmedTxList.Merge(dst, src) +} +func (m *UnconfirmedTxList) XXX_Size() int { + return xxx_messageInfo_UnconfirmedTxList.Size(m) +} +func (m *UnconfirmedTxList) XXX_DiscardUnknown() { + xxx_messageInfo_UnconfirmedTxList.DiscardUnknown(m) +} + +var xxx_messageInfo_UnconfirmedTxList proto.InternalMessageInfo + +func (m *UnconfirmedTxList) GetNumTxs() uint64 { + if m != nil { + return m.NumTxs + } + return 0 +} + +func (m *UnconfirmedTxList) GetTxs() [][]byte { + if m != nil { + return m.Txs + } + return nil +} + +type Status struct { + NodeInfo *NodeInfo `protobuf:"bytes,1,opt,name=NodeInfo,proto3" json:"NodeInfo,omitempty"` + GenesisHash []byte `protobuf:"bytes,2,opt,name=GenesisHash,proto3" json:"GenesisHash,omitempty"` + PublicKey []byte `protobuf:"bytes,3,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` + LatestBlockHash []byte `protobuf:"bytes,4,opt,name=LatestBlockHash,proto3" json:"LatestBlockHash,omitempty"` + LatestBlockHeight uint64 `protobuf:"varint,5,opt,name=LatestBlockHeight,proto3" json:"LatestBlockHeight,omitempty"` + LatestBlockTime int64 `protobuf:"varint,6,opt,name=LatestBlockTime,proto3" json:"LatestBlockTime,omitempty"` + NodeVersion string `protobuf:"bytes,7,opt,name=NodeVersion,proto3" json:"NodeVersion,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Status) Reset() { *m = Status{} } +func (m *Status) String() string { return proto.CompactTextString(m) } +func (*Status) ProtoMessage() {} +func (*Status) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{29} +} +func (m *Status) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Status.Unmarshal(m, b) +} +func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Status.Marshal(b, m, deterministic) +} +func (dst *Status) XXX_Merge(src proto.Message) { + xxx_messageInfo_Status.Merge(dst, src) +} +func (m *Status) XXX_Size() int { + return xxx_messageInfo_Status.Size(m) +} +func (m *Status) XXX_DiscardUnknown() { + xxx_messageInfo_Status.DiscardUnknown(m) +} + +var xxx_messageInfo_Status proto.InternalMessageInfo + +func (m *Status) GetNodeInfo() *NodeInfo { + if m != nil { + return m.NodeInfo + } + return nil +} + +func (m *Status) GetGenesisHash() []byte { + if m != nil { + return m.GenesisHash + } + return nil +} + +func (m *Status) GetPublicKey() []byte { + if m != nil { + return m.PublicKey + } + return nil +} + +func (m *Status) GetLatestBlockHash() []byte { + if m != nil { + return m.LatestBlockHash + } + return nil +} + +func (m *Status) GetLatestBlockHeight() uint64 { + if m != nil { + return m.LatestBlockHeight + } + return 0 +} + +func (m *Status) GetLatestBlockTime() int64 { + if m != nil { + return m.LatestBlockTime + } + return 0 +} + +func (m *Status) GetNodeVersion() string { + if m != nil { + return m.NodeVersion + } + return "" +} + +// These are used for get consensus state. There is a lot of information that could be included +// We should decided what the minimum we want inccluded is. +type RoundState struct { + Height int64 `protobuf:"varint,1,opt,name=Height,proto3" json:"Height,omitempty"` + Round int64 `protobuf:"varint,2,opt,name=Round,proto3" json:"Round,omitempty"` + Step int64 `protobuf:"varint,3,opt,name=Step,proto3" json:"Step,omitempty"` + StartTime uint64 `protobuf:"varint,4,opt,name=StartTime,proto3" json:"StartTime,omitempty"` + CommitTime uint64 `protobuf:"varint,5,opt,name=CommitTime,proto3" json:"CommitTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RoundState) Reset() { *m = RoundState{} } +func (m *RoundState) String() string { return proto.CompactTextString(m) } +func (*RoundState) ProtoMessage() {} +func (*RoundState) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{30} +} +func (m *RoundState) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RoundState.Unmarshal(m, b) +} +func (m *RoundState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RoundState.Marshal(b, m, deterministic) +} +func (dst *RoundState) XXX_Merge(src proto.Message) { + xxx_messageInfo_RoundState.Merge(dst, src) +} +func (m *RoundState) XXX_Size() int { + return xxx_messageInfo_RoundState.Size(m) +} +func (m *RoundState) XXX_DiscardUnknown() { + xxx_messageInfo_RoundState.DiscardUnknown(m) +} + +var xxx_messageInfo_RoundState proto.InternalMessageInfo + +func (m *RoundState) GetHeight() int64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *RoundState) GetRound() int64 { + if m != nil { + return m.Round + } + return 0 +} + +func (m *RoundState) GetStep() int64 { + if m != nil { + return m.Step + } + return 0 +} + +func (m *RoundState) GetStartTime() uint64 { + if m != nil { + return m.StartTime + } + return 0 +} + +func (m *RoundState) GetCommitTime() uint64 { + if m != nil { + return m.CommitTime + } + return 0 +} + +type PeerRoundState struct { + Height int64 `protobuf:"varint,1,opt,name=Height,proto3" json:"Height,omitempty"` + Round int64 `protobuf:"varint,2,opt,name=Round,proto3" json:"Round,omitempty"` + Step int64 `protobuf:"varint,3,opt,name=Step,proto3" json:"Step,omitempty"` + StartTime uint64 `protobuf:"varint,4,opt,name=StartTime,proto3" json:"StartTime,omitempty"` + Proposal bool `protobuf:"varint,5,opt,name=Proposal,proto3" json:"Proposal,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PeerRoundState) Reset() { *m = PeerRoundState{} } +func (m *PeerRoundState) String() string { return proto.CompactTextString(m) } +func (*PeerRoundState) ProtoMessage() {} +func (*PeerRoundState) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{31} +} +func (m *PeerRoundState) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PeerRoundState.Unmarshal(m, b) +} +func (m *PeerRoundState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PeerRoundState.Marshal(b, m, deterministic) +} +func (dst *PeerRoundState) XXX_Merge(src proto.Message) { + xxx_messageInfo_PeerRoundState.Merge(dst, src) +} +func (m *PeerRoundState) XXX_Size() int { + return xxx_messageInfo_PeerRoundState.Size(m) +} +func (m *PeerRoundState) XXX_DiscardUnknown() { + xxx_messageInfo_PeerRoundState.DiscardUnknown(m) +} + +var xxx_messageInfo_PeerRoundState proto.InternalMessageInfo + +func (m *PeerRoundState) GetHeight() int64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *PeerRoundState) GetRound() int64 { + if m != nil { + return m.Round + } + return 0 +} + +func (m *PeerRoundState) GetStep() int64 { + if m != nil { + return m.Step + } + return 0 +} + +func (m *PeerRoundState) GetStartTime() uint64 { + if m != nil { + return m.StartTime + } + return 0 +} + +func (m *PeerRoundState) GetProposal() bool { + if m != nil { + return m.Proposal + } + return false +} + +type ConsensusState struct { + RoundState *RoundState `protobuf:"bytes,1,opt,name=RoundState,proto3" json:"RoundState,omitempty"` + PeerRoundStates []*PeerRoundState `protobuf:"bytes,2,rep,name=PeerRoundStates,proto3" json:"PeerRoundStates,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ConsensusState) Reset() { *m = ConsensusState{} } +func (m *ConsensusState) String() string { return proto.CompactTextString(m) } +func (*ConsensusState) ProtoMessage() {} +func (*ConsensusState) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{32} +} +func (m *ConsensusState) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ConsensusState.Unmarshal(m, b) +} +func (m *ConsensusState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ConsensusState.Marshal(b, m, deterministic) +} +func (dst *ConsensusState) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConsensusState.Merge(dst, src) +} +func (m *ConsensusState) XXX_Size() int { + return xxx_messageInfo_ConsensusState.Size(m) +} +func (m *ConsensusState) XXX_DiscardUnknown() { + xxx_messageInfo_ConsensusState.DiscardUnknown(m) +} + +var xxx_messageInfo_ConsensusState proto.InternalMessageInfo + +func (m *ConsensusState) GetRoundState() *RoundState { + if m != nil { + return m.RoundState + } + return nil +} + +func (m *ConsensusState) GetPeerRoundStates() []*PeerRoundState { + if m != nil { + return m.PeerRoundStates + } + return nil +} + +// Params +type EventIdParam struct { + EventId string `protobuf:"bytes,1,opt,name=eventId,proto3" json:"eventId,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EventIdParam) Reset() { *m = EventIdParam{} } +func (m *EventIdParam) String() string { return proto.CompactTextString(m) } +func (*EventIdParam) ProtoMessage() {} +func (*EventIdParam) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{33} +} +func (m *EventIdParam) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EventIdParam.Unmarshal(m, b) +} +func (m *EventIdParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EventIdParam.Marshal(b, m, deterministic) +} +func (dst *EventIdParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventIdParam.Merge(dst, src) +} +func (m *EventIdParam) XXX_Size() int { + return xxx_messageInfo_EventIdParam.Size(m) +} +func (m *EventIdParam) XXX_DiscardUnknown() { + xxx_messageInfo_EventIdParam.DiscardUnknown(m) +} + +var xxx_messageInfo_EventIdParam proto.InternalMessageInfo + +func (m *EventIdParam) GetEventId() string { + if m != nil { + return m.EventId + } + return "" +} + +type SubIdParam struct { + SubId string `protobuf:"bytes,1,opt,name=subId,proto3" json:"subId,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SubIdParam) Reset() { *m = SubIdParam{} } +func (m *SubIdParam) String() string { return proto.CompactTextString(m) } +func (*SubIdParam) ProtoMessage() {} +func (*SubIdParam) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{34} +} +func (m *SubIdParam) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SubIdParam.Unmarshal(m, b) +} +func (m *SubIdParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SubIdParam.Marshal(b, m, deterministic) +} +func (dst *SubIdParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubIdParam.Merge(dst, src) +} +func (m *SubIdParam) XXX_Size() int { + return xxx_messageInfo_SubIdParam.Size(m) +} +func (m *SubIdParam) XXX_DiscardUnknown() { + xxx_messageInfo_SubIdParam.DiscardUnknown(m) +} + +var xxx_messageInfo_SubIdParam proto.InternalMessageInfo + +func (m *SubIdParam) GetSubId() string { + if m != nil { + return m.SubId + } + return "" +} + +// Results +type EventUnSub struct { + Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EventUnSub) Reset() { *m = EventUnSub{} } +func (m *EventUnSub) String() string { return proto.CompactTextString(m) } +func (*EventUnSub) ProtoMessage() {} +func (*EventUnSub) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{35} +} +func (m *EventUnSub) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EventUnSub.Unmarshal(m, b) +} +func (m *EventUnSub) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EventUnSub.Marshal(b, m, deterministic) +} +func (dst *EventUnSub) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUnSub.Merge(dst, src) +} +func (m *EventUnSub) XXX_Size() int { + return xxx_messageInfo_EventUnSub.Size(m) +} +func (m *EventUnSub) XXX_DiscardUnknown() { + xxx_messageInfo_EventUnSub.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUnSub proto.InternalMessageInfo + +func (m *EventUnSub) GetResult() bool { + if m != nil { + return m.Result + } + return false +} + +type EventDataLog struct { + Address []byte `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"` + Height uint64 `protobuf:"varint,3,opt,name=Height,proto3" json:"Height,omitempty"` + Topics []string `protobuf:"bytes,4,rep,name=Topics,proto3" json:"Topics,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EventDataLog) Reset() { *m = EventDataLog{} } +func (m *EventDataLog) String() string { return proto.CompactTextString(m) } +func (*EventDataLog) ProtoMessage() {} +func (*EventDataLog) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{36} +} +func (m *EventDataLog) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EventDataLog.Unmarshal(m, b) +} +func (m *EventDataLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EventDataLog.Marshal(b, m, deterministic) +} +func (dst *EventDataLog) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventDataLog.Merge(dst, src) +} +func (m *EventDataLog) XXX_Size() int { + return xxx_messageInfo_EventDataLog.Size(m) +} +func (m *EventDataLog) XXX_DiscardUnknown() { + xxx_messageInfo_EventDataLog.DiscardUnknown(m) +} + +var xxx_messageInfo_EventDataLog proto.InternalMessageInfo + +func (m *EventDataLog) GetAddress() []byte { + if m != nil { + return m.Address + } + return nil +} + +func (m *EventDataLog) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *EventDataLog) GetHeight() uint64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *EventDataLog) GetTopics() []string { + if m != nil { + return m.Topics + } + return nil +} + +type EventDataTx struct { + Tx []byte `protobuf:"bytes,1,opt,name=Tx,proto3" json:"Tx,omitempty"` + Return []byte `protobuf:"bytes,2,opt,name=Return,proto3" json:"Return,omitempty"` + Exception string `protobuf:"bytes,3,opt,name=Exception,proto3" json:"Exception,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EventDataTx) Reset() { *m = EventDataTx{} } +func (m *EventDataTx) String() string { return proto.CompactTextString(m) } +func (*EventDataTx) ProtoMessage() {} +func (*EventDataTx) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{37} +} +func (m *EventDataTx) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EventDataTx.Unmarshal(m, b) +} +func (m *EventDataTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EventDataTx.Marshal(b, m, deterministic) +} +func (dst *EventDataTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventDataTx.Merge(dst, src) +} +func (m *EventDataTx) XXX_Size() int { + return xxx_messageInfo_EventDataTx.Size(m) +} +func (m *EventDataTx) XXX_DiscardUnknown() { + xxx_messageInfo_EventDataTx.DiscardUnknown(m) +} + +var xxx_messageInfo_EventDataTx proto.InternalMessageInfo + +func (m *EventDataTx) GetTx() []byte { + if m != nil { + return m.Tx + } + return nil +} + +func (m *EventDataTx) GetReturn() []byte { + if m != nil { + return m.Return + } + return nil +} + +func (m *EventDataTx) GetException() string { + if m != nil { + return m.Exception + } + return "" +} + +type Event struct { + Event string `protobuf:"bytes,1,opt,name=Event,proto3" json:"Event,omitempty"` + EventDataTx *EventDataTx `protobuf:"bytes,2,opt,name=EventDataTx,proto3" json:"EventDataTx,omitempty"` + EventDataCall *EventDataCall `protobuf:"bytes,3,opt,name=EventDataCall,proto3" json:"EventDataCall,omitempty"` + EventDataLog *EventDataLog `protobuf:"bytes,4,opt,name=EventDataLog,proto3" json:"EventDataLog,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Event) Reset() { *m = Event{} } +func (m *Event) String() string { return proto.CompactTextString(m) } +func (*Event) ProtoMessage() {} +func (*Event) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{38} +} +func (m *Event) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Event.Unmarshal(m, b) +} +func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Event.Marshal(b, m, deterministic) +} +func (dst *Event) XXX_Merge(src proto.Message) { + xxx_messageInfo_Event.Merge(dst, src) +} +func (m *Event) XXX_Size() int { + return xxx_messageInfo_Event.Size(m) +} +func (m *Event) XXX_DiscardUnknown() { + xxx_messageInfo_Event.DiscardUnknown(m) +} + +var xxx_messageInfo_Event proto.InternalMessageInfo + +func (m *Event) GetEvent() string { + if m != nil { + return m.Event + } + return "" +} + +func (m *Event) GetEventDataTx() *EventDataTx { + if m != nil { + return m.EventDataTx + } + return nil +} + +func (m *Event) GetEventDataCall() *EventDataCall { + if m != nil { + return m.EventDataCall + } + return nil +} + +func (m *Event) GetEventDataLog() *EventDataLog { + if m != nil { + return m.EventDataLog + } + return nil +} + +type PollResponse struct { + Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PollResponse) Reset() { *m = PollResponse{} } +func (m *PollResponse) String() string { return proto.CompactTextString(m) } +func (*PollResponse) ProtoMessage() {} +func (*PollResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{39} +} +func (m *PollResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PollResponse.Unmarshal(m, b) +} +func (m *PollResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PollResponse.Marshal(b, m, deterministic) +} +func (dst *PollResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PollResponse.Merge(dst, src) +} +func (m *PollResponse) XXX_Size() int { + return xxx_messageInfo_PollResponse.Size(m) +} +func (m *PollResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PollResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PollResponse proto.InternalMessageInfo + +func (m *PollResponse) GetEvents() []*Event { + if m != nil { + return m.Events + } + return nil +} + +// Params +type NameRegEntryParam struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NameRegEntryParam) Reset() { *m = NameRegEntryParam{} } +func (m *NameRegEntryParam) String() string { return proto.CompactTextString(m) } +func (*NameRegEntryParam) ProtoMessage() {} +func (*NameRegEntryParam) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{40} +} +func (m *NameRegEntryParam) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NameRegEntryParam.Unmarshal(m, b) +} +func (m *NameRegEntryParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NameRegEntryParam.Marshal(b, m, deterministic) +} +func (dst *NameRegEntryParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_NameRegEntryParam.Merge(dst, src) +} +func (m *NameRegEntryParam) XXX_Size() int { + return xxx_messageInfo_NameRegEntryParam.Size(m) +} +func (m *NameRegEntryParam) XXX_DiscardUnknown() { + xxx_messageInfo_NameRegEntryParam.DiscardUnknown(m) +} + +var xxx_messageInfo_NameRegEntryParam proto.InternalMessageInfo + +func (m *NameRegEntryParam) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type TransactNameRegParam struct { + InputAccount *InputAccount `protobuf:"bytes,1,opt,name=inputAccount,proto3" json:"inputAccount,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + Fee uint64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"` + Amount uint64 `protobuf:"varint,5,opt,name=amount,proto3" json:"amount,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TransactNameRegParam) Reset() { *m = TransactNameRegParam{} } +func (m *TransactNameRegParam) String() string { return proto.CompactTextString(m) } +func (*TransactNameRegParam) ProtoMessage() {} +func (*TransactNameRegParam) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{41} +} +func (m *TransactNameRegParam) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TransactNameRegParam.Unmarshal(m, b) +} +func (m *TransactNameRegParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TransactNameRegParam.Marshal(b, m, deterministic) +} +func (dst *TransactNameRegParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransactNameRegParam.Merge(dst, src) +} +func (m *TransactNameRegParam) XXX_Size() int { + return xxx_messageInfo_TransactNameRegParam.Size(m) +} +func (m *TransactNameRegParam) XXX_DiscardUnknown() { + xxx_messageInfo_TransactNameRegParam.DiscardUnknown(m) +} + +var xxx_messageInfo_TransactNameRegParam proto.InternalMessageInfo + +func (m *TransactNameRegParam) GetInputAccount() *InputAccount { + if m != nil { + return m.InputAccount + } + return nil +} + +func (m *TransactNameRegParam) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *TransactNameRegParam) GetData() string { + if m != nil { + return m.Data + } + return "" +} + +func (m *TransactNameRegParam) GetFee() uint64 { + if m != nil { + return m.Fee + } + return 0 +} + +func (m *TransactNameRegParam) GetAmount() uint64 { + if m != nil { + return m.Amount + } + return 0 +} + +// Results +type NameRegEntry struct { + // registered name for the entry + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + Owner []byte `protobuf:"bytes,2,opt,name=Owner,proto3" json:"Owner,omitempty"` + Data string `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"` + Expires uint64 `protobuf:"varint,4,opt,name=Expires,proto3" json:"Expires,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NameRegEntry) Reset() { *m = NameRegEntry{} } +func (m *NameRegEntry) String() string { return proto.CompactTextString(m) } +func (*NameRegEntry) ProtoMessage() {} +func (*NameRegEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{42} +} +func (m *NameRegEntry) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NameRegEntry.Unmarshal(m, b) +} +func (m *NameRegEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NameRegEntry.Marshal(b, m, deterministic) +} +func (dst *NameRegEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_NameRegEntry.Merge(dst, src) +} +func (m *NameRegEntry) XXX_Size() int { + return xxx_messageInfo_NameRegEntry.Size(m) +} +func (m *NameRegEntry) XXX_DiscardUnknown() { + xxx_messageInfo_NameRegEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_NameRegEntry proto.InternalMessageInfo + +func (m *NameRegEntry) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NameRegEntry) GetOwner() []byte { + if m != nil { + return m.Owner + } + return nil +} + +func (m *NameRegEntry) GetData() string { + if m != nil { + return m.Data + } + return "" +} + +func (m *NameRegEntry) GetExpires() uint64 { + if m != nil { + return m.Expires + } + return 0 +} + +type NameRegEntryList struct { + BlockHeight uint64 `protobuf:"varint,1,opt,name=BlockHeight,proto3" json:"BlockHeight,omitempty"` + Names []*NameRegEntry `protobuf:"bytes,2,rep,name=Names,proto3" json:"Names,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NameRegEntryList) Reset() { *m = NameRegEntryList{} } +func (m *NameRegEntryList) String() string { return proto.CompactTextString(m) } +func (*NameRegEntryList) ProtoMessage() {} +func (*NameRegEntryList) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{43} +} +func (m *NameRegEntryList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NameRegEntryList.Unmarshal(m, b) +} +func (m *NameRegEntryList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NameRegEntryList.Marshal(b, m, deterministic) +} +func (dst *NameRegEntryList) XXX_Merge(src proto.Message) { + xxx_messageInfo_NameRegEntryList.Merge(dst, src) +} +func (m *NameRegEntryList) XXX_Size() int { + return xxx_messageInfo_NameRegEntryList.Size(m) +} +func (m *NameRegEntryList) XXX_DiscardUnknown() { + xxx_messageInfo_NameRegEntryList.DiscardUnknown(m) +} + +var xxx_messageInfo_NameRegEntryList proto.InternalMessageInfo + +func (m *NameRegEntryList) GetBlockHeight() uint64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *NameRegEntryList) GetNames() []*NameRegEntry { + if m != nil { + return m.Names + } + return nil +} + +// Params +type PeerParam struct { + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PeerParam) Reset() { *m = PeerParam{} } +func (m *PeerParam) String() string { return proto.CompactTextString(m) } +func (*PeerParam) ProtoMessage() {} +func (*PeerParam) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{44} +} +func (m *PeerParam) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PeerParam.Unmarshal(m, b) +} +func (m *PeerParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PeerParam.Marshal(b, m, deterministic) +} +func (dst *PeerParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_PeerParam.Merge(dst, src) +} +func (m *PeerParam) XXX_Size() int { + return xxx_messageInfo_PeerParam.Size(m) +} +func (m *PeerParam) XXX_DiscardUnknown() { + xxx_messageInfo_PeerParam.DiscardUnknown(m) +} + +var xxx_messageInfo_PeerParam proto.InternalMessageInfo + +func (m *PeerParam) GetAddress() []byte { + if m != nil { + return m.Address + } + return nil +} + +// Results +type ClientVersion struct { + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ClientVersion) Reset() { *m = ClientVersion{} } +func (m *ClientVersion) String() string { return proto.CompactTextString(m) } +func (*ClientVersion) ProtoMessage() {} +func (*ClientVersion) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{45} +} +func (m *ClientVersion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ClientVersion.Unmarshal(m, b) +} +func (m *ClientVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ClientVersion.Marshal(b, m, deterministic) +} +func (dst *ClientVersion) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClientVersion.Merge(dst, src) +} +func (m *ClientVersion) XXX_Size() int { + return xxx_messageInfo_ClientVersion.Size(m) +} +func (m *ClientVersion) XXX_DiscardUnknown() { + xxx_messageInfo_ClientVersion.DiscardUnknown(m) +} + +var xxx_messageInfo_ClientVersion proto.InternalMessageInfo + +func (m *ClientVersion) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +type NodeID struct { + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + PublicKey []byte `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NodeID) Reset() { *m = NodeID{} } +func (m *NodeID) String() string { return proto.CompactTextString(m) } +func (*NodeID) ProtoMessage() {} +func (*NodeID) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{46} +} +func (m *NodeID) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NodeID.Unmarshal(m, b) +} +func (m *NodeID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NodeID.Marshal(b, m, deterministic) +} +func (dst *NodeID) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeID.Merge(dst, src) +} +func (m *NodeID) XXX_Size() int { + return xxx_messageInfo_NodeID.Size(m) +} +func (m *NodeID) XXX_DiscardUnknown() { + xxx_messageInfo_NodeID.DiscardUnknown(m) +} + +var xxx_messageInfo_NodeID proto.InternalMessageInfo + +func (m *NodeID) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NodeID) GetPublicKey() []byte { + if m != nil { + return m.PublicKey + } + return nil +} + +type NodeInfo struct { + ID *NodeID `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` + ListenAddr string `protobuf:"bytes,2,opt,name=ListenAddr,proto3" json:"ListenAddr,omitempty"` + Network string `protobuf:"bytes,3,opt,name=Network,proto3" json:"Network,omitempty"` + Version string `protobuf:"bytes,4,opt,name=Version,proto3" json:"Version,omitempty"` + Channels []byte `protobuf:"bytes,5,opt,name=Channels,proto3" json:"Channels,omitempty"` + Moniker string `protobuf:"bytes,6,opt,name=Moniker,proto3" json:"Moniker,omitempty"` + Other []string `protobuf:"bytes,7,rep,name=Other,proto3" json:"Other,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NodeInfo) Reset() { *m = NodeInfo{} } +func (m *NodeInfo) String() string { return proto.CompactTextString(m) } +func (*NodeInfo) ProtoMessage() {} +func (*NodeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{47} +} +func (m *NodeInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NodeInfo.Unmarshal(m, b) +} +func (m *NodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NodeInfo.Marshal(b, m, deterministic) +} +func (dst *NodeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeInfo.Merge(dst, src) +} +func (m *NodeInfo) XXX_Size() int { + return xxx_messageInfo_NodeInfo.Size(m) +} +func (m *NodeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_NodeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_NodeInfo proto.InternalMessageInfo + +func (m *NodeInfo) GetID() *NodeID { + if m != nil { + return m.ID + } + return nil +} + +func (m *NodeInfo) GetListenAddr() string { + if m != nil { + return m.ListenAddr + } + return "" +} + +func (m *NodeInfo) GetNetwork() string { + if m != nil { + return m.Network + } + return "" +} + +func (m *NodeInfo) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *NodeInfo) GetChannels() []byte { + if m != nil { + return m.Channels + } + return nil +} + +func (m *NodeInfo) GetMoniker() string { + if m != nil { + return m.Moniker + } + return "" +} + +func (m *NodeInfo) GetOther() []string { + if m != nil { + return m.Other + } + return nil +} + +type NetworkInfo struct { + Listening bool `protobuf:"varint,1,opt,name=Listening,proto3" json:"Listening,omitempty"` + Listeners []string `protobuf:"bytes,2,rep,name=Listeners,proto3" json:"Listeners,omitempty"` + Peers []*Peer `protobuf:"bytes,3,rep,name=Peers,proto3" json:"Peers,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NetworkInfo) Reset() { *m = NetworkInfo{} } +func (m *NetworkInfo) String() string { return proto.CompactTextString(m) } +func (*NetworkInfo) ProtoMessage() {} +func (*NetworkInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{48} +} +func (m *NetworkInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NetworkInfo.Unmarshal(m, b) +} +func (m *NetworkInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NetworkInfo.Marshal(b, m, deterministic) +} +func (dst *NetworkInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_NetworkInfo.Merge(dst, src) +} +func (m *NetworkInfo) XXX_Size() int { + return xxx_messageInfo_NetworkInfo.Size(m) +} +func (m *NetworkInfo) XXX_DiscardUnknown() { + xxx_messageInfo_NetworkInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_NetworkInfo proto.InternalMessageInfo + +func (m *NetworkInfo) GetListening() bool { + if m != nil { + return m.Listening + } + return false +} + +func (m *NetworkInfo) GetListeners() []string { + if m != nil { + return m.Listeners + } + return nil +} + +func (m *NetworkInfo) GetPeers() []*Peer { + if m != nil { + return m.Peers + } + return nil +} + +type Peer struct { + NodeInfo *NodeInfo `protobuf:"bytes,1,opt,name=NodeInfo,proto3" json:"NodeInfo,omitempty"` + IsOutbound bool `protobuf:"varint,2,opt,name=IsOutbound,proto3" json:"IsOutbound,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Peer) Reset() { *m = Peer{} } +func (m *Peer) String() string { return proto.CompactTextString(m) } +func (*Peer) ProtoMessage() {} +func (*Peer) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{49} +} +func (m *Peer) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Peer.Unmarshal(m, b) +} +func (m *Peer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Peer.Marshal(b, m, deterministic) +} +func (dst *Peer) XXX_Merge(src proto.Message) { + xxx_messageInfo_Peer.Merge(dst, src) +} +func (m *Peer) XXX_Size() int { + return xxx_messageInfo_Peer.Size(m) +} +func (m *Peer) XXX_DiscardUnknown() { + xxx_messageInfo_Peer.DiscardUnknown(m) +} + +var xxx_messageInfo_Peer proto.InternalMessageInfo + +func (m *Peer) GetNodeInfo() *NodeInfo { + if m != nil { + return m.NodeInfo + } + return nil +} + +func (m *Peer) GetIsOutbound() bool { + if m != nil { + return m.IsOutbound + } + return false +} + +type PeerList struct { + Peers []*Peer `protobuf:"bytes,1,rep,name=Peers,proto3" json:"Peers,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PeerList) Reset() { *m = PeerList{} } +func (m *PeerList) String() string { return proto.CompactTextString(m) } +func (*PeerList) ProtoMessage() {} +func (*PeerList) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{50} +} +func (m *PeerList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PeerList.Unmarshal(m, b) +} +func (m *PeerList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PeerList.Marshal(b, m, deterministic) +} +func (dst *PeerList) XXX_Merge(src proto.Message) { + xxx_messageInfo_PeerList.Merge(dst, src) +} +func (m *PeerList) XXX_Size() int { + return xxx_messageInfo_PeerList.Size(m) +} +func (m *PeerList) XXX_DiscardUnknown() { + xxx_messageInfo_PeerList.DiscardUnknown(m) +} + +var xxx_messageInfo_PeerList proto.InternalMessageInfo + +func (m *PeerList) GetPeers() []*Peer { + if m != nil { + return m.Peers + } + return nil +} + +// Params +type CallParam struct { + From []byte `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CallParam) Reset() { *m = CallParam{} } +func (m *CallParam) String() string { return proto.CompactTextString(m) } +func (*CallParam) ProtoMessage() {} +func (*CallParam) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{51} +} +func (m *CallParam) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CallParam.Unmarshal(m, b) +} +func (m *CallParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CallParam.Marshal(b, m, deterministic) +} +func (dst *CallParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_CallParam.Merge(dst, src) +} +func (m *CallParam) XXX_Size() int { + return xxx_messageInfo_CallParam.Size(m) +} +func (m *CallParam) XXX_DiscardUnknown() { + xxx_messageInfo_CallParam.DiscardUnknown(m) +} + +var xxx_messageInfo_CallParam proto.InternalMessageInfo + +func (m *CallParam) GetFrom() []byte { + if m != nil { + return m.From + } + return nil +} + +func (m *CallParam) GetAddress() []byte { + if m != nil { + return m.Address + } + return nil +} + +func (m *CallParam) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +type CallCodeParam struct { + From []byte `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Code []byte `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CallCodeParam) Reset() { *m = CallCodeParam{} } +func (m *CallCodeParam) String() string { return proto.CompactTextString(m) } +func (*CallCodeParam) ProtoMessage() {} +func (*CallCodeParam) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{52} +} +func (m *CallCodeParam) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CallCodeParam.Unmarshal(m, b) +} +func (m *CallCodeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CallCodeParam.Marshal(b, m, deterministic) +} +func (dst *CallCodeParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_CallCodeParam.Merge(dst, src) +} +func (m *CallCodeParam) XXX_Size() int { + return xxx_messageInfo_CallCodeParam.Size(m) +} +func (m *CallCodeParam) XXX_DiscardUnknown() { + xxx_messageInfo_CallCodeParam.DiscardUnknown(m) +} + +var xxx_messageInfo_CallCodeParam proto.InternalMessageInfo + +func (m *CallCodeParam) GetFrom() []byte { + if m != nil { + return m.From + } + return nil +} + +func (m *CallCodeParam) GetCode() []byte { + if m != nil { + return m.Code + } + return nil +} + +func (m *CallCodeParam) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +type TransactParam struct { + InputAccount *InputAccount `protobuf:"bytes,1,opt,name=inputAccount,proto3" json:"inputAccount,omitempty"` + Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + GasLimit uint64 `protobuf:"varint,4,opt,name=gasLimit,proto3" json:"gasLimit,omitempty"` + Fee uint64 `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TransactParam) Reset() { *m = TransactParam{} } +func (m *TransactParam) String() string { return proto.CompactTextString(m) } +func (*TransactParam) ProtoMessage() {} +func (*TransactParam) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{53} +} +func (m *TransactParam) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TransactParam.Unmarshal(m, b) +} +func (m *TransactParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TransactParam.Marshal(b, m, deterministic) +} +func (dst *TransactParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransactParam.Merge(dst, src) +} +func (m *TransactParam) XXX_Size() int { + return xxx_messageInfo_TransactParam.Size(m) +} +func (m *TransactParam) XXX_DiscardUnknown() { + xxx_messageInfo_TransactParam.DiscardUnknown(m) +} + +var xxx_messageInfo_TransactParam proto.InternalMessageInfo + +func (m *TransactParam) GetInputAccount() *InputAccount { + if m != nil { + return m.InputAccount + } + return nil +} + +func (m *TransactParam) GetAddress() []byte { + if m != nil { + return m.Address + } + return nil +} + +func (m *TransactParam) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *TransactParam) GetGasLimit() uint64 { + if m != nil { + return m.GasLimit + } + return 0 +} + +func (m *TransactParam) GetFee() uint64 { + if m != nil { + return m.Fee + } + return 0 +} + +type SendParam struct { + InputAccount *InputAccount `protobuf:"bytes,1,opt,name=inputAccount,proto3" json:"inputAccount,omitempty"` + ToAddress []byte `protobuf:"bytes,2,opt,name=toAddress,proto3" json:"toAddress,omitempty"` + Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SendParam) Reset() { *m = SendParam{} } +func (m *SendParam) String() string { return proto.CompactTextString(m) } +func (*SendParam) ProtoMessage() {} +func (*SendParam) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{54} +} +func (m *SendParam) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SendParam.Unmarshal(m, b) +} +func (m *SendParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SendParam.Marshal(b, m, deterministic) +} +func (dst *SendParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_SendParam.Merge(dst, src) +} +func (m *SendParam) XXX_Size() int { + return xxx_messageInfo_SendParam.Size(m) +} +func (m *SendParam) XXX_DiscardUnknown() { + xxx_messageInfo_SendParam.DiscardUnknown(m) +} + +var xxx_messageInfo_SendParam proto.InternalMessageInfo + +func (m *SendParam) GetInputAccount() *InputAccount { + if m != nil { + return m.InputAccount + } + return nil +} + +func (m *SendParam) GetToAddress() []byte { + if m != nil { + return m.ToAddress + } + return nil +} + +func (m *SendParam) GetAmount() uint64 { + if m != nil { + return m.Amount + } + return 0 +} + +type TxParam struct { + Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TxParam) Reset() { *m = TxParam{} } +func (m *TxParam) String() string { return proto.CompactTextString(m) } +func (*TxParam) ProtoMessage() {} +func (*TxParam) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{55} +} +func (m *TxParam) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TxParam.Unmarshal(m, b) +} +func (m *TxParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TxParam.Marshal(b, m, deterministic) +} +func (dst *TxParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_TxParam.Merge(dst, src) +} +func (m *TxParam) XXX_Size() int { + return xxx_messageInfo_TxParam.Size(m) +} +func (m *TxParam) XXX_DiscardUnknown() { + xxx_messageInfo_TxParam.DiscardUnknown(m) +} + +var xxx_messageInfo_TxParam proto.InternalMessageInfo + +func (m *TxParam) GetTx() []byte { + if m != nil { + return m.Tx + } + return nil +} + +type SignTxParam struct { + Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` + PrivateAccounts []*PrivateAccount `protobuf:"bytes,2,rep,name=privateAccounts,proto3" json:"privateAccounts,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignTxParam) Reset() { *m = SignTxParam{} } +func (m *SignTxParam) String() string { return proto.CompactTextString(m) } +func (*SignTxParam) ProtoMessage() {} +func (*SignTxParam) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{56} +} +func (m *SignTxParam) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignTxParam.Unmarshal(m, b) +} +func (m *SignTxParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignTxParam.Marshal(b, m, deterministic) +} +func (dst *SignTxParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignTxParam.Merge(dst, src) +} +func (m *SignTxParam) XXX_Size() int { + return xxx_messageInfo_SignTxParam.Size(m) +} +func (m *SignTxParam) XXX_DiscardUnknown() { + xxx_messageInfo_SignTxParam.DiscardUnknown(m) +} + +var xxx_messageInfo_SignTxParam proto.InternalMessageInfo + +func (m *SignTxParam) GetTx() []byte { + if m != nil { + return m.Tx + } + return nil +} + +func (m *SignTxParam) GetPrivateAccounts() []*PrivateAccount { + if m != nil { + return m.PrivateAccounts + } + return nil +} + +// Results +type SignedTx struct { + Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignedTx) Reset() { *m = SignedTx{} } +func (m *SignedTx) String() string { return proto.CompactTextString(m) } +func (*SignedTx) ProtoMessage() {} +func (*SignedTx) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{57} +} +func (m *SignedTx) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignedTx.Unmarshal(m, b) +} +func (m *SignedTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignedTx.Marshal(b, m, deterministic) +} +func (dst *SignedTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignedTx.Merge(dst, src) +} +func (m *SignedTx) XXX_Size() int { + return xxx_messageInfo_SignedTx.Size(m) +} +func (m *SignedTx) XXX_DiscardUnknown() { + xxx_messageInfo_SignedTx.DiscardUnknown(m) +} + +var xxx_messageInfo_SignedTx proto.InternalMessageInfo + +func (m *SignedTx) GetTx() []byte { + if m != nil { + return m.Tx + } + return nil +} + +type CallResult struct { + Return []byte `protobuf:"bytes,1,opt,name=Return,proto3" json:"Return,omitempty"` + GasUsed uint64 `protobuf:"varint,2,opt,name=GasUsed,proto3" json:"GasUsed,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CallResult) Reset() { *m = CallResult{} } +func (m *CallResult) String() string { return proto.CompactTextString(m) } +func (*CallResult) ProtoMessage() {} +func (*CallResult) Descriptor() ([]byte, []int) { + return fileDescriptor_burrow_864e11a4a412859d, []int{58} +} +func (m *CallResult) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CallResult.Unmarshal(m, b) +} +func (m *CallResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CallResult.Marshal(b, m, deterministic) +} +func (dst *CallResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_CallResult.Merge(dst, src) +} +func (m *CallResult) XXX_Size() int { + return xxx_messageInfo_CallResult.Size(m) +} +func (m *CallResult) XXX_DiscardUnknown() { + xxx_messageInfo_CallResult.DiscardUnknown(m) +} + +var xxx_messageInfo_CallResult proto.InternalMessageInfo + +func (m *CallResult) GetReturn() []byte { + if m != nil { + return m.Return + } + return nil +} + +func (m *CallResult) GetGasUsed() uint64 { + if m != nil { + return m.GasUsed + } + return 0 +} + +func init() { + proto.RegisterType((*Empty)(nil), "Empty") + proto.RegisterType((*InputAccount)(nil), "InputAccount") + proto.RegisterType((*FilterData)(nil), "FilterData") + proto.RegisterType((*FilterListParam)(nil), "FilterListParam") + proto.RegisterType((*TxReceipt)(nil), "TxReceipt") + proto.RegisterType((*PrivateAccount)(nil), "PrivateAccount") + proto.RegisterType((*EventDataCall)(nil), "EventDataCall") + proto.RegisterType((*CallData)(nil), "CallData") + proto.RegisterType((*AddressParam)(nil), "AddressParam") + proto.RegisterType((*PrivateKeyParam)(nil), "PrivateKeyParam") + proto.RegisterType((*StorageAtParam)(nil), "StorageAtParam") + proto.RegisterType((*BasePermissions)(nil), "BasePermissions") + proto.RegisterType((*AccountPermissions)(nil), "AccountPermissions") + proto.RegisterType((*Account)(nil), "Account") + proto.RegisterType((*AccountList)(nil), "AccountList") + proto.RegisterType((*Validator)(nil), "Validator") + proto.RegisterType((*ValidatorList)(nil), "ValidatorList") + proto.RegisterType((*StorageItem)(nil), "StorageItem") + proto.RegisterType((*StorageDump)(nil), "StorageDump") + proto.RegisterType((*HeightParam)(nil), "HeightParam") + proto.RegisterType((*BlocksParam)(nil), "BlocksParam") + proto.RegisterType((*Header)(nil), "Header") + proto.RegisterType((*Data)(nil), "Data") + proto.RegisterType((*Block)(nil), "Block") + proto.RegisterType((*BlockMeta)(nil), "BlockMeta") + proto.RegisterType((*BlockList)(nil), "BlockList") + proto.RegisterType((*ChainId)(nil), "ChainId") + proto.RegisterType((*GenesisDoc)(nil), "GenesisDoc") + proto.RegisterType((*GenesisDoc_GenesisAccount)(nil), "GenesisDoc.GenesisAccount") + proto.RegisterType((*GenesisDoc_GenesisValidator)(nil), "GenesisDoc.GenesisValidator") + proto.RegisterType((*UnconfirmedTxList)(nil), "UnconfirmedTxList") + proto.RegisterType((*Status)(nil), "Status") + proto.RegisterType((*RoundState)(nil), "RoundState") + proto.RegisterType((*PeerRoundState)(nil), "PeerRoundState") + proto.RegisterType((*ConsensusState)(nil), "ConsensusState") + proto.RegisterType((*EventIdParam)(nil), "EventIdParam") + proto.RegisterType((*SubIdParam)(nil), "SubIdParam") + proto.RegisterType((*EventUnSub)(nil), "EventUnSub") + proto.RegisterType((*EventDataLog)(nil), "EventDataLog") + proto.RegisterType((*EventDataTx)(nil), "EventDataTx") + proto.RegisterType((*Event)(nil), "Event") + proto.RegisterType((*PollResponse)(nil), "PollResponse") + proto.RegisterType((*NameRegEntryParam)(nil), "NameRegEntryParam") + proto.RegisterType((*TransactNameRegParam)(nil), "TransactNameRegParam") + proto.RegisterType((*NameRegEntry)(nil), "NameRegEntry") + proto.RegisterType((*NameRegEntryList)(nil), "NameRegEntryList") + proto.RegisterType((*PeerParam)(nil), "PeerParam") + proto.RegisterType((*ClientVersion)(nil), "ClientVersion") + proto.RegisterType((*NodeID)(nil), "NodeID") + proto.RegisterType((*NodeInfo)(nil), "NodeInfo") + proto.RegisterType((*NetworkInfo)(nil), "NetworkInfo") + proto.RegisterType((*Peer)(nil), "Peer") + proto.RegisterType((*PeerList)(nil), "PeerList") + proto.RegisterType((*CallParam)(nil), "CallParam") + proto.RegisterType((*CallCodeParam)(nil), "CallCodeParam") + proto.RegisterType((*TransactParam)(nil), "TransactParam") + proto.RegisterType((*SendParam)(nil), "SendParam") + proto.RegisterType((*TxParam)(nil), "TxParam") + proto.RegisterType((*SignTxParam)(nil), "SignTxParam") + proto.RegisterType((*SignedTx)(nil), "SignedTx") + proto.RegisterType((*CallResult)(nil), "CallResult") +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// AccountsClient is the client API for Accounts service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type AccountsClient interface { + GenPrivAccount(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PrivateAccount, error) + GenPrivAccountFromKey(ctx context.Context, in *PrivateKeyParam, opts ...grpc.CallOption) (*PrivateAccount, error) + GetAccount(ctx context.Context, in *AddressParam, opts ...grpc.CallOption) (*Account, error) + GetAccounts(ctx context.Context, in *FilterListParam, opts ...grpc.CallOption) (*AccountList, error) + GetValidators(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ValidatorList, error) + GetStorage(ctx context.Context, in *AddressParam, opts ...grpc.CallOption) (*StorageDump, error) + GetStorageAt(ctx context.Context, in *StorageAtParam, opts ...grpc.CallOption) (*StorageItem, error) +} + +type accountsClient struct { + cc *grpc.ClientConn +} + +func NewAccountsClient(cc *grpc.ClientConn) AccountsClient { + return &accountsClient{cc} +} + +func (c *accountsClient) GenPrivAccount(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PrivateAccount, error) { + out := new(PrivateAccount) + err := c.cc.Invoke(ctx, "/Accounts/GenPrivAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) GenPrivAccountFromKey(ctx context.Context, in *PrivateKeyParam, opts ...grpc.CallOption) (*PrivateAccount, error) { + out := new(PrivateAccount) + err := c.cc.Invoke(ctx, "/Accounts/GenPrivAccountFromKey", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) GetAccount(ctx context.Context, in *AddressParam, opts ...grpc.CallOption) (*Account, error) { + out := new(Account) + err := c.cc.Invoke(ctx, "/Accounts/GetAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) GetAccounts(ctx context.Context, in *FilterListParam, opts ...grpc.CallOption) (*AccountList, error) { + out := new(AccountList) + err := c.cc.Invoke(ctx, "/Accounts/GetAccounts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) GetValidators(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ValidatorList, error) { + out := new(ValidatorList) + err := c.cc.Invoke(ctx, "/Accounts/GetValidators", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) GetStorage(ctx context.Context, in *AddressParam, opts ...grpc.CallOption) (*StorageDump, error) { + out := new(StorageDump) + err := c.cc.Invoke(ctx, "/Accounts/GetStorage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsClient) GetStorageAt(ctx context.Context, in *StorageAtParam, opts ...grpc.CallOption) (*StorageItem, error) { + out := new(StorageItem) + err := c.cc.Invoke(ctx, "/Accounts/GetStorageAt", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AccountsServer is the server API for Accounts service. +type AccountsServer interface { + GenPrivAccount(context.Context, *Empty) (*PrivateAccount, error) + GenPrivAccountFromKey(context.Context, *PrivateKeyParam) (*PrivateAccount, error) + GetAccount(context.Context, *AddressParam) (*Account, error) + GetAccounts(context.Context, *FilterListParam) (*AccountList, error) + GetValidators(context.Context, *Empty) (*ValidatorList, error) + GetStorage(context.Context, *AddressParam) (*StorageDump, error) + GetStorageAt(context.Context, *StorageAtParam) (*StorageItem, error) +} + +func RegisterAccountsServer(s *grpc.Server, srv AccountsServer) { + s.RegisterService(&_Accounts_serviceDesc, srv) +} + +func _Accounts_GenPrivAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).GenPrivAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Accounts/GenPrivAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).GenPrivAccount(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_GenPrivAccountFromKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PrivateKeyParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).GenPrivAccountFromKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Accounts/GenPrivAccountFromKey", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).GenPrivAccountFromKey(ctx, req.(*PrivateKeyParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddressParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).GetAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Accounts/GetAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).GetAccount(ctx, req.(*AddressParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_GetAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FilterListParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).GetAccounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Accounts/GetAccounts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).GetAccounts(ctx, req.(*FilterListParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_GetValidators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).GetValidators(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Accounts/GetValidators", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).GetValidators(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_GetStorage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddressParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).GetStorage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Accounts/GetStorage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).GetStorage(ctx, req.(*AddressParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Accounts_GetStorageAt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StorageAtParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountsServer).GetStorageAt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Accounts/GetStorageAt", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountsServer).GetStorageAt(ctx, req.(*StorageAtParam)) + } + return interceptor(ctx, in, info, handler) +} + +var _Accounts_serviceDesc = grpc.ServiceDesc{ + ServiceName: "Accounts", + HandlerType: (*AccountsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GenPrivAccount", + Handler: _Accounts_GenPrivAccount_Handler, + }, + { + MethodName: "GenPrivAccountFromKey", + Handler: _Accounts_GenPrivAccountFromKey_Handler, + }, + { + MethodName: "GetAccount", + Handler: _Accounts_GetAccount_Handler, + }, + { + MethodName: "GetAccounts", + Handler: _Accounts_GetAccounts_Handler, + }, + { + MethodName: "GetValidators", + Handler: _Accounts_GetValidators_Handler, + }, + { + MethodName: "GetStorage", + Handler: _Accounts_GetStorage_Handler, + }, + { + MethodName: "GetStorageAt", + Handler: _Accounts_GetStorageAt_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "burrow.proto", +} + +// BlockchainClient is the client API for Blockchain service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type BlockchainClient interface { + GetBlock(ctx context.Context, in *HeightParam, opts ...grpc.CallOption) (*Block, error) + GetBlocks(ctx context.Context, in *BlocksParam, opts ...grpc.CallOption) (*BlockList, error) + GetBlockchainInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Status, error) + GetChainId(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ChainId, error) + GetGenesis(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GenesisDoc, error) + GetLatestBlock(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Block, error) + GetUnconfirmedTxs(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*UnconfirmedTxList, error) + GetConsensusState(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ConsensusState, error) +} + +type blockchainClient struct { + cc *grpc.ClientConn +} + +func NewBlockchainClient(cc *grpc.ClientConn) BlockchainClient { + return &blockchainClient{cc} +} + +func (c *blockchainClient) GetBlock(ctx context.Context, in *HeightParam, opts ...grpc.CallOption) (*Block, error) { + out := new(Block) + err := c.cc.Invoke(ctx, "/Blockchain/GetBlock", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blockchainClient) GetBlocks(ctx context.Context, in *BlocksParam, opts ...grpc.CallOption) (*BlockList, error) { + out := new(BlockList) + err := c.cc.Invoke(ctx, "/Blockchain/GetBlocks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blockchainClient) GetBlockchainInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Status, error) { + out := new(Status) + err := c.cc.Invoke(ctx, "/Blockchain/GetBlockchainInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blockchainClient) GetChainId(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ChainId, error) { + out := new(ChainId) + err := c.cc.Invoke(ctx, "/Blockchain/GetChainId", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blockchainClient) GetGenesis(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GenesisDoc, error) { + out := new(GenesisDoc) + err := c.cc.Invoke(ctx, "/Blockchain/GetGenesis", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blockchainClient) GetLatestBlock(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Block, error) { + out := new(Block) + err := c.cc.Invoke(ctx, "/Blockchain/GetLatestBlock", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blockchainClient) GetUnconfirmedTxs(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*UnconfirmedTxList, error) { + out := new(UnconfirmedTxList) + err := c.cc.Invoke(ctx, "/Blockchain/GetUnconfirmedTxs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blockchainClient) GetConsensusState(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ConsensusState, error) { + out := new(ConsensusState) + err := c.cc.Invoke(ctx, "/Blockchain/GetConsensusState", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BlockchainServer is the server API for Blockchain service. +type BlockchainServer interface { + GetBlock(context.Context, *HeightParam) (*Block, error) + GetBlocks(context.Context, *BlocksParam) (*BlockList, error) + GetBlockchainInfo(context.Context, *Empty) (*Status, error) + GetChainId(context.Context, *Empty) (*ChainId, error) + GetGenesis(context.Context, *Empty) (*GenesisDoc, error) + GetLatestBlock(context.Context, *Empty) (*Block, error) + GetUnconfirmedTxs(context.Context, *Empty) (*UnconfirmedTxList, error) + GetConsensusState(context.Context, *Empty) (*ConsensusState, error) +} + +func RegisterBlockchainServer(s *grpc.Server, srv BlockchainServer) { + s.RegisterService(&_Blockchain_serviceDesc, srv) +} + +func _Blockchain_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HeightParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServer).GetBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Blockchain/GetBlock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServer).GetBlock(ctx, req.(*HeightParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Blockchain_GetBlocks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BlocksParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServer).GetBlocks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Blockchain/GetBlocks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServer).GetBlocks(ctx, req.(*BlocksParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Blockchain_GetBlockchainInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServer).GetBlockchainInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Blockchain/GetBlockchainInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServer).GetBlockchainInfo(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Blockchain_GetChainId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServer).GetChainId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Blockchain/GetChainId", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServer).GetChainId(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Blockchain_GetGenesis_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServer).GetGenesis(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Blockchain/GetGenesis", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServer).GetGenesis(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Blockchain_GetLatestBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServer).GetLatestBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Blockchain/GetLatestBlock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServer).GetLatestBlock(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Blockchain_GetUnconfirmedTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServer).GetUnconfirmedTxs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Blockchain/GetUnconfirmedTxs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServer).GetUnconfirmedTxs(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Blockchain_GetConsensusState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServer).GetConsensusState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Blockchain/GetConsensusState", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServer).GetConsensusState(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +var _Blockchain_serviceDesc = grpc.ServiceDesc{ + ServiceName: "Blockchain", + HandlerType: (*BlockchainServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetBlock", + Handler: _Blockchain_GetBlock_Handler, + }, + { + MethodName: "GetBlocks", + Handler: _Blockchain_GetBlocks_Handler, + }, + { + MethodName: "GetBlockchainInfo", + Handler: _Blockchain_GetBlockchainInfo_Handler, + }, + { + MethodName: "GetChainId", + Handler: _Blockchain_GetChainId_Handler, + }, + { + MethodName: "GetGenesis", + Handler: _Blockchain_GetGenesis_Handler, + }, + { + MethodName: "GetLatestBlock", + Handler: _Blockchain_GetLatestBlock_Handler, + }, + { + MethodName: "GetUnconfirmedTxs", + Handler: _Blockchain_GetUnconfirmedTxs_Handler, + }, + { + MethodName: "GetConsensusState", + Handler: _Blockchain_GetConsensusState_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "burrow.proto", +} + +// EventsClient is the client API for Events service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type EventsClient interface { + EventPoll(ctx context.Context, in *SubIdParam, opts ...grpc.CallOption) (*PollResponse, error) + EventSubscribe(ctx context.Context, in *EventIdParam, opts ...grpc.CallOption) (*SubIdParam, error) + EventUnsubscribe(ctx context.Context, in *SubIdParam, opts ...grpc.CallOption) (*EventUnSub, error) +} + +type eventsClient struct { + cc *grpc.ClientConn +} + +func NewEventsClient(cc *grpc.ClientConn) EventsClient { + return &eventsClient{cc} +} + +func (c *eventsClient) EventPoll(ctx context.Context, in *SubIdParam, opts ...grpc.CallOption) (*PollResponse, error) { + out := new(PollResponse) + err := c.cc.Invoke(ctx, "/Events/EventPoll", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *eventsClient) EventSubscribe(ctx context.Context, in *EventIdParam, opts ...grpc.CallOption) (*SubIdParam, error) { + out := new(SubIdParam) + err := c.cc.Invoke(ctx, "/Events/EventSubscribe", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *eventsClient) EventUnsubscribe(ctx context.Context, in *SubIdParam, opts ...grpc.CallOption) (*EventUnSub, error) { + out := new(EventUnSub) + err := c.cc.Invoke(ctx, "/Events/EventUnsubscribe", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// EventsServer is the server API for Events service. +type EventsServer interface { + EventPoll(context.Context, *SubIdParam) (*PollResponse, error) + EventSubscribe(context.Context, *EventIdParam) (*SubIdParam, error) + EventUnsubscribe(context.Context, *SubIdParam) (*EventUnSub, error) +} + +func RegisterEventsServer(s *grpc.Server, srv EventsServer) { + s.RegisterService(&_Events_serviceDesc, srv) +} + +func _Events_EventPoll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SubIdParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EventsServer).EventPoll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Events/EventPoll", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EventsServer).EventPoll(ctx, req.(*SubIdParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Events_EventSubscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EventIdParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EventsServer).EventSubscribe(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Events/EventSubscribe", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EventsServer).EventSubscribe(ctx, req.(*EventIdParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Events_EventUnsubscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SubIdParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EventsServer).EventUnsubscribe(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Events/EventUnsubscribe", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EventsServer).EventUnsubscribe(ctx, req.(*SubIdParam)) + } + return interceptor(ctx, in, info, handler) +} + +var _Events_serviceDesc = grpc.ServiceDesc{ + ServiceName: "Events", + HandlerType: (*EventsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "EventPoll", + Handler: _Events_EventPoll_Handler, + }, + { + MethodName: "EventSubscribe", + Handler: _Events_EventSubscribe_Handler, + }, + { + MethodName: "EventUnsubscribe", + Handler: _Events_EventUnsubscribe_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "burrow.proto", +} + +// NameRegClient is the client API for NameReg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type NameRegClient interface { + GetEntry(ctx context.Context, in *NameRegEntryParam, opts ...grpc.CallOption) (*NameRegEntry, error) + GetEntries(ctx context.Context, in *FilterListParam, opts ...grpc.CallOption) (*NameRegEntryList, error) + TransactNameReg(ctx context.Context, in *TransactNameRegParam, opts ...grpc.CallOption) (*TxReceipt, error) + TransactNameRegAndHold(ctx context.Context, in *TransactNameRegParam, opts ...grpc.CallOption) (*NameRegEntry, error) +} + +type nameRegClient struct { + cc *grpc.ClientConn +} + +func NewNameRegClient(cc *grpc.ClientConn) NameRegClient { + return &nameRegClient{cc} +} + +func (c *nameRegClient) GetEntry(ctx context.Context, in *NameRegEntryParam, opts ...grpc.CallOption) (*NameRegEntry, error) { + out := new(NameRegEntry) + err := c.cc.Invoke(ctx, "/NameReg/GetEntry", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nameRegClient) GetEntries(ctx context.Context, in *FilterListParam, opts ...grpc.CallOption) (*NameRegEntryList, error) { + out := new(NameRegEntryList) + err := c.cc.Invoke(ctx, "/NameReg/GetEntries", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nameRegClient) TransactNameReg(ctx context.Context, in *TransactNameRegParam, opts ...grpc.CallOption) (*TxReceipt, error) { + out := new(TxReceipt) + err := c.cc.Invoke(ctx, "/NameReg/TransactNameReg", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nameRegClient) TransactNameRegAndHold(ctx context.Context, in *TransactNameRegParam, opts ...grpc.CallOption) (*NameRegEntry, error) { + out := new(NameRegEntry) + err := c.cc.Invoke(ctx, "/NameReg/TransactNameRegAndHold", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NameRegServer is the server API for NameReg service. +type NameRegServer interface { + GetEntry(context.Context, *NameRegEntryParam) (*NameRegEntry, error) + GetEntries(context.Context, *FilterListParam) (*NameRegEntryList, error) + TransactNameReg(context.Context, *TransactNameRegParam) (*TxReceipt, error) + TransactNameRegAndHold(context.Context, *TransactNameRegParam) (*NameRegEntry, error) +} + +func RegisterNameRegServer(s *grpc.Server, srv NameRegServer) { + s.RegisterService(&_NameReg_serviceDesc, srv) +} + +func _NameReg_GetEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NameRegEntryParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NameRegServer).GetEntry(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/NameReg/GetEntry", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NameRegServer).GetEntry(ctx, req.(*NameRegEntryParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _NameReg_GetEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FilterListParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NameRegServer).GetEntries(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/NameReg/GetEntries", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NameRegServer).GetEntries(ctx, req.(*FilterListParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _NameReg_TransactNameReg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TransactNameRegParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NameRegServer).TransactNameReg(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/NameReg/TransactNameReg", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NameRegServer).TransactNameReg(ctx, req.(*TransactNameRegParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _NameReg_TransactNameRegAndHold_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TransactNameRegParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NameRegServer).TransactNameRegAndHold(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/NameReg/TransactNameRegAndHold", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NameRegServer).TransactNameRegAndHold(ctx, req.(*TransactNameRegParam)) + } + return interceptor(ctx, in, info, handler) +} + +var _NameReg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "NameReg", + HandlerType: (*NameRegServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetEntry", + Handler: _NameReg_GetEntry_Handler, + }, + { + MethodName: "GetEntries", + Handler: _NameReg_GetEntries_Handler, + }, + { + MethodName: "TransactNameReg", + Handler: _NameReg_TransactNameReg_Handler, + }, + { + MethodName: "TransactNameRegAndHold", + Handler: _NameReg_TransactNameRegAndHold_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "burrow.proto", +} + +// NetworkClient is the client API for Network service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type NetworkClient interface { + GetClientVersion(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ClientVersion, error) + GetNetworkInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*NetworkInfo, error) + GetNodeInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*NodeInfo, error) + GetPeer(ctx context.Context, in *PeerParam, opts ...grpc.CallOption) (*Peer, error) + GetPeers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PeerList, error) +} + +type networkClient struct { + cc *grpc.ClientConn +} + +func NewNetworkClient(cc *grpc.ClientConn) NetworkClient { + return &networkClient{cc} +} + +func (c *networkClient) GetClientVersion(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ClientVersion, error) { + out := new(ClientVersion) + err := c.cc.Invoke(ctx, "/Network/GetClientVersion", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *networkClient) GetNetworkInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*NetworkInfo, error) { + out := new(NetworkInfo) + err := c.cc.Invoke(ctx, "/Network/GetNetworkInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *networkClient) GetNodeInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*NodeInfo, error) { + out := new(NodeInfo) + err := c.cc.Invoke(ctx, "/Network/GetNodeInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *networkClient) GetPeer(ctx context.Context, in *PeerParam, opts ...grpc.CallOption) (*Peer, error) { + out := new(Peer) + err := c.cc.Invoke(ctx, "/Network/GetPeer", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *networkClient) GetPeers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PeerList, error) { + out := new(PeerList) + err := c.cc.Invoke(ctx, "/Network/GetPeers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NetworkServer is the server API for Network service. +type NetworkServer interface { + GetClientVersion(context.Context, *Empty) (*ClientVersion, error) + GetNetworkInfo(context.Context, *Empty) (*NetworkInfo, error) + GetNodeInfo(context.Context, *Empty) (*NodeInfo, error) + GetPeer(context.Context, *PeerParam) (*Peer, error) + GetPeers(context.Context, *Empty) (*PeerList, error) +} + +func RegisterNetworkServer(s *grpc.Server, srv NetworkServer) { + s.RegisterService(&_Network_serviceDesc, srv) +} + +func _Network_GetClientVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NetworkServer).GetClientVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Network/GetClientVersion", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NetworkServer).GetClientVersion(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Network_GetNetworkInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NetworkServer).GetNetworkInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Network/GetNetworkInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NetworkServer).GetNetworkInfo(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Network_GetNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NetworkServer).GetNodeInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Network/GetNodeInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NetworkServer).GetNodeInfo(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Network_GetPeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PeerParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NetworkServer).GetPeer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Network/GetPeer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NetworkServer).GetPeer(ctx, req.(*PeerParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Network_GetPeers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NetworkServer).GetPeers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Network/GetPeers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NetworkServer).GetPeers(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +var _Network_serviceDesc = grpc.ServiceDesc{ + ServiceName: "Network", + HandlerType: (*NetworkServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetClientVersion", + Handler: _Network_GetClientVersion_Handler, + }, + { + MethodName: "GetNetworkInfo", + Handler: _Network_GetNetworkInfo_Handler, + }, + { + MethodName: "GetNodeInfo", + Handler: _Network_GetNodeInfo_Handler, + }, + { + MethodName: "GetPeer", + Handler: _Network_GetPeer_Handler, + }, + { + MethodName: "GetPeers", + Handler: _Network_GetPeers_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "burrow.proto", +} + +// TransactionClient is the client API for Transaction service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type TransactionClient interface { + BroadcastTx(ctx context.Context, in *TxParam, opts ...grpc.CallOption) (*TxReceipt, error) + Call(ctx context.Context, in *CallParam, opts ...grpc.CallOption) (*CallResult, error) + CallCode(ctx context.Context, in *CallCodeParam, opts ...grpc.CallOption) (*CallResult, error) + Transact(ctx context.Context, in *TransactParam, opts ...grpc.CallOption) (*TxReceipt, error) + TransactAndHold(ctx context.Context, in *TransactParam, opts ...grpc.CallOption) (*EventDataCall, error) + Send(ctx context.Context, in *SendParam, opts ...grpc.CallOption) (*TxReceipt, error) + SendAndHold(ctx context.Context, in *SendParam, opts ...grpc.CallOption) (*TxReceipt, error) + SignTx(ctx context.Context, in *SignTxParam, opts ...grpc.CallOption) (*SignedTx, error) +} + +type transactionClient struct { + cc *grpc.ClientConn +} + +func NewTransactionClient(cc *grpc.ClientConn) TransactionClient { + return &transactionClient{cc} +} + +func (c *transactionClient) BroadcastTx(ctx context.Context, in *TxParam, opts ...grpc.CallOption) (*TxReceipt, error) { + out := new(TxReceipt) + err := c.cc.Invoke(ctx, "/Transaction/BroadcastTx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactionClient) Call(ctx context.Context, in *CallParam, opts ...grpc.CallOption) (*CallResult, error) { + out := new(CallResult) + err := c.cc.Invoke(ctx, "/Transaction/Call", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactionClient) CallCode(ctx context.Context, in *CallCodeParam, opts ...grpc.CallOption) (*CallResult, error) { + out := new(CallResult) + err := c.cc.Invoke(ctx, "/Transaction/CallCode", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactionClient) Transact(ctx context.Context, in *TransactParam, opts ...grpc.CallOption) (*TxReceipt, error) { + out := new(TxReceipt) + err := c.cc.Invoke(ctx, "/Transaction/Transact", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactionClient) TransactAndHold(ctx context.Context, in *TransactParam, opts ...grpc.CallOption) (*EventDataCall, error) { + out := new(EventDataCall) + err := c.cc.Invoke(ctx, "/Transaction/TransactAndHold", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactionClient) Send(ctx context.Context, in *SendParam, opts ...grpc.CallOption) (*TxReceipt, error) { + out := new(TxReceipt) + err := c.cc.Invoke(ctx, "/Transaction/Send", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactionClient) SendAndHold(ctx context.Context, in *SendParam, opts ...grpc.CallOption) (*TxReceipt, error) { + out := new(TxReceipt) + err := c.cc.Invoke(ctx, "/Transaction/SendAndHold", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactionClient) SignTx(ctx context.Context, in *SignTxParam, opts ...grpc.CallOption) (*SignedTx, error) { + out := new(SignedTx) + err := c.cc.Invoke(ctx, "/Transaction/SignTx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TransactionServer is the server API for Transaction service. +type TransactionServer interface { + BroadcastTx(context.Context, *TxParam) (*TxReceipt, error) + Call(context.Context, *CallParam) (*CallResult, error) + CallCode(context.Context, *CallCodeParam) (*CallResult, error) + Transact(context.Context, *TransactParam) (*TxReceipt, error) + TransactAndHold(context.Context, *TransactParam) (*EventDataCall, error) + Send(context.Context, *SendParam) (*TxReceipt, error) + SendAndHold(context.Context, *SendParam) (*TxReceipt, error) + SignTx(context.Context, *SignTxParam) (*SignedTx, error) +} + +func RegisterTransactionServer(s *grpc.Server, srv TransactionServer) { + s.RegisterService(&_Transaction_serviceDesc, srv) +} + +func _Transaction_BroadcastTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TxParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServer).BroadcastTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Transaction/BroadcastTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServer).BroadcastTx(ctx, req.(*TxParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transaction_Call_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CallParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServer).Call(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Transaction/Call", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServer).Call(ctx, req.(*CallParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transaction_CallCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CallCodeParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServer).CallCode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Transaction/CallCode", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServer).CallCode(ctx, req.(*CallCodeParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transaction_Transact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TransactParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServer).Transact(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Transaction/Transact", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServer).Transact(ctx, req.(*TransactParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transaction_TransactAndHold_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TransactParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServer).TransactAndHold(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Transaction/TransactAndHold", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServer).TransactAndHold(ctx, req.(*TransactParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transaction_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServer).Send(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Transaction/Send", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServer).Send(ctx, req.(*SendParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transaction_SendAndHold_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServer).SendAndHold(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Transaction/SendAndHold", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServer).SendAndHold(ctx, req.(*SendParam)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transaction_SignTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SignTxParam) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServer).SignTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Transaction/SignTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServer).SignTx(ctx, req.(*SignTxParam)) + } + return interceptor(ctx, in, info, handler) +} + +var _Transaction_serviceDesc = grpc.ServiceDesc{ + ServiceName: "Transaction", + HandlerType: (*TransactionServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "BroadcastTx", + Handler: _Transaction_BroadcastTx_Handler, + }, + { + MethodName: "Call", + Handler: _Transaction_Call_Handler, + }, + { + MethodName: "CallCode", + Handler: _Transaction_CallCode_Handler, + }, + { + MethodName: "Transact", + Handler: _Transaction_Transact_Handler, + }, + { + MethodName: "TransactAndHold", + Handler: _Transaction_TransactAndHold_Handler, + }, + { + MethodName: "Send", + Handler: _Transaction_Send_Handler, + }, + { + MethodName: "SendAndHold", + Handler: _Transaction_SendAndHold_Handler, + }, + { + MethodName: "SignTx", + Handler: _Transaction_SignTx_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "burrow.proto", +} + +func init() { proto.RegisterFile("burrow.proto", fileDescriptor_burrow_864e11a4a412859d) } + +var fileDescriptor_burrow_864e11a4a412859d = []byte{ + // 2599 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x19, 0x5d, 0x6f, 0x1b, 0xc7, + 0x11, 0xfc, 0x26, 0x87, 0x14, 0x25, 0x6f, 0x1c, 0x97, 0x61, 0x5d, 0xc5, 0xd9, 0x58, 0xb1, 0x93, + 0x3a, 0xdb, 0x5a, 0x4d, 0x82, 0x36, 0x48, 0x53, 0xc8, 0x92, 0x23, 0x0b, 0x71, 0x1c, 0x61, 0x49, + 0xa7, 0xcd, 0x43, 0x1f, 0x4e, 0xe4, 0x4a, 0x3a, 0x98, 0xbc, 0x63, 0xef, 0x96, 0x36, 0xf3, 0x1f, + 0xda, 0x3e, 0xb4, 0x8f, 0x05, 0xfa, 0xda, 0x87, 0xbe, 0xf7, 0x29, 0x40, 0x51, 0xf4, 0xa1, 0x40, + 0xff, 0x45, 0x81, 0xfe, 0x90, 0x62, 0x66, 0x77, 0xef, 0xf6, 0x8e, 0x52, 0xec, 0x3a, 0x40, 0x9e, + 0x78, 0x33, 0x3b, 0x3b, 0x3b, 0x33, 0x3b, 0x9f, 0x4b, 0xe8, 0x9d, 0x2c, 0x93, 0x24, 0x7e, 0x26, + 0x16, 0x49, 0xac, 0x63, 0xde, 0x82, 0xc6, 0xfd, 0xf9, 0x42, 0x7f, 0xc5, 0x1f, 0x40, 0xef, 0x28, + 0x5a, 0x2c, 0xf5, 0xde, 0x64, 0x12, 0x2f, 0x23, 0xcd, 0xb6, 0x01, 0x16, 0x49, 0xf8, 0x34, 0xd0, + 0xea, 0x53, 0xf5, 0xd5, 0xa0, 0x72, 0xa3, 0x72, 0xbb, 0x27, 0x3d, 0x0c, 0x1b, 0x40, 0x2b, 0x98, + 0x4e, 0x13, 0x95, 0xa6, 0x83, 0x2a, 0x2d, 0x3a, 0x90, 0x3f, 0x00, 0xf8, 0x24, 0x9c, 0x69, 0x95, + 0x1c, 0x04, 0x3a, 0x60, 0x57, 0xa1, 0x71, 0x1a, 0xaa, 0xd9, 0x94, 0x58, 0x74, 0xa4, 0x01, 0x58, + 0x1f, 0xaa, 0xf1, 0x82, 0x36, 0x76, 0x64, 0x35, 0x5e, 0x20, 0xd5, 0xd3, 0x60, 0xb6, 0x54, 0x83, + 0x9a, 0xa1, 0x22, 0x80, 0xff, 0x14, 0x36, 0x0d, 0xa7, 0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 0x2d, 0xa3, + 0xa9, 0xad, 0x21, 0x06, 0xa0, 0x60, 0xd4, 0x6a, 0xe1, 0x4a, 0x08, 0x7e, 0xa3, 0x49, 0x46, 0x3a, + 0x48, 0x34, 0x89, 0x65, 0x82, 0x30, 0x47, 0x60, 0xfa, 0x32, 0xc5, 0x80, 0x96, 0x8d, 0x86, 0x1e, + 0x06, 0xc5, 0xe9, 0x1f, 0x2b, 0x95, 0x7c, 0x87, 0x22, 0x0d, 0xa1, 0x7d, 0x9c, 0xc4, 0x8b, 0x38, + 0x0d, 0x66, 0x24, 0x50, 0x5b, 0x66, 0x30, 0x5f, 0x41, 0x7f, 0x3f, 0x8e, 0x52, 0x15, 0xa5, 0xcb, + 0xd4, 0x48, 0xf3, 0x43, 0xdf, 0x5c, 0xd6, 0x79, 0xba, 0x22, 0x47, 0x49, 0xdf, 0x9a, 0x3f, 0x83, + 0xcd, 0xa2, 0x32, 0x2e, 0x23, 0x6f, 0x8a, 0x22, 0x5e, 0x96, 0xe9, 0x70, 0xae, 0xa0, 0x69, 0xec, + 0x68, 0x9a, 0x35, 0xfe, 0xca, 0xc0, 0xae, 0xbe, 0x5b, 0x90, 0x73, 0x80, 0xd1, 0xf2, 0xc4, 0xd1, + 0x5d, 0x85, 0x46, 0x8a, 0x90, 0x9b, 0x8f, 0x09, 0xe0, 0x37, 0x01, 0x88, 0xdb, 0xe3, 0x68, 0xb4, + 0x3c, 0x41, 0x8b, 0x26, 0x2a, 0x5d, 0xce, 0x8c, 0x45, 0xdb, 0xd2, 0x42, 0x7c, 0x66, 0xcf, 0xc4, + 0xea, 0xf5, 0x30, 0x3e, 0xfb, 0x86, 0x80, 0x77, 0x13, 0x53, 0xd5, 0x9b, 0x98, 0xf2, 0x7b, 0xb2, + 0x61, 0x6e, 0xef, 0x09, 0xe7, 0xc0, 0x78, 0x11, 0x4e, 0x30, 0x25, 0xe3, 0x28, 0x60, 0x21, 0x3e, + 0x82, 0x6e, 0x76, 0xda, 0x78, 0x85,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x9f, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xa7, + 0x9f, 0xf8, 0x97, 0xc7, 0x1d, 0x00, 0x00, +} diff --git a/rpc/protos/burrow.proto b/rpc/burrow/burrow.proto similarity index 98% rename from rpc/protos/burrow.proto rename to rpc/burrow/burrow.proto index 6bcb01cc955a37d5e053d1748c628864e2318266..969fac4e70394b796535fa6a54ae78d7ee41be9c 100644 --- a/rpc/protos/burrow.proto +++ b/rpc/burrow/burrow.proto @@ -61,7 +61,7 @@ message CallData { // #BEGIN(account) // Account Service definition -service AccountService { +service Accounts { rpc GenPrivAccount(Empty) returns (PrivateAccount); rpc GenPrivAccountFromKey(PrivateKeyParam) returns (PrivateAccount); rpc GetAccount(AddressParam) returns (Account); @@ -140,7 +140,7 @@ message StorageDump { // #BEGIN(blockchain) // Blockchain Service Definition -service BlockchainService { +service Blockchain { rpc GetBlock(HeightParam) returns (Block); rpc GetBlocks(BlocksParam) returns (BlockList); rpc GetBlockchainInfo(Empty) returns (Status); @@ -298,7 +298,7 @@ message ConsensusState { // #BEGIN(event) // Event Service Definition -service EventService { +service Events { rpc EventPoll(SubIdParam) returns (PollResponse); rpc EventSubscribe(EventIdParam) returns (SubIdParam); rpc EventUnsubscribe(SubIdParam) returns (EventUnSub); @@ -347,7 +347,7 @@ message PollResponse { // #BEGIN(namereg) // Name Registry Service Definition -service NameRegService { +service NameReg { rpc GetEntry(NameRegEntryParam) returns (NameRegEntry); rpc GetEntries(FilterListParam) returns (NameRegEntryList); rpc TransactNameReg(TransactNameRegParam) returns (TxReceipt); @@ -387,7 +387,7 @@ message NameRegEntryList { // #BEGIN(network) // Network Service Definition -service NetworkService { +service Network { rpc GetClientVersion(Empty) returns (ClientVersion); // NI - go rpc GetNetworkInfo(Empty) returns (NetworkInfo); rpc GetNodeInfo(Empty) returns (NodeInfo); // NI - go @@ -440,7 +440,7 @@ message PeerList { // #BEGIN(transaction) // Transaction Service Definition -service TransactionService { +service Transaction { rpc BroadcastTx(TxParam) returns (TxReceipt); rpc Call(CallParam) returns (CallResult); rpc CallCode(CallCodeParam) returns (CallResult); diff --git a/rpc/burrow/integration/main_test.go b/rpc/burrow/integration/main_test.go new file mode 100644 index 0000000000000000000000000000000000000000..a83a08b5158c70bc5236c3a042e1e6ceab4eb827 --- /dev/null +++ b/rpc/burrow/integration/main_test.go @@ -0,0 +1,42 @@ +// +build integration + +// Space above here matters +// Copyright 2017 Monax Industries Limited +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package integration + +import ( + "os" + "testing" + "time" + + "github.com/hyperledger/burrow/core" + "github.com/hyperledger/burrow/core/integration" +) + +var privateAccounts = integration.MakePrivateAccounts(5) // make keys +var genesisDoc = integration.TestGenesisDoc(privateAccounts) +var kern *core.Kernel + +// Needs to be in a _test.go file to be picked up +func TestMain(m *testing.M) { + returnValue := integration.TestWrapper(privateAccounts, genesisDoc, func(k *core.Kernel) int { + kern = k + return m.Run() + }) + + time.Sleep(3 * time.Second) + os.Exit(returnValue) +} diff --git a/rpc/burrow/integration/strange_loop.go b/rpc/burrow/integration/strange_loop.go new file mode 100644 index 0000000000000000000000000000000000000000..f8137df9465c72ab725616c6463092a4006d9db0 --- /dev/null +++ b/rpc/burrow/integration/strange_loop.go @@ -0,0 +1,3 @@ +package integration + +const strangeLoopBytecode = "60606040526017600055602260015560116002556001600360006101000a81548160ff021916908315150217905550341561003957600080fd5b6102c9806100486000396000f300606060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063ebb384dd14610046575b600080fd5b341561005157600080fd5b61005961006f565b6040518082815260200191505060405180910390f35b60006002549050600360009054906101000a900460ff16156101cf57600154600254121561012e5760026000815480929190600101919050555060025490503073ffffffffffffffffffffffffffffffffffffffff1663ebb384dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561011157600080fd5b5af1151561011e57600080fd5b50505060405180519050506101ca565b6000600360006101000a81548160ff02191690831515021790555060025490503073ffffffffffffffffffffffffffffffffffffffff1663ebb384dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156101b157600080fd5b5af115156101be57600080fd5b50505060405180519050505b610299565b6000546002541315610273576002600081548092919060019003919050555060025490503073ffffffffffffffffffffffffffffffffffffffff1663ebb384dd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561025657600080fd5b5af1151561026357600080fd5b5050506040518051905050610298565b6001600360006101000a81548160ff021916908315150217905550600254905061029a565b5b5b905600a165627a7a7230582071446a8de59540361bd59bb4f5a84f884006f53e50c1c89d2bfbdb72f92fd4700029" diff --git a/rpc/burrow/integration/strange_loop.sh b/rpc/burrow/integration/strange_loop.sh new file mode 100755 index 0000000000000000000000000000000000000000..d0cf04eecf86779b63ccdfb604aeee15792a52ec --- /dev/null +++ b/rpc/burrow/integration/strange_loop.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +echo -e "package integration\n\nconst strangeLoopBytecode = \"$(solc --bin rpc/v0/integration/strange_loop.sol | tail -1)\"" > "${script_dir}/strange_loop.go" diff --git a/rpc/burrow/integration/strange_loop.sol b/rpc/burrow/integration/strange_loop.sol new file mode 100644 index 0000000000000000000000000000000000000000..2a3e07f242d5da224a6e5a9e502c8df38e308a39 --- /dev/null +++ b/rpc/burrow/integration/strange_loop.sol @@ -0,0 +1,31 @@ +pragma solidity ^0.4.16; + +contract StrangeLoop { + int top = 23; + int bottom = 34; + int depth = 17; + bool down = true; + + function UpsieDownsie() public returns (int i) { + i = depth; + if (down) { + if (depth < bottom) { + depth++; + i = depth; + this.UpsieDownsie(); + } else { + down = false; + i = depth; + this.UpsieDownsie(); + } + } else if (depth > top) { + depth--; + i = depth; + this.UpsieDownsie(); + } else { + down = true; + i = depth; + return; + } + } +} \ No newline at end of file diff --git a/rpc/burrow/integration/transaction_service_test.go b/rpc/burrow/integration/transaction_service_test.go new file mode 100644 index 0000000000000000000000000000000000000000..db7f825489c76fb74a429cdfd03603f444b47b2b --- /dev/null +++ b/rpc/burrow/integration/transaction_service_test.go @@ -0,0 +1,224 @@ +// +build integration + +// Space above here matters +// Copyright 2017 Monax Industries Limited +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package integration + +import ( + "context" + "encoding/hex" + "fmt" + "sync" + "testing" + + "github.com/hyperledger/burrow/binary" + "github.com/hyperledger/burrow/consensus/tendermint" + "github.com/hyperledger/burrow/execution/evm/abi" + "github.com/hyperledger/burrow/rpc" + "github.com/hyperledger/burrow/rpc/burrow" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/types" + "google.golang.org/grpc" +) + +func TestTransactCallNoCode(t *testing.T) { + cli := newClient(t) + + // Flip flops between sending private key and input address to test private key and address based signing + toAddress := privateAccounts[2].Address() + + numCreates := 1000 + countCh := committedTxCount(t) + for i := 0; i < numCreates; i++ { + receipt, err := cli.Transact(context.Background(), &burrow.TransactParam{ + InputAccount: inputAccount(i), + Address: toAddress.Bytes(), + Data: []byte{}, + Fee: 2, + GasLimit: 10000 + uint64(i), + }) + require.NoError(t, err) + assert.False(t, receipt.CreatesContract) + assert.Equal(t, toAddress.Bytes(), receipt.ContractAddress) + } + require.Equal(t, numCreates, <-countCh) +} + +func TestTransactCreate(t *testing.T) { + cli := newClient(t) + numGoroutines := 100 + numCreates := 50 + wg := new(sync.WaitGroup) + wg.Add(numGoroutines) + // Flip flops between sending private key and input address to test private key and address based signing + bc, err := hex.DecodeString(strangeLoopBytecode) + require.NoError(t, err) + countCh := committedTxCount(t) + for i := 0; i < numGoroutines; i++ { + go func() { + for j := 0; j < numCreates; j++ { + create, err := cli.Transact(context.Background(), &burrow.TransactParam{ + InputAccount: inputAccount(i), + Address: nil, + Data: bc, + Fee: 2, + GasLimit: 10000, + }) + if assert.NoError(t, err) { + assert.True(t, create.CreatesContract) + } + } + wg.Done() + }() + } + wg.Wait() + + require.Equal(t, numGoroutines*numCreates, <-countCh) +} + +func BenchmarkTransactCreateContract(b *testing.B) { + cli := newClient(b) + bc, err := hex.DecodeString(strangeLoopBytecode) + require.NoError(b, err) + for i := 0; i < b.N; i++ { + create, err := cli.Transact(context.Background(), &burrow.TransactParam{ + InputAccount: inputAccount(i), + Address: nil, + Data: bc, + Fee: 2, + GasLimit: 10000, + }) + require.NoError(b, err) + assert.True(b, create.CreatesContract) + } +} + +func TestTransactAndHold(t *testing.T) { + cli := newClient(t) + bc, err := hex.DecodeString(strangeLoopBytecode) + require.NoError(t, err) + numGoroutines := 5 + numRuns := 2 + countCh := committedTxCount(t) + for i := 0; i < numGoroutines; i++ { + for j := 0; j < numRuns; j++ { + create, err := cli.TransactAndHold(context.Background(), &burrow.TransactParam{ + InputAccount: inputAccount(i), + Address: nil, + Data: bc, + Fee: 2, + GasLimit: 10000, + }) + require.NoError(t, err) + assert.Equal(t, int64(0), create.StackDepth) + functionID := abi.FunctionID("UpsieDownsie()") + call, err := cli.TransactAndHold(context.Background(), &burrow.TransactParam{ + InputAccount: inputAccount(i), + Address: create.CallData.Callee, + Data: functionID[:], + Fee: 2, + GasLimit: 10000, + }) + require.NoError(t, err) + depth := binary.Uint64FromWord256(binary.LeftPadWord256(call.Return)) + // Would give 23 if taken from wrong frame + assert.Equal(t, 18, int(depth)) + } + } + require.Equal(t, numGoroutines*numRuns*2, <-countCh) +} + +func TestSend(t *testing.T) { + cli := newClient(t) + numSends := 1000 + countCh := committedTxCount(t) + for i := 0; i < numSends; i++ { + send, err := cli.Send(context.Background(), &burrow.SendParam{ + InputAccount: inputAccount(i), + Amount: 2003, + ToAddress: privateAccounts[3].Address().Bytes(), + }) + require.NoError(t, err) + assert.Equal(t, false, send.CreatesContract) + } + require.Equal(t, numSends, <-countCh) +} + +func TestSendAndHold(t *testing.T) { + cli := newClient(t) + for i := 0; i < 2; i++ { + send, err := cli.SendAndHold(context.Background(), &burrow.SendParam{ + InputAccount: inputAccount(i), + Amount: 2003, + ToAddress: privateAccounts[3].Address().Bytes(), + }) + require.NoError(t, err) + assert.Equal(t, false, send.CreatesContract) + } +} + +// Helpers +func newClient(t testing.TB) burrow.TransactionClient { + conn, err := grpc.Dial(rpc.DefaultGRPCConfig().ListenAddress, grpc.WithInsecure()) + require.NoError(t, err) + return burrow.NewTransactionClient(conn) +} + +var committedTxCountIndex = 0 + +func committedTxCount(t *testing.T) chan int { + var numTxs int64 + emptyBlocks := 0 + maxEmptyBlocks := 2 + outCh := make(chan int) + ch := make(chan *types.EventDataNewBlock) + ctx := context.Background() + subscriber := fmt.Sprintf("committedTxCount_%v", committedTxCountIndex) + committedTxCountIndex++ + require.NoError(t, tendermint.SubscribeNewBlock(ctx, kern.Emitter, subscriber, ch)) + + go func() { + for ed := range ch { + if ed.Block.NumTxs == 0 { + emptyBlocks++ + } else { + emptyBlocks = 0 + } + if emptyBlocks > maxEmptyBlocks { + break + } + numTxs += ed.Block.NumTxs + t.Logf("Total TXs committed at block %v: %v (+%v)\n", ed.Block.Height, numTxs, ed.Block.NumTxs) + } + require.NoError(t, kern.Emitter.UnsubscribeAll(ctx, subscriber)) + outCh <- int(numTxs) + }() + return outCh +} + +var inputPrivateKey = privateAccounts[0].PrivateKey().RawBytes() +var inputAddress = privateAccounts[0].Address().Bytes() + +func inputAccount(i int) *burrow.InputAccount { + ia := new(burrow.InputAccount) + if i%2 == 0 { + ia.PrivateKey = inputPrivateKey + } else { + ia.Address = inputAddress + } + return ia +} diff --git a/rpc/protos/split.py b/rpc/burrow/split.py similarity index 100% rename from rpc/protos/split.py rename to rpc/burrow/split.py diff --git a/rpc/burrow/transaction_server.go b/rpc/burrow/transaction_server.go new file mode 100644 index 0000000000000000000000000000000000000000..73deeabc2e5b48788b2ae548e76836438c4e5ace --- /dev/null +++ b/rpc/burrow/transaction_server.go @@ -0,0 +1,104 @@ +package burrow + +import ( + "github.com/hyperledger/burrow/crypto" + "github.com/hyperledger/burrow/execution/evm/events" + "github.com/hyperledger/burrow/rpc" + "github.com/hyperledger/burrow/txs" + "golang.org/x/net/context" +) + +type transactionServer struct { + service *rpc.Service +} + +func NewTransactionServer(service *rpc.Service) TransactionServer { + return &transactionServer{service} +} + +func (ts *transactionServer) BroadcastTx(ctx context.Context, param *TxParam) (*TxReceipt, error) { + receipt, err := ts.service.Transactor().BroadcastTxRaw(param.Tx) + if err != nil { + return nil, err + } + return txReceipt(receipt), nil +} + +func (ts *transactionServer) Call(context.Context, *CallParam) (*CallResult, error) { + panic("implement me") +} + +func (ts *transactionServer) CallCode(context.Context, *CallCodeParam) (*CallResult, error) { + panic("implement me") +} + +func (ts *transactionServer) Transact(ctx context.Context, param *TransactParam) (*TxReceipt, error) { + inputAccount, err := ts.service.SigningAccount(param.InputAccount.Address, param.InputAccount.PrivateKey) + if err != nil { + return nil, err + } + address, err := crypto.MaybeAddressFromBytes(param.Address) + if err != nil { + return nil, err + } + receipt, err := ts.service.Transactor().Transact(inputAccount, address, param.Data, param.GasLimit, param.Fee) + if err != nil { + return nil, err + } + return txReceipt(receipt), nil +} + +func (ts *transactionServer) TransactAndHold(ctx context.Context, param *TransactParam) (*EventDataCall, error) { + inputAccount, err := ts.service.SigningAccount(param.InputAccount.Address, param.InputAccount.PrivateKey) + if err != nil { + return nil, err + } + address, err := crypto.MaybeAddressFromBytes(param.Address) + if err != nil { + return nil, err + } + edt, err := ts.service.Transactor().TransactAndHold(inputAccount, address, param.Data, param.GasLimit, param.Fee) + if err != nil { + return nil, err + } + return eventDataCall(edt), nil +} + +func (ts *transactionServer) Send(context.Context, *SendParam) (*TxReceipt, error) { + panic("implement me") +} + +func (ts *transactionServer) SendAndHold(context.Context, *SendParam) (*TxReceipt, error) { + panic("implement me") +} + +func (ts *transactionServer) SignTx(context.Context, *SignTxParam) (*SignedTx, error) { + panic("implement me") +} + +func eventDataCall(edt *events.EventDataCall) *EventDataCall { + return &EventDataCall{ + Origin: edt.Origin.Bytes(), + TxHash: edt.TxHash, + CallData: callData(edt.CallData), + StackDepth: int64(edt.StackDepth), + Return: edt.Return, + Exception: edt.Exception.Error(), + } +} +func callData(cd *events.CallData) *CallData { + return &CallData{ + Caller: cd.Caller.Bytes(), + Callee: cd.Callee.Bytes(), + Data: cd.Data, + Gas: cd.Gas, + } +} + +func txReceipt(receipt *txs.Receipt) *TxReceipt { + return &TxReceipt{ + ContractAddress: receipt.ContractAddress.Bytes(), + CreatesContract: receipt.CreatesContract, + TxHash: receipt.TxHash, + } +} diff --git a/rpc/codec.go b/rpc/codec.go index 750a5a88e8a6ea672fe635ef41c2f69d2c36274d..bbf0ba604183cc0da6be98b0c0909181c9ba9773 100644 --- a/rpc/codec.go +++ b/rpc/codec.go @@ -23,6 +23,5 @@ type Codec interface { EncodeBytes(interface{}) ([]byte, error) Encode(interface{}, io.Writer) error DecodeBytes(interface{}, []byte) error - DecodeBytesPtr(interface{}, []byte) error Decode(interface{}, io.Reader) error } diff --git a/rpc/protos/account.proto b/rpc/protos/account.proto deleted file mode 100644 index 24980fef21de2d164962aaad250c0ab6f4b74c09..0000000000000000000000000000000000000000 --- a/rpc/protos/account.proto +++ /dev/null @@ -1,82 +0,0 @@ -syntax = 'proto3'; - -import "common.proto"; - -// Account Service definition -service AccountService { - rpc GenPrivAccount(Empty) returns (PrivateAccount); - rpc GenPrivAccountFromKey(PrivateKeyParam) returns (PrivateAccount); - rpc GetAccount(AddressParam) returns (Account); - rpc GetAccounts(FilterListParam) returns (AccountList); - rpc GetValidators(Empty) returns (ValidatorList); - rpc GetStorage(AddressParam) returns (StorageDump); - rpc GetStorageAt(StorageAtParam) returns (StorageItem); -} - -// Params -message AddressParam { - bytes address = 1; -} - -message PrivateKeyParam { - bytes privateKey = 1; -} - -message StorageAtParam { - bytes address = 1; - bytes key = 2; -} - -// Results - -message BasePermissions { - uint64 Perms = 1; - uint64 SetBit = 2; -} - -message AccountPermissions { - BasePermissions Base = 1; - repeated string Roles = 2; -} - -message Account { - bytes Address = 1; - bytes PublicKey = 2; - uint64 Sequence = 3; - uint64 Balance = 4; - bytes Code = 5; - bytes StorageRoot = 6; - AccountPermissions Permissions = 7; -} - -message AccountList { - uint64 BlockHeight = 1; - repeated Account Accounts = 2; -} - -message Validator { - bytes Address = 1; - bytes PublicKey = 2; - uint64 Power = 3; -} - -message ValidatorList { - uint64 BlockHeight = 1; - repeated Validator BondedValidators = 2; - repeated Validator UnbondingValidators = 3; -} - -message StorageItem { - bytes Key = 1; - bytes Value = 2; -} - -message StorageDump { - bytes StorageRoot = 1; - repeated StorageItem StorageItems = 2; -} - - -//----------------------------------------------- - - diff --git a/rpc/protos/blockchain.proto b/rpc/protos/blockchain.proto deleted file mode 100644 index d15bdec10ed694fedb4e40a8a9b6f8ad6df7b7de..0000000000000000000000000000000000000000 --- a/rpc/protos/blockchain.proto +++ /dev/null @@ -1,161 +0,0 @@ -syntax = 'proto3'; - -import "common.proto"; - -// Blockchain Service Definition -service BlockchainService { - rpc GetBlock(HeightParam) returns (Block); - rpc GetBlocks(BlocksParam) returns (BlockList); - rpc GetBlockchainInfo(Empty) returns (Status); - rpc GetChainId(Empty) returns (ChainId); - rpc GetGenesis(Empty) returns (GenesisDoc); // NI - go - rpc GetLatestBlock(Empty) returns (Block); - rpc GetUnconfirmedTxs(Empty) returns (UnconfirmedTxList); - - rpc GetConsensusState(Empty) returns (ConsensusState); // WE NEED TO DISCUSS THIS ONE -} - -// Params -message HeightParam { - uint64 height = 1; -} - -message BlocksParam { - uint64 minHeight = 1; - uint64 maxHeight = 2; -} - -// Results -message Header { - string ChainID = 1; - int64 Height = 2; - int64 Time = 3; - int64 NumTxs = 4; - bytes LastBlockID = 5; - bytes LastCommitHash = 6; - bytes DataHash = 7; - bytes ValidatorsHash = 8; - bytes AppHash = 9; -} - - -message Data { - repeated bytes Txs = 1; - bytes hash = 2; -} - -message Block { - bytes BlockID = 1; - Header Header = 2; - Data Data = 3; -} - -message BlockMeta { - bytes BlockID = 1; - Header Header = 2; -} - -message BlockList { - uint64 LastHeight = 1; - repeated BlockMeta BlockMetas = 2; -} - -message ChainId { - string ChainName = 1; - string ChainId = 2; - bytes GenesisHash = 3; -} - - -message GenesisDoc { - message GenesisAccount { - bytes Address = 1; - bytes PublicKey = 2; - uint64 Amount = 3; - string Name = 4; - AccountPermissions Permissions = 5; - } - - message GenesisValidator { - bytes Address = 1; - bytes PublicKey = 2; - uint64 Amount = 3; - string Name = 4; - repeated bytes UnbondTo = 5; - } - uint64 GenesisTime = 1; - string ChainName = 2; - bytes Salt = 3; - uint64 GlobalPermissions = 4; - repeated GenesisAccount Accounts = 5; - repeated GenesisValidator Validators = 6; -} - -message UnconfirmedTxList { - uint64 NumTxs = 1; - repeated bytes Txs = 2; -} - -message Status { - NodeInfo NodeInfo = 1; - bytes GenesisHash = 2; - bytes PublicKey = 3; - bytes LatestBlockHash = 4; - uint64 LatestBlockHeight = 5; - int64 LatestBlockTime = 6; - string NodeVersion = 7; -} - - -// These are used for get consensus state. There is a lot of information that could be included -// We should decided what the minimum we want inccluded is. -message RoundState { - int64 Height = 1; - int64 Round = 2; - int64 Step = 3; - uint64 StartTime = 4; - uint64 CommitTime = 5; -/* Validators *types.ValidatorSet `json:"validators"` - Proposal *types.Proposal `json:"proposal"` - ProposalBlock *types.Block `json:"proposal_block"` - ProposalBlockParts *types.PartSet `json:"proposal_block_parts"` - LockedRound int `json:"locked_round"` - LockedBlock *types.Block `json:"locked_block"` - LockedBlockParts *types.PartSet `json:"locked_block_parts"` - ValidRound int `json:"valid_round"` // Last known round with POL for non-nil valid block. - ValidBlock *types.Block `json:"valid_block"` // Last known block of POL mentioned above. - ValidBlockParts *types.PartSet `json:"valid_block_parts"` // Last known block parts of POL metnioned above. - Votes *HeightVoteSet `json:"votes"` - CommitRound int `json:"commit_round"` // - LastCommit *types.VoteSet `json:"last_commit"` // Last precommits at Height-1 - LastValidators *types.ValidatorSet `json:"last_validators"`*/ -} - -message PeerRoundState { - int64 Height = 1; - int64 Round = 2; - int64 Step = 3; - uint64 StartTime = 4; - bool Proposal = 5; -/* - ProposalBlockPartsHeader types.PartSetHeader `json:"proposal_block_parts_header"` // - ProposalBlockParts *cmn.BitArray `json:"proposal_block_parts"` // - ProposalPOLRound int `json:"proposal_pol_round"` // Proposal's POL round. -1 if none. - ProposalPOL *cmn.BitArray `json:"proposal_pol"` // nil until ProposalPOLMessage received. - Prevotes *cmn.BitArray `json:"prevotes"` // All votes peer has for this round - Precommits *cmn.BitArray `json:"precommits"` // All precommits peer has for this round - LastCommitRound int `json:"last_commit_round"` // Round of commit for last height. -1 if none. - LastCommit *cmn.BitArray `json:"last_commit"` // All commit precommits of commit for last height. - CatchupCommitRound int `json:"catchup_commit_round"` // Round that we have commit for. Not necessarily unique. -1 if none. - CatchupCommit *cmn.BitArray `json:"catchup_commit"` // All commit precommits peer has for this height & CatchupCommitRound -*/ -} - -message ConsensusState { - RoundState RoundState = 1; - repeated PeerRoundState PeerRoundStates = 2; -} - -//-------------------------------------------------- - - diff --git a/rpc/protos/common.proto b/rpc/protos/common.proto deleted file mode 100644 index 0837a742c83c72b92e3bc92b2446453661f49aad..0000000000000000000000000000000000000000 --- a/rpc/protos/common.proto +++ /dev/null @@ -1,61 +0,0 @@ -syntax = 'proto3'; - -import "common.proto"; - -// Common Messages -message Empty { - -} - -message InputAccount { - bytes privateKey = 1; - bytes address = 2; -} - -message FilterData { - string field = 1; - string op = 2; - string value = 3; -} - -message FilterListParam { - repeated FilterData filters = 1; -} - -// This is here because it is required by both transactions and namereg -// This situation can be remedied multiple ways -message TxReceipt { - bytes TxHash = 1; - bool CreatesContract = 2; - bytes ContractAddress = 3; -} - -// This is here because it is used in both the Account Service (GenPrivAccount) -// And in the transaction service (SignTx) -message PrivateAccount { - bytes Address = 1; - bytes PublicKey = 2; - bytes PrivateKey = 3; -} - -// This is hear because it is used by both the Events service (Poll) and the -// Transaction service (TransactAndHold) -message EventDataCall { - CallData CallData = 1; - bytes Origin = 2; - bytes TxHash = 3; - int64 StackDepth = 4; - bytes Return = 5; - string Exception = 6; -} - -message CallData { - bytes Caller = 1; - bytes Callee = 2; - bytes Data = 3; - uint64 Value = 4; - uint64 Gas = 5; -} - - - diff --git a/rpc/protos/event.proto b/rpc/protos/event.proto deleted file mode 100644 index 61d05c07a02c1b50d67b89fdb55055b5d1c2a366..0000000000000000000000000000000000000000 --- a/rpc/protos/event.proto +++ /dev/null @@ -1,52 +0,0 @@ -syntax = 'proto3'; - -import "common.proto"; - -// Event Service Definition -service EventService { - rpc EventPoll(SubIdParam) returns (PollResponse); - rpc EventSubscribe(EventIdParam) returns (SubIdParam); - rpc EventUnsubscribe(SubIdParam) returns (EventUnSub); -} - -// Params -message EventIdParam { - string eventId = 1; -} - -message SubIdParam { - string subId = 1; -} - -// Results -message EventUnSub { - bool result = 1; -} - -message EventDataLog { - bytes Address = 1; - bytes Data = 2; - uint64 Height = 3; - repeated string Topics = 4; -} - -message EventDataTx { - bytes Tx = 1; - bytes Return = 2; - string Exception = 3; -} - -message Event { - string Event = 1; // This message is missing the tendermint object part. this might not be important? - EventDataTx EventDataTx = 2; - EventDataCall EventDataCall = 3; - EventDataLog EventDataLog = 4; -} - - -message PollResponse { - repeated Event events = 1; -} -//-------------------------------------------------- - - diff --git a/rpc/protos/namereg.proto b/rpc/protos/namereg.proto deleted file mode 100644 index 454fb2602f6af5ab24fc1bada553856d064df1f8..0000000000000000000000000000000000000000 --- a/rpc/protos/namereg.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = 'proto3'; - -import "common.proto"; - -// Name Registry Service Definition -service NameRegService { - rpc GetEntry(NameRegEntryParam) returns (NameRegEntry); - rpc GetEntries(FilterListParam) returns (NameRegEntryList); - rpc TransactNameReg(TransactNameRegParam) returns (TxReceipt); - rpc TransactNameRegAndHold(TransactNameRegParam) returns (NameRegEntry); -} - -// Params -message NameRegEntryParam { - string name = 1; -} - -message TransactNameRegParam { - InputAccount inputAccount = 1; - string name = 2; - string data = 3; - uint64 fee = 4; - uint64 amount = 5; -} - -// Results -message NameRegEntry { - // registered name for the entry - string Name = 1; - bytes Owner = 2; - string Data = 3; - uint64 Expires = 4; -} - -message NameRegEntryList { - uint64 BlockHeight = 1; - repeated NameRegEntry Names = 2; -} - - -//-------------------------------------------------- - - diff --git a/rpc/protos/network.proto b/rpc/protos/network.proto deleted file mode 100644 index e6cf71bdedae1187b26d5d5b58d0d8bacb58cea5..0000000000000000000000000000000000000000 --- a/rpc/protos/network.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = 'proto3'; - -import "common.proto"; - -// Network Service Definition -service NetworkService { - rpc GetClientVersion(Empty) returns (ClientVersion); // NI - go - rpc GetNetworkInfo(Empty) returns (NetworkInfo); - rpc GetNodeInfo(Empty) returns (NodeInfo); // NI - go - rpc GetPeer(PeerParam) returns (Peer); // NI - go - rpc GetPeers(Empty) returns (PeerList); -} - -// Params -message PeerParam { - bytes address = 1; -} - -// Results -message ClientVersion { - string version = 1; -} - -message NodeID { - string Name = 1; - bytes PublicKey = 2; -} - -message NodeInfo { - NodeID ID = 1; - string ListenAddr = 2; - string Network = 3; - string Version = 4; - bytes Channels = 5; - string Moniker = 6; - repeated string Other = 7; -} - -message NetworkInfo { - bool Listening = 1; - repeated string Listeners = 2; - repeated Peer Peers = 3; -} - -message Peer { - NodeInfo NodeInfo = 1; - bool IsOutbound = 2; -} - -message PeerList { - repeated Peer Peers = 1; -} - -//------------------------------------------------- - - diff --git a/rpc/protos/transaction.proto b/rpc/protos/transaction.proto deleted file mode 100644 index 7032dbfe3142e1de06875d78b62db6638ea8b0de..0000000000000000000000000000000000000000 --- a/rpc/protos/transaction.proto +++ /dev/null @@ -1,63 +0,0 @@ -syntax = 'proto3'; - -import "common.proto"; - -// Transaction Service Definition -service TransactionService { - rpc BroadcastTx(TxParam) returns (TxReceipt); - rpc Call(CallParam) returns (CallResult); - rpc CallCode(CallCodeParam) returns (CallResult); - rpc Transact(TransactParam) returns (TxReceipt); - rpc TransactAndHold(TransactParam) returns (EventDataCall); - rpc Send(SendParam) returns (TxReceipt); - rpc SendAndHold(SendParam) returns (TxReceipt); - rpc SignTx(SignTxParam) returns (SignedTx); -} - -// Params -message CallParam { - bytes from = 1; - bytes address = 2; - bytes data = 3; -} - -message CallCodeParam { - bytes from = 1; - bytes code = 2; - bytes data = 3; -} - -message TransactParam { - InputAccount inputAccount = 1; - bytes address = 2; - bytes data = 3; - uint64 gasLimit =4; - uint64 fee = 5; -} - -message SendParam { - InputAccount inputAccount = 1; - bytes toAddress = 2; - uint64 amount = 3; -} - -message TxParam { - bytes tx = 1; -} - -message SignTxParam { - bytes tx = 1; - repeated PrivateAccount privateAccounts = 2; -} - -// Results -message SignedTx { - bytes tx = 1; -} - -message CallResult { - bytes Return = 1; - uint64 GasUsed = 2; -} - -//-------------------------------------------------- \ No newline at end of file diff --git a/rpc/result_test.go b/rpc/result_test.go index 9a4b37f3bebd580da855d7b69750c0b3a507b54b..5de3f3eb949ee2808b9fc9c2a7747b58cd2145ea 100644 --- a/rpc/result_test.go +++ b/rpc/result_test.go @@ -18,8 +18,6 @@ import ( "encoding/json" "testing" - goCrypto "github.com/tendermint/go-crypto" - acm "github.com/hyperledger/burrow/account" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/execution" @@ -27,7 +25,7 @@ import ( "github.com/hyperledger/burrow/txs/payload" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/tendermint/go-wire" + goCrypto "github.com/tendermint/go-crypto" "github.com/tendermint/tendermint/consensus/types" tmTypes "github.com/tendermint/tendermint/types" "github.com/tendermint/tmlibs/common" @@ -43,8 +41,9 @@ func TestResultBroadcastTx(t *testing.T) { }, } - js := string(wire.JSONBytes(res)) - assert.Equal(t, `{"Receipt":{"TxHash":"666F6F","CreatesContract":true,"ContractAddress":"0002030000000000000000000000000000000000"}}`, js) + bs, err := json.Marshal(res) + require.NoError(t, err) + assert.Equal(t, `{"TxHash":"666F6F","CreatesContract":true,"ContractAddress":"0002030000000000000000000000000000000000"}`, string(bs)) } func TestListUnconfirmedTxs(t *testing.T) { diff --git a/rpc/service.go b/rpc/service.go index dab10524d4d88570b4e7eaa365f5bea2232b4a1f..ecf7b3bc4e3d8171755922e66cd6ad65844b714b 100644 --- a/rpc/service.go +++ b/rpc/service.go @@ -419,3 +419,19 @@ func (s *Service) GeneratePrivateAccount() (*ResultGeneratePrivateAccount, error PrivateAccount: acm.AsConcretePrivateAccount(privateAccount), }, nil } + +// Gets signing account from onr of private key or address - failing if both are provided +func (s *Service) SigningAccount(address, privateKey []byte) (*execution.SequentialSigningAccount, error) { + if len(address) > 0 { + if len(privateKey) > 0 { + return nil, fmt.Errorf("privKey and address provided but only one or the other should be given") + } + address, err := crypto.AddressFromBytes(address) + if err != nil { + return nil, err + } + return s.MempoolAccounts().SequentialSigningAccount(address) + } + + return s.mempoolAccounts.SequentialSigningAccountFromPrivateKey(privateKey) +} diff --git a/rpc/v0/codec.go b/rpc/v0/codec.go index a1f9900724e5bdee4830141a9b8336279628ea84..dc29f3e2fcb89af88b81fe574e4fc1de719da03b 100644 --- a/rpc/v0/codec.go +++ b/rpc/v0/codec.go @@ -18,9 +18,9 @@ import ( "io" "io/ioutil" - wire "github.com/tendermint/go-wire" + "encoding/json" - rpc "github.com/hyperledger/burrow/rpc" + "github.com/hyperledger/burrow/rpc" ) // Codec that uses tendermints 'binary' package for JSON. @@ -34,40 +34,29 @@ func NewTCodec() rpc.Codec { // Encode to an io.Writer. func (codec *TCodec) Encode(v interface{}, w io.Writer) error { - var err error - var n int - wire.WriteJSON(v, w, &n, &err) + bs, err := codec.EncodeBytes(v) + if err != nil { + return err + } + _, err = w.Write(bs) return err } // Encode to a byte array. func (codec *TCodec) EncodeBytes(v interface{}) ([]byte, error) { - return wire.JSONBytes(v), nil + return json.Marshal(v) } -// TODO: [ben] implement EncodeBytesPtr ? - // Decode from an io.Reader. func (codec *TCodec) Decode(v interface{}, r io.Reader) error { - bts, errR := ioutil.ReadAll(r) - if errR != nil { - return errR + bs, err := ioutil.ReadAll(r) + if err != nil { + return err } - var err error - wire.ReadJSON(v, bts, &err) - return err + return codec.DecodeBytes(v, bs) } // Decode from a byte array. -func (codec *TCodec) DecodeBytes(v interface{}, bts []byte) error { - var err error - wire.ReadJSON(v, bts, &err) - return err -} - -// Decode from a byte array pointer. -func (codec *TCodec) DecodeBytesPtr(v interface{}, bts []byte) error { - var err error - wire.ReadJSONPtr(v, bts, &err) - return err +func (codec *TCodec) DecodeBytes(v interface{}, bs []byte) error { + return json.Unmarshal(bs, v) } diff --git a/rpc/v0/json_service_data_test.go b/rpc/v0/json_service_data_test.go index 9d65bd052d5f02975723cf655d937445dd272467..b1d5bca08ff0a699db9dd70bddca84fa315d450b 100644 --- a/rpc/v0/json_service_data_test.go +++ b/rpc/v0/json_service_data_test.go @@ -18,38 +18,24 @@ import ( "encoding/json" "testing" + "fmt" + + acm "github.com/hyperledger/burrow/account" "github.com/hyperledger/burrow/rpc" + "github.com/hyperledger/burrow/txs" "github.com/hyperledger/burrow/txs/payload" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) +var txEnvelopeString = `{"Signatories":[{"Address":"83207817DC3814B96F57EFF925F467E07CAA9138","PublicKey":{"CurveType":"ed25519","PublicKey":"34D26579DBB456693E540672CF922F52DDE0D6532E35BF06BE013A7C532F20E0"},"Signature":"RjtJSb0c+Fiwe+X6xedfULXx6s3c2hgHT3NUOq0MPL4H2eouhJ1sjZP7IdArzyrnCCDuvRf+sKSr7WQI4C9DBA=="}],"Tx":{"ChainID":"testChain","Type":"CallTx","Payload":{"Input":{"Address":"83207817DC3814B96F57EFF925F467E07CAA9138","Amount":343,"Sequence":3},"Address":"AC280D53FD359D9FF11F19D0796D9B89907F3B53","GasLimit":2323,"Fee":12,"Data":"AwQFBQ=="}}}` + var testBroadcastCallTxJsonRequest = []byte(` { "id": "57EC1D39-7B3D-4F96-B286-8FC128177AFC4", "jsonrpc": "2.0", "method": "burrow.broadcastTx", - "params": [ - 2, - { - "address": "5A9083BB0EFFE4C8EB2ADD29174994F73E77D418", - "data": "2F2397A00000000000000000000000000000000000000000000000000000000000003132", - "fee": 1, - "gas_limit": 1000000, - "input": { - "address": "BE18FDCBF12BF99F4D75325E17FF2E78F1A35FE8", - "amount": 1, - "pub_key": [ - 1, - "8D1611925948DC2EDDF739FB65CE517757D286155A039B28441C3349BE9A8C38" - ], - "sequence": 2, - "signature": [ - 1, - "B090D622F143ECEDA9B9E7B15485CE7504453C05434951CF867B013D80ED1BD2A0CA32846FC175D234CDFB9D5C3D792759E8FE79FD4DB3006B24950EE3C37D00" - ] - } - } - ] + "params": ` + txEnvelopeString + ` }`) // strictly test the codec for go-wire encoding of the Json format, @@ -57,14 +43,29 @@ var testBroadcastCallTxJsonRequest = []byte(` // (which was broken on v0.12) func TestCallTxJsonFormatCodec(t *testing.T) { codec := NewTCodec() - param := new(payload.Payload) - + txEnv := new(txs.Envelope) // Create new request object and unmarshal. request := &rpc.RPCRequest{} assert.NoError(t, json.Unmarshal(testBroadcastCallTxJsonRequest, request), "Provided JSON test data does not unmarshal to rpc.RPCRequest object.") - assert.NoError(t, codec.DecodeBytesPtr(param, request.Params), + assert.NoError(t, codec.DecodeBytes(txEnv, request.Params), "RPC codec failed to decode params as transaction type.") - _, ok := (*param).(*payload.CallTx) + _, ok := txEnv.Tx.Payload.(*payload.CallTx) assert.True(t, ok, "Type byte 0x02 should unmarshal into CallTx.") } + +func TestGenTxEnvelope(t *testing.T) { + codec := NewTCodec() + privAccFrom := acm.GeneratePrivateAccountFromSecret("foo") + privAccTo := acm.GeneratePrivateAccountFromSecret("bar") + toAddress := privAccTo.Address() + txEnv := txs.Enclose("testChain", payload.NewCallTxWithSequence(privAccFrom.PublicKey(), &toAddress, + []byte{3, 4, 5, 5}, 343, 2323, 12, 3)) + err := txEnv.Sign(privAccFrom) + require.NoError(t, err) + bs, err := codec.EncodeBytes(txEnv) + require.NoError(t, err) + if !assert.Equal(t, txEnvelopeString, string(bs)) { + fmt.Println(string(bs)) + } +} diff --git a/rpc/v0/methods.go b/rpc/v0/methods.go index e391f5333aa608097d5eda79d9ab8fe6355b2532..e2c2aca1bd73fe450dcd9ff48c90a7256166a182 100644 --- a/rpc/v0/methods.go +++ b/rpc/v0/methods.go @@ -15,11 +15,8 @@ package v0 import ( - "fmt" - acm "github.com/hyperledger/burrow/account" "github.com/hyperledger/burrow/crypto" - "github.com/hyperledger/burrow/execution" "github.com/hyperledger/burrow/execution/names" "github.com/hyperledger/burrow/logging" "github.com/hyperledger/burrow/rpc" @@ -200,7 +197,7 @@ func GetMethods(codec rpc.Codec, service *rpc.Service, logger *logging.Logger) m BROADCAST_TX: func(request *rpc.RPCRequest, requester interface{}) (interface{}, int, error) { // Accept all transaction types as parameter for broadcast. txEnv := new(txs.Envelope) - err := codec.DecodeBytesPtr(txEnv, request.Params) + err := codec.DecodeBytes(txEnv, request.Params) if err != nil { return nil, rpc.INVALID_PARAMS, err } @@ -234,7 +231,7 @@ func GetMethods(codec rpc.Codec, service *rpc.Service, logger *logging.Logger) m return nil, rpc.INVALID_PARAMS, err } // Use mempool state so that transact can generate a run of sequence numbers when formulating transactions - inputAccount, err := signingAccount(service.MempoolAccounts(), param.InputAccount) + inputAccount, err := service.SigningAccount(param.InputAccount.Address, param.InputAccount.PrivateKey) if err != nil { return nil, rpc.INVALID_PARAMS, err } @@ -254,7 +251,7 @@ func GetMethods(codec rpc.Codec, service *rpc.Service, logger *logging.Logger) m if err != nil { return nil, rpc.INVALID_PARAMS, err } - inputAccount, err := signingAccount(service.MempoolAccounts(), param.InputAccount) + inputAccount, err := service.SigningAccount(param.InputAccount.Address, param.InputAccount.PrivateKey) if err != nil { return nil, rpc.INVALID_PARAMS, err } @@ -275,7 +272,7 @@ func GetMethods(codec rpc.Codec, service *rpc.Service, logger *logging.Logger) m return nil, rpc.INVALID_PARAMS, err } // Run Send against mempool state - inputAccount, err := signingAccount(service.MempoolAccounts(), param.InputAccount) + inputAccount, err := service.SigningAccount(param.InputAccount.Address, param.InputAccount.PrivateKey) if err != nil { return nil, rpc.INVALID_PARAMS, err } @@ -296,7 +293,7 @@ func GetMethods(codec rpc.Codec, service *rpc.Service, logger *logging.Logger) m return nil, rpc.INVALID_PARAMS, err } // Run Send against mempool state - inputAccount, err := signingAccount(service.MempoolAccounts(), param.InputAccount) + inputAccount, err := service.SigningAccount(param.InputAccount.Address, param.InputAccount.PrivateKey) if err != nil { return nil, rpc.INVALID_PARAMS, err } @@ -312,7 +309,7 @@ func GetMethods(codec rpc.Codec, service *rpc.Service, logger *logging.Logger) m if err != nil { return nil, rpc.INVALID_PARAMS, err } - inputAccount, err := signingAccount(service.MempoolAccounts(), param.InputAccount) + inputAccount, err := service.SigningAccount(param.InputAccount.Address, param.InputAccount.PrivateKey) if err != nil { return nil, rpc.INVALID_PARAMS, err } @@ -445,19 +442,3 @@ func GetMethods(codec rpc.Codec, service *rpc.Service, logger *logging.Logger) m }, } } - -// Gets signing account from onr of private key or address - failing if both are provided -func signingAccount(accounts *execution.Accounts, inputAccount InputAccount) (*execution.SequentialSigningAccount, error) { - if len(inputAccount.Address) > 0 { - if len(inputAccount.PrivateKey) > 0 { - return nil, fmt.Errorf("privKey and address provided but only one or the other should be given") - } - address, err := crypto.AddressFromBytes(inputAccount.Address) - if err != nil { - return nil, err - } - return accounts.SequentialSigningAccount(address) - } - - return accounts.SequentialSigningAccountFromPrivateKey(inputAccount.PrivateKey) -} diff --git a/rpc/v0/params.go b/rpc/v0/params.go index 6827dd94d6afe0a5890f0e486e29122b0ee17e73..b84c131e18d89d24d55acf0537b851dc90067be7 100644 --- a/rpc/v0/params.go +++ b/rpc/v0/params.go @@ -16,24 +16,15 @@ package v0 import ( acm "github.com/hyperledger/burrow/account" + "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/rpc/filters" "github.com/hyperledger/burrow/txs/payload" - "github.com/tendermint/go-wire/data" ) -// Legacy for JS -var _ = data.NewMapper(struct{ payload.Payload }{}). - RegisterImplementation(&payload.SendTx{}, "send_tx", byte(payload.TypeSend)). - RegisterImplementation(&payload.CallTx{}, "call_tx", byte(payload.TypeCall)). - RegisterImplementation(&payload.NameTx{}, "name_tx", byte(payload.TypeName)). - RegisterImplementation(&payload.BondTx{}, "bond_tx", byte(payload.TypeBond)). - RegisterImplementation(&payload.UnbondTx{}, "unbond_tx", byte(payload.TypeUnbond)). - RegisterImplementation(&payload.PermissionsTx{}, "permissions_tx", byte(payload.TypePermissions)) - type ( // Used to send an address. The address should be hex and properly formatted. AddressParam struct { - Address []byte `json:"address"` + Address binary.HexBytes `json:"address"` } // Used to send an address @@ -42,18 +33,18 @@ type ( } PrivateKeyParam struct { - PrivateKey []byte `json:"privateKey"` + PrivateKey binary.HexBytes `json:"privateKey"` } InputAccount struct { - PrivateKey []byte `json:"privateKey"` - Address []byte `json:"address"` + PrivateKey binary.HexBytes `json:"privateKey"` + Address binary.HexBytes `json:"address"` } // StorageAt StorageAtParam struct { - Address []byte `json:"address"` - Key []byte `json:"key"` + Address binary.HexBytes `json:"address"` + Key binary.HexBytes `json:"key"` } // Get a block @@ -82,16 +73,16 @@ type ( // Used when doing calls CallParam struct { - Address []byte `json:"address"` - From []byte `json:"from"` - Data []byte `json:"data"` + Address binary.HexBytes `json:"address"` + From binary.HexBytes `json:"from"` + Data binary.HexBytes `json:"data"` } // Used when doing code calls CallCodeParam struct { - From []byte `json:"from"` - Code []byte `json:"code"` - Data []byte `json:"data"` + From binary.HexBytes `json:"from"` + Code binary.HexBytes `json:"code"` + Data binary.HexBytes `json:"data"` } // Used when signing a tx. Uses placeholders just like TxParam @@ -103,18 +94,18 @@ type ( // Used when sending a transaction to be created and signed on the server // (using the private key). This only uses the standard key type for now. TransactParam struct { - InputAccount InputAccount `json:"inputAccount"` - Data []byte `json:"data"` - Address []byte `json:"address"` - Fee uint64 `json:"fee"` - GasLimit uint64 `json:"gasLimit"` + InputAccount InputAccount `json:"inputAccount"` + Data binary.HexBytes `json:"data"` + Address binary.HexBytes `json:"address"` + Fee uint64 `json:"fee"` + GasLimit uint64 `json:"gasLimit"` } // Used when sending a 'Send' transaction. SendParam struct { - InputAccount InputAccount `json:"inputAccount"` - ToAddress []byte `json:"toAddress"` - Amount uint64 `json:"amount"` + InputAccount InputAccount `json:"inputAccount"` + ToAddress binary.HexBytes `json:"toAddress"` + Amount uint64 `json:"amount"` } NameRegEntryParam struct { diff --git a/txs/envelope.go b/txs/envelope.go index ca8b618b5116cc9e6eb9d089c4e1f5798afa6717..222867eacd2c481cae94d66a203bcb5eeee489db 100644 --- a/txs/envelope.go +++ b/txs/envelope.go @@ -71,9 +71,24 @@ func (s *Signatory) RealisePublicKey(getter state.AccountGetter) error { return nil } +// Returns an error if Envelope has a nil transaction or zero signatures (and therefore could not possibly be valid) +func (txEnv *Envelope) Validate() error { + if txEnv.Tx == nil { + return fmt.Errorf("transaction envelope contains no (successfully unmarshalled) transaction") + } + if len(txEnv.Signatories) == 0 { + return fmt.Errorf("transaction envelope contains no (successfully unmarshalled) signatories") + } + return nil +} + // Verifies the validity of the Signatories' Signatures in the Envelope. The Signatories must // appear in the same order as the inputs as returned by Tx.GetInputs(). func (txEnv *Envelope) Verify(getter state.AccountGetter) error { + err := txEnv.Validate() + if err != nil { + return err + } errPrefix := fmt.Sprintf("could not verify transaction %X", txEnv.Tx.Hash()) inputs := txEnv.Tx.GetInputs() if len(inputs) != len(txEnv.Signatories) { diff --git a/txs/tx.go b/txs/tx.go index ec4a667673ae67c1c3cdd35a80634e5599916e8e..c80fac1a7fbe3df553521d8cd20610b2170b81d6 100644 --- a/txs/tx.go +++ b/txs/tx.go @@ -19,6 +19,7 @@ import ( "fmt" acm "github.com/hyperledger/burrow/account" + "github.com/hyperledger/burrow/binary" "github.com/hyperledger/burrow/crypto" "github.com/hyperledger/burrow/txs/payload" "golang.org/x/crypto/ripemd160" @@ -129,7 +130,7 @@ func (tx *Tx) Rehash() []byte { // BroadcastTx or Transaction receipt type Receipt struct { - TxHash []byte + TxHash binary.HexBytes CreatesContract bool ContractAddress crypto.Address }