diff --git a/modules/network/keeper/msg_server.go b/modules/network/keeper/msg_server.go index 3faee4aa..2bf7034e 100644 --- a/modules/network/keeper/msg_server.go +++ b/modules/network/keeper/msg_server.go @@ -38,12 +38,13 @@ func (k msgServer) Attest(goCtx context.Context, msg *types.MsgAttest) (*types.M !k.IsCheckpointHeight(ctx, msg.Height) { return nil, sdkerr.Wrapf(sdkerrors.ErrInvalidRequest, "height %d is not a checkpoint", msg.Height) } - has, err := k.IsInAttesterSet(ctx, msg.ConsensusAddress) - if err != nil { - return nil, sdkerr.Wrapf(err, "in attester set") + + if len(msg.Vote) < MinVoteLen { + return nil, sdkerr.Wrapf(sdkerrors.ErrInvalidRequest, "vote payload too short: got %d bytes, minimum %d", len(msg.Vote), MinVoteLen) } - if !has { - return nil, sdkerr.Wrapf(sdkerrors.ErrUnauthorized, "consensus address %s not in attester set", msg.ConsensusAddress) + + if err := k.assertValidValidatorAuthority(ctx, msg.ConsensusAddress, msg.Authority); err != nil { + return nil, err } index, found := k.GetValidatorIndex(ctx, msg.ConsensusAddress) @@ -91,15 +92,6 @@ func (k msgServer) Attest(goCtx context.Context, msg *types.MsgAttest) (*types.M return nil, sdkerr.Wrapf(sdkerrors.ErrInvalidRequest, "consensus address %s already attested for height %d", msg.ConsensusAddress, msg.Height) } - // Validate vote payload meets minimum signature length. - // A valid vote must contain at least a cryptographic signature ( - // 64 bytes for Ed25519). We enforce the minimum here; full cryptographic - // verification of the signature against the block data should be added once - // the vote format is finalized. - if len(msg.Vote) < MinVoteLen { - return nil, sdkerr.Wrapf(sdkerrors.ErrInvalidRequest, "vote payload too short: got %d bytes, minimum %d", len(msg.Vote), MinVoteLen) - } - // Set the bit k.bitmapHelper.SetBit(bitmap, int(index)) if err := k.SetAttestationBitmap(ctx, msg.Height, bitmap); err != nil { @@ -200,7 +192,7 @@ func (k msgServer) JoinAttesterSet(goCtx context.Context, msg *types.MsgJoinAtte // Store the attester information including pubkey (key by consensus address) attesterInfo := &types.AttesterInfo{ - Validator: msg.ConsensusAddress, // Use consensus address as primary key + Authority: msg.Authority, Pubkey: msg.Pubkey, JoinedHeight: ctx.BlockHeight(), } @@ -208,7 +200,6 @@ func (k msgServer) JoinAttesterSet(goCtx context.Context, msg *types.MsgJoinAtte if err := k.SetAttesterInfo(ctx, msg.ConsensusAddress, attesterInfo); err != nil { return nil, sdkerr.Wrap(err, "set attester info") } - // TODO (Alex): the valset should be updated at the end of an epoch only if err := k.SetAttesterSetMember(ctx, msg.ConsensusAddress); err != nil { return nil, sdkerr.Wrap(err, "set attester set member") @@ -229,14 +220,13 @@ func (k msgServer) JoinAttesterSet(goCtx context.Context, msg *types.MsgJoinAtte func (k msgServer) LeaveAttesterSet(goCtx context.Context, msg *types.MsgLeaveAttesterSet) (*types.MsgLeaveAttesterSetResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - has, err := k.IsInAttesterSet(ctx, msg.ConsensusAddress) - if err != nil { - return nil, sdkerr.Wrapf(err, "in attester set") - } - if !has { - return nil, sdkerr.Wrapf(sdkerrors.ErrInvalidRequest, "consensus address not in attester set") + if err := k.assertValidValidatorAuthority(ctx, msg.ConsensusAddress, msg.Authority); err != nil { + return nil, err } + if err := k.AttesterInfo.Remove(ctx, msg.ConsensusAddress); err != nil { + return nil, sdkerr.Wrap(err, "remove attester info") + } // TODO (Alex): the valset should be updated at the end of an epoch only if err := k.RemoveAttesterSetMember(ctx, msg.ConsensusAddress); err != nil { return nil, sdkerr.Wrap(err, "remove attester set member") @@ -253,6 +243,20 @@ func (k msgServer) LeaveAttesterSet(goCtx context.Context, msg *types.MsgLeaveAt return &types.MsgLeaveAttesterSetResponse{}, nil } +func (k msgServer) assertValidValidatorAuthority(ctx sdk.Context, consensusAddress, authority string) error { + v, err := k.AttesterInfo.Get(ctx, consensusAddress) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return sdkerr.Wrapf(sdkerrors.ErrUnauthorized, "consensus address %s not in attester set", consensusAddress) + } + return sdkerr.Wrapf(err, "attester set") + } + if v.Authority != authority { + return sdkerr.Wrapf(sdkerrors.ErrUnauthorized, "address %s", authority) + } + return nil +} + // UpdateParams handles MsgUpdateParams func (k msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) diff --git a/modules/network/keeper/msg_server_test.go b/modules/network/keeper/msg_server_test.go index 4b9623ad..a4419612 100644 --- a/modules/network/keeper/msg_server_test.go +++ b/modules/network/keeper/msg_server_test.go @@ -1,6 +1,7 @@ package keeper import ( + "bytes" "context" "maps" "slices" @@ -66,41 +67,12 @@ func TestJoinAttesterSet(t *testing.T) { expErr: sdkerrors.ErrInvalidRequest, expSet: true, }, - //{ - // name: "failed to set attester set member", - // setup: func(t *testing.T, ctx sdk.Context, keeper *Keeper, sk *MockStakingKeeper) { - // validatorAddr := sdk.ValAddress([]byte("validator5")) - // validator := stakingtypes.Validator{ - // OperatorAddress: validatorAddr.String(), - // Status: stakingtypes.Bonded, - // } - // err := sk.SetValidator(ctx, validator) - // require.NoError(t, err, "failed to set validator") - // keeper.forceError = true - // }, - // msg: &types.MsgJoinAttesterSet{ - // Validator: "validator5", - // }, - // expErr: sdkerrors.ErrInternal, - // expectResponse: false, - //}, } for name, spec := range tests { t.Run(name, func(t *testing.T) { sk := NewMockStakingKeeper() - - cdc := moduletestutil.MakeTestEncodingConfig().Codec - - keys := storetypes.NewKVStoreKeys(types.StoreKey) - - logger := log.NewTestLogger(t) - cms := integration.CreateMultiStore(keys, logger) - authority := authtypes.NewModuleAddress("gov") - keeper := NewKeeper(cdc, runtime.NewKVStoreService(keys[types.StoreKey]), sk, nil, nil, authority.String()) - server := msgServer{Keeper: keeper} - ctx := sdk.NewContext(cms, cmtproto.Header{ChainID: "test-chain", Time: time.Now().UTC(), Height: 10}, false, logger). - WithContext(t.Context()) + server, keeper, ctx := newTestServer(t, &sk) spec.setup(t, ctx, &keeper, &sk) @@ -120,6 +92,11 @@ func TestJoinAttesterSet(t *testing.T) { exists, gotErr := keeper.AttesterSet.Has(ctx, spec.msg.ConsensusAddress) require.NoError(t, gotErr) assert.True(t, exists) + + // Verify authority is stored correctly in AttesterInfo + info, infoErr := keeper.GetAttesterInfo(ctx, spec.msg.ConsensusAddress) + require.NoError(t, infoErr) + assert.Equal(t, spec.msg.Authority, info.Authority) }) } } @@ -131,15 +108,7 @@ func TestJoinAttesterSetMaxCap(t *testing.T) { t.Run("join succeeds under cap", func(t *testing.T) { sk := NewMockStakingKeeper() - cdc := moduletestutil.MakeTestEncodingConfig().Codec - keys := storetypes.NewKVStoreKeys(types.StoreKey) - logger := log.NewTestLogger(t) - cms := integration.CreateMultiStore(keys, logger) - authority := authtypes.NewModuleAddress("gov") - keeper := NewKeeper(cdc, runtime.NewKVStoreService(keys[types.StoreKey]), sk, nil, nil, authority.String()) - server := msgServer{Keeper: keeper} - ctx := sdk.NewContext(cms, cmtproto.Header{ChainID: "test-chain", Time: time.Now().UTC(), Height: 10}, false, logger). - WithContext(t.Context()) + server, keeper, ctx := newTestServer(t, &sk) // With an empty set, join should succeed newAddr := sdk.ValAddress("new_attester") @@ -189,21 +158,10 @@ func TestAttestVotePayloadValidation(t *testing.T) { for name, spec := range specs { t.Run(name, func(t *testing.T) { sk := NewMockStakingKeeper() - cdc := moduletestutil.MakeTestEncodingConfig().Codec - keys := storetypes.NewKVStoreKeys(types.StoreKey) - logger := log.NewTestLogger(t) - cms := integration.CreateMultiStore(keys, logger) - authority := authtypes.NewModuleAddress("gov") - keeper := NewKeeper(cdc, runtime.NewKVStoreService(keys[types.StoreKey]), sk, nil, nil, authority.String()) - server := msgServer{Keeper: keeper} - ctx := sdk.NewContext(cms, cmtproto.Header{ - ChainID: "test-chain", - Time: time.Now().UTC(), - Height: 10, - }, false, logger).WithContext(t.Context()) - + server, keeper, ctx := newTestServer(t, &sk) require.NoError(t, keeper.SetParams(ctx, types.DefaultParams())) require.NoError(t, keeper.SetAttesterSetMember(ctx, myValAddr.String())) + require.NoError(t, keeper.SetAttesterInfo(ctx, myValAddr.String(), &types.AttesterInfo{Authority: myValAddr.String()})) require.NoError(t, keeper.BuildValidatorIndexMap(ctx)) msg := &types.MsgAttest{ @@ -225,11 +183,184 @@ func TestAttestVotePayloadValidation(t *testing.T) { } } +func TestLeaveAttesterSet(t *testing.T) { + ownerAddr := sdk.ValAddress("owner1") + otherAddr := sdk.ValAddress("other1") + + type testCase struct { + setup func(t *testing.T, ctx sdk.Context, keeper *Keeper, server msgServer) + msg *types.MsgLeaveAttesterSet + expErr error + } + + tests := map[string]testCase{ + "valid": { + setup: func(t *testing.T, ctx sdk.Context, keeper *Keeper, server msgServer) { + t.Helper() + joinMsg := &types.MsgJoinAttesterSet{ + Authority: ownerAddr.String(), + ConsensusAddress: ownerAddr.String(), + } + _, err := server.JoinAttesterSet(ctx, joinMsg) + require.NoError(t, err) + }, + msg: &types.MsgLeaveAttesterSet{ + Authority: ownerAddr.String(), + ConsensusAddress: ownerAddr.String(), + }, + }, + "not_in_set": { + setup: func(t *testing.T, ctx sdk.Context, keeper *Keeper, server msgServer) { + t.Helper() + }, + msg: &types.MsgLeaveAttesterSet{ + Authority: ownerAddr.String(), + ConsensusAddress: ownerAddr.String(), + }, + expErr: sdkerrors.ErrUnauthorized, + }, + "wrong_authority": { + setup: func(t *testing.T, ctx sdk.Context, keeper *Keeper, server msgServer) { + t.Helper() + joinMsg := &types.MsgJoinAttesterSet{ + Authority: ownerAddr.String(), + ConsensusAddress: ownerAddr.String(), + } + _, err := server.JoinAttesterSet(ctx, joinMsg) + require.NoError(t, err) + }, + msg: &types.MsgLeaveAttesterSet{ + Authority: otherAddr.String(), + ConsensusAddress: ownerAddr.String(), + }, + expErr: sdkerrors.ErrUnauthorized, + }, + } + + for name, spec := range tests { + t.Run(name, func(t *testing.T) { + sk := NewMockStakingKeeper() + server, keeper, ctx := newTestServer(t, &sk) + + spec.setup(t, ctx, &keeper, server) + + rsp, err := server.LeaveAttesterSet(ctx, spec.msg) + if spec.expErr != nil { + require.ErrorIs(t, err, spec.expErr) + require.Nil(t, rsp) + return + } + require.NoError(t, err) + require.NotNil(t, rsp) + + // Verify actually removed from attester set + exists, gotErr := keeper.AttesterSet.Has(ctx, spec.msg.ConsensusAddress) + require.NoError(t, gotErr) + assert.False(t, exists) + }) + } +} + +func TestAttest(t *testing.T) { + ownerAddr := sdk.ValAddress("attester_owner") + otherAddr := sdk.ValAddress("other_sender") + + type testCase struct { + setup func(t *testing.T, ctx sdk.Context, keeper *Keeper, server msgServer) + msg *types.MsgAttest + expErr error + } + + tests := map[string]testCase{ + "valid": { + setup: func(t *testing.T, ctx sdk.Context, keeper *Keeper, server msgServer) { + t.Helper() + require.NoError(t, keeper.SetParams(ctx, types.DefaultParams())) + joinMsg := &types.MsgJoinAttesterSet{ + Authority: ownerAddr.String(), + ConsensusAddress: ownerAddr.String(), + } + _, err := server.JoinAttesterSet(ctx, joinMsg) + require.NoError(t, err) + require.NoError(t, keeper.BuildValidatorIndexMap(ctx)) + }, + msg: &types.MsgAttest{ + Authority: ownerAddr.String(), + ConsensusAddress: ownerAddr.String(), + Height: 10, + Vote: bytes.Repeat([]byte{0x01}, 64), + }, + }, + "not_in_set": { + setup: func(t *testing.T, ctx sdk.Context, keeper *Keeper, server msgServer) { + t.Helper() + }, + msg: &types.MsgAttest{ + Authority: ownerAddr.String(), + ConsensusAddress: ownerAddr.String(), + Height: 10, + Vote: bytes.Repeat([]byte{0x01}, 64), + }, + expErr: sdkerrors.ErrUnauthorized, + }, + "wrong_authority": { + setup: func(t *testing.T, ctx sdk.Context, keeper *Keeper, server msgServer) { + t.Helper() + joinMsg := &types.MsgJoinAttesterSet{ + Authority: ownerAddr.String(), + ConsensusAddress: ownerAddr.String(), + } + _, err := server.JoinAttesterSet(ctx, joinMsg) + require.NoError(t, err) + require.NoError(t, keeper.BuildValidatorIndexMap(ctx)) + }, + msg: &types.MsgAttest{ + Authority: otherAddr.String(), + ConsensusAddress: ownerAddr.String(), + Height: 10, + Vote: bytes.Repeat([]byte{0x01}, 64), + }, + expErr: sdkerrors.ErrUnauthorized, + }, + } + for name, spec := range tests { + t.Run(name, func(t *testing.T) { + sk := NewMockStakingKeeper() + server, keeper, ctx := newTestServer(t, &sk) + + spec.setup(t, ctx, &keeper, server) + + rsp, err := server.Attest(ctx, spec.msg) + if spec.expErr != nil { + require.ErrorIs(t, err, spec.expErr) + require.Nil(t, rsp) + return + } + require.NoError(t, err) + require.NotNil(t, rsp) + }) + } +} + +func newTestServer(t *testing.T, sk *MockStakingKeeper) (msgServer, Keeper, sdk.Context) { + t.Helper() + cdc := moduletestutil.MakeTestEncodingConfig().Codec + keys := storetypes.NewKVStoreKeys(types.StoreKey) + logger := log.NewTestLogger(t) + cms := integration.CreateMultiStore(keys, logger) + authority := authtypes.NewModuleAddress("gov") + keeper := NewKeeper(cdc, runtime.NewKVStoreService(keys[types.StoreKey]), sk, nil, nil, authority.String()) + server := msgServer{Keeper: keeper} + ctx := sdk.NewContext(cms, cmtproto.Header{ChainID: "test-chain", Time: time.Now().UTC(), Height: 10}, false, logger). + WithContext(t.Context()) + return server, keeper, ctx +} + func TestAttestHeightBounds(t *testing.T) { myValAddr := sdk.ValAddress("validator1") + ownerAddr := sdk.ValAddress("attester_owner") // With DefaultParams: EpochLength=1, PruneAfter=15 // At blockHeight=100: currentEpoch=100, minHeight=(100-7)*1=93 - specs := map[string]struct { blockHeight int64 attestH int64 @@ -272,7 +403,6 @@ func TestAttestHeightBounds(t *testing.T) { attestH: 1, }, } - for name, spec := range specs { t.Run(name, func(t *testing.T) { sk := NewMockStakingKeeper() @@ -291,17 +421,21 @@ func TestAttestHeightBounds(t *testing.T) { require.NoError(t, keeper.SetParams(ctx, types.DefaultParams())) - // Setup: add attester and build index map - require.NoError(t, keeper.SetAttesterSetMember(ctx, myValAddr.String())) + joinMsg := &types.MsgJoinAttesterSet{ + Authority: ownerAddr.String(), + ConsensusAddress: myValAddr.String(), + } + _, err := server.JoinAttesterSet(ctx, joinMsg) + require.NoError(t, err) require.NoError(t, keeper.BuildValidatorIndexMap(ctx)) + // when msg := &types.MsgAttest{ - Authority: myValAddr.String(), + Authority: ownerAddr.String(), ConsensusAddress: myValAddr.String(), Height: spec.attestH, Vote: make([]byte, MinVoteLen), } - rsp, err := server.Attest(ctx, msg) if spec.expErr != nil { require.ErrorIs(t, err, spec.expErr) diff --git a/modules/network/module/v1/module.pb.go b/modules/network/module/v1/module.pb.go index fea65b08..20d66d02 100644 --- a/modules/network/module/v1/module.pb.go +++ b/modules/network/module/v1/module.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: rollkitsdk/network/module/v1/module.proto +// source: evabci/network/module/v1/module.proto package v1 @@ -33,7 +33,7 @@ func (m *Module) Reset() { *m = Module{} } func (m *Module) String() string { return proto.CompactTextString(m) } func (*Module) ProtoMessage() {} func (*Module) Descriptor() ([]byte, []int) { - return fileDescriptor_fc353625fec2db0a, []int{0} + return fileDescriptor_26a1f0e017d853ba, []int{0} } func (m *Module) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -70,29 +70,28 @@ func (m *Module) GetAuthority() string { } func init() { - proto.RegisterType((*Module)(nil), "rollkitsdk.network.module.v1.Module") + proto.RegisterType((*Module)(nil), "evabci.network.module.v1.Module") } func init() { - proto.RegisterFile("rollkitsdk/network/module/v1/module.proto", fileDescriptor_fc353625fec2db0a) + proto.RegisterFile("evabci/network/module/v1/module.proto", fileDescriptor_26a1f0e017d853ba) } -var fileDescriptor_fc353625fec2db0a = []byte{ - // 211 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x2c, 0xca, 0xcf, 0xc9, - 0xc9, 0xce, 0x2c, 0x29, 0x4e, 0xc9, 0xd6, 0xcf, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, 0xca, 0xd6, 0xcf, - 0xcd, 0x4f, 0x29, 0xcd, 0x49, 0xd5, 0x2f, 0x33, 0x84, 0xb2, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, - 0x85, 0x64, 0x10, 0x4a, 0xf5, 0xa0, 0x4a, 0xf5, 0xa0, 0x0a, 0xca, 0x0c, 0xa5, 0x14, 0x92, 0xf3, - 0x8b, 0x73, 0xf3, 0x8b, 0xf5, 0x13, 0x0b, 0x0a, 0xf4, 0xcb, 0x0c, 0x13, 0x73, 0x0a, 0x32, 0x12, - 0x51, 0xf5, 0x2b, 0xa5, 0x70, 0xb1, 0xf9, 0x82, 0xf9, 0x42, 0x32, 0x5c, 0x9c, 0x89, 0xa5, 0x25, - 0x19, 0xf9, 0x45, 0x99, 0x25, 0x95, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x08, 0x01, 0x2b, - 0x9b, 0x5d, 0x07, 0xa6, 0xdd, 0x62, 0x34, 0xe3, 0x32, 0x49, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, - 0x4b, 0xce, 0xcf, 0xd5, 0x87, 0x5a, 0xad, 0x9f, 0x9e, 0xaf, 0x9b, 0x5a, 0x91, 0x9a, 0x5c, 0x5a, - 0x92, 0x99, 0x9f, 0xa7, 0x9b, 0x98, 0x94, 0x9c, 0x09, 0xb5, 0xa2, 0x18, 0xe6, 0x78, 0xa7, 0x88, - 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, - 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xb2, 0x23, 0xc7, 0x3c, 0x44, 0x60, - 0x24, 0xb1, 0x81, 0xbd, 0x61, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x63, 0x01, 0x0d, 0x5d, 0x33, - 0x01, 0x00, 0x00, +var fileDescriptor_26a1f0e017d853ba = []byte{ + // 200 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4d, 0x2d, 0x4b, 0x4c, + 0x4a, 0xce, 0xd4, 0xcf, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, 0xca, 0xd6, 0xcf, 0xcd, 0x4f, 0x29, 0xcd, + 0x49, 0xd5, 0x2f, 0x33, 0x84, 0xb2, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x24, 0x20, 0xca, + 0xf4, 0xa0, 0xca, 0xf4, 0xa0, 0x92, 0x65, 0x86, 0x52, 0x0a, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, + 0xfa, 0x89, 0x05, 0x05, 0xfa, 0x65, 0x86, 0x89, 0x39, 0x05, 0x19, 0x89, 0xa8, 0x7a, 0x95, 0xa2, + 0xb8, 0xd8, 0x7c, 0xc1, 0x7c, 0x21, 0x19, 0x2e, 0xce, 0xc4, 0xd2, 0x92, 0x8c, 0xfc, 0xa2, 0xcc, + 0x92, 0x4a, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x84, 0x80, 0x95, 0xd1, 0xae, 0x03, 0xd3, + 0x6e, 0x31, 0xea, 0x70, 0x69, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, + 0xa7, 0x96, 0x15, 0x97, 0x24, 0x26, 0x67, 0xeb, 0xa7, 0x96, 0xe9, 0x82, 0x9d, 0x09, 0x31, 0xb8, + 0x18, 0xe6, 0x5c, 0x27, 0xbf, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, + 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x32, + 0x21, 0xde, 0x14, 0x84, 0xa7, 0x93, 0xd8, 0xc0, 0x4e, 0x36, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, + 0x77, 0x2e, 0xc1, 0xc6, 0x17, 0x01, 0x00, 0x00, } func (m *Module) Marshal() (dAtA []byte, err error) { diff --git a/modules/network/types/attester.pb.go b/modules/network/types/attester.pb.go index c0e53950..361f5e93 100644 --- a/modules/network/types/attester.pb.go +++ b/modules/network/types/attester.pb.go @@ -7,8 +7,6 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -29,8 +27,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // AttesterInfo stores information about an attester type AttesterInfo struct { - // validator is the address of the attester - Validator string `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` + // authority is the address of the account managing the validator and submitting attestations + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // pubkey is the consensus public key of the attester Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` // joined_height is the height at which the attester joined @@ -77,29 +75,28 @@ func init() { func init() { proto.RegisterFile("evabci/network/v1/attester.proto", fileDescriptor_a8fe3a2e81f284b4) } var fileDescriptor_a8fe3a2e81f284b4 = []byte{ - // 337 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x90, 0x3d, 0x4e, 0xeb, 0x40, - 0x10, 0xc7, 0xbd, 0x2f, 0x52, 0xf4, 0xe2, 0x97, 0x57, 0x60, 0xa5, 0x70, 0x22, 0xe1, 0x18, 0x68, - 0xd2, 0x64, 0x97, 0x40, 0x47, 0x83, 0x92, 0x02, 0xf1, 0xd1, 0xa0, 0x20, 0x51, 0xd0, 0x44, 0xfe, - 0x98, 0x6c, 0x4c, 0x12, 0x8f, 0xb5, 0xbb, 0x36, 0xf2, 0x0d, 0x28, 0x39, 0x42, 0x0e, 0x91, 0x33, - 0x20, 0x44, 0x15, 0x51, 0x51, 0xa2, 0xa4, 0xe1, 0x18, 0x08, 0xaf, 0x03, 0xdd, 0xce, 0x6f, 0x7e, - 0x33, 0xfb, 0xd7, 0x98, 0x2e, 0x64, 0x9e, 0x1f, 0x44, 0x2c, 0x06, 0xf5, 0x80, 0x62, 0xca, 0xb2, - 0x1e, 0xf3, 0x94, 0x02, 0xa9, 0x40, 0xd0, 0x44, 0xa0, 0x42, 0x6b, 0x47, 0x1b, 0xb4, 0x34, 0x68, - 0xd6, 0x6b, 0x35, 0x39, 0x22, 0x9f, 0x01, 0x2b, 0x04, 0x3f, 0x1d, 0x33, 0x2f, 0xce, 0xb5, 0xdd, - 0x6a, 0x06, 0x28, 0xe7, 0x28, 0x47, 0x45, 0xc5, 0x74, 0x51, 0xb6, 0x1a, 0x1c, 0x39, 0x6a, 0xfe, - 0xfd, 0xd2, 0x74, 0xff, 0x99, 0x98, 0xf5, 0x7e, 0xf9, 0xe3, 0x45, 0x3c, 0x46, 0xeb, 0xd4, 0xac, - 0x65, 0xde, 0x2c, 0x0a, 0x3d, 0x85, 0xc2, 0x26, 0x2e, 0xe9, 0xd4, 0x06, 0x7b, 0x6f, 0xcb, 0xee, - 0x6e, 0xb9, 0xeb, 0x76, 0xdb, 0xeb, 0x87, 0xa1, 0x00, 0x29, 0x6f, 0x94, 0x88, 0x62, 0x3e, 0xfc, - 0x9d, 0xb1, 0xce, 0xcc, 0x6a, 0x92, 0xfa, 0x53, 0xc8, 0xed, 0x3f, 0x2e, 0xe9, 0xfc, 0x3b, 0x6a, - 0x50, 0x1d, 0x97, 0x6e, 0xe3, 0xd2, 0x7e, 0x9c, 0x0f, 0xec, 0xd7, 0x65, 0xb7, 0x51, 0xee, 0x0c, - 0x44, 0x9e, 0x28, 0xa4, 0xd7, 0xa9, 0x7f, 0x05, 0xf9, 0xb0, 0x9c, 0xb6, 0x0e, 0xcc, 0xff, 0xf7, - 0x18, 0xc5, 0x10, 0x8e, 0x26, 0x10, 0xf1, 0x89, 0xb2, 0x2b, 0x2e, 0xe9, 0x54, 0x86, 0x75, 0x0d, - 0xcf, 0x0b, 0x76, 0xf2, 0xf7, 0x71, 0xd1, 0x36, 0x3e, 0x17, 0x6d, 0x63, 0x70, 0xf9, 0xb2, 0x76, - 0xc8, 0x6a, 0xed, 0x90, 0x8f, 0xb5, 0x43, 0x9e, 0x36, 0x8e, 0xb1, 0xda, 0x38, 0xc6, 0xfb, 0xc6, - 0x31, 0xee, 0x0e, 0x79, 0xa4, 0x26, 0xa9, 0x4f, 0x03, 0x9c, 0x33, 0xc8, 0xa4, 0xf2, 0x82, 0x29, - 0x83, 0xac, 0x5b, 0xdc, 0x7d, 0x8e, 0x61, 0x3a, 0x03, 0xf9, 0x73, 0x7f, 0x95, 0x27, 0x20, 0xfd, - 0x6a, 0x11, 0xf5, 0xf8, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x70, 0xe5, 0x74, 0x5e, 0x9e, 0x01, 0x00, - 0x00, + // 327 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x90, 0xbb, 0x4e, 0xc3, 0x30, + 0x14, 0x86, 0x63, 0x2a, 0x55, 0x34, 0x94, 0x81, 0xa8, 0x43, 0xda, 0x21, 0x8d, 0x60, 0xe9, 0x52, + 0x9b, 0x82, 0xc4, 0xc0, 0xd6, 0x0e, 0x88, 0xcb, 0x82, 0xca, 0xc6, 0x52, 0xe5, 0x72, 0x9a, 0x84, + 0xb6, 0x39, 0x91, 0xed, 0x04, 0xf9, 0x0d, 0x18, 0x79, 0x84, 0x3e, 0x04, 0x2b, 0x3b, 0x62, 0xaa, + 0x98, 0x18, 0x51, 0xbb, 0xf0, 0x18, 0x88, 0x38, 0xd0, 0xcd, 0xe7, 0xf3, 0xe7, 0xe3, 0x5f, 0xbf, + 0xe9, 0x42, 0xe1, 0xf9, 0x41, 0xc2, 0x52, 0x90, 0x8f, 0xc8, 0x67, 0xac, 0x18, 0x30, 0x4f, 0x4a, + 0x10, 0x12, 0x38, 0xcd, 0x38, 0x4a, 0xb4, 0x0e, 0xb4, 0x41, 0x2b, 0x83, 0x16, 0x83, 0x4e, 0x3b, + 0x42, 0x8c, 0xe6, 0xc0, 0x4a, 0xc1, 0xcf, 0xa7, 0xcc, 0x4b, 0x95, 0xb6, 0x3b, 0xed, 0x00, 0xc5, + 0x02, 0xc5, 0xa4, 0x9c, 0x98, 0x1e, 0xaa, 0xab, 0x56, 0x84, 0x11, 0x6a, 0xfe, 0x7b, 0xd2, 0xf4, + 0xf0, 0x95, 0x98, 0xcd, 0x61, 0xf5, 0xe3, 0x55, 0x3a, 0x45, 0xeb, 0xcc, 0x6c, 0x78, 0xb9, 0x8c, + 0x91, 0x27, 0x52, 0xd9, 0xc4, 0x25, 0xbd, 0xc6, 0xc8, 0xfe, 0x78, 0xe9, 0xb7, 0xaa, 0x5d, 0xc3, + 0x30, 0xe4, 0x20, 0xc4, 0x9d, 0xe4, 0x49, 0x1a, 0x8d, 0xb7, 0xaa, 0x75, 0x61, 0xd6, 0xb3, 0xdc, + 0x9f, 0x81, 0xb2, 0x77, 0x5c, 0xd2, 0xdb, 0x3b, 0x69, 0x51, 0x9d, 0x92, 0xfe, 0xa5, 0xa4, 0xc3, + 0x54, 0x8d, 0xec, 0xf7, 0xed, 0xaa, 0x80, 0xab, 0x4c, 0x22, 0xbd, 0xcd, 0xfd, 0x1b, 0x50, 0xe3, + 0xea, 0xb5, 0x75, 0x64, 0xee, 0x3f, 0x60, 0x92, 0x42, 0x38, 0x89, 0x21, 0x89, 0x62, 0x69, 0xd7, + 0x5c, 0xd2, 0xab, 0x8d, 0x9b, 0x1a, 0x5e, 0x96, 0xec, 0x7c, 0xf7, 0x69, 0xd9, 0x35, 0xbe, 0x97, + 0x5d, 0x63, 0x74, 0xfd, 0xb6, 0x76, 0xc8, 0x6a, 0xed, 0x90, 0xaf, 0xb5, 0x43, 0x9e, 0x37, 0x8e, + 0xb1, 0xda, 0x38, 0xc6, 0xe7, 0xc6, 0x31, 0xee, 0x8f, 0xa3, 0x44, 0xc6, 0xb9, 0x4f, 0x03, 0x5c, + 0x30, 0x28, 0x84, 0xf4, 0x82, 0x19, 0x83, 0xa2, 0x5f, 0xd6, 0xbd, 0xc0, 0x30, 0x9f, 0x83, 0xf8, + 0xaf, 0x5d, 0xaa, 0x0c, 0x84, 0x5f, 0x2f, 0xa3, 0x9e, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0xcf, + 0x03, 0xda, 0x4b, 0x95, 0x01, 0x00, 0x00, } func (m *AttesterInfo) Marshal() (dAtA []byte, err error) { @@ -139,10 +136,10 @@ func (m *AttesterInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.Validator) > 0 { - i -= len(m.Validator) - copy(dAtA[i:], m.Validator) - i = encodeVarintAttester(dAtA, i, uint64(len(m.Validator))) + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintAttester(dAtA, i, uint64(len(m.Authority))) i-- dAtA[i] = 0xa } @@ -166,7 +163,7 @@ func (m *AttesterInfo) Size() (n int) { } var l int _ = l - l = len(m.Validator) + l = len(m.Authority) if l > 0 { n += 1 + l + sovAttester(uint64(l)) } @@ -217,7 +214,7 @@ func (m *AttesterInfo) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -245,7 +242,7 @@ func (m *AttesterInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Validator = string(dAtA[iNdEx:postIndex]) + m.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -407,9 +404,3 @@ var ( ErrIntOverflowAttester = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupAttester = fmt.Errorf("proto: unexpected end of group") ) - -// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces -func (info *AttesterInfo) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - var pk cryptotypes.PubKey - return unpacker.UnpackAny(info.Pubkey, &pk) -} diff --git a/modules/network/types/query.pb.gw.go b/modules/network/types/query.pb.gw.go index 8090b0a1..1dc93cde 100644 --- a/modules/network/types/query.pb.gw.go +++ b/modules/network/types/query.pb.gw.go @@ -321,6 +321,78 @@ func local_request_Query_AttesterSignatures_0(ctx context.Context, marshaler run } +func request_Query_LastAttestedHeight_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastAttestedHeightRequest + var metadata runtime.ServerMetadata + + msg, err := client.LastAttestedHeight(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_LastAttestedHeight_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastAttestedHeightRequest + var metadata runtime.ServerMetadata + + msg, err := server.LastAttestedHeight(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_AttesterInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAttesterInfoRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["validator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") + } + + protoReq.ValidatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) + } + + msg, err := client.AttesterInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AttesterInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAttesterInfoRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["validator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") + } + + protoReq.ValidatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) + } + + msg, err := server.AttesterInfo(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -465,6 +537,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_LastAttestedHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_LastAttestedHeight_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_LastAttestedHeight_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AttesterInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AttesterInfo_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AttesterInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -626,6 +744,46 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_LastAttestedHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_LastAttestedHeight_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_LastAttestedHeight_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AttesterInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AttesterInfo_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AttesterInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -641,6 +799,10 @@ var ( pattern_Query_SoftConfirmationStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evabci", "network", "v1", "soft-confirmation", "height"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_AttesterSignatures_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evabci", "network", "v1", "signatures", "height"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_LastAttestedHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"evabci", "network", "v1", "last-attested-height"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AttesterInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"evabci", "network", "v1", "attester", "validator_address"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -655,4 +817,8 @@ var ( forward_Query_SoftConfirmationStatus_0 = runtime.ForwardResponseMessage forward_Query_AttesterSignatures_0 = runtime.ForwardResponseMessage + + forward_Query_LastAttestedHeight_0 = runtime.ForwardResponseMessage + + forward_Query_AttesterInfo_0 = runtime.ForwardResponseMessage ) diff --git a/modules/network/types/tx.pb.go b/modules/network/types/tx.pb.go index 53d88eac..de0bcf27 100644 --- a/modules/network/types/tx.pb.go +++ b/modules/network/types/tx.pb.go @@ -193,7 +193,7 @@ func (m *MsgJoinAttesterSetResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgJoinAttesterSetResponse proto.InternalMessageInfo -// MsgLeaveAttesterSet opts a validatr out of the attester set +// MsgLeaveAttesterSet opts a validator out of the attester set type MsgLeaveAttesterSet struct { // authority is the address of the account submitting and paying for the transaction Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` diff --git a/modules/proto/buf.lock b/modules/proto/buf.lock index 1a1d97e6..65ff3d28 100644 --- a/modules/proto/buf.lock +++ b/modules/proto/buf.lock @@ -5,14 +5,14 @@ deps: commit: 04467658e59e44bbb22fe568206e1f70 digest: b5:8058c0aadbee8c9af67a9cefe86492c6c0b0bd5b4526b0ec820507b91fc9b0b5efbebca97331854576d2d279b0b3f5ed6a7abb0640cb640c4186532239c48fc4 - name: buf.build/cosmos/cosmos-sdk - commit: 650cd9ad7f7a468e8e19975269958658 - digest: b5:652a0cd9aa3c220bb12b558f29b30ca5c248b994420472c9c2a54eed3d33356b1307e51687c1909ea4f535a2a1e180895b8cda83b58a4697003009d17fdbc154 + commit: 65fa41963e6a41dd95a35934239029df + digest: b5:45c2788f1c8ca1c0e72f643d51dba37c3b25d113ee166277cd60dfd49404e713a178e177beaa7d6d016f3853722d77f8fbf40e9444e173cd3d89754d39ca0427 - name: buf.build/cosmos/gogo-proto commit: 88ef6483f90f478fb938c37dde52ece3 digest: b5:f0c69202c9bca9672dc72a9737ea9bc83744daaed2b3da77e3a95b0e53b86dee76b5a7405b993181d6c863fd64afaca0976a302f700d6c4912eb1692a1782c0a - name: buf.build/googleapis/googleapis - commit: 61b203b9a9164be9a834f58c37be6f62 - digest: b5:7811a98b35bd2e4ae5c3ac73c8b3d9ae429f3a790da15de188dc98fc2b77d6bb10e45711f14903af9553fa9821dff256054f2e4b7795789265bc476bec2f088c + commit: 004180b77378443887d3b55cabc00384 + digest: b5:e8f475fe3330f31f5fd86ac689093bcd274e19611a09db91f41d637cb9197881ce89882b94d13a58738e53c91c6e4bae7dc1feba85f590164c975a89e25115dc - name: buf.build/protocolbuffers/wellknowntypes - commit: a4aee59cf3714106961b09d99b349cd1 - digest: b5:0bcf938c1c604919ccc4bee0b72b56ffe049fd043837b80aca7c89a984979e9b4913b4973166fa6e7895995b30da23daab6c83d9ba21d9d16ddc414bf25e3288 + commit: 4e1ccfa6827947beb55974645a315b8d + digest: b5:eb5228b1abd02064d6ff0248918500c1ec1ce7df69126af3f220c0b67d81ff45bdf9f016a8e66cd9c1e534f18afc6d8e090d400604c5331d551a68d05f7e7be9 diff --git a/modules/proto/evabci/network/v1/attester.proto b/modules/proto/evabci/network/v1/attester.proto index ba5caa00..e54e3a5d 100644 --- a/modules/proto/evabci/network/v1/attester.proto +++ b/modules/proto/evabci/network/v1/attester.proto @@ -13,12 +13,12 @@ message AttesterInfo { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - // validator is the address of the attester - string validator = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - + // authority is the address of the account managing the validator and submitting attestations + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // pubkey is the consensus public key of the attester google.protobuf.Any pubkey = 2 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"]; - + // joined_height is the height at which the attester joined int64 joined_height = 3; } \ No newline at end of file