diff --git a/common/proto_common.pb.go b/common/proto_common.pb.go index cfb940a644..9ffbc5669f 100644 --- a/common/proto_common.pb.go +++ b/common/proto_common.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.34.2 // protoc v5.28.2 // source: common/proto_common.proto @@ -30,9 +30,11 @@ type ProtoLocation struct { func (x *ProtoLocation) Reset() { *x = ProtoLocation{} - mi := &file_common_proto_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_common_proto_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoLocation) String() string { @@ -43,7 +45,7 @@ func (*ProtoLocation) ProtoMessage() {} func (x *ProtoLocation) ProtoReflect() protoreflect.Message { mi := &file_common_proto_common_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -75,9 +77,11 @@ type ProtoHash struct { func (x *ProtoHash) Reset() { *x = ProtoHash{} - mi := &file_common_proto_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_common_proto_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoHash) String() string { @@ -88,7 +92,7 @@ func (*ProtoHash) ProtoMessage() {} func (x *ProtoHash) ProtoReflect() protoreflect.Message { mi := &file_common_proto_common_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -120,9 +124,11 @@ type ProtoHashes struct { func (x *ProtoHashes) Reset() { *x = ProtoHashes{} - mi := &file_common_proto_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_common_proto_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoHashes) String() string { @@ -133,7 +139,7 @@ func (*ProtoHashes) ProtoMessage() {} func (x *ProtoHashes) ProtoReflect() protoreflect.Message { mi := &file_common_proto_common_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -165,9 +171,11 @@ type ProtoAddress struct { func (x *ProtoAddress) Reset() { *x = ProtoAddress{} - mi := &file_common_proto_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_common_proto_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoAddress) String() string { @@ -178,7 +186,7 @@ func (*ProtoAddress) ProtoMessage() {} func (x *ProtoAddress) ProtoReflect() protoreflect.Message { mi := &file_common_proto_common_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -210,9 +218,11 @@ type ProtoNumber struct { func (x *ProtoNumber) Reset() { *x = ProtoNumber{} - mi := &file_common_proto_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_common_proto_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoNumber) String() string { @@ -223,7 +233,7 @@ func (*ProtoNumber) ProtoMessage() {} func (x *ProtoNumber) ProtoReflect() protoreflect.Message { mi := &file_common_proto_common_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -255,9 +265,11 @@ type ProtoLocations struct { func (x *ProtoLocations) Reset() { *x = ProtoLocations{} - mi := &file_common_proto_common_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_common_proto_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoLocations) String() string { @@ -268,7 +280,7 @@ func (*ProtoLocations) ProtoMessage() {} func (x *ProtoLocations) ProtoReflect() protoreflect.Message { mi := &file_common_proto_common_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -355,6 +367,80 @@ func file_common_proto_common_proto_init() { if File_common_proto_common_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_common_proto_common_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ProtoLocation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_proto_common_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ProtoHash); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_proto_common_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ProtoHashes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_proto_common_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ProtoAddress); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_proto_common_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*ProtoNumber); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_proto_common_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ProtoLocations); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/core/chain_indexer.go b/core/chain_indexer.go index 6cc0371f21..c8ae40e061 100644 --- a/core/chain_indexer.go +++ b/core/chain_indexer.go @@ -19,7 +19,6 @@ package core import ( "context" "encoding/binary" - "errors" "fmt" "math/big" "runtime/debug" @@ -28,6 +27,7 @@ import ( "time" "github.com/dominant-strategies/go-quai/common" + "github.com/dominant-strategies/go-quai/consensus/misc" "github.com/dominant-strategies/go-quai/core/rawdb" "github.com/dominant-strategies/go-quai/core/state" "github.com/dominant-strategies/go-quai/core/types" @@ -36,6 +36,7 @@ import ( "github.com/dominant-strategies/go-quai/event" "github.com/dominant-strategies/go-quai/log" "github.com/dominant-strategies/go-quai/params" + "google.golang.org/protobuf/proto" ) var PruneDepth = uint64(100000000) // Number of blocks behind in which we begin pruning old block data @@ -702,10 +703,6 @@ func (c *ChainIndexer) addOutpointsToIndexer(addressOutpoints map[string]map[str for _, tx := range utxos { for _, in := range tx.TxIn() { - if types.IsCoinBaseTx(tx) { - continue - } - outpoint := in.PreviousOutPoint address := crypto.PubkeyBytesToAddress(in.PubKey, config.Location).Hex() @@ -740,66 +737,145 @@ func (c *ChainIndexer) addOutpointsToIndexer(addressOutpoints map[string]map[str addressOutpoints[address][outpointAndDenom.Key()] = outpointAndDenom } } + + for _, tx := range block.Body().ExternalTransactions() { + if tx.EtxType() == types.CoinbaseType && tx.To().IsInQiLedgerScope() { + lockupByte := tx.Data()[0] + lockup := new(big.Int).SetUint64(params.LockupByteToBlockDepth[lockupByte]) + lockup.Add(lockup, block.Number(nodeCtx)) + + coinbaseAddr := tx.To().Hex() + + value := params.CalculateCoinbaseValueWithLockup(tx.Value(), lockupByte) + denominations := misc.FindMinDenominations(value) + outputIndex := uint16(0) + // Iterate over the denominations in descending order + for denomination := types.MaxDenomination; denomination >= 0; denomination-- { + // If the denomination count is zero, skip it + if denominations[uint8(denomination)] == 0 { + continue + } + for j := uint64(0); j < denominations[uint8(denomination)]; j++ { + if outputIndex >= types.MaxOutputIndex { + // No more gas, the rest of the denominations are lost but the tx is still valid + break + } + // the ETX hash is guaranteed to be unique + outpointAndDenom := &types.OutpointAndDenomination{ + TxHash: tx.Hash(), + Index: outputIndex, + Denomination: uint8(denomination), + Lock: lockup, + } + if _, exists := addressOutpoints[coinbaseAddr]; !exists { + addressOutpoints[coinbaseAddr] = rawdb.ReadOutpointsForAddress(c.chainDb, coinbaseAddr) + } + addressOutpoints[coinbaseAddr][outpointAndDenom.Key()] = outpointAndDenom + outputIndex++ + } + } + } else if tx.EtxType() == types.ConversionType && tx.To().IsInQiLedgerScope() { + lock := new(big.Int).Add(block.Number(nodeCtx), new(big.Int).SetUint64(params.ConversionLockPeriod)) + value := tx.Value() + addr := tx.To().Hex() + txGas := tx.Gas() + if txGas < params.TxGas { + continue + } + txGas -= params.TxGas + denominations := misc.FindMinDenominations(value) + outputIndex := uint16(0) + // Iterate over the denominations in descending order + for denomination := types.MaxDenomination; denomination >= 0; denomination-- { + // If the denomination count is zero, skip it + if denominations[uint8(denomination)] == 0 { + continue + } + for j := uint64(0); j < denominations[uint8(denomination)]; j++ { + if txGas < params.CallValueTransferGas || outputIndex >= types.MaxOutputIndex { + // No more gas, the rest of the denominations are lost but the tx is still valid + break + } + txGas -= params.CallValueTransferGas + // the ETX hash is guaranteed to be unique + + outpointAndDenom := &types.OutpointAndDenomination{ + TxHash: tx.Hash(), + Index: outputIndex, + Denomination: uint8(denomination), + Lock: lock, + } + if _, exists := addressOutpoints[addr]; !exists { + addressOutpoints[addr] = rawdb.ReadOutpointsForAddress(c.chainDb, addr) + } + addressOutpoints[addr][outpointAndDenom.Key()] = outpointAndDenom + outputIndex++ + } + } + } + } } // reorgUtxoIndexer adds back previously removed outpoints and removes newly added outpoints. // This is done in reverse order from the old header to the common ancestor. func (c *ChainIndexer) reorgUtxoIndexer(headers []*types.WorkObject, addressOutpoints map[string]map[string]*types.OutpointAndDenomination, nodeCtx int, config params.ChainConfig) error { for _, header := range headers { - block := rawdb.ReadWorkObject(c.chainDb, header.NumberU64(nodeCtx), header.Hash(), types.BlockObject) - - for _, tx := range block.QiTransactions() { - for i, out := range tx.TxOut() { - address := out.Address + sutxos, err := rawdb.ReadSpentUTXOs(c.chainDb, header.Hash()) + if err != nil { + return err + } + trimmedUtxos, err := rawdb.ReadTrimmedUTXOs(c.chainDb, header.Hash()) + if err != nil { + return err + } + sutxos = append(sutxos, trimmedUtxos...) + for _, sutxo := range sutxos { - addr := common.BytesToAddress(address, config.Location).Hex() - outpointsForAddress, exists := addressOutpoints[addr] - if !exists { - outpointsForAddress = rawdb.ReadOutpointsForAddress(c.chainDb, addr) - addressOutpoints[addr] = outpointsForAddress - } + addrBytes := sutxo.Address + address := common.BytesToAddress(addrBytes, config.Location).Hex() - // reconstruct outpoint to remove it via outpoint.Key() - outpoint := types.OutPoint{ - TxHash: tx.Hash(), - Index: uint16(i), - } + outpointAndDenom := &types.OutpointAndDenomination{ + TxHash: sutxo.TxHash, + Index: sutxo.Index, + Denomination: sutxo.Denomination, + Lock: sutxo.Lock, + } - delete(outpointsForAddress, outpoint.Key()) + if _, exists := addressOutpoints[address]; !exists { + addressOutpoints[address] = rawdb.ReadOutpointsForAddress(c.chainDb, address) } + addressOutpoints[address][outpointAndDenom.Key()] = outpointAndDenom - if types.IsCoinBaseTx(tx) { + } + utxoKeys, err := rawdb.ReadCreatedUTXOKeys(c.chainDb, header.Hash()) + if err != nil { + return err + } + for _, key := range utxoKeys { + if len(key) == rawdb.UtxoKeyWithDenominationLength { + key = key[:rawdb.UtxoKeyLength] // The last byte of the key is the denomination (but only in CreatedUTXOKeys) + } + data, _ := c.chainDb.Get(key) + utxoProto := new(types.ProtoTxOut) + if err := proto.Unmarshal(data, utxoProto); err != nil { continue } - - for _, in := range tx.TxIn() { - outpoint := in.PreviousOutPoint - address := crypto.PubkeyBytesToAddress(in.PubKey, config.Location).Hex() - parentNumber := rawdb.ReadHeaderNumber(c.chainDb, block.ParentHash(nodeCtx)) - if parentNumber == nil { - return errors.New("parent number cannot be found") - } - - entry := rawdb.GetUTXO(c.chainDb, outpoint.TxHash, outpoint.Index) - if entry == nil { - // missing entry while tryig to add back outpoint - continue - } - - outpointAndDenom := &types.OutpointAndDenomination{ - TxHash: outpoint.TxHash, - Index: outpoint.Index, - Denomination: entry.Denomination, - } - - if _, exists := addressOutpoints[address]; !exists { - addressOutpoints[address] = rawdb.ReadOutpointsForAddress(c.chainDb, address) - } - addressOutpoints[address][outpointAndDenom.Key()] = outpointAndDenom + utxo := new(types.TxOut) + if err := utxo.ProtoDecode(utxoProto); err != nil { + continue } + address := common.BytesToAddress(utxo.Address, config.Location).Hex() + outpointsForAddress, exists := addressOutpoints[address] + if !exists { + outpointsForAddress = rawdb.ReadOutpointsForAddress(c.chainDb, address) + addressOutpoints[address] = outpointsForAddress + } + keyWithoutPrefix := key[len(rawdb.UtxoPrefix):] + delete(outpointsForAddress, common.Bytes2Hex(keyWithoutPrefix)) } + } return nil } diff --git a/core/rawdb/accessors_chain_test.go b/core/rawdb/accessors_chain_test.go index 58c8786fb1..2eeb043eea 100644 --- a/core/rawdb/accessors_chain_test.go +++ b/core/rawdb/accessors_chain_test.go @@ -787,12 +787,14 @@ func TestAddressOutpointsStorage(t *testing.T) { TxHash: common.Hash{1}, Index: uint16(1), Denomination: uint8(1), + Lock: big.NewInt(0), } outpoint2 := types.OutpointAndDenomination{ TxHash: common.Hash{2}, Index: uint16(1), Denomination: uint8(1), + Lock: big.NewInt(0), } outpointMap := map[string]*types.OutpointAndDenomination{ @@ -811,17 +813,11 @@ func TestAddressOutpointsStorage(t *testing.T) { WriteAddressOutpoints(db, addressOutpointMap) if entry := ReadOutpointsForAddress(db, address); len(entry) == 0 || *entry[outpoint.Key()] != outpoint { - if len(entry) > 0 { - t.Fatalf("expected: %v \n found: %v", entry[outpoint.Key()], outpoint) - } - t.Fatal("Stored outpoint not found") + require.Equal(t, outpoint, *entry[outpoint.Key()]) } if entry := ReadOutpointsForAddress(db, address2); len(entry) == 0 || *entry[outpoint2.Key()] != outpoint2 { - if len(entry) > 0 { - t.Fatalf("expected: %v \n found: %v", entry[outpoint2.Key()], outpoint2) - } - t.Fatal("Stored outpoint not found") + require.Equal(t, outpoint2, *entry[outpoint2.Key()]) } } diff --git a/core/rawdb/db.pb.go b/core/rawdb/db.pb.go index 0ff70349e8..0c54a7f092 100644 --- a/core/rawdb/db.pb.go +++ b/core/rawdb/db.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.34.2 // protoc v5.28.2 // source: core/rawdb/db.proto @@ -31,9 +31,11 @@ type ProtoNumber struct { func (x *ProtoNumber) Reset() { *x = ProtoNumber{} - mi := &file_core_rawdb_db_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_rawdb_db_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoNumber) String() string { @@ -44,7 +46,7 @@ func (*ProtoNumber) ProtoMessage() {} func (x *ProtoNumber) ProtoReflect() protoreflect.Message { mi := &file_core_rawdb_db_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -78,9 +80,11 @@ type ProtoLegacyTxLookupEntry struct { func (x *ProtoLegacyTxLookupEntry) Reset() { *x = ProtoLegacyTxLookupEntry{} - mi := &file_core_rawdb_db_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_rawdb_db_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoLegacyTxLookupEntry) String() string { @@ -91,7 +95,7 @@ func (*ProtoLegacyTxLookupEntry) ProtoMessage() {} func (x *ProtoLegacyTxLookupEntry) ProtoReflect() protoreflect.Message { mi := &file_core_rawdb_db_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -182,6 +186,32 @@ func file_core_rawdb_db_proto_init() { if File_core_rawdb_db_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_core_rawdb_db_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ProtoNumber); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_rawdb_db_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ProtoLegacyTxLookupEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/core/state_processor.go b/core/state_processor.go index f1dd68d8de..533c54a36a 100644 --- a/core/state_processor.go +++ b/core/state_processor.go @@ -458,6 +458,7 @@ func (p *StateProcessor) Process(block *types.WorkObject, batch ethdb.Batch) (ty if lockup.Uint64() < params.ConversionLockPeriod { return nil, nil, nil, nil, 0, 0, 0, nil, fmt.Errorf("coinbase lockup period is less than the minimum lockup period of %d blocks", params.ConversionLockPeriod) } + lockup.Add(lockup, blockNumber) value := params.CalculateCoinbaseValueWithLockup(tx.Value(), lockupByte) denominations := misc.FindMinDenominations(value) outputIndex := uint16(0) diff --git a/core/types/proto_block.pb.go b/core/types/proto_block.pb.go index 597e0d26a8..d0f04c8d03 100644 --- a/core/types/proto_block.pb.go +++ b/core/types/proto_block.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.34.2 // protoc v5.28.2 // source: core/types/proto_block.proto @@ -66,9 +66,11 @@ type ProtoHeader struct { func (x *ProtoHeader) Reset() { *x = ProtoHeader{} - mi := &file_core_types_proto_block_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoHeader) String() string { @@ -79,7 +81,7 @@ func (*ProtoHeader) ProtoMessage() {} func (x *ProtoHeader) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -378,9 +380,11 @@ type ProtoTransaction struct { func (x *ProtoTransaction) Reset() { *x = ProtoTransaction{} - mi := &file_core_types_proto_block_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoTransaction) String() string { @@ -391,7 +395,7 @@ func (*ProtoTransaction) ProtoMessage() {} func (x *ProtoTransaction) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -577,9 +581,11 @@ type ProtoTransactions struct { func (x *ProtoTransactions) Reset() { *x = ProtoTransactions{} - mi := &file_core_types_proto_block_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoTransactions) String() string { @@ -590,7 +596,7 @@ func (*ProtoTransactions) ProtoMessage() {} func (x *ProtoTransactions) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -622,9 +628,11 @@ type ProtoHeaders struct { func (x *ProtoHeaders) Reset() { *x = ProtoHeaders{} - mi := &file_core_types_proto_block_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoHeaders) String() string { @@ -635,7 +643,7 @@ func (*ProtoHeaders) ProtoMessage() {} func (x *ProtoHeaders) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -667,9 +675,11 @@ type ProtoManifest struct { func (x *ProtoManifest) Reset() { *x = ProtoManifest{} - mi := &file_core_types_proto_block_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoManifest) String() string { @@ -680,7 +690,7 @@ func (*ProtoManifest) ProtoMessage() {} func (x *ProtoManifest) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -712,9 +722,11 @@ type ProtoAccessList struct { func (x *ProtoAccessList) Reset() { *x = ProtoAccessList{} - mi := &file_core_types_proto_block_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoAccessList) String() string { @@ -725,7 +737,7 @@ func (*ProtoAccessList) ProtoMessage() {} func (x *ProtoAccessList) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -768,9 +780,11 @@ type ProtoWorkObjectHeader struct { func (x *ProtoWorkObjectHeader) Reset() { *x = ProtoWorkObjectHeader{} - mi := &file_core_types_proto_block_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoWorkObjectHeader) String() string { @@ -781,7 +795,7 @@ func (*ProtoWorkObjectHeader) ProtoMessage() {} func (x *ProtoWorkObjectHeader) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -890,9 +904,11 @@ type ProtoWorkObjectHeaders struct { func (x *ProtoWorkObjectHeaders) Reset() { *x = ProtoWorkObjectHeaders{} - mi := &file_core_types_proto_block_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoWorkObjectHeaders) String() string { @@ -903,7 +919,7 @@ func (*ProtoWorkObjectHeaders) ProtoMessage() {} func (x *ProtoWorkObjectHeaders) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -940,9 +956,11 @@ type ProtoWorkObjectBody struct { func (x *ProtoWorkObjectBody) Reset() { *x = ProtoWorkObjectBody{} - mi := &file_core_types_proto_block_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoWorkObjectBody) String() string { @@ -953,7 +971,7 @@ func (*ProtoWorkObjectBody) ProtoMessage() {} func (x *ProtoWorkObjectBody) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1022,9 +1040,11 @@ type ProtoWorkObject struct { func (x *ProtoWorkObject) Reset() { *x = ProtoWorkObject{} - mi := &file_core_types_proto_block_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoWorkObject) String() string { @@ -1035,7 +1055,7 @@ func (*ProtoWorkObject) ProtoMessage() {} func (x *ProtoWorkObject) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1081,9 +1101,11 @@ type ProtoWorkObjects struct { func (x *ProtoWorkObjects) Reset() { *x = ProtoWorkObjects{} - mi := &file_core_types_proto_block_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoWorkObjects) String() string { @@ -1094,7 +1116,7 @@ func (*ProtoWorkObjects) ProtoMessage() {} func (x *ProtoWorkObjects) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1126,9 +1148,11 @@ type ProtoWorkObjectBlockView struct { func (x *ProtoWorkObjectBlockView) Reset() { *x = ProtoWorkObjectBlockView{} - mi := &file_core_types_proto_block_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoWorkObjectBlockView) String() string { @@ -1139,7 +1163,7 @@ func (*ProtoWorkObjectBlockView) ProtoMessage() {} func (x *ProtoWorkObjectBlockView) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1171,9 +1195,11 @@ type ProtoWorkObjectBlocksView struct { func (x *ProtoWorkObjectBlocksView) Reset() { *x = ProtoWorkObjectBlocksView{} - mi := &file_core_types_proto_block_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoWorkObjectBlocksView) String() string { @@ -1184,7 +1210,7 @@ func (*ProtoWorkObjectBlocksView) ProtoMessage() {} func (x *ProtoWorkObjectBlocksView) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1216,9 +1242,11 @@ type ProtoWorkObjectHeaderView struct { func (x *ProtoWorkObjectHeaderView) Reset() { *x = ProtoWorkObjectHeaderView{} - mi := &file_core_types_proto_block_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoWorkObjectHeaderView) String() string { @@ -1229,7 +1257,7 @@ func (*ProtoWorkObjectHeaderView) ProtoMessage() {} func (x *ProtoWorkObjectHeaderView) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1261,9 +1289,11 @@ type ProtoWorkObjectShareView struct { func (x *ProtoWorkObjectShareView) Reset() { *x = ProtoWorkObjectShareView{} - mi := &file_core_types_proto_block_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoWorkObjectShareView) String() string { @@ -1274,7 +1304,7 @@ func (*ProtoWorkObjectShareView) ProtoMessage() {} func (x *ProtoWorkObjectShareView) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1307,9 +1337,11 @@ type ProtoAccessTuple struct { func (x *ProtoAccessTuple) Reset() { *x = ProtoAccessTuple{} - mi := &file_core_types_proto_block_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoAccessTuple) String() string { @@ -1320,7 +1352,7 @@ func (*ProtoAccessTuple) ProtoMessage() {} func (x *ProtoAccessTuple) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1365,9 +1397,11 @@ type ProtoReceiptForStorage struct { func (x *ProtoReceiptForStorage) Reset() { *x = ProtoReceiptForStorage{} - mi := &file_core_types_proto_block_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoReceiptForStorage) String() string { @@ -1378,7 +1412,7 @@ func (*ProtoReceiptForStorage) ProtoMessage() {} func (x *ProtoReceiptForStorage) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1452,9 +1486,11 @@ type ProtoReceiptsForStorage struct { func (x *ProtoReceiptsForStorage) Reset() { *x = ProtoReceiptsForStorage{} - mi := &file_core_types_proto_block_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoReceiptsForStorage) String() string { @@ -1465,7 +1501,7 @@ func (*ProtoReceiptsForStorage) ProtoMessage() {} func (x *ProtoReceiptsForStorage) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1499,9 +1535,11 @@ type ProtoLogForStorage struct { func (x *ProtoLogForStorage) Reset() { *x = ProtoLogForStorage{} - mi := &file_core_types_proto_block_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoLogForStorage) String() string { @@ -1512,7 +1550,7 @@ func (*ProtoLogForStorage) ProtoMessage() {} func (x *ProtoLogForStorage) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1558,9 +1596,11 @@ type ProtoLogsForStorage struct { func (x *ProtoLogsForStorage) Reset() { *x = ProtoLogsForStorage{} - mi := &file_core_types_proto_block_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoLogsForStorage) String() string { @@ -1571,7 +1611,7 @@ func (*ProtoLogsForStorage) ProtoMessage() {} func (x *ProtoLogsForStorage) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[19] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1604,9 +1644,11 @@ type ProtoPendingHeader struct { func (x *ProtoPendingHeader) Reset() { *x = ProtoPendingHeader{} - mi := &file_core_types_proto_block_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoPendingHeader) String() string { @@ -1617,7 +1659,7 @@ func (*ProtoPendingHeader) ProtoMessage() {} func (x *ProtoPendingHeader) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[20] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1657,9 +1699,11 @@ type ProtoTermini struct { func (x *ProtoTermini) Reset() { *x = ProtoTermini{} - mi := &file_core_types_proto_block_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoTermini) String() string { @@ -1670,7 +1714,7 @@ func (*ProtoTermini) ProtoMessage() {} func (x *ProtoTermini) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[21] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1709,9 +1753,11 @@ type ProtoEtxSet struct { func (x *ProtoEtxSet) Reset() { *x = ProtoEtxSet{} - mi := &file_core_types_proto_block_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoEtxSet) String() string { @@ -1722,7 +1768,7 @@ func (*ProtoEtxSet) ProtoMessage() {} func (x *ProtoEtxSet) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[22] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1755,9 +1801,11 @@ type ProtoPendingEtxs struct { func (x *ProtoPendingEtxs) Reset() { *x = ProtoPendingEtxs{} - mi := &file_core_types_proto_block_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoPendingEtxs) String() string { @@ -1768,7 +1816,7 @@ func (*ProtoPendingEtxs) ProtoMessage() {} func (x *ProtoPendingEtxs) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[23] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1808,9 +1856,11 @@ type ProtoPendingEtxsRollup struct { func (x *ProtoPendingEtxsRollup) Reset() { *x = ProtoPendingEtxsRollup{} - mi := &file_core_types_proto_block_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoPendingEtxsRollup) String() string { @@ -1821,7 +1871,7 @@ func (*ProtoPendingEtxsRollup) ProtoMessage() {} func (x *ProtoPendingEtxsRollup) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[24] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1860,9 +1910,11 @@ type ProtoTxIns struct { func (x *ProtoTxIns) Reset() { *x = ProtoTxIns{} - mi := &file_core_types_proto_block_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoTxIns) String() string { @@ -1873,7 +1925,7 @@ func (*ProtoTxIns) ProtoMessage() {} func (x *ProtoTxIns) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[25] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1905,9 +1957,11 @@ type ProtoTxOuts struct { func (x *ProtoTxOuts) Reset() { *x = ProtoTxOuts{} - mi := &file_core_types_proto_block_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoTxOuts) String() string { @@ -1918,7 +1972,7 @@ func (*ProtoTxOuts) ProtoMessage() {} func (x *ProtoTxOuts) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[26] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1951,9 +2005,11 @@ type ProtoTxIn struct { func (x *ProtoTxIn) Reset() { *x = ProtoTxIn{} - mi := &file_core_types_proto_block_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoTxIn) String() string { @@ -1964,7 +2020,7 @@ func (*ProtoTxIn) ProtoMessage() {} func (x *ProtoTxIn) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[27] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2004,9 +2060,11 @@ type ProtoOutPoint struct { func (x *ProtoOutPoint) Reset() { *x = ProtoOutPoint{} - mi := &file_core_types_proto_block_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoOutPoint) String() string { @@ -2017,7 +2075,7 @@ func (*ProtoOutPoint) ProtoMessage() {} func (x *ProtoOutPoint) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[28] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2058,9 +2116,11 @@ type ProtoTxOut struct { func (x *ProtoTxOut) Reset() { *x = ProtoTxOut{} - mi := &file_core_types_proto_block_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoTxOut) String() string { @@ -2071,7 +2131,7 @@ func (*ProtoTxOut) ProtoMessage() {} func (x *ProtoTxOut) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[29] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2115,13 +2175,16 @@ type ProtoOutPointAndDenomination struct { Hash *common.ProtoHash `protobuf:"bytes,1,opt,name=hash,proto3,oneof" json:"hash,omitempty"` Index *uint32 `protobuf:"varint,2,opt,name=index,proto3,oneof" json:"index,omitempty"` Denomination *uint32 `protobuf:"varint,3,opt,name=denomination,proto3,oneof" json:"denomination,omitempty"` + Lock []byte `protobuf:"bytes,4,opt,name=lock,proto3,oneof" json:"lock,omitempty"` } func (x *ProtoOutPointAndDenomination) Reset() { *x = ProtoOutPointAndDenomination{} - mi := &file_core_types_proto_block_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoOutPointAndDenomination) String() string { @@ -2132,7 +2195,7 @@ func (*ProtoOutPointAndDenomination) ProtoMessage() {} func (x *ProtoOutPointAndDenomination) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[30] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2168,6 +2231,13 @@ func (x *ProtoOutPointAndDenomination) GetDenomination() uint32 { return 0 } +func (x *ProtoOutPointAndDenomination) GetLock() []byte { + if x != nil { + return x.Lock + } + return nil +} + type ProtoAddressOutPoints struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2178,9 +2248,11 @@ type ProtoAddressOutPoints struct { func (x *ProtoAddressOutPoints) Reset() { *x = ProtoAddressOutPoints{} - mi := &file_core_types_proto_block_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoAddressOutPoints) String() string { @@ -2191,7 +2263,7 @@ func (*ProtoAddressOutPoints) ProtoMessage() {} func (x *ProtoAddressOutPoints) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[31] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2223,9 +2295,11 @@ type ProtoOutPointsMap struct { func (x *ProtoOutPointsMap) Reset() { *x = ProtoOutPointsMap{} - mi := &file_core_types_proto_block_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoOutPointsMap) String() string { @@ -2236,7 +2310,7 @@ func (*ProtoOutPointsMap) ProtoMessage() {} func (x *ProtoOutPointsMap) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[32] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2269,9 +2343,11 @@ type ProtoSpentUTXO struct { func (x *ProtoSpentUTXO) Reset() { *x = ProtoSpentUTXO{} - mi := &file_core_types_proto_block_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoSpentUTXO) String() string { @@ -2282,7 +2358,7 @@ func (*ProtoSpentUTXO) ProtoMessage() {} func (x *ProtoSpentUTXO) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[33] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2321,9 +2397,11 @@ type ProtoSpentUTXOs struct { func (x *ProtoSpentUTXOs) Reset() { *x = ProtoSpentUTXOs{} - mi := &file_core_types_proto_block_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoSpentUTXOs) String() string { @@ -2334,7 +2412,7 @@ func (*ProtoSpentUTXOs) ProtoMessage() {} func (x *ProtoSpentUTXOs) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[34] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2366,9 +2444,11 @@ type ProtoKeys struct { func (x *ProtoKeys) Reset() { *x = ProtoKeys{} - mi := &file_core_types_proto_block_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoKeys) String() string { @@ -2379,7 +2459,7 @@ func (*ProtoKeys) ProtoMessage() {} func (x *ProtoKeys) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[35] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2411,9 +2491,11 @@ type ProtoTrimDepths struct { func (x *ProtoTrimDepths) Reset() { *x = ProtoTrimDepths{} - mi := &file_core_types_proto_block_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoTrimDepths) String() string { @@ -2424,7 +2506,7 @@ func (*ProtoTrimDepths) ProtoMessage() {} func (x *ProtoTrimDepths) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[36] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2456,9 +2538,11 @@ type ProtoTokenChoiceSet struct { func (x *ProtoTokenChoiceSet) Reset() { *x = ProtoTokenChoiceSet{} - mi := &file_core_types_proto_block_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoTokenChoiceSet) String() string { @@ -2469,7 +2553,7 @@ func (*ProtoTokenChoiceSet) ProtoMessage() {} func (x *ProtoTokenChoiceSet) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[37] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2501,9 +2585,11 @@ type ProtoTokenChoiceArray struct { func (x *ProtoTokenChoiceArray) Reset() { *x = ProtoTokenChoiceArray{} - mi := &file_core_types_proto_block_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoTokenChoiceArray) String() string { @@ -2514,7 +2600,7 @@ func (*ProtoTokenChoiceArray) ProtoMessage() {} func (x *ProtoTokenChoiceArray) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[38] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2548,9 +2634,11 @@ type ProtoTokenChoice struct { func (x *ProtoTokenChoice) Reset() { *x = ProtoTokenChoice{} - mi := &file_core_types_proto_block_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoTokenChoice) String() string { @@ -2561,7 +2649,7 @@ func (*ProtoTokenChoice) ProtoMessage() {} func (x *ProtoTokenChoice) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[39] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2608,9 +2696,11 @@ type ProtoBetas struct { func (x *ProtoBetas) Reset() { *x = ProtoBetas{} - mi := &file_core_types_proto_block_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_core_types_proto_block_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoBetas) String() string { @@ -2621,7 +2711,7 @@ func (*ProtoBetas) ProtoMessage() {} func (x *ProtoBetas) ProtoReflect() protoreflect.Message { mi := &file_core_types_proto_block_proto_msgTypes[40] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3133,7 +3223,7 @@ var file_core_types_proto_block_proto_rawDesc = []byte{ 0x0c, 0x48, 0x02, 0x52, 0x04, 0x6c, 0x6f, 0x63, 0x6b, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6c, 0x6f, - 0x63, 0x6b, 0x22, 0xb2, 0x01, 0x0a, 0x1c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4f, 0x75, 0x74, 0x50, + 0x63, 0x6b, 0x22, 0xd4, 0x01, 0x0a, 0x1c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x6e, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, @@ -3142,83 +3232,85 @@ var file_core_types_proto_block_proto_rawDesc = []byte{ 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x88, 0x01, 0x01, 0x12, 0x27, 0x0a, 0x0c, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x02, 0x52, 0x0c, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc6, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x12, 0x4a, 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x50, 0x72, + 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0c, 0x48, 0x03, 0x52, 0x04, 0x6c, 0x6f, 0x63, 0x6b, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x42, + 0x0f, 0x0a, 0x0d, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0xc6, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x2e, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x1a, 0x61, 0x0a, - 0x0e, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4f, 0x75, - 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x6e, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0xae, 0x01, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x4d, 0x61, 0x70, 0x12, 0x3f, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x4d, 0x61, - 0x70, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, - 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x1a, 0x58, 0x0a, 0x0c, 0x45, 0x6e, 0x74, 0x72, 0x69, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4f, 0x75, 0x74, - 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0x8c, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x53, 0x70, 0x65, 0x6e, 0x74, - 0x55, 0x54, 0x58, 0x4f, 0x12, 0x35, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, - 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x05, 0x73, - 0x75, 0x74, 0x78, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x54, 0x78, 0x4f, 0x75, 0x74, 0x48, 0x01, 0x52, - 0x05, 0x73, 0x75, 0x74, 0x78, 0x6f, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6f, 0x75, - 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x75, 0x74, 0x78, 0x6f, - 0x22, 0x40, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x53, 0x70, 0x65, 0x6e, 0x74, 0x55, 0x54, - 0x58, 0x4f, 0x73, 0x12, 0x2d, 0x0a, 0x06, 0x73, 0x75, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x53, 0x70, 0x65, 0x6e, 0x74, 0x55, 0x54, 0x58, 0x4f, 0x52, 0x06, 0x73, 0x75, 0x74, 0x78, - 0x6f, 0x73, 0x22, 0x1f, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x12, - 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x6b, - 0x65, 0x79, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x54, 0x72, 0x69, - 0x6d, 0x44, 0x65, 0x70, 0x74, 0x68, 0x73, 0x12, 0x47, 0x0a, 0x0b, 0x74, 0x72, 0x69, 0x6d, 0x5f, - 0x64, 0x65, 0x70, 0x74, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x54, 0x72, 0x69, 0x6d, 0x44, 0x65, - 0x70, 0x74, 0x68, 0x73, 0x2e, 0x54, 0x72, 0x69, 0x6d, 0x44, 0x65, 0x70, 0x74, 0x68, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x74, 0x72, 0x69, 0x6d, 0x44, 0x65, 0x70, 0x74, 0x68, 0x73, - 0x1a, 0x3d, 0x0a, 0x0f, 0x54, 0x72, 0x69, 0x6d, 0x44, 0x65, 0x70, 0x74, 0x68, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0x61, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x68, 0x6f, - 0x69, 0x63, 0x65, 0x53, 0x65, 0x74, 0x12, 0x4a, 0x0a, 0x12, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, - 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x41, 0x72, 0x72, 0x61, 0x79, - 0x52, 0x10, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x41, 0x72, 0x72, - 0x61, 0x79, 0x22, 0x6c, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x41, 0x0a, 0x0d, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x10, - 0x0a, 0x0e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x73, - 0x22, 0x4a, 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x68, - 0x6f, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x71, 0x75, 0x61, 0x69, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x04, 0x71, 0x75, 0x61, 0x69, 0x12, 0x0e, 0x0a, 0x02, 0x71, 0x69, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x71, 0x69, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, 0x66, 0x66, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x69, 0x66, 0x66, 0x22, 0x38, 0x0a, 0x0a, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x65, 0x74, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, - 0x74, 0x61, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x65, 0x74, 0x61, 0x30, - 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x74, 0x61, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x05, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x6e, 0x74, 0x2d, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x65, 0x67, 0x69, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x2d, 0x71, 0x75, 0x61, 0x69, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x6e, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4f, 0x75, 0x74, 0x50, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2e, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x1a, + 0x61, 0x0a, 0x0e, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x6e, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0xae, 0x01, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4f, 0x75, 0x74, 0x50, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x4d, 0x61, 0x70, 0x12, 0x3f, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, + 0x4d, 0x61, 0x70, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x1a, 0x58, 0x0a, 0x0c, 0x45, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4f, + 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x8c, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x53, 0x70, 0x65, + 0x6e, 0x74, 0x55, 0x54, 0x58, 0x4f, 0x12, 0x35, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x00, + 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, + 0x05, 0x73, 0x75, 0x74, 0x78, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x54, 0x78, 0x4f, 0x75, 0x74, 0x48, + 0x01, 0x52, 0x05, 0x73, 0x75, 0x74, 0x78, 0x6f, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, + 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x75, 0x74, + 0x78, 0x6f, 0x22, 0x40, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x53, 0x70, 0x65, 0x6e, 0x74, + 0x55, 0x54, 0x58, 0x4f, 0x73, 0x12, 0x2d, 0x0a, 0x06, 0x73, 0x75, 0x74, 0x78, 0x6f, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x53, 0x70, 0x65, 0x6e, 0x74, 0x55, 0x54, 0x58, 0x4f, 0x52, 0x06, 0x73, 0x75, + 0x74, 0x78, 0x6f, 0x73, 0x22, 0x1f, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4b, 0x65, 0x79, + 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, + 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x54, + 0x72, 0x69, 0x6d, 0x44, 0x65, 0x70, 0x74, 0x68, 0x73, 0x12, 0x47, 0x0a, 0x0b, 0x74, 0x72, 0x69, + 0x6d, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x54, 0x72, 0x69, 0x6d, + 0x44, 0x65, 0x70, 0x74, 0x68, 0x73, 0x2e, 0x54, 0x72, 0x69, 0x6d, 0x44, 0x65, 0x70, 0x74, 0x68, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x74, 0x72, 0x69, 0x6d, 0x44, 0x65, 0x70, 0x74, + 0x68, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x54, 0x72, 0x69, 0x6d, 0x44, 0x65, 0x70, 0x74, 0x68, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x61, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x53, 0x65, 0x74, 0x12, 0x4a, 0x0a, 0x12, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x41, 0x72, 0x72, + 0x61, 0x79, 0x52, 0x10, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x41, + 0x72, 0x72, 0x61, 0x79, 0x22, 0x6c, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x41, 0x0a, + 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x48, 0x00, 0x52, + 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x88, 0x01, 0x01, + 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, + 0x65, 0x73, 0x22, 0x4a, 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x71, 0x75, 0x61, 0x69, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x71, 0x75, 0x61, 0x69, 0x12, 0x0e, 0x0a, 0x02, 0x71, 0x69, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x71, 0x69, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, + 0x66, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x69, 0x66, 0x66, 0x22, 0x38, + 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x65, 0x74, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, + 0x62, 0x65, 0x74, 0x61, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x65, 0x74, + 0x61, 0x30, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x74, 0x61, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x05, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x6e, 0x74, 0x2d, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x69, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x2d, 0x71, 0x75, + 0x61, 0x69, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3375,6 +3467,500 @@ func file_core_types_proto_block_proto_init() { if File_core_types_proto_block_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_core_types_proto_block_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ProtoHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ProtoTransaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ProtoTransactions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ProtoHeaders); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*ProtoManifest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ProtoAccessList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ProtoWorkObjectHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*ProtoWorkObjectHeaders); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*ProtoWorkObjectBody); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*ProtoWorkObject); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*ProtoWorkObjects); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*ProtoWorkObjectBlockView); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*ProtoWorkObjectBlocksView); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*ProtoWorkObjectHeaderView); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*ProtoWorkObjectShareView); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*ProtoAccessTuple); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*ProtoReceiptForStorage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*ProtoReceiptsForStorage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*ProtoLogForStorage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*ProtoLogsForStorage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*ProtoPendingHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[21].Exporter = func(v any, i int) any { + switch v := v.(*ProtoTermini); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[22].Exporter = func(v any, i int) any { + switch v := v.(*ProtoEtxSet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[23].Exporter = func(v any, i int) any { + switch v := v.(*ProtoPendingEtxs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[24].Exporter = func(v any, i int) any { + switch v := v.(*ProtoPendingEtxsRollup); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[25].Exporter = func(v any, i int) any { + switch v := v.(*ProtoTxIns); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[26].Exporter = func(v any, i int) any { + switch v := v.(*ProtoTxOuts); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[27].Exporter = func(v any, i int) any { + switch v := v.(*ProtoTxIn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[28].Exporter = func(v any, i int) any { + switch v := v.(*ProtoOutPoint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[29].Exporter = func(v any, i int) any { + switch v := v.(*ProtoTxOut); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[30].Exporter = func(v any, i int) any { + switch v := v.(*ProtoOutPointAndDenomination); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[31].Exporter = func(v any, i int) any { + switch v := v.(*ProtoAddressOutPoints); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[32].Exporter = func(v any, i int) any { + switch v := v.(*ProtoOutPointsMap); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[33].Exporter = func(v any, i int) any { + switch v := v.(*ProtoSpentUTXO); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[34].Exporter = func(v any, i int) any { + switch v := v.(*ProtoSpentUTXOs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[35].Exporter = func(v any, i int) any { + switch v := v.(*ProtoKeys); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[36].Exporter = func(v any, i int) any { + switch v := v.(*ProtoTrimDepths); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[37].Exporter = func(v any, i int) any { + switch v := v.(*ProtoTokenChoiceSet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[38].Exporter = func(v any, i int) any { + switch v := v.(*ProtoTokenChoiceArray); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[39].Exporter = func(v any, i int) any { + switch v := v.(*ProtoTokenChoice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_types_proto_block_proto_msgTypes[40].Exporter = func(v any, i int) any { + switch v := v.(*ProtoBetas); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } file_core_types_proto_block_proto_msgTypes[0].OneofWrappers = []any{} file_core_types_proto_block_proto_msgTypes[1].OneofWrappers = []any{} file_core_types_proto_block_proto_msgTypes[6].OneofWrappers = []any{} diff --git a/core/types/proto_block.proto b/core/types/proto_block.proto index 4cfc50db06..ba35de4ae9 100644 --- a/core/types/proto_block.proto +++ b/core/types/proto_block.proto @@ -203,6 +203,7 @@ message ProtoOutPointAndDenomination { optional common.ProtoHash hash = 1; optional uint32 index = 2; optional uint32 denomination = 3; + optional bytes lock = 4; } message ProtoAddressOutPoints { diff --git a/core/types/utxo.go b/core/types/utxo.go index 45efca98e7..572b70765b 100644 --- a/core/types/utxo.go +++ b/core/types/utxo.go @@ -182,9 +182,10 @@ func (outPoint *OutPoint) ProtoDecode(protoOutPoint *ProtoOutPoint) error { } type OutpointAndDenomination struct { - TxHash common.Hash - Index uint16 - Denomination uint8 + TxHash common.Hash `json:"txHash"` + Index uint16 `json:"index"` + Denomination uint8 `json:"denomination"` + Lock *big.Int `json:"lock"` } func (outPoint OutpointAndDenomination) Key() string { @@ -201,6 +202,9 @@ func (outPoint OutpointAndDenomination) ProtoEncode() (*ProtoOutPointAndDenomina protoOutPoint.Index = &index denomination := uint32(outPoint.Denomination) protoOutPoint.Denomination = &denomination + if outPoint.Lock != nil { + protoOutPoint.Lock = outPoint.Lock.Bytes() + } return protoOutPoint, nil } @@ -209,6 +213,11 @@ func (outPoint *OutpointAndDenomination) ProtoDecode(protoOutPoint *ProtoOutPoin outPoint.TxHash.ProtoDecode(protoOutPoint.Hash) outPoint.Index = uint16(*protoOutPoint.Index) outPoint.Denomination = uint8(*protoOutPoint.Denomination) + if protoOutPoint.Lock != nil { + outPoint.Lock = new(big.Int).SetBytes(protoOutPoint.Lock) + } else { + outPoint.Lock = big.NewInt(0) + } return nil } diff --git a/core/worker.go b/core/worker.go index 1a0ec34d97..c53aef4b7d 100644 --- a/core/worker.go +++ b/core/worker.go @@ -1063,6 +1063,7 @@ func (w *worker) commitTransaction(env *environment, parent *types.WorkObject, t if lockup.Uint64() < params.ConversionLockPeriod { return nil, false, fmt.Errorf("coinbase lockup period is less than the minimum lockup period of %d blocks", params.ConversionLockPeriod) } + lockup.Add(lockup, env.wo.Number(w.hc.NodeCtx())) value := params.CalculateCoinbaseValueWithLockup(tx.Value(), lockupByte) denominations := misc.FindMinDenominations(value) outputIndex := uint16(0) diff --git a/internal/quaiapi/quai_api.go b/internal/quaiapi/quai_api.go index dd240ad14b..b0e54e5c29 100644 --- a/internal/quaiapi/quai_api.go +++ b/internal/quaiapi/quai_api.go @@ -56,11 +56,17 @@ func NewPublicQuaiAPI(b Backend) *PublicQuaiAPI { // GasPrice returns a suggestion for a gas price for legacy transactions. func (s *PublicQuaiAPI) GasPrice(ctx context.Context) (*hexutil.Big, error) { + if s.b.NodeLocation().Context() != common.ZONE_CTX { + return (*hexutil.Big)(big.NewInt(0)), errors.New("gasPrice call can only be made in zone chain") + } return (*hexutil.Big)(s.b.GetMinGasPrice()), nil } // MinerTip returns the gas price of the pool func (s *PublicQuaiAPI) MinerTip(ctx context.Context) *hexutil.Big { + if s.b.NodeLocation().Context() != common.ZONE_CTX { + return (*hexutil.Big)(big.NewInt(0)) + } return (*hexutil.Big)(s.b.GetPoolGasPrice()) } @@ -148,12 +154,30 @@ func (s *PublicBlockChainQuaiAPI) GetBalance(ctx context.Context, address common } } -func (s *PublicBlockChainQuaiAPI) GetOutpointsByAddress(ctx context.Context, address common.Address) (map[string]*types.OutpointAndDenomination, error) { - outpints, err := s.b.AddressOutpoints(ctx, address) +func (s *PublicBlockChainQuaiAPI) GetOutpointsByAddress(ctx context.Context, address common.Address) ([]interface{}, error) { + outpoints, err := s.b.AddressOutpoints(ctx, address) if err != nil { return nil, err } - return outpints, nil + jsonOutpoints := make([]interface{}, 0, len(outpoints)) + for _, outpoint := range outpoints { + if outpoint == nil { + continue + } + lock := big.NewInt(0) + if outpoint.Lock != nil { + lock = outpoint.Lock + } + jsonOutpoint := map[string]interface{}{ + "txHash": outpoint.TxHash.Hex(), + "index": hexutil.Uint64(outpoint.Index), + "denomination": hexutil.Uint64(outpoint.Denomination), + "lock": hexutil.Big(*lock), + } + jsonOutpoints = append(jsonOutpoints, jsonOutpoint) + } + + return jsonOutpoints, nil } // GetProof returns the Merkle-proof for a given account and optionally some storage keys. @@ -812,7 +836,11 @@ func (s *PublicBlockChainQuaiAPI) QiRateAtBlock(ctx context.Context, blockNrOrHa var header *types.WorkObject var err error if blockNr, ok := blockNrOrHash.Number(); ok { - header, err = s.b.HeaderByNumber(ctx, rpc.BlockNumber(blockNr)) + if blockNr == rpc.LatestBlockNumber { + header = s.b.CurrentHeader() + } else { + header, err = s.b.HeaderByNumber(ctx, rpc.BlockNumber(blockNr)) + } } else if hash, ok := blockNrOrHash.Hash(); ok { header, err = s.b.HeaderByHash(ctx, hash) } else { @@ -821,6 +849,8 @@ func (s *PublicBlockChainQuaiAPI) QiRateAtBlock(ctx context.Context, blockNrOrHa if err != nil { s.b.Logger().WithField("err", err).Error("Error calculating QiRateAtBlock") return nil + } else if header == nil { + return nil } return (*hexutil.Big)(misc.QiToQuai(header, new(big.Int).SetUint64(qiAmount))) } @@ -830,7 +860,11 @@ func (s *PublicBlockChainQuaiAPI) QuaiRateAtBlock(ctx context.Context, blockNrOr var header *types.WorkObject var err error if blockNr, ok := blockNrOrHash.Number(); ok { - header, err = s.b.HeaderByNumber(ctx, rpc.BlockNumber(blockNr)) + if blockNr == rpc.LatestBlockNumber { + header = s.b.CurrentHeader() + } else { + header, err = s.b.HeaderByNumber(ctx, rpc.BlockNumber(blockNr)) + } } else if hash, ok := blockNrOrHash.Hash(); ok { header, err = s.b.HeaderByHash(ctx, hash) } else { @@ -839,6 +873,8 @@ func (s *PublicBlockChainQuaiAPI) QuaiRateAtBlock(ctx context.Context, blockNrOr if err != nil { s.b.Logger().WithField("err", err).Error("Error calculating QuaiRateAtBlock") return nil + } else if header == nil { + return nil } return (*hexutil.Big)(misc.QuaiToQi(header, new(big.Int).SetUint64(quaiAmount))) } diff --git a/p2p/node/peerManager/peerdb/peer_info.pb.go b/p2p/node/peerManager/peerdb/peer_info.pb.go index cd3854f0dd..ca1882ad1f 100644 --- a/p2p/node/peerManager/peerdb/peer_info.pb.go +++ b/p2p/node/peerManager/peerdb/peer_info.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.34.2 // protoc v5.28.2 // source: p2p/node/peerManager/peerdb/peer_info.proto @@ -33,9 +33,11 @@ type ProtoPeerInfo struct { func (x *ProtoPeerInfo) Reset() { *x = ProtoPeerInfo{} - mi := &file_p2p_node_peerManager_peerdb_peer_info_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_p2p_node_peerManager_peerdb_peer_info_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoPeerInfo) String() string { @@ -46,7 +48,7 @@ func (*ProtoPeerInfo) ProtoMessage() {} func (x *ProtoPeerInfo) ProtoReflect() protoreflect.Message { mi := &file_p2p_node_peerManager_peerdb_peer_info_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -100,9 +102,11 @@ type ProtoAddrInfo struct { func (x *ProtoAddrInfo) Reset() { *x = ProtoAddrInfo{} - mi := &file_p2p_node_peerManager_peerdb_peer_info_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_p2p_node_peerManager_peerdb_peer_info_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProtoAddrInfo) String() string { @@ -113,7 +117,7 @@ func (*ProtoAddrInfo) ProtoMessage() {} func (x *ProtoAddrInfo) ProtoReflect() protoreflect.Message { mi := &file_p2p_node_peerManager_peerdb_peer_info_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -199,6 +203,32 @@ func file_p2p_node_peerManager_peerdb_peer_info_proto_init() { if File_p2p_node_peerManager_peerdb_peer_info_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_p2p_node_peerManager_peerdb_peer_info_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ProtoPeerInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_p2p_node_peerManager_peerdb_peer_info_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ProtoAddrInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/p2p/pb/quai_messages.pb.go b/p2p/pb/quai_messages.pb.go index 9706e38414..a1fc057b18 100644 --- a/p2p/pb/quai_messages.pb.go +++ b/p2p/pb/quai_messages.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.34.2 // protoc v5.28.2 // source: p2p/pb/quai_messages.proto @@ -33,9 +33,11 @@ type GossipWorkObject struct { func (x *GossipWorkObject) Reset() { *x = GossipWorkObject{} - mi := &file_p2p_pb_quai_messages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_p2p_pb_quai_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GossipWorkObject) String() string { @@ -46,7 +48,7 @@ func (*GossipWorkObject) ProtoMessage() {} func (x *GossipWorkObject) ProtoReflect() protoreflect.Message { mi := &file_p2p_pb_quai_messages_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -78,9 +80,11 @@ type GossipTransaction struct { func (x *GossipTransaction) Reset() { *x = GossipTransaction{} - mi := &file_p2p_pb_quai_messages_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_p2p_pb_quai_messages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GossipTransaction) String() string { @@ -91,7 +95,7 @@ func (*GossipTransaction) ProtoMessage() {} func (x *GossipTransaction) ProtoReflect() protoreflect.Message { mi := &file_p2p_pb_quai_messages_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -137,9 +141,11 @@ type QuaiRequestMessage struct { func (x *QuaiRequestMessage) Reset() { *x = QuaiRequestMessage{} - mi := &file_p2p_pb_quai_messages_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_p2p_pb_quai_messages_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *QuaiRequestMessage) String() string { @@ -150,7 +156,7 @@ func (*QuaiRequestMessage) ProtoMessage() {} func (x *QuaiRequestMessage) ProtoReflect() protoreflect.Message { mi := &file_p2p_pb_quai_messages_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -298,9 +304,11 @@ type QuaiResponseMessage struct { func (x *QuaiResponseMessage) Reset() { *x = QuaiResponseMessage{} - mi := &file_p2p_pb_quai_messages_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_p2p_pb_quai_messages_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *QuaiResponseMessage) String() string { @@ -311,7 +319,7 @@ func (*QuaiResponseMessage) ProtoMessage() {} func (x *QuaiResponseMessage) ProtoReflect() protoreflect.Message { mi := &file_p2p_pb_quai_messages_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -417,9 +425,11 @@ type QuaiMessage struct { func (x *QuaiMessage) Reset() { *x = QuaiMessage{} - mi := &file_p2p_pb_quai_messages_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_p2p_pb_quai_messages_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *QuaiMessage) String() string { @@ -430,7 +440,7 @@ func (*QuaiMessage) ProtoMessage() {} func (x *QuaiMessage) ProtoReflect() protoreflect.Message { mi := &file_p2p_pb_quai_messages_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -628,6 +638,68 @@ func file_p2p_pb_quai_messages_proto_init() { if File_p2p_pb_quai_messages_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_p2p_pb_quai_messages_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GossipWorkObject); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_p2p_pb_quai_messages_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GossipTransaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_p2p_pb_quai_messages_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*QuaiRequestMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_p2p_pb_quai_messages_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*QuaiResponseMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_p2p_pb_quai_messages_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*QuaiMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } file_p2p_pb_quai_messages_proto_msgTypes[2].OneofWrappers = []any{ (*QuaiRequestMessage_Hash)(nil), (*QuaiRequestMessage_Number)(nil), diff --git a/quaiclient/ethclient/ethclient.go b/quaiclient/ethclient/ethclient.go index 94fb35aca9..f59c7d165d 100644 --- a/quaiclient/ethclient/ethclient.go +++ b/quaiclient/ethclient/ethclient.go @@ -338,8 +338,8 @@ func (ec *Client) ContractSizeAt(ctx context.Context, account common.MixedcaseAd return (*big.Int)(&result), err } -func (ec *Client) GetOutpointsByAddress(ctx context.Context, address common.MixedcaseAddress) (map[string]*types.OutpointAndDenomination, error) { - var outpoints map[string]*types.OutpointAndDenomination +func (ec *Client) GetOutpointsByAddress(ctx context.Context, address common.MixedcaseAddress) ([]*types.OutpointAndDenomination, error) { + var outpoints []*types.OutpointAndDenomination err := ec.c.CallContext(ctx, &outpoints, "quai_getOutpointsByAddress", address.Original()) return outpoints, err }