diff --git a/go.mod b/go.mod index 712c9ef732d..769b836eaca 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( github.com/dgraph-io/badger/v3 v3.2011.1 github.com/go-kit/kit v0.10.0 github.com/gogo/protobuf v1.3.2 + github.com/golang/protobuf v1.4.3 github.com/ipfs/go-log v1.0.4 github.com/lazyledger/lazyledger-core v0.0.0-20210219190522-0eccfb24e2aa github.com/libp2p/go-libp2p v0.13.0 diff --git a/proto/gen.sh b/proto/gen.sh new file mode 100755 index 00000000000..da08a5d3530 --- /dev/null +++ b/proto/gen.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +# see: https://stackoverflow.com/a/246128 +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" + +cd $SCRIPT_DIR +protoc -I=. -I=$GOPATH/src -I=$GOPATH/src/github.com/gogo/protobuf --gofast_out=../types/pb/optimint optimint.proto diff --git a/proto/optimint.proto b/proto/optimint.proto new file mode 100644 index 00000000000..8af2b26f556 --- /dev/null +++ b/proto/optimint.proto @@ -0,0 +1,73 @@ +syntax = "proto3"; +package optimint; + +// option go_package = "github.com/lazyledger/optimint/proto"; +import "tendermint/abci/types.proto"; + +// Version captures the consensus rules for processing a block in the blockchain, +// including all blockchain data structures and the rules of the application's +// state transition machine. +// This is equivalent to the tmversion.Consensus type in Tendermint. +message Version { + uint32 block = 1; + uint32 app = 2; +} + +message Header { + // Block and App version + Version version = 1; + // NamespaceID identifies this chain e.g. when connected to other rollups via IBC. + bytes namespace_id = 2; + + // Block height + uint64 height = 3; + + // Block creation time + uint64 time = 4; + + // Previous block info + bytes last_header_hash = 5; + + // Commit from aggregator(s) from the last block + bytes last_commit_hash = 6; + + // Block.Data root aka Transactions + bytes data_hash = 7; + + // Consensus params for current block + bytes consensus_hash = 8; + + // State after applying txs from the current block + bytes app_hash = 9; + + // Root hash of all results from the txs from the previous block. + // This is ABCI specific but smart-contract chains require some way of committing + // to transaction receipts/results. + bytes last_results_hash = 10; + + // Original proposer of the block + // Note that the address can be derived from the pubkey which can be derived + // from the signature when using secp256k. + // We keep this in case users choose another signature format where the + // pubkey can't be recovered by the signature (e.g. ed25519). + bytes proposer_address = 11; +} + +message Commit { + uint64 height = 1; + bytes hader_hash = 2; + // Note: most of the time this will be a single sinature + repeated bytes signatures = 3; +} + +message Data { + repeated bytes txs = 1; + repeated bytes intermediate_state_roots = 2; + repeated tendermint.abci.Evidence evidence = 3; +} + +message Block { + Header header = 1; + Data data = 2; + Commit last_commit = 3; +} diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto new file mode 100644 index 00000000000..29e0885f9f8 --- /dev/null +++ b/proto/tendermint/abci/types.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; +package tendermint.abci; + +option go_package = "github.com/lazyledger/lazyledger-core/abci/types"; + +// For more information on gogo.proto, see: +// https://github.com/gogo/protobuf/blob/master/extensions.md +import "google/protobuf/timestamp.proto"; +import "gogoproto/gogo.proto"; + +// This file is copied from http://github.com/tendermint/abci +// NOTE: When using custom types, mind the warnings. +// https://github.com/gogo/protobuf/blob/master/custom_types.md#warnings-and-issues + +// Validator +message Validator { + bytes address = 1; // The first 20 bytes of SHA256(public key) + // PubKey pub_key = 2 [(gogoproto.nullable)=false]; + int64 power = 3; // The voting power +} + +enum EvidenceType { + UNKNOWN = 0; + DUPLICATE_VOTE = 1; + LIGHT_CLIENT_ATTACK = 2; +} + +message Evidence { + EvidenceType type = 1; + // The offending validator + Validator validator = 2 [(gogoproto.nullable) = false]; + // The height when the offense occurred + int64 height = 3; + // The corresponding time where the offense occurred + google.protobuf.Timestamp time = 4 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; + // Total voting power of the validator set in case the ABCI application does + // not store historical validators. + // https://github.com/tendermint/tendermint/issues/4581 + int64 total_voting_power = 5; +} + diff --git a/types/pb/optimint/optimint.pb.go b/types/pb/optimint/optimint.pb.go new file mode 100644 index 00000000000..d553a10317c --- /dev/null +++ b/types/pb/optimint/optimint.pb.go @@ -0,0 +1,1682 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: optimint.proto + +/* + Package optimint is a generated protocol buffer package. + + It is generated from these files: + optimint.proto + + It has these top-level messages: + Version + Header + Commit + Data + Block +*/ +package optimint + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import tendermint_abci "github.com/lazyledger/lazyledger-core/abci/types" + +import io "io" + +// 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 + +type Version struct { + Block uint32 `protobuf:"varint,1,opt,name=block,proto3" json:"block,omitempty"` + App uint32 `protobuf:"varint,2,opt,name=app,proto3" json:"app,omitempty"` +} + +func (m *Version) Reset() { *m = Version{} } +func (m *Version) String() string { return proto.CompactTextString(m) } +func (*Version) ProtoMessage() {} +func (*Version) Descriptor() ([]byte, []int) { return fileDescriptorOptimint, []int{0} } + +func (m *Version) GetBlock() uint32 { + if m != nil { + return m.Block + } + return 0 +} + +func (m *Version) GetApp() uint32 { + if m != nil { + return m.App + } + return 0 +} + +type Header struct { + Version *Version `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` + NamespaceId []byte `protobuf:"bytes,2,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` + Time uint64 `protobuf:"varint,4,opt,name=time,proto3" json:"time,omitempty"` + LastHeaderHash []byte `protobuf:"bytes,5,opt,name=last_header_hash,json=lastHeaderHash,proto3" json:"last_header_hash,omitempty"` + LastCommitHash []byte `protobuf:"bytes,6,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"` + DataHash []byte `protobuf:"bytes,7,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` + ConsensusHash []byte `protobuf:"bytes,8,opt,name=consensus_hash,json=consensusHash,proto3" json:"consensus_hash,omitempty"` + AppHash []byte `protobuf:"bytes,9,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` + LastResultsHash []byte `protobuf:"bytes,10,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"` + ProposerAddress []byte `protobuf:"bytes,11,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` +} + +func (m *Header) Reset() { *m = Header{} } +func (m *Header) String() string { return proto.CompactTextString(m) } +func (*Header) ProtoMessage() {} +func (*Header) Descriptor() ([]byte, []int) { return fileDescriptorOptimint, []int{1} } + +func (m *Header) GetVersion() *Version { + if m != nil { + return m.Version + } + return nil +} + +func (m *Header) GetNamespaceId() []byte { + if m != nil { + return m.NamespaceId + } + return nil +} + +func (m *Header) GetHeight() uint64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *Header) GetTime() uint64 { + if m != nil { + return m.Time + } + return 0 +} + +func (m *Header) GetLastHeaderHash() []byte { + if m != nil { + return m.LastHeaderHash + } + 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) GetConsensusHash() []byte { + if m != nil { + return m.ConsensusHash + } + return nil +} + +func (m *Header) GetAppHash() []byte { + if m != nil { + return m.AppHash + } + return nil +} + +func (m *Header) GetLastResultsHash() []byte { + if m != nil { + return m.LastResultsHash + } + return nil +} + +func (m *Header) GetProposerAddress() []byte { + if m != nil { + return m.ProposerAddress + } + return nil +} + +type Commit struct { + Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + HaderHash []byte `protobuf:"bytes,2,opt,name=hader_hash,json=haderHash,proto3" json:"hader_hash,omitempty"` + Signatures [][]byte `protobuf:"bytes,3,rep,name=signatures" json:"signatures,omitempty"` +} + +func (m *Commit) Reset() { *m = Commit{} } +func (m *Commit) String() string { return proto.CompactTextString(m) } +func (*Commit) ProtoMessage() {} +func (*Commit) Descriptor() ([]byte, []int) { return fileDescriptorOptimint, []int{2} } + +func (m *Commit) GetHeight() uint64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *Commit) GetHaderHash() []byte { + if m != nil { + return m.HaderHash + } + return nil +} + +func (m *Commit) GetSignatures() [][]byte { + if m != nil { + return m.Signatures + } + return nil +} + +type Data struct { + Txs [][]byte `protobuf:"bytes,1,rep,name=txs" json:"txs,omitempty"` + IntermediateStateRoots [][]byte `protobuf:"bytes,2,rep,name=intermediate_state_roots,json=intermediateStateRoots" json:"intermediate_state_roots,omitempty"` + Evidence []*tendermint_abci.Evidence `protobuf:"bytes,3,rep,name=evidence" json:"evidence,omitempty"` +} + +func (m *Data) Reset() { *m = Data{} } +func (m *Data) String() string { return proto.CompactTextString(m) } +func (*Data) ProtoMessage() {} +func (*Data) Descriptor() ([]byte, []int) { return fileDescriptorOptimint, []int{3} } + +func (m *Data) GetTxs() [][]byte { + if m != nil { + return m.Txs + } + return nil +} + +func (m *Data) GetIntermediateStateRoots() [][]byte { + if m != nil { + return m.IntermediateStateRoots + } + return nil +} + +func (m *Data) GetEvidence() []*tendermint_abci.Evidence { + if m != nil { + return m.Evidence + } + return nil +} + +type Block struct { + Header *Header `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` + Data *Data `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"` + LastCommit *Commit `protobuf:"bytes,3,opt,name=last_commit,json=lastCommit" json:"last_commit,omitempty"` +} + +func (m *Block) Reset() { *m = Block{} } +func (m *Block) String() string { return proto.CompactTextString(m) } +func (*Block) ProtoMessage() {} +func (*Block) Descriptor() ([]byte, []int) { return fileDescriptorOptimint, []int{4} } + +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 +} + +func (m *Block) GetLastCommit() *Commit { + if m != nil { + return m.LastCommit + } + return nil +} + +func init() { + proto.RegisterType((*Version)(nil), "optimint.Version") + proto.RegisterType((*Header)(nil), "optimint.Header") + proto.RegisterType((*Commit)(nil), "optimint.Commit") + proto.RegisterType((*Data)(nil), "optimint.Data") + proto.RegisterType((*Block)(nil), "optimint.Block") +} +func (m *Version) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Version) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Block != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintOptimint(dAtA, i, uint64(m.Block)) + } + if m.App != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintOptimint(dAtA, i, uint64(m.App)) + } + return i, nil +} + +func (m *Header) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Header) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Version != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintOptimint(dAtA, i, uint64(m.Version.Size())) + n1, err := m.Version.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if len(m.NamespaceId) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintOptimint(dAtA, i, uint64(len(m.NamespaceId))) + i += copy(dAtA[i:], m.NamespaceId) + } + if m.Height != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintOptimint(dAtA, i, uint64(m.Height)) + } + if m.Time != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintOptimint(dAtA, i, uint64(m.Time)) + } + if len(m.LastHeaderHash) > 0 { + dAtA[i] = 0x2a + i++ + i = encodeVarintOptimint(dAtA, i, uint64(len(m.LastHeaderHash))) + i += copy(dAtA[i:], m.LastHeaderHash) + } + if len(m.LastCommitHash) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintOptimint(dAtA, i, uint64(len(m.LastCommitHash))) + i += copy(dAtA[i:], m.LastCommitHash) + } + if len(m.DataHash) > 0 { + dAtA[i] = 0x3a + i++ + i = encodeVarintOptimint(dAtA, i, uint64(len(m.DataHash))) + i += copy(dAtA[i:], m.DataHash) + } + if len(m.ConsensusHash) > 0 { + dAtA[i] = 0x42 + i++ + i = encodeVarintOptimint(dAtA, i, uint64(len(m.ConsensusHash))) + i += copy(dAtA[i:], m.ConsensusHash) + } + if len(m.AppHash) > 0 { + dAtA[i] = 0x4a + i++ + i = encodeVarintOptimint(dAtA, i, uint64(len(m.AppHash))) + i += copy(dAtA[i:], m.AppHash) + } + if len(m.LastResultsHash) > 0 { + dAtA[i] = 0x52 + i++ + i = encodeVarintOptimint(dAtA, i, uint64(len(m.LastResultsHash))) + i += copy(dAtA[i:], m.LastResultsHash) + } + if len(m.ProposerAddress) > 0 { + dAtA[i] = 0x5a + i++ + i = encodeVarintOptimint(dAtA, i, uint64(len(m.ProposerAddress))) + i += copy(dAtA[i:], m.ProposerAddress) + } + return i, nil +} + +func (m *Commit) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Commit) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Height != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintOptimint(dAtA, i, uint64(m.Height)) + } + if len(m.HaderHash) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintOptimint(dAtA, i, uint64(len(m.HaderHash))) + i += copy(dAtA[i:], m.HaderHash) + } + if len(m.Signatures) > 0 { + for _, b := range m.Signatures { + dAtA[i] = 0x1a + i++ + i = encodeVarintOptimint(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + return i, nil +} + +func (m *Data) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Data) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Txs) > 0 { + for _, b := range m.Txs { + dAtA[i] = 0xa + i++ + i = encodeVarintOptimint(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if len(m.IntermediateStateRoots) > 0 { + for _, b := range m.IntermediateStateRoots { + dAtA[i] = 0x12 + i++ + i = encodeVarintOptimint(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if len(m.Evidence) > 0 { + for _, msg := range m.Evidence { + dAtA[i] = 0x1a + i++ + i = encodeVarintOptimint(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Block) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Block) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Header != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintOptimint(dAtA, i, uint64(m.Header.Size())) + n2, err := m.Header.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.Data != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintOptimint(dAtA, i, uint64(m.Data.Size())) + n3, err := m.Data.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.LastCommit != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintOptimint(dAtA, i, uint64(m.LastCommit.Size())) + n4, err := m.LastCommit.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + return i, nil +} + +func encodeFixed64Optimint(dAtA []byte, offset int, v uint64) int { + dAtA[offset] = uint8(v) + dAtA[offset+1] = uint8(v >> 8) + dAtA[offset+2] = uint8(v >> 16) + dAtA[offset+3] = uint8(v >> 24) + dAtA[offset+4] = uint8(v >> 32) + dAtA[offset+5] = uint8(v >> 40) + dAtA[offset+6] = uint8(v >> 48) + dAtA[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Optimint(dAtA []byte, offset int, v uint32) int { + dAtA[offset] = uint8(v) + dAtA[offset+1] = uint8(v >> 8) + dAtA[offset+2] = uint8(v >> 16) + dAtA[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintOptimint(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *Version) Size() (n int) { + var l int + _ = l + if m.Block != 0 { + n += 1 + sovOptimint(uint64(m.Block)) + } + if m.App != 0 { + n += 1 + sovOptimint(uint64(m.App)) + } + return n +} + +func (m *Header) Size() (n int) { + var l int + _ = l + if m.Version != nil { + l = m.Version.Size() + n += 1 + l + sovOptimint(uint64(l)) + } + l = len(m.NamespaceId) + if l > 0 { + n += 1 + l + sovOptimint(uint64(l)) + } + if m.Height != 0 { + n += 1 + sovOptimint(uint64(m.Height)) + } + if m.Time != 0 { + n += 1 + sovOptimint(uint64(m.Time)) + } + l = len(m.LastHeaderHash) + if l > 0 { + n += 1 + l + sovOptimint(uint64(l)) + } + l = len(m.LastCommitHash) + if l > 0 { + n += 1 + l + sovOptimint(uint64(l)) + } + l = len(m.DataHash) + if l > 0 { + n += 1 + l + sovOptimint(uint64(l)) + } + l = len(m.ConsensusHash) + if l > 0 { + n += 1 + l + sovOptimint(uint64(l)) + } + l = len(m.AppHash) + if l > 0 { + n += 1 + l + sovOptimint(uint64(l)) + } + l = len(m.LastResultsHash) + if l > 0 { + n += 1 + l + sovOptimint(uint64(l)) + } + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovOptimint(uint64(l)) + } + return n +} + +func (m *Commit) Size() (n int) { + var l int + _ = l + if m.Height != 0 { + n += 1 + sovOptimint(uint64(m.Height)) + } + l = len(m.HaderHash) + if l > 0 { + n += 1 + l + sovOptimint(uint64(l)) + } + if len(m.Signatures) > 0 { + for _, b := range m.Signatures { + l = len(b) + n += 1 + l + sovOptimint(uint64(l)) + } + } + return n +} + +func (m *Data) Size() (n int) { + var l int + _ = l + if len(m.Txs) > 0 { + for _, b := range m.Txs { + l = len(b) + n += 1 + l + sovOptimint(uint64(l)) + } + } + if len(m.IntermediateStateRoots) > 0 { + for _, b := range m.IntermediateStateRoots { + l = len(b) + n += 1 + l + sovOptimint(uint64(l)) + } + } + if len(m.Evidence) > 0 { + for _, e := range m.Evidence { + l = e.Size() + n += 1 + l + sovOptimint(uint64(l)) + } + } + return n +} + +func (m *Block) Size() (n int) { + var l int + _ = l + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovOptimint(uint64(l)) + } + if m.Data != nil { + l = m.Data.Size() + n += 1 + l + sovOptimint(uint64(l)) + } + if m.LastCommit != nil { + l = m.LastCommit.Size() + n += 1 + l + sovOptimint(uint64(l)) + } + return n +} + +func sovOptimint(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOptimint(x uint64) (n int) { + return sovOptimint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Version) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Version: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Version: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) + } + m.Block = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Block |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field App", wireType) + } + m.App = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.App |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipOptimint(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOptimint + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Header) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Header: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOptimint + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Version == nil { + m.Version = &Version{} + } + if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NamespaceId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOptimint + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NamespaceId = append(m.NamespaceId[:0], dAtA[iNdEx:postIndex]...) + if m.NamespaceId == nil { + m.NamespaceId = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + } + m.Time = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Time |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastHeaderHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOptimint + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LastHeaderHash = append(m.LastHeaderHash[:0], dAtA[iNdEx:postIndex]...) + if m.LastHeaderHash == nil { + m.LastHeaderHash = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastCommitHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOptimint + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LastCommitHash = append(m.LastCommitHash[:0], dAtA[iNdEx:postIndex]...) + if m.LastCommitHash == nil { + m.LastCommitHash = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOptimint + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DataHash = append(m.DataHash[:0], dAtA[iNdEx:postIndex]...) + if m.DataHash == nil { + m.DataHash = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOptimint + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConsensusHash = append(m.ConsensusHash[:0], dAtA[iNdEx:postIndex]...) + if m.ConsensusHash == nil { + m.ConsensusHash = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOptimint + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) + if m.AppHash == nil { + m.AppHash = []byte{} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOptimint + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LastResultsHash = append(m.LastResultsHash[:0], dAtA[iNdEx:postIndex]...) + if m.LastResultsHash == nil { + m.LastResultsHash = []byte{} + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOptimint + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOptimint(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOptimint + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Commit) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Commit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Commit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HaderHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOptimint + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HaderHash = append(m.HaderHash[:0], dAtA[iNdEx:postIndex]...) + if m.HaderHash == nil { + m.HaderHash = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOptimint + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signatures = append(m.Signatures, make([]byte, postIndex-iNdEx)) + copy(m.Signatures[len(m.Signatures)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOptimint(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOptimint + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Data) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Data: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Data: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOptimint + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) + copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IntermediateStateRoots", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOptimint + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IntermediateStateRoots = append(m.IntermediateStateRoots, make([]byte, postIndex-iNdEx)) + copy(m.IntermediateStateRoots[len(m.IntermediateStateRoots)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOptimint + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Evidence = append(m.Evidence, &tendermint_abci.Evidence{}) + if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOptimint(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOptimint + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Block) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Block: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOptimint + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &Header{} + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOptimint + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Data == nil { + m.Data = &Data{} + } + if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastCommit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptimint + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOptimint + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LastCommit == nil { + m.LastCommit = &Commit{} + } + if err := m.LastCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOptimint(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOptimint + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipOptimint(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOptimint + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOptimint + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOptimint + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthOptimint + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOptimint + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipOptimint(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthOptimint = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOptimint = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("optimint.proto", fileDescriptorOptimint) } + +var fileDescriptorOptimint = []byte{ + // 517 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x93, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0x86, 0x71, 0x93, 0x26, 0xe9, 0xb8, 0x0d, 0xe9, 0x0a, 0x55, 0x2e, 0x15, 0x51, 0xb0, 0x84, + 0x14, 0x40, 0x4a, 0xd5, 0x20, 0x24, 0xae, 0x14, 0x90, 0xca, 0x75, 0x91, 0xb8, 0x5a, 0x1b, 0x7b, + 0x54, 0xaf, 0x88, 0xbd, 0xab, 0xdd, 0x4d, 0x05, 0x6f, 0x00, 0x17, 0xce, 0x3c, 0x12, 0x47, 0x1e, + 0x01, 0x85, 0x17, 0x41, 0x3b, 0xeb, 0xd8, 0xe9, 0x25, 0xda, 0xfd, 0xff, 0xcf, 0x93, 0x99, 0xf1, + 0x6f, 0x18, 0x2b, 0xed, 0x64, 0x25, 0x6b, 0xb7, 0xd0, 0x46, 0x39, 0xc5, 0x46, 0xbb, 0xfb, 0xe3, + 0x0b, 0x87, 0x75, 0x81, 0xc6, 0x9f, 0x2f, 0xc5, 0x2a, 0x97, 0x97, 0xee, 0x9b, 0x46, 0x1b, 0xb0, + 0xf4, 0x0a, 0x86, 0x9f, 0xd1, 0x58, 0xa9, 0x6a, 0xf6, 0x08, 0x0e, 0x57, 0x6b, 0x95, 0x7f, 0x49, + 0xa2, 0x59, 0x34, 0x3f, 0xe1, 0xe1, 0xc2, 0x26, 0xd0, 0x13, 0x5a, 0x27, 0x07, 0xa4, 0xf9, 0x63, + 0xfa, 0xb3, 0x07, 0x83, 0x1b, 0x14, 0x05, 0x1a, 0xf6, 0x12, 0x86, 0x77, 0xe1, 0x69, 0x7a, 0x28, + 0x5e, 0x9e, 0x2e, 0xda, 0x36, 0x9a, 0xb2, 0x7c, 0x47, 0xb0, 0xa7, 0x70, 0x5c, 0x8b, 0x0a, 0xad, + 0x16, 0x39, 0x66, 0xb2, 0xa0, 0x92, 0xc7, 0x3c, 0x6e, 0xb5, 0x8f, 0x05, 0x3b, 0x83, 0x41, 0x89, + 0xf2, 0xb6, 0x74, 0x49, 0x6f, 0x16, 0xcd, 0xfb, 0xbc, 0xb9, 0x31, 0x06, 0x7d, 0x27, 0x2b, 0x4c, + 0xfa, 0xa4, 0xd2, 0x99, 0xcd, 0x61, 0xb2, 0x16, 0xd6, 0x65, 0x25, 0xb5, 0x92, 0x95, 0xc2, 0x96, + 0xc9, 0x21, 0x95, 0x1c, 0x7b, 0x3d, 0x74, 0x78, 0x23, 0x6c, 0xd9, 0x92, 0xb9, 0xaa, 0x2a, 0xe9, + 0x02, 0x39, 0xe8, 0xc8, 0x77, 0x24, 0x13, 0x79, 0x01, 0x47, 0x85, 0x70, 0x22, 0x20, 0x43, 0x42, + 0x46, 0x5e, 0x20, 0xf3, 0x19, 0x8c, 0x73, 0x55, 0x5b, 0xac, 0xed, 0xc6, 0x06, 0x62, 0x44, 0xc4, + 0x49, 0xab, 0x12, 0x76, 0x0e, 0x23, 0xa1, 0x75, 0x00, 0x8e, 0x08, 0x18, 0x0a, 0xad, 0xc9, 0x7a, + 0x01, 0xa7, 0xd4, 0x88, 0x41, 0xbb, 0x59, 0xbb, 0xa6, 0x08, 0x10, 0xf3, 0xd0, 0x1b, 0x3c, 0xe8, + 0xc4, 0x3e, 0x87, 0x89, 0x36, 0x4a, 0x2b, 0x8b, 0x26, 0x13, 0x45, 0x61, 0xd0, 0xda, 0x24, 0x0e, + 0xe8, 0x4e, 0x7f, 0x1b, 0xe4, 0x34, 0x83, 0x41, 0x98, 0x61, 0x6f, 0x7f, 0xd1, 0xbd, 0xfd, 0x3d, + 0x01, 0x28, 0xbb, 0x2d, 0x85, 0xc5, 0x1f, 0x95, 0xed, 0x82, 0xa6, 0x00, 0x56, 0xde, 0xd6, 0xc2, + 0x6d, 0x0c, 0xda, 0xa4, 0x37, 0xeb, 0xcd, 0x8f, 0xf9, 0x9e, 0x92, 0xfe, 0x88, 0xa0, 0xff, 0x5e, + 0x38, 0xe1, 0xc3, 0xe0, 0xbe, 0xda, 0x24, 0x22, 0xc2, 0x1f, 0xd9, 0x1b, 0x48, 0x64, 0xed, 0xd0, + 0x54, 0x58, 0x48, 0xe1, 0x30, 0xb3, 0xce, 0xff, 0x1a, 0xa5, 0x9c, 0x4d, 0x0e, 0x08, 0x3b, 0xdb, + 0xf7, 0x3f, 0x79, 0x9b, 0x7b, 0x97, 0xbd, 0x86, 0x11, 0xde, 0xc9, 0x02, 0xeb, 0x1c, 0xe9, 0x2f, + 0xe3, 0xe5, 0xf9, 0xa2, 0x4b, 0xea, 0xc2, 0x27, 0x75, 0xf1, 0xa1, 0x01, 0x78, 0x8b, 0xa6, 0xdf, + 0x23, 0x38, 0xbc, 0xa6, 0x64, 0xce, 0xfd, 0xb0, 0x7e, 0x86, 0x26, 0x7b, 0x93, 0x2e, 0x7b, 0xe1, + 0xe5, 0xf3, 0xc6, 0x67, 0x29, 0xf4, 0xfd, 0x5b, 0xa4, 0xc1, 0xe3, 0xe5, 0xb8, 0xe3, 0xfc, 0x50, + 0x9c, 0x3c, 0x76, 0x05, 0xf1, 0x5e, 0x48, 0x28, 0x7f, 0xf7, 0x4a, 0x86, 0x0d, 0x73, 0xe8, 0x12, + 0x73, 0x3d, 0xf9, 0xbd, 0x9d, 0x46, 0x7f, 0xb6, 0xd3, 0xe8, 0xef, 0x76, 0x1a, 0xfd, 0xfa, 0x37, + 0x7d, 0xb0, 0x1a, 0xd0, 0x47, 0xf5, 0xea, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdb, 0x88, 0x13, + 0x8f, 0x8d, 0x03, 0x00, 0x00, +}