From 739f08eecd2baeb7deab134c03db67618b4d2fcb Mon Sep 17 00:00:00 2001 From: corver Date: Thu, 10 Oct 2024 18:44:23 +0200 Subject: [PATCH] refactor(proto): make all module query array non-nullable --- halo/attest/keeper/builder_test.go | 8 +-- halo/attest/keeper/keeper_test.go | 2 +- halo/attest/keeper/valaddr.go | 2 +- halo/attest/voter/voter_test.go | 4 +- halo/evmslashing/evmslashing.go | 8 +-- halo/evmstaking/evmstaking.go | 8 +-- halo/evmupgrade/evmupgrade.go | 8 +-- halo/portal/keeper/query.go | 4 +- halo/portal/types/query.pb.go | 56 ++++++++-------- halo/portal/types/query.proto | 4 +- halo/registry/keeper/logeventproc.go | 8 +-- halo/registry/keeper/query.go | 4 +- halo/registry/types/query.pb.go | 65 ++++++++++--------- halo/registry/types/query.proto | 6 +- halo/valsync/keeper/query.go | 8 +-- halo/valsync/keeper/query_internal_test.go | 4 +- halo/valsync/types/query.pb.go | 58 +++++++++-------- halo/valsync/types/query.proto | 4 +- lib/cchain/provider.go | 2 +- lib/cchain/provider/provider.go | 2 +- .../provider/testdata/TestXBlock.golden | 8 +-- lib/cchain/provider/xblock.go | 8 +-- lib/cchain/provider/xblock_internal_test.go | 4 +- lib/netconf/provider.go | 2 +- octane/evmengine/keeper/abci_internal_test.go | 6 +- octane/evmengine/keeper/evmmsgs.go | 4 +- octane/evmengine/keeper/msg_server.go | 2 +- octane/evmengine/keeper/proposal_server.go | 4 +- octane/evmengine/types/cpayload.go | 4 +- octane/evmengine/types/tx.pb.go | 64 +++++++++--------- octane/evmengine/types/tx.proto | 3 +- 31 files changed, 195 insertions(+), 179 deletions(-) diff --git a/halo/attest/keeper/builder_test.go b/halo/attest/keeper/builder_test.go index 6a7bfbca4..3d7a1e588 100644 --- a/halo/attest/keeper/builder_test.go +++ b/halo/attest/keeper/builder_test.go @@ -42,7 +42,7 @@ var ( consensusID = netconf.Simnet.Static().OmniConsensusChainIDUint64() ) -func newValSet(id uint64, vals ...*vtypes.Validator) *vtypes.ValidatorSetResponse { +func newValSet(id uint64, vals ...vtypes.Validator) *vtypes.ValidatorSetResponse { return &vtypes.ValidatorSetResponse{ Id: id, CreatedHeight: 0, @@ -51,8 +51,8 @@ func newValSet(id uint64, vals ...*vtypes.Validator) *vtypes.ValidatorSetRespons } } -func newValidator(key crypto.PubKey, power int64) *vtypes.Validator { - return &vtypes.Validator{ +func newValidator(key crypto.PubKey, power int64) vtypes.Validator { + return vtypes.Validator{ ConsensusPubkey: key.Bytes(), Power: power, } @@ -230,7 +230,7 @@ func (b *AggVoteBuilder) Vote() *types.AggVote { return b.vote } -func sigsTuples(vals ...*vtypes.Validator) []*types.SigTuple { +func sigsTuples(vals ...vtypes.Validator) []*types.SigTuple { var sigs []*types.SigTuple for _, v := range vals { ethAddr, _ := v.EthereumAddress() diff --git a/halo/attest/keeper/keeper_test.go b/halo/attest/keeper/keeper_test.go index 690a57874..3326c9088 100644 --- a/halo/attest/keeper/keeper_test.go +++ b/halo/attest/keeper/keeper_test.go @@ -1041,7 +1041,7 @@ func toValSet(valset *vtypes.ValidatorSetResponse) keeper.ValSet { } } -func expectValSig(id uint64, attID uint64, val *vtypes.Validator, offset uint64) *keeper.Signature { +func expectValSig(id uint64, attID uint64, val vtypes.Validator, offset uint64) *keeper.Signature { ethAddr, _ := val.EthereumAddress() paddedSig := pad65(ethAddr.Bytes()) diff --git a/halo/attest/keeper/valaddr.go b/halo/attest/keeper/valaddr.go index 8f0d8cc44..c483be4b3 100644 --- a/halo/attest/keeper/valaddr.go +++ b/halo/attest/keeper/valaddr.go @@ -30,7 +30,7 @@ func (c *valAddrCache) GetEthAddress(cmtAddr [crypto.AddressSize]byte) (common.A return ethAddr, ok } -func (c *valAddrCache) SetAll(vals []*vtypes.Validator) error { +func (c *valAddrCache) SetAll(vals []vtypes.Validator) error { var ethAddrs = make(map[[crypto.AddressSize]byte]common.Address, len(vals)) for _, val := range vals { cmtAddr, err := val.CometAddress() diff --git a/halo/attest/voter/voter_test.go b/halo/attest/voter/voter_test.go index f851225c5..d52e68597 100644 --- a/halo/attest/voter/voter_test.go +++ b/halo/attest/voter/voter_test.go @@ -581,12 +581,12 @@ func setIsVal(t *testing.T, v *voter.Voter, pk k1.PrivKey, isVal bool) { cmtPubkey, err := k1util.PBPubKeyFromBytes(pk.PubKey().Bytes()) require.NoError(t, err) - vals := []*vtypes.Validator{{ + vals := []vtypes.Validator{{ ConsensusPubkey: k1.GenPrivKey().PubKey().Bytes(), Power: 1, }} if isVal { - vals = append(vals, &vtypes.Validator{ + vals = append(vals, vtypes.Validator{ ConsensusPubkey: cmtPubkey.GetSecp256K1(), Power: 1, }) diff --git a/halo/evmslashing/evmslashing.go b/halo/evmslashing/evmslashing.go index 29520f4a4..94e1a8473 100644 --- a/halo/evmslashing/evmslashing.go +++ b/halo/evmslashing/evmslashing.go @@ -56,7 +56,7 @@ func New(ethCl ethclient.Client, sKeeper skeeper.Keeper) (EventProcessor, error) } // Prepare returns all omni stake contract EVM event logs from the provided block hash. -func (p EventProcessor) Prepare(ctx context.Context, blockHash common.Hash) ([]*evmenginetypes.EVMEvent, error) { +func (p EventProcessor) Prepare(ctx context.Context, blockHash common.Hash) ([]evmenginetypes.EVMEvent, error) { logs, err := p.ethCl.FilterLogs(ctx, ethereum.FilterQuery{ BlockHash: &blockHash, Addresses: p.Addresses(), @@ -66,13 +66,13 @@ func (p EventProcessor) Prepare(ctx context.Context, blockHash common.Hash) ([]* return nil, errors.Wrap(err, "filter logs") } - resp := make([]*evmenginetypes.EVMEvent, 0, len(logs)) + resp := make([]evmenginetypes.EVMEvent, 0, len(logs)) for _, l := range logs { topics := make([][]byte, 0, len(l.Topics)) for _, t := range l.Topics { topics = append(topics, t.Bytes()) } - resp = append(resp, &evmenginetypes.EVMEvent{ + resp = append(resp, evmenginetypes.EVMEvent{ Address: l.Address.Bytes(), Topics: topics, Data: l.Data, @@ -92,7 +92,7 @@ func (p EventProcessor) Addresses() []common.Address { // Deliver processes a omni deposit log event, which must be one of: // - Unjail. -func (p EventProcessor) Deliver(ctx context.Context, _ common.Hash, elog *evmenginetypes.EVMEvent) error { +func (p EventProcessor) Deliver(ctx context.Context, _ common.Hash, elog evmenginetypes.EVMEvent) error { ethlog, err := elog.ToEthLog() if err != nil { return err diff --git a/halo/evmstaking/evmstaking.go b/halo/evmstaking/evmstaking.go index 92fed92bd..13abdc6b5 100644 --- a/halo/evmstaking/evmstaking.go +++ b/halo/evmstaking/evmstaking.go @@ -71,7 +71,7 @@ func New( } // Prepare returns all omni stake contract EVM event logs from the provided block hash. -func (p EventProcessor) Prepare(ctx context.Context, blockHash common.Hash) ([]*evmenginetypes.EVMEvent, error) { +func (p EventProcessor) Prepare(ctx context.Context, blockHash common.Hash) ([]evmenginetypes.EVMEvent, error) { logs, err := p.ethCl.FilterLogs(ctx, ethereum.FilterQuery{ BlockHash: &blockHash, Addresses: p.Addresses(), @@ -81,13 +81,13 @@ func (p EventProcessor) Prepare(ctx context.Context, blockHash common.Hash) ([]* return nil, errors.Wrap(err, "filter logs") } - resp := make([]*evmenginetypes.EVMEvent, 0, len(logs)) + resp := make([]evmenginetypes.EVMEvent, 0, len(logs)) for _, l := range logs { topics := make([][]byte, 0, len(l.Topics)) for _, t := range l.Topics { topics = append(topics, t.Bytes()) } - resp = append(resp, &evmenginetypes.EVMEvent{ + resp = append(resp, evmenginetypes.EVMEvent{ Address: l.Address.Bytes(), Topics: topics, Data: l.Data, @@ -108,7 +108,7 @@ func (p EventProcessor) Addresses() []common.Address { // Deliver processes a omni deposit log event, which must be one of: // - CreateValidator // - Delegate. -func (p EventProcessor) Deliver(ctx context.Context, _ common.Hash, elog *evmenginetypes.EVMEvent) error { +func (p EventProcessor) Deliver(ctx context.Context, _ common.Hash, elog evmenginetypes.EVMEvent) error { ethlog, err := elog.ToEthLog() if err != nil { return err diff --git a/halo/evmupgrade/evmupgrade.go b/halo/evmupgrade/evmupgrade.go index 52ae86deb..0de606fe2 100644 --- a/halo/evmupgrade/evmupgrade.go +++ b/halo/evmupgrade/evmupgrade.go @@ -58,7 +58,7 @@ func New(ethCl ethclient.Client, uKeeper *ukeeper.Keeper) (EventProcessor, error } // Prepare returns all omni stake contract EVM event logs from the provided block hash. -func (p EventProcessor) Prepare(ctx context.Context, blockHash common.Hash) ([]*evmenginetypes.EVMEvent, error) { +func (p EventProcessor) Prepare(ctx context.Context, blockHash common.Hash) ([]evmenginetypes.EVMEvent, error) { logs, err := p.ethCl.FilterLogs(ctx, ethereum.FilterQuery{ BlockHash: &blockHash, Addresses: p.Addresses(), @@ -68,13 +68,13 @@ func (p EventProcessor) Prepare(ctx context.Context, blockHash common.Hash) ([]* return nil, errors.Wrap(err, "filter logs") } - resp := make([]*evmenginetypes.EVMEvent, 0, len(logs)) + resp := make([]evmenginetypes.EVMEvent, 0, len(logs)) for _, l := range logs { topics := make([][]byte, 0, len(l.Topics)) for _, t := range l.Topics { topics = append(topics, t.Bytes()) } - resp = append(resp, &evmenginetypes.EVMEvent{ + resp = append(resp, evmenginetypes.EVMEvent{ Address: l.Address.Bytes(), Topics: topics, Data: l.Data, @@ -95,7 +95,7 @@ func (p EventProcessor) Addresses() []common.Address { // Deliver processes a upgrade log event, which must be one of: // - PlanUpgrade. // - CancelUpgrade. -func (p EventProcessor) Deliver(ctx context.Context, _ common.Hash, elog *evmenginetypes.EVMEvent) error { +func (p EventProcessor) Deliver(ctx context.Context, _ common.Hash, elog evmenginetypes.EVMEvent) error { ethlog, err := elog.ToEthLog() if err != nil { return err diff --git a/halo/portal/keeper/query.go b/halo/portal/keeper/query.go index d0e224e35..5ff7b0032 100644 --- a/halo/portal/keeper/query.go +++ b/halo/portal/keeper/query.go @@ -30,9 +30,9 @@ func (k Keeper) Block(ctx context.Context, req *types.BlockRequest) (*types.Bloc return nil, status.Error(codes.Internal, err.Error()) } - var messages []*types.Msg + var messages []types.Msg for _, msg := range msgs { - messages = append(messages, &types.Msg{ + messages = append(messages, types.Msg{ Id: msg.GetId(), Type: msg.GetMsgType(), MsgTypeId: msg.GetMsgTypeId(), diff --git a/halo/portal/types/query.pb.go b/halo/portal/types/query.pb.go index c75e05d9c..7ab868efb 100644 --- a/halo/portal/types/query.pb.go +++ b/halo/portal/types/query.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" @@ -82,7 +83,7 @@ func (m *BlockRequest) GetLatest() bool { type BlockResponse struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` CreatedHeight uint64 `protobuf:"varint,2,opt,name=created_height,json=createdHeight,proto3" json:"created_height,omitempty"` - Msgs []*Msg `protobuf:"bytes,3,rep,name=msgs,proto3" json:"msgs,omitempty"` + Msgs []Msg `protobuf:"bytes,3,rep,name=msgs,proto3" json:"msgs"` } func (m *BlockResponse) Reset() { *m = BlockResponse{} } @@ -132,7 +133,7 @@ func (m *BlockResponse) GetCreatedHeight() uint64 { return 0 } -func (m *BlockResponse) GetMsgs() []*Msg { +func (m *BlockResponse) GetMsgs() []Msg { if m != nil { return m.Msgs } @@ -232,30 +233,31 @@ func init() { func init() { proto.RegisterFile("halo/portal/types/query.proto", fileDescriptor_ab1e808cfde1f319) } var fileDescriptor_ab1e808cfde1f319 = []byte{ - // 355 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xc1, 0x4a, 0xfb, 0x40, - 0x10, 0xc6, 0x93, 0x26, 0xed, 0xbf, 0xff, 0x69, 0x53, 0xe8, 0x1e, 0x4a, 0x14, 0x8c, 0x21, 0x22, - 0x14, 0x85, 0x14, 0x2a, 0xf8, 0x00, 0xf5, 0x62, 0xc1, 0x22, 0x06, 0xbd, 0x78, 0x09, 0xb1, 0xbb, - 0x4d, 0x82, 0x49, 0x93, 0xee, 0x6c, 0x0f, 0x7d, 0x0b, 0x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x12, 0xa5, 0x4b, 0x49, 0x98, 0x8a, 0xe8, 0x48, 0xf1, 0x46, 0x6a, 0x53, 0x4a, 0x8e, 0xa0, 0x8d, - 0x49, 0xc4, 0xa9, 0xb4, 0x9b, 0xca, 0xfe, 0xa7, 0xfa, 0x29, 0x25, 0x67, 0x60, 0xa1, 0xe0, 0x2c, - 0xca, 0xc3, 0x62, 0xb1, 0x40, 0x26, 0xec, 0x96, 0xf2, 0xbb, 0x95, 0x78, 0xaf, 0xb4, 0xf1, 0x13, - 0x34, 0x1f, 0x64, 0xfa, 0xe4, 0x0e, 0x9a, 0x2a, 0x2c, 0x72, 0xfa, 0xcb, 0xfb, 0x7e, 0xc6, 0x7f, - 0xec, 0xfe, 0x0d, 0x54, 0x39, 0x7b, 0xda, 0xe4, 0xf2, 0x63, 0xe7, 0xe8, 0xdb, 0x9d, 0xa3, 0x7f, - 0xed, 0x1c, 0xfd, 0x6d, 0xef, 0x68, 0xdb, 0xbd, 0xa3, 0x7d, 0xee, 0x1d, 0xed, 0xb9, 0x5f, 0x3b, - 0xff, 0x4b, 0x4b, 0x5d, 0xfe, 0xea, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x20, 0xec, 0x52, 0xc5, 0x1a, - 0x02, 0x00, 0x00, + // 376 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xc1, 0x6a, 0xe3, 0x30, + 0x10, 0x86, 0xed, 0xd8, 0xc9, 0x66, 0x95, 0x38, 0x10, 0xb1, 0x04, 0x6f, 0x60, 0x1d, 0xe3, 0x65, + 0x21, 0xb0, 0x60, 0x2f, 0x59, 0xe8, 0x03, 0xa4, 0x97, 0x06, 0x1a, 0x4a, 0x4d, 0x7b, 0xe9, 0xc5, + 0xb8, 0x91, 0x22, 0x9b, 0xda, 0x91, 0xe3, 0x51, 0xa0, 0x79, 0x8b, 0xbe, 0x48, 0xdf, 0x23, 0xc7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b0, 0x9b, 0x6d, 0x41, 0x67, 0x04, 0x7b, 0xc8, 0x22, 0x14, + 0x44, 0xb4, 0x48, 0xe2, 0x74, 0x25, 0x1d, 0xa6, 0x72, 0x74, 0xa4, 0x78, 0x2e, 0xb5, 0x19, 0xc1, + 0x3f, 0x51, 0x1b, 0x92, 0xb8, 0x24, 0x12, 0x37, 0x15, 0xfe, 0xa6, 0xf2, 0x19, 0xc1, 0xbf, 0x91, + 0x05, 0xa2, 0xa4, 0x71, 0x1e, 0xf1, 0xe5, 0x12, 0xa8, 0xb0, 0x5b, 0x8a, 0x77, 0x2b, 0xf1, 0x4a, + 0x69, 0x93, 0x5b, 0xd4, 0xbc, 0x96, 0x9b, 0xc1, 0x97, 0xa8, 0xa9, 0x46, 0x86, 0x47, 0x9f, 0xbc, + 0xf2, 0xe3, 0x12, 0x86, 0xee, 0xd7, 0x86, 0x6a, 0xda, 0x9e, 0x36, 0xfd, 0xbb, 0x3b, 0x38, 0xfa, + 0xfe, 0xe0, 0xe8, 0x6f, 0x07, 0x47, 0x7f, 0x3a, 0x3a, 0xda, 0xfe, 0xe8, 0x68, 0x2f, 0x47, 0x47, + 0xbb, 0xeb, 0xd7, 0xbe, 0xc6, 0x7d, 0x4b, 0x2d, 0xfb, 0xff, 0x7b, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xb4, 0x62, 0x67, 0x35, 0x36, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -742,7 +744,7 @@ func (m *BlockResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Msgs = append(m.Msgs, &Msg{}) + m.Msgs = append(m.Msgs, Msg{}) if err := m.Msgs[len(m.Msgs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/halo/portal/types/query.proto b/halo/portal/types/query.proto index 99254f13c..a0d531fbc 100644 --- a/halo/portal/types/query.proto +++ b/halo/portal/types/query.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package halo.portal.types; +import "gogoproto/gogo.proto"; + option go_package = "halo/portal/types"; // Query defines the gRPC querier service. @@ -17,7 +19,7 @@ message BlockRequest { message BlockResponse { uint64 id = 1; uint64 created_height = 2; - repeated Msg msgs = 3; + repeated Msg msgs = 3 [(gogoproto.nullable) = false]; } message Msg { diff --git a/halo/registry/keeper/logeventproc.go b/halo/registry/keeper/logeventproc.go index a99990adc..445b5e64b 100644 --- a/halo/registry/keeper/logeventproc.go +++ b/halo/registry/keeper/logeventproc.go @@ -34,7 +34,7 @@ func (k Keeper) Addresses() []common.Address { } // Prepare returns all omni portal registry contract EVM event logs from the provided block hash. -func (k Keeper) Prepare(ctx context.Context, blockHash common.Hash) ([]*evmenginetypes.EVMEvent, error) { +func (k Keeper) Prepare(ctx context.Context, blockHash common.Hash) ([]evmenginetypes.EVMEvent, error) { logs, err := k.ethCl.FilterLogs(ctx, ethereum.FilterQuery{ BlockHash: &blockHash, Addresses: k.Addresses(), @@ -44,13 +44,13 @@ func (k Keeper) Prepare(ctx context.Context, blockHash common.Hash) ([]*evmengin return nil, errors.Wrap(err, "filter logs") } - resp := make([]*evmenginetypes.EVMEvent, 0, len(logs)) + resp := make([]evmenginetypes.EVMEvent, 0, len(logs)) for _, l := range logs { topics := make([][]byte, 0, len(l.Topics)) for _, t := range l.Topics { topics = append(topics, t.Bytes()) } - resp = append(resp, &evmenginetypes.EVMEvent{ + resp = append(resp, evmenginetypes.EVMEvent{ Address: l.Address.Bytes(), Topics: topics, Data: l.Data, @@ -61,7 +61,7 @@ func (k Keeper) Prepare(ctx context.Context, blockHash common.Hash) ([]*evmengin } // Deliver processes a omni portal registry events. -func (k Keeper) Deliver(ctx context.Context, _ common.Hash, elog *evmenginetypes.EVMEvent) error { +func (k Keeper) Deliver(ctx context.Context, _ common.Hash, elog evmenginetypes.EVMEvent) error { ethlog, err := elog.ToEthLog() if err != nil { return err diff --git a/halo/registry/keeper/query.go b/halo/registry/keeper/query.go index a92d7b1b2..e8a598cb7 100644 --- a/halo/registry/keeper/query.go +++ b/halo/registry/keeper/query.go @@ -30,9 +30,9 @@ func (k Keeper) Network(ctx context.Context, req *types.NetworkRequest) (*types. return nil, status.Error(codes.Internal, err.Error()) } - portals := make([]*types.Portal, 0, len(network.GetPortals())) + portals := make([]types.Portal, 0, len(network.GetPortals())) for _, portal := range network.GetPortals() { - portals = append(portals, &types.Portal{ + portals = append(portals, types.Portal{ ChainId: portal.GetChainId(), Address: portal.GetAddress(), DeployHeight: portal.GetDeployHeight(), diff --git a/halo/registry/types/query.pb.go b/halo/registry/types/query.pb.go index 678aa3da8..8bcc9428c 100644 --- a/halo/registry/types/query.pb.go +++ b/halo/registry/types/query.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" @@ -80,9 +81,9 @@ func (m *NetworkRequest) GetLatest() bool { } type NetworkResponse struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - CreatedHeight uint64 `protobuf:"varint,2,opt,name=created_height,json=createdHeight,proto3" json:"created_height,omitempty"` - Portals []*Portal `protobuf:"bytes,3,rep,name=portals,proto3" json:"portals,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + CreatedHeight uint64 `protobuf:"varint,2,opt,name=created_height,json=createdHeight,proto3" json:"created_height,omitempty"` + Portals []Portal `protobuf:"bytes,3,rep,name=portals,proto3" json:"portals"` } func (m *NetworkResponse) Reset() { *m = NetworkResponse{} } @@ -132,7 +133,7 @@ func (m *NetworkResponse) GetCreatedHeight() uint64 { return 0 } -func (m *NetworkResponse) GetPortals() []*Portal { +func (m *NetworkResponse) GetPortals() []Portal { if m != nil { return m.Portals } @@ -240,32 +241,34 @@ func init() { func init() { proto.RegisterFile("halo/registry/types/query.proto", fileDescriptor_a5a7e0fe95c853e3) } var fileDescriptor_a5a7e0fe95c853e3 = []byte{ - // 398 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xcf, 0x6e, 0xd3, 0x40, - 0x10, 0xc6, 0xb3, 0x89, 0x1b, 0xa7, 0x43, 0xeb, 0x48, 0x5b, 0x09, 0x2d, 0x54, 0x32, 0x96, 0xcb, - 0x1f, 0x5f, 0x70, 0xa4, 0x22, 0x24, 0xce, 0x9c, 0xc8, 0xa5, 0x2a, 0x7b, 0xe0, 0xc0, 0xc5, 0xda, - 0x66, 0x47, 0xf5, 0xaa, 0xc6, 0xeb, 0xee, 0x6e, 0x41, 0x3e, 0xf1, 0x0a, 0x3c, 0x16, 0xc7, 0x1e, - 0x39, 0xa2, 0x84, 0x07, 0x41, 0x59, 0xdb, 0x91, 0x10, 0x51, 0x6f, 0x3b, 0x3f, 0x7d, 0xb3, 0x33, - 0xfa, 0xbe, 0x81, 0x67, 0xa5, 0xa8, 0xf4, 0xc2, 0xe0, 0xb5, 0xb2, 0xce, 0xb4, 0x0b, 0xd7, 0x36, - 0x68, 0x17, 0xb7, 0x77, 0x68, 0xda, 0xbc, 0x31, 0xda, 0x69, 0x7a, 0xb2, 0x15, 0xe4, 0x83, 0x20, - 0xf7, 0x82, 0xf4, 0x1d, 0x44, 0x17, 0xe8, 0xbe, 0x69, 0x73, 0xc3, 0xf1, 0xf6, 0x0e, 0xad, 0xa3, - 0x11, 0x8c, 0x95, 0x64, 0x24, 0x21, 0x59, 0xc0, 0xc7, 0x4a, 0xd2, 0xc7, 0x30, 0xad, 0x84, 0x43, - 0xeb, 0xd8, 0x38, 0x21, 0xd9, 0x8c, 0xf7, 0x55, 0xfa, 0x1d, 0xe6, 0xbb, 0x4e, 0xdb, 0xe8, 0xda, - 0xe2, 0x7f, 0xad, 0x2f, 0x20, 0x5a, 0x19, 0x14, 0x0e, 0x65, 0x51, 0xa2, 0xba, 0x2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0x31, 0xb9, 0x5f, 0xc7, 0xe4, 0xf7, 0x3a, 0x26, 0x3f, 0x36, 0xf1, 0xe8, 0x7e, - 0x13, 0x8f, 0x7e, 0x6d, 0xe2, 0xd1, 0xe7, 0x93, 0x3d, 0x27, 0x75, 0x35, 0xf5, 0xd7, 0xf4, 0xe6, - 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0d, 0xd6, 0x9c, 0xbf, 0x70, 0x02, 0x00, 0x00, + // 417 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xbf, 0x6e, 0xdb, 0x30, + 0x10, 0xc6, 0x45, 0x5b, 0xb1, 0x9c, 0x6b, 0x62, 0x03, 0x4c, 0x51, 0xb0, 0x09, 0xa0, 0x08, 0x4e, + 0xff, 0x68, 0xa9, 0x0c, 0xa4, 0x4b, 0x81, 0x6e, 0x99, 0xea, 0x25, 0x48, 0x39, 0x74, 0xe8, 0x22, + 0x30, 0xe6, 0xc1, 0x22, 0xa2, 0x8a, 0x0a, 0xc9, 0xb4, 0xf0, 0x03, 0x74, 0xef, 0x63, 0x65, 0xcc, + 0xd8, 0xa9, 0x28, 0xec, 0x3e, 0x48, 0x61, 0x4a, 0x32, 0x50, 0xd4, 0xc8, 0xc6, 0xfb, 0xf1, 0x3b, + 0xe2, 0xe3, 0x77, 0x07, 0xa7, 0x85, 0x28, 0xf5, 0xd4, 0xe0, 0x42, 0x59, 0x67, 0x96, 0x53, 0xb7, + 0xac, 0xd1, 0x4e, 0x6f, 0xef, 0xd0, 0x2c, 0xb3, 0xda, 0x68, 0xa7, 0xe9, 0xd1, 0x46, 0x90, 0x75, + 0x82, 0xcc, 0x0b, 0x8e, 0x9f, 0x2e, 0xf4, 0x42, 0xfb, 0xfb, 0xe9, 0xe6, 0xd4, 0x48, 0x27, 0xef, + 0x60, 0x74, 0x89, 0xee, 0x9b, 0x36, 0x37, 0x1c, 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, 0x1a, 0x8d, + 0xd2, 0x32, 0xaf, 0x2c, 0x1b, 0x34, 0x79, 0x78, 0x7c, 0xe5, 0xe9, 0xa5, 0xa5, 0x14, 0xc2, 0x4a, + 0x7c, 0x41, 0x16, 0x25, 0x24, 0xdd, 0xe7, 0xfe, 0x7c, 0x9e, 0xc3, 0xde, 0xc7, 0xcd, 0x88, 0xe9, + 0x27, 0x88, 0xda, 0xd8, 0xe9, 0xd9, 0xce, 0x98, 0xfe, 0x9d, 0xe7, 0xf1, 0x8b, 0xc7, 0x45, 0xcd, + 0xe4, 0x26, 0xc1, 0xc5, 0x9b, 0xfb, 0x55, 0x4c, 0x1e, 0x56, 0x31, 0xf9, 0xbd, 0x8a, 0xc9, 0x8f, + 0x75, 0x1c, 0x3c, 0xac, 0xe3, 0xe0, 0xe7, 0x3a, 0x0e, 0x3e, 0x1f, 0xed, 0xd8, 0xb7, 0xeb, 0x81, + 0xdf, 0x9f, 0xb7, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x71, 0x3a, 0x84, 0x34, 0x8d, 0x02, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -783,7 +786,7 @@ func (m *NetworkResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Portals = append(m.Portals, &Portal{}) + m.Portals = append(m.Portals, Portal{}) if err := m.Portals[len(m.Portals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/halo/registry/types/query.proto b/halo/registry/types/query.proto index c0e0b8a5b..749a60fbb 100644 --- a/halo/registry/types/query.proto +++ b/halo/registry/types/query.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package halo.registry.types; +import "gogoproto/gogo.proto"; + option go_package = "halo/registry/types"; // Query defines the gRPC querier service. @@ -17,7 +19,7 @@ message NetworkRequest { message NetworkResponse { uint64 id = 1; uint64 created_height = 2; // Height this network was created at - repeated Portal portals = 3; // Supported portals by source chain. + repeated Portal portals = 3 [(gogoproto.nullable) = false]; // Supported portals by source chain. } message Portal { @@ -26,6 +28,6 @@ message Portal { uint64 deploy_height = 3; // Height this portal contract was deployed at repeated uint64 shard_ids = 4; // Shard IDs supported by this portal uint64 attest_interval = 5; // The interval, in blocks, at which validators must attest, even if empty - uint64 block_period_ns = 6; // The block period of the chain deployed to, in nanoseconds. + uint64 block_period_ns = 6; // The block period of the chain deployed to, in nanoseconds. string name = 7; // The name of the chain deployed to (ex "omni_evm", "ethereum") } \ No newline at end of file diff --git a/halo/valsync/keeper/query.go b/halo/valsync/keeper/query.go index ad575106e..c11b2dac0 100644 --- a/halo/valsync/keeper/query.go +++ b/halo/valsync/keeper/query.go @@ -100,7 +100,7 @@ func (k *Keeper) ValidatorSet(ctx context.Context, req *types.ValidatorSetReques } defer valIter.Close() - var vals []*types.Validator + var vals []types.Validator for valIter.Next() { val, err := valIter.Value() if err != nil { @@ -111,7 +111,7 @@ func (k *Keeper) ValidatorSet(ctx context.Context, req *types.ValidatorSetReques continue // Skip zero power validators. } - vals = append(vals, &types.Validator{ + vals = append(vals, types.Validator{ ConsensusPubkey: val.GetPubKey(), Power: val.GetPower(), }) @@ -126,9 +126,9 @@ func (k *Keeper) ValidatorSet(ctx context.Context, req *types.ValidatorSetReques } func valSetResponse(set *ValidatorSet, vals []*Validator) *types.ValidatorSetResponse { - var validators []*types.Validator + var validators []types.Validator for _, val := range vals { - validators = append(validators, &types.Validator{ + validators = append(validators, types.Validator{ ConsensusPubkey: val.GetPubKey(), Power: val.GetPower(), }) diff --git a/halo/valsync/keeper/query_internal_test.go b/halo/valsync/keeper/query_internal_test.go index 8b49773cf..86493f338 100644 --- a/halo/valsync/keeper/query_internal_test.go +++ b/halo/valsync/keeper/query_internal_test.go @@ -185,9 +185,9 @@ func newActivatedResp(id uint64, set []*Validator) *types.ValidatorSetResponse { } func newResp(id uint64, set []*Validator) *types.ValidatorSetResponse { - var vals []*types.Validator + var vals []types.Validator for _, v := range set { - vals = append(vals, &types.Validator{ + vals = append(vals, types.Validator{ ConsensusPubkey: v.GetPubKey(), Power: v.GetPower(), }) diff --git a/halo/valsync/types/query.pb.go b/halo/valsync/types/query.pb.go index 42ff6bc82..5b1b1d7b6 100644 --- a/halo/valsync/types/query.pb.go +++ b/halo/valsync/types/query.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" @@ -80,10 +81,10 @@ func (m *ValidatorSetRequest) GetLatest() bool { } type ValidatorSetResponse struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - CreatedHeight uint64 `protobuf:"varint,2,opt,name=created_height,json=createdHeight,proto3" json:"created_height,omitempty"` - ActivatedHeight uint64 `protobuf:"varint,3,opt,name=activated_height,json=activatedHeight,proto3" json:"activated_height,omitempty"` - Validators []*Validator `protobuf:"bytes,4,rep,name=validators,proto3" json:"validators,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + CreatedHeight uint64 `protobuf:"varint,2,opt,name=created_height,json=createdHeight,proto3" json:"created_height,omitempty"` + ActivatedHeight uint64 `protobuf:"varint,3,opt,name=activated_height,json=activatedHeight,proto3" json:"activated_height,omitempty"` + Validators []Validator `protobuf:"bytes,4,rep,name=validators,proto3" json:"validators"` } func (m *ValidatorSetResponse) Reset() { *m = ValidatorSetResponse{} } @@ -140,7 +141,7 @@ func (m *ValidatorSetResponse) GetActivatedHeight() uint64 { return 0 } -func (m *ValidatorSetResponse) GetValidators() []*Validator { +func (m *ValidatorSetResponse) GetValidators() []Validator { if m != nil { return m.Validators } @@ -208,28 +209,29 @@ func init() { func init() { proto.RegisterFile("halo/valsync/types/query.proto", fileDescriptor_7457158ec95097a5) } var fileDescriptor_7457158ec95097a5 = []byte{ - // 322 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x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2, 0x2c, 0xac, 0x1b, 0x61, - 0xb7, 0xc0, 0x73, 0xe9, 0x18, 0x60, 0xf9, 0xbd, 0x59, 0xf5, 0x1b, 0x83, 0xba, 0xb3, 0x37, 0x3a, - 0x71, 0xab, 0x4f, 0x74, 0x0b, 0x7f, 0xbc, 0xd4, 0x60, 0xdf, 0xc0, 0x6e, 0x41, 0x64, 0x6b, 0xbd, - 0xcc, 0xf6, 0x5c, 0x25, 0x6a, 0x12, 0x25, 0xd3, 0x67, 0x4c, 0x8d, 0xf7, 0x36, 0xef, 0x16, 0xf8, - 0xad, 0x81, 0x69, 0x0f, 0x9a, 0x91, 0x7c, 0xc1, 0xd8, 0xf8, 0xaf, 0xf3, 0x6d, 0x31, 0x0a, 0xa1, - 0x79, 0x97, 0x25, 0x4d, 0x3d, 0x68, 0x97, 0xf3, 0xa0, 0x67, 0x7f, 0x3a, 0xfa, 0x49, 0xfc, 0xd8, - 0xf9, 0x5f, 0xb8, 0x8d, 0xd6, 0xb6, 0xae, 0x2e, 0xde, 0xd7, 0x8c, 0xac, 0xd6, 0x8c, 0x7c, 0xae, - 0x19, 0x79, 0xdd, 0x30, 0x6b, 0xb5, 0x61, 0xd6, 0xc7, 0x86, 0x59, 0x8f, 0xb4, 0x7a, 0x02, 0xd3, - 0x96, 0xf9, 0xfd, 0xcb, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x53, 0x26, 0x4d, 0x1f, 0x02, - 0x00, 0x00, + // 339 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0xbf, 0x4b, 0xc3, 0x40, + 0x14, 0xce, 0xb5, 0x69, 0xd1, 0x67, 0x6d, 0xe5, 0x2c, 0x52, 0x0a, 0x9e, 0x25, 0x20, 0x46, 0x90, + 0x04, 0xea, 0xec, 0x52, 0x17, 0x07, 0x07, 0x3d, 0xc1, 0xc1, 0xa5, 0x5c, 0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 0xcc, 0xc5, 0xc7, 0x89, 0x41, 0x37, 0xd2, 0xac, 0x5b, 0xd8, 0x2d, 0xe9, 0xac, 0xb9, + 0x97, 0x0d, 0x3f, 0x95, 0x89, 0x1c, 0x46, 0xc9, 0xe8, 0x99, 0xa7, 0x7a, 0x83, 0x06, 0x6d, 0x95, + 0xf8, 0x9d, 0x86, 0x71, 0x1b, 0x6a, 0x91, 0x78, 0xe1, 0xb1, 0xde, 0xa2, 0x4a, 0xf3, 0xa0, 0x1f, + 0x42, 0xed, 0x3e, 0xbb, 0x02, 0xf6, 0xa0, 0xb1, 0xe9, 0x0a, 0x3e, 0xfb, 0x73, 0xae, 0x1f, 0xdf, + 0xbb, 0xf6, 0xff, 0xc2, 0xdc, 0x60, 0xcb, 0x18, 0x5c, 0x2c, 0x56, 0x04, 0x2d, 0x57, 0x04, 0x7d, + 0xae, 0x08, 0x7a, 0x5d, 0x13, 0x63, 0xb9, 0x26, 0xc6, 0xfb, 0x9a, 0x18, 0x4f, 0x78, 0xfb, 0x7b, + 0x8c, 0xea, 0xfa, 0xde, 0x97, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x40, 0x45, 0x50, 0xf9, 0x3b, + 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -714,7 +716,7 @@ func (m *ValidatorSetResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Validators = append(m.Validators, &Validator{}) + m.Validators = append(m.Validators, Validator{}) if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/halo/valsync/types/query.proto b/halo/valsync/types/query.proto index 21b6f7781..796dde79a 100644 --- a/halo/valsync/types/query.proto +++ b/halo/valsync/types/query.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package halo.valsync.types; +import "gogoproto/gogo.proto"; + option go_package = "halo/valsync/types"; // Query defines the gRPC querier service. @@ -18,7 +20,7 @@ message ValidatorSetResponse { uint64 id = 1; uint64 created_height = 2; uint64 activated_height = 3; - repeated Validator validators = 4; + repeated Validator validators = 4 [(gogoproto.nullable) = false]; } message Validator { diff --git a/lib/cchain/provider.go b/lib/cchain/provider.go index e5b9aa81c..f2485a8b3 100644 --- a/lib/cchain/provider.go +++ b/lib/cchain/provider.go @@ -81,7 +81,7 @@ type Provider interface { CometClient() rpcclient.Client // Portals returns the portals registered in the registry module. - Portals(ctx context.Context) ([]*rtypes.Portal, bool, error) + Portals(ctx context.Context) ([]rtypes.Portal, bool, error) // CurrentPlannedPlan returns the current (non-activated) upgrade plan. CurrentPlannedPlan(ctx context.Context) (utypes.Plan, bool, error) diff --git a/lib/cchain/provider/provider.go b/lib/cchain/provider/provider.go index 44a808653..62c821eab 100644 --- a/lib/cchain/provider/provider.go +++ b/lib/cchain/provider/provider.go @@ -242,7 +242,7 @@ func (p Provider) stream( return nil } -func (p Provider) Portals(ctx context.Context) ([]*rtypes.Portal, bool, error) { +func (p Provider) Portals(ctx context.Context) ([]rtypes.Portal, bool, error) { // networkID is ignored when latest is true. netResp, ok, err := p.networkFunc(ctx, 0, true) if err != nil { diff --git a/lib/cchain/provider/testdata/TestXBlock.golden b/lib/cchain/provider/testdata/TestXBlock.golden index 331f4a8a3..0223d3c5b 100644 --- a/lib/cchain/provider/testdata/TestXBlock.golden +++ b/lib/cchain/provider/testdata/TestXBlock.golden @@ -5,12 +5,12 @@ "Msgs": [ { "SourceChainID": 77, - "DestChainID": 1894687307556873581, - "ShardID": 159752935074943669, - "StreamOffset": 12770383191077542918, + "DestChainID": 2970407023101560849, + "ShardID": 6295580847973568114, + "StreamOffset": 12896007735802954714, "SourceMsgSender": "0x0000000000000000000000000000000000000000", "DestAddress": "0x0000000000000000000000000000000000000000", - "Data": "hTLrnwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEN50pKixOw+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAMPnjxoiVAmeLVz5BUSfNKWpJl+NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAftQW+yJ9K/Q=", + "Data": "hTLrnwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEN50pKixOw+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAADWz7WzoQFPonieuabq2S9jZNm+vAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIOicjYEr6QQAAAAAAAAAAAAAAADNo8QoJQnafj/BprjnqlHXlquPfgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABTylLGzt7aAAAAAAAAAAAAAAAAJGFefCwB5A6Lv4it+RtUEEJNwbcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnov9YU2H+7gAAAAAAAAAAAAAAAJevJTp0R+rGB8I8m5WAg1NVHpIBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATjXYoIUNzCQAAAAAAAAAAAAAAAB+dAgSsJChZ/3VCADdEMmxHdjplAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGO7CwDeyslmAAAAAAAAAAAAAAAAuEBkyUn7LF5pAZOA8UTaBfE3Uv4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAeBuX0Qjyttw==", "DestGasLimit": 0, "TxHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "Fees": null diff --git a/lib/cchain/provider/xblock.go b/lib/cchain/provider/xblock.go index a927812c0..9e7d851a2 100644 --- a/lib/cchain/provider/xblock.go +++ b/lib/cchain/provider/xblock.go @@ -33,7 +33,7 @@ func (p Provider) XBlock(ctx context.Context, height uint64, latest bool) (xchai return xchain.Block{}, false, errors.Wrap(err, "get chain ID") } - dataProviders := map[ptypes.MsgType]func(ctx context.Context, msg *ptypes.Msg) ([]byte, error){ + dataProviders := map[ptypes.MsgType]func(ctx context.Context, msg ptypes.Msg) ([]byte, error){ ptypes.MsgTypeValSet: p.msgValSetData, ptypes.MsgTypeNetwork: p.msgNetworkData, } @@ -77,7 +77,7 @@ func (p Provider) XBlock(ctx context.Context, height uint64, latest bool) (xchai }, true, nil } -func (p Provider) msgValSetData(ctx context.Context, msg *ptypes.Msg) ([]byte, error) { +func (p Provider) msgValSetData(ctx context.Context, msg ptypes.Msg) ([]byte, error) { valset, ok, err := p.valset(ctx, msg.MsgTypeId, false) if err != nil { return nil, errors.Wrap(err, "get valset") @@ -98,7 +98,7 @@ func (p Provider) msgValSetData(ctx context.Context, msg *ptypes.Msg) ([]byte, e return data, nil } -func (p Provider) msgNetworkData(ctx context.Context, msg *ptypes.Msg) ([]byte, error) { +func (p Provider) msgNetworkData(ctx context.Context, msg ptypes.Msg) ([]byte, error) { network, ok, err := p.networkFunc(ctx, msg.MsgTypeId, false) if err != nil { return nil, errors.Wrap(err, "get network") @@ -142,7 +142,7 @@ func toPortalVals(vals []cchain.PortalValidator) ([]bindings.Validator, error) { return resp, nil } -func toPortalChains(portals []*types.Portal) []bindings.XTypesChain { +func toPortalChains(portals []types.Portal) []bindings.XTypesChain { resp := make([]bindings.XTypesChain, 0, len(portals)) for _, portal := range portals { resp = append(resp, bindings.XTypesChain{ diff --git a/lib/cchain/provider/xblock_internal_test.go b/lib/cchain/provider/xblock_internal_test.go index a82ec1e28..0ef5f0ae7 100644 --- a/lib/cchain/provider/xblock_internal_test.go +++ b/lib/cchain/provider/xblock_internal_test.go @@ -57,7 +57,7 @@ func TestXBlock(t *testing.T) { }, nil } portalBlockFunc := func(ctx context.Context, h uint64, _ bool) (*ptypes.BlockResponse, bool, error) { - var valSetMsg *ptypes.Msg + var valSetMsg ptypes.Msg f.Fuzz(&valSetMsg) valSetMsg.Type = uint32(ptypes.MsgTypeValSet) valSetMsg.MsgTypeId = h @@ -65,7 +65,7 @@ func TestXBlock(t *testing.T) { return &ptypes.BlockResponse{ Id: h, CreatedHeight: 123456, - Msgs: []*ptypes.Msg{valSetMsg}, + Msgs: []ptypes.Msg{valSetMsg}, }, true, nil } diff --git a/lib/netconf/provider.go b/lib/netconf/provider.go index b946c164d..3bb426163 100644 --- a/lib/netconf/provider.go +++ b/lib/netconf/provider.go @@ -213,7 +213,7 @@ func toShardIDs(shards []uint64) []xchain.ShardID { return resp } -func toPortalBindings(portals []*rtypes.Portal) ([]bindings.PortalRegistryDeployment, error) { +func toPortalBindings(portals []rtypes.Portal) ([]bindings.PortalRegistryDeployment, error) { rtypesPortals := make([]bindings.PortalRegistryDeployment, len(portals)) for i, p := range portals { addr, err := cast.EthAddress(p.Address) diff --git a/octane/evmengine/keeper/abci_internal_test.go b/octane/evmengine/keeper/abci_internal_test.go index 944299c93..453057c02 100644 --- a/octane/evmengine/keeper/abci_internal_test.go +++ b/octane/evmengine/keeper/abci_internal_test.go @@ -451,13 +451,13 @@ func (m mockLogProvider) Name() string { return "mock" } -func (m mockLogProvider) Prepare(_ context.Context, blockHash common.Hash) ([]*etypes.EVMEvent, error) { +func (m mockLogProvider) Prepare(_ context.Context, blockHash common.Hash) ([]etypes.EVMEvent, error) { f := fuzz.NewWithSeed(int64(blockHash[0])) var topic common.Hash f.Fuzz(&topic) - return []*etypes.EVMEvent{{ + return []etypes.EVMEvent{{ Address: zeroAddr.Bytes(), Topics: [][]byte{topic[:]}, }}, nil @@ -467,7 +467,7 @@ func (m mockLogProvider) Addresses() []common.Address { return []common.Address{zeroAddr} } -func (m mockLogProvider) Deliver(_ context.Context, _ common.Hash, log *etypes.EVMEvent) error { +func (m mockLogProvider) Deliver(_ context.Context, _ common.Hash, log etypes.EVMEvent) error { if !bytes.Equal(log.Address, zeroAddr.Bytes()) { panic("unexpected evm log address") } diff --git a/octane/evmengine/keeper/evmmsgs.go b/octane/evmengine/keeper/evmmsgs.go index 02437c239..324d99fd6 100644 --- a/octane/evmengine/keeper/evmmsgs.go +++ b/octane/evmengine/keeper/evmmsgs.go @@ -14,8 +14,8 @@ import ( ) // evmEvents returns all EVM log events from the provided block hash. -func (k *Keeper) evmEvents(ctx context.Context, blockHash common.Hash) ([]*types.EVMEvent, error) { - var events []*types.EVMEvent +func (k *Keeper) evmEvents(ctx context.Context, blockHash common.Hash) ([]types.EVMEvent, error) { + var events []types.EVMEvent for _, proc := range k.eventProcs { // Fetching evm events over the network is unreliable, retry forever. err := retryForever(ctx, func(ctx context.Context) (bool, error) { diff --git a/octane/evmengine/keeper/msg_server.go b/octane/evmengine/keeper/msg_server.go index 37ad60e0a..70505f1c4 100644 --- a/octane/evmengine/keeper/msg_server.go +++ b/octane/evmengine/keeper/msg_server.go @@ -110,7 +110,7 @@ func (s msgServer) ExecutionPayload(ctx context.Context, msg *types.MsgExecution // deliverEvents delivers the given logs to the registered log providers. // TODO(corver): Return log event results to properly manage failures. -func (s msgServer) deliverEvents(ctx context.Context, height uint64, blockHash common.Hash, logs []*types.EVMEvent) error { +func (s msgServer) deliverEvents(ctx context.Context, height uint64, blockHash common.Hash, logs []types.EVMEvent) error { procs := make(map[common.Address]types.EvmEventProcessor) for _, proc := range s.eventProcs { for _, addr := range proc.Addresses() { diff --git a/octane/evmengine/keeper/proposal_server.go b/octane/evmengine/keeper/proposal_server.go index 66f5ce7db..a10e21844 100644 --- a/octane/evmengine/keeper/proposal_server.go +++ b/octane/evmengine/keeper/proposal_server.go @@ -68,13 +68,13 @@ func NewProposalServer(keeper *Keeper) types.MsgServiceServer { var _ types.MsgServiceServer = proposalServer{} -func evmEventsEqual(a, b []*types.EVMEvent) error { +func evmEventsEqual(a, b []types.EVMEvent) error { if len(a) != len(b) { return errors.New("count mismatch", "a", len(a), "b", len(b)) } for i := range a { - if !proto.Equal(a[i], b[i]) { + if !proto.Equal(&a[i], &b[i]) { return errors.New("log mismatch", "index", i) } } diff --git a/octane/evmengine/types/cpayload.go b/octane/evmengine/types/cpayload.go index 2f304ca38..17e1d48d1 100644 --- a/octane/evmengine/types/cpayload.go +++ b/octane/evmengine/types/cpayload.go @@ -28,9 +28,9 @@ type VoteExtensionProvider interface { // the consensus block. It is also called during ProcessPayload to verify the proposed EVM events. type EvmEventProcessor interface { Name() string - Prepare(ctx context.Context, blockHash common.Hash) ([]*EVMEvent, error) + Prepare(ctx context.Context, blockHash common.Hash) ([]EVMEvent, error) Addresses() []common.Address - Deliver(ctx context.Context, blockHash common.Hash, log *EVMEvent) error + Deliver(ctx context.Context, blockHash common.Hash, log EVMEvent) error } var _ depinject.ManyPerContainerType = InjectedEventProc{} diff --git a/octane/evmengine/types/tx.pb.go b/octane/evmengine/types/tx.pb.go index bf031c5bd..f9e3051a3 100644 --- a/octane/evmengine/types/tx.pb.go +++ b/octane/evmengine/types/tx.pb.go @@ -7,6 +7,7 @@ import ( context "context" fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" @@ -76,9 +77,9 @@ func (m *GenesisState) GetExecutionBlockHash() []byte { // MsgExecutionPayload defines the next EVM execution payload and the // logs from previous execution payload. type MsgExecutionPayload struct { - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - ExecutionPayload []byte `protobuf:"bytes,2,opt,name=execution_payload,json=executionPayload,proto3" json:"execution_payload,omitempty"` - PrevPayloadEvents []*EVMEvent `protobuf:"bytes,3,rep,name=prev_payload_events,json=prevPayloadEvents,proto3" json:"prev_payload_events,omitempty"` + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + ExecutionPayload []byte `protobuf:"bytes,2,opt,name=execution_payload,json=executionPayload,proto3" json:"execution_payload,omitempty"` + PrevPayloadEvents []EVMEvent `protobuf:"bytes,3,rep,name=prev_payload_events,json=prevPayloadEvents,proto3" json:"prev_payload_events"` } func (m *MsgExecutionPayload) Reset() { *m = MsgExecutionPayload{} } @@ -128,7 +129,7 @@ func (m *MsgExecutionPayload) GetExecutionPayload() []byte { return nil } -func (m *MsgExecutionPayload) GetPrevPayloadEvents() []*EVMEvent { +func (m *MsgExecutionPayload) GetPrevPayloadEvents() []EVMEvent { if m != nil { return m.PrevPayloadEvents } @@ -243,32 +244,33 @@ func init() { func init() { proto.RegisterFile("octane/evmengine/types/tx.proto", fileDescriptor_288b272163299061) } var fileDescriptor_288b272163299061 = []byte{ - // 388 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0x31, 0xcb, 0xda, 0x50, - 0x14, 0xf5, 0x99, 0xd6, 0xd6, 0x57, 0x29, 0xfa, 0x2c, 0x36, 0x84, 0x92, 0x86, 0x4c, 0xa2, 0x90, - 0x58, 0xbb, 0x75, 0x2a, 0x82, 0xb4, 0x8b, 0x20, 0x11, 0x3a, 0x74, 0x91, 0x67, 0x72, 0x49, 0x42, - 0x35, 0x2f, 0xcd, 0x7d, 0x06, 0xdd, 0x4a, 0x87, 0xce, 0xfd, 0x29, 0xfe, 0x86, 0x4e, 0x1d, 0x1d, - 0x3b, 0x16, 0x1d, 0xfc, 0x1b, 0x1f, 0x89, 0x46, 0xc1, 0x4f, 0xa7, 0xe4, 0xde, 0x7b, 0xce, 0xb9, - 0xef, 0x1c, 0x2e, 0x7d, 0x2b, 0x5c, 0xc9, 0x23, 0xb0, 0x21, 0x5d, 0x40, 0xe4, 0x87, 0x11, 0xd8, - 0x72, 0x1d, 0x03, 0xda, 0x72, 0x65, 0xc5, 0x89, 0x90, 0x82, 0xb5, 0x8e, 0x00, 0xeb, 0x0c, 0xb0, - 0x72, 0x80, 0xf6, 0xda, 0x15, 0xb8, 0x10, 0x68, 0x2f, 0xd0, 0xb7, 0xd3, 0x77, 0xd9, 0xe7, 0x48, - 0x30, 0x3f, 0xd2, 0xda, 0x27, 0x88, 0x00, 0x43, 0x9c, 0x48, 0x2e, 0x81, 0xf5, 0xe8, 0x2b, 0x58, -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x1b, 0x51, 0x6b, 0xbd, 0xbb, 0x11, 0xdc, 0xf1, 0xa4, - 0x3d, 0xfd, 0x71, 0xd8, 0x74, 0xc8, 0xa0, 0xf7, 0x77, 0xa7, 0x93, 0xed, 0x4e, 0x27, 0xff, 0x77, - 0x3a, 0xf9, 0xbd, 0xd7, 0x4b, 0xdb, 0xbd, 0x5e, 0xfa, 0xb7, 0xd7, 0x4b, 0x5f, 0x5b, 0xb7, 0x2f, - 0x6d, 0x56, 0xc9, 0xcf, 0xe6, 0xfd, 0x43, 0x00, 0x00, 0x00, 0xff, 0xff, 0x93, 0x2a, 0xc8, 0x2a, - 0x8a, 0x02, 0x00, 0x00, + // 408 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x31, 0x6b, 0xdb, 0x40, + 0x14, 0xc7, 0x75, 0x51, 0x9a, 0x36, 0x57, 0x53, 0x92, 0x4b, 0x70, 0x85, 0x28, 0x8a, 0xd0, 0x64, + 0x12, 0x90, 0xdc, 0x74, 0xeb, 0x54, 0x0c, 0xa6, 0x5d, 0x0c, 0x41, 0x81, 0x0c, 0x5d, 0xcc, 0x59, + 0x7a, 0x48, 0xa2, 0xb6, 0x4e, 0xd5, 0x3b, 0x0b, 0x7b, 0x2b, 0x1d, 0x3a, 0xf7, 0xa3, 0xf8, 0x63, + 0x78, 0xf4, 0xd8, 0xa9, 0x14, 0x7b, 0xf0, 0xd7, 0x28, 0x3a, 0x59, 0x36, 0x38, 0xf6, 0xa4, 0xbb, + 0xfb, 0xff, 0xde, 0xff, 0xe9, 0xfd, 0x79, 0xf4, 0x46, 0x04, 0x92, 0xa7, 0xe0, 0x41, 0x31, 0x82, + 0x34, 0x4a, 0x52, 0xf0, 0xe4, 0x34, 0x03, 0xf4, 0xe4, 0xc4, 0xcd, 0x72, 0x21, 0x05, 0x6b, 0x56, + 0x80, 0xbb, 0x05, 0x5c, 0x05, 0x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, 0x97, 0xfa, 0xca, 0x9a, + 0xf4, 0x4c, 0x8a, 0x2c, 0x09, 0xd0, 0x38, 0xb1, 0xf5, 0x56, 0xc3, 0xdf, 0xdc, 0x18, 0xa3, 0xa7, + 0x21, 0x97, 0xdc, 0xd0, 0x15, 0xae, 0xce, 0xf7, 0xbf, 0x08, 0xa5, 0x3d, 0x8c, 0x1e, 0x21, 0x2f, + 0x92, 0x00, 0xd8, 0x77, 0x7a, 0xf1, 0x2c, 0xc3, 0xbb, 0x63, 0xb3, 0x1d, 0x08, 0xdc, 0x6c, 0x1f, + 0x0d, 0xe2, 0xc8, 0x4c, 0xe6, 0x8b, 0x1f, 0xeb, 0xd9, 0x2d, 0xe9, 0xb4, 0xe7, 0x4b, 0x8b, 0x2c, + 0x96, 0x16, 0xf9, 0xb7, 0xb4, 0xc8, 0xef, 0x95, 0xa5, 0x2d, 0x56, 0x96, 0xf6, 0x67, 0x65, 0x69, + 0x5f, 0x9b, 0x87, 0xb7, 0x70, 0x70, 0xa6, 0x96, 0xe7, 0xc3, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x0a, 0x1d, 0x7f, 0x24, 0xa6, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -797,7 +799,7 @@ func (m *MsgExecutionPayload) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PrevPayloadEvents = append(m.PrevPayloadEvents, &EVMEvent{}) + m.PrevPayloadEvents = append(m.PrevPayloadEvents, EVMEvent{}) if err := m.PrevPayloadEvents[len(m.PrevPayloadEvents)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/octane/evmengine/types/tx.proto b/octane/evmengine/types/tx.proto index 0e9287f0b..c86fd6560 100644 --- a/octane/evmengine/types/tx.proto +++ b/octane/evmengine/types/tx.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package octane.evmengine.types; +import "gogoproto/gogo.proto"; import "cosmos/msg/v1/msg.proto"; option go_package = "octane/evmengine/types"; @@ -25,7 +26,7 @@ message MsgExecutionPayload { option (cosmos.msg.v1.signer) = "authority"; string authority = 1; bytes execution_payload = 2; - repeated EVMEvent prev_payload_events = 3; + repeated EVMEvent prev_payload_events = 3 [(gogoproto.nullable) = false]; } message ExecutionPayloadResponse {}