diff --git a/precompiles/avs/IAVSManager.sol b/precompiles/avs/IAVSManager.sol index bc4209ca6..2396acbfd 100644 --- a/precompiles/avs/IAVSManager.sol +++ b/precompiles/avs/IAVSManager.sol @@ -49,6 +49,7 @@ interface IAVSManager { /// @param slashAddr The slash address of AVS. /// @param rewardAddr The reward address of AVS. /// @param avsOwnerAddress The owners who have permission for AVS. + /// @param whitelistAddress The whitelist address of the operator. /// @param assetIds The basic asset information of AVS. /// @param avsUnbondingPeriod The unbonding duration of AVS. /// @param minSelfDelegation The minimum delegation amount for an operator. @@ -65,6 +66,7 @@ interface IAVSManager { address slashAddr, address rewardAddr, string[] memory avsOwnerAddress, + string[] memory whitelistAddress, string[] memory assetIds, uint64 avsUnbondingPeriod, uint64 minSelfDelegation, @@ -80,6 +82,7 @@ interface IAVSManager { /// @param slashAddr The slash address of AVS. /// @param rewardAddr The reward address of AVS. /// @param avsOwnerAddress The owners who have permission for AVS. + /// @param whitelistAddress The whitelist address of the operator. /// @param assetIds The basic asset information of AVS. /// @param avsUnbondingPeriod The unbonding duration of AVS. /// @param minSelfDelegation The minimum delegation amount for an operator. @@ -96,6 +99,7 @@ interface IAVSManager { address slashAddr, address rewardAddr, string[] memory avsOwnerAddress, + string[] memory whitelistAddress, string[] memory assetIds, uint64 avsUnbondingPeriod, uint64 minSelfDelegation, diff --git a/precompiles/avs/abi.json b/precompiles/avs/abi.json index bdd6ed2dd..4d2318ec4 100644 --- a/precompiles/avs/abi.json +++ b/precompiles/avs/abi.json @@ -646,6 +646,11 @@ "name": "avsOwnerAddress", "type": "string[]" }, + { + "internalType": "string[]", + "name": "whitelistAddress", + "type": "string[]" + }, { "internalType": "string[]", "name": "assetIds", @@ -778,6 +783,11 @@ "name": "avsOwnerAddress", "type": "string[]" }, + { + "internalType": "string[]", + "name": "whitelistAddress", + "type": "string[]" + }, { "internalType": "string[]", "name": "assetIds", diff --git a/precompiles/avs/types.go b/precompiles/avs/types.go index 155325731..c43d5db15 100644 --- a/precompiles/avs/types.go +++ b/precompiles/avs/types.go @@ -68,38 +68,51 @@ func (p Precompile) GetAVSParamsFromInputs(_ sdk.Context, args []interface{}) (* exoAddresses[i] = accAddr.String() } avsParams.AvsOwnerAddress = exoAddresses - + // bech32 + whitelistAddress, ok := args[7].([]string) + if !ok || whitelistAddress == nil { + return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 7, "[]string", whitelistAddress) + } + exoWhiteAddresses := make([]string, len(whitelistAddress)) + for i, addr := range whitelistAddress { + accAddr, err := sdk.AccAddressFromBech32(addr) + if err != nil { + return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 7, "[]string", whitelistAddress) + } + exoAddresses[i] = accAddr.String() + } + avsParams.WhitelistAddress = exoWhiteAddresses // string, since it is the address_id representation - assetID, ok := args[7].([]string) + assetID, ok := args[8].([]string) if !ok || len(assetID) == 0 { - return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 7, "[]string", assetID) + return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 8, "[]string", assetID) } avsParams.AssetID = assetID - unbondingPeriod, ok := args[8].(uint64) + unbondingPeriod, ok := args[9].(uint64) if !ok || unbondingPeriod == 0 { - return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 8, "uint64", unbondingPeriod) + return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 9, "uint64", unbondingPeriod) } avsParams.UnbondingPeriod = unbondingPeriod - minSelfDelegation, ok := args[9].(uint64) + minSelfDelegation, ok := args[10].(uint64) if !ok { - return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 9, "uint64", minSelfDelegation) + return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 10, "uint64", minSelfDelegation) } avsParams.MinSelfDelegation = minSelfDelegation - epochIdentifier, ok := args[10].(string) + epochIdentifier, ok := args[11].(string) if !ok || epochIdentifier == "" { - return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 10, "string", epochIdentifier) + return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 11, "string", epochIdentifier) } avsParams.EpochIdentifier = epochIdentifier // The parameters below are used when creating tasks, to ensure that the minimum criteria are met by the set // of operators. - taskParam, ok := args[11].([]uint64) + taskParam, ok := args[12].([]uint64) if !ok || taskParam == nil || len(taskParam) != 4 { - return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 11, "[]string", taskParam) + return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 12, "[]string", taskParam) } minOptInOperators := taskParam[0] avsParams.MinOptInOperators = minOptInOperators @@ -166,43 +179,56 @@ func (p Precompile) GetAVSParamsFromUpdateInputs(_ sdk.Context, args []interface for i, addr := range avsOwnerAddress { accAddr, err := sdk.AccAddressFromBech32(addr) if err != nil { - return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 7, "[]string", avsOwnerAddress) + return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 6, "[]string", avsOwnerAddress) } exoAddresses[i] = accAddr.String() } avsParams.AvsOwnerAddress = exoAddresses - + // bech32 + whitelistAddress, ok := args[7].([]string) + if !ok || whitelistAddress == nil { + return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 7, "[]string", whitelistAddress) + } + exoWhiteAddresses := make([]string, len(whitelistAddress)) + for i, addr := range whitelistAddress { + accAddr, err := sdk.AccAddressFromBech32(addr) + if err != nil { + return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 7, "[]string", whitelistAddress) + } + exoAddresses[i] = accAddr.String() + } + avsParams.WhitelistAddress = exoWhiteAddresses // string, since it is the address_id representation - assetID, ok := args[7].([]string) + assetID, ok := args[8].([]string) if !ok { - return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 7, "[]string", assetID) + return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 8, "[]string", assetID) } avsParams.AssetID = assetID - unbondingPeriod, ok := args[8].(uint64) + unbondingPeriod, ok := args[9].(uint64) if !ok { - return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 8, "uint64", unbondingPeriod) + return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 9, "uint64", unbondingPeriod) } avsParams.UnbondingPeriod = unbondingPeriod - minSelfDelegation, ok := args[9].(uint64) + minSelfDelegation, ok := args[10].(uint64) if !ok { - return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 9, "uint64", minSelfDelegation) + return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 10, "uint64", minSelfDelegation) } avsParams.MinSelfDelegation = minSelfDelegation - epochIdentifier, ok := args[10].(string) + epochIdentifier, ok := args[11].(string) if !ok { - return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 10, "string", epochIdentifier) + return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 11, "string", epochIdentifier) } avsParams.EpochIdentifier = epochIdentifier // The parameters below are used when creating tasks, to ensure that the minimum criteria are met by the set // of operators. - taskParam, ok := args[11].([]uint64) + taskParam, ok := args[12].([]uint64) if !ok || taskParam == nil || len(taskParam) != 4 { - return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 11, "[]string", taskParam) + return nil, fmt.Errorf(exocmn.ErrContractInputParaOrType, 12, "[]string", taskParam) } minOptInOperators := taskParam[0] avsParams.MinOptInOperators = minOptInOperators diff --git a/proto/exocore/avs/v1/tx.proto b/proto/exocore/avs/v1/tx.proto index 8cf07b65f..b3bf6b598 100644 --- a/proto/exocore/avs/v1/tx.proto +++ b/proto/exocore/avs/v1/tx.proto @@ -52,9 +52,10 @@ message AVSInfo { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; - // asset_reward_commission_epoch_basis is the avs reward distribution based on asset per eopch end. map asset_reward_amount_epoch_basis = 18; + // whitelist_address are the bech32 addresses ,whitelist address of supported operators + repeated string whitelist_address = 19; } // Status and proof of each operator diff --git a/x/avs/keeper/avs.go b/x/avs/keeper/avs.go index 4862b9af3..3a28039a4 100644 --- a/x/avs/keeper/avs.go +++ b/x/avs/keeper/avs.go @@ -1,14 +1,14 @@ package keeper import ( + errorsmod "cosmossdk.io/errors" + sdkmath "cosmossdk.io/math" "fmt" "math/big" + "slices" "strconv" "strings" - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - "github.com/ExocoreNetwork/exocore/x/avs/types" "github.com/ethereum/go-ethereum/common" "github.com/evmos/evmos/v16/x/evm/statedb" @@ -224,3 +224,23 @@ func (k *Keeper) GetAllChainIDInfos(ctx sdk.Context) ([]types.ChainIDInfo, error } return ret, nil } + +// IsWhitelisted check if operator is in the whitelist +func (k *Keeper) IsWhitelisted(ctx sdk.Context, avsAddr, operatorAddr string) (bool, error) { + avsInfo, err := k.GetAVSInfo(ctx, avsAddr) + if err != nil { + return false, errorsmod.Wrap(err, fmt.Sprintf("IsWhitelisted: key is %s", avsAddr)) + } + _, err = sdk.AccAddressFromBech32(operatorAddr) + if err != nil { + return false, errorsmod.Wrap(err, "IsWhitelisted: error occurred when parse acc address from Bech32") + } + // Currently avs has no whitelist set and any operator can optin + if len(avsInfo.Info.WhitelistAddress) == 0 { + return true, nil + } + if !slices.Contains(avsInfo.Info.WhitelistAddress, operatorAddr) { + return false, errorsmod.Wrap(err, "not in the whitelist address of supported operators") + } + return true, nil +} diff --git a/x/avs/keeper/avs_test.go b/x/avs/keeper/avs_test.go index 1b7dddbca..eb0011985 100644 --- a/x/avs/keeper/avs_test.go +++ b/x/avs/keeper/avs_test.go @@ -23,6 +23,8 @@ func (suite *AVSTestSuite) TestAVS() { avsAddress := suite.avsAddress avsOwnerAddress := []string{"exo13h6xg79g82e2g2vhjwg7j4r2z2hlncelwutkjr", "exo13h6xg79g82e2g2vhjwg7j4r2z2hlncelwutkj1", "exo13h6xg79g82e2g2vhjwg7j4r2z2hlncelwutkj2"} assetID := suite.AssetIDs + operatorAddress := sdk.AccAddress(utiltx.GenerateAddress().Bytes()).String() + avs := &types.AVSInfo{ Name: avsName, AvsAddress: avsAddress.String(), @@ -38,11 +40,15 @@ func (suite *AVSTestSuite) TestAVS() { AvsSlash: sdk.MustNewDecFromStr("0.001"), AvsReward: sdk.MustNewDecFromStr("0.002"), TaskAddr: "exo13h6xg79g82e2g2vhjwg7j4r2z2hlncelwutkjr", + WhitelistAddress: []string{operatorAddress}, } err := suite.App.AVSManagerKeeper.SetAVSInfo(suite.Ctx, avs) suite.NoError(err) + whitelisted, err := suite.App.AVSManagerKeeper.IsWhitelisted(suite.Ctx, avsAddress.String(), operatorAddress) + suite.NoError(err) + suite.Equal(whitelisted, true) info, err := suite.App.AVSManagerKeeper.GetAVSInfo(suite.Ctx, avsAddress.String()) suite.NoError(err) diff --git a/x/avs/keeper/keeper.go b/x/avs/keeper/keeper.go index 4e0e0fce4..8f9868966 100644 --- a/x/avs/keeper/keeper.go +++ b/x/avs/keeper/keeper.go @@ -129,7 +129,8 @@ func (k Keeper) UpdateAVSInfo(ctx sdk.Context, params *types.AVSRegisterOrDeregi // #nosec G115 AvsSlash: sdk.NewDecWithPrec(int64(params.AvsSlash), 2), // #nosec G115 - AvsReward: sdk.NewDecWithPrec(int64(params.AvsReward), 2), + AvsReward: sdk.NewDecWithPrec(int64(params.AvsReward), 2), + WhitelistAddress: params.WhitelistAddress, } return k.SetAVSInfo(ctx, avs) @@ -185,6 +186,9 @@ func (k Keeper) UpdateAVSInfo(ctx sdk.Context, params *types.AVSRegisterOrDeregi if params.AvsOwnerAddress != nil { avs.AvsOwnerAddress = params.AvsOwnerAddress } + if params.WhitelistAddress != nil { + avs.WhitelistAddress = params.WhitelistAddress + } if params.AssetID != nil { avs.AssetIDs = params.AssetID if err := k.ValidateAssetIDs(ctx, params.AssetID); err != nil { diff --git a/x/avs/types/tx.pb.go b/x/avs/types/tx.pb.go index d54782356..52043224f 100644 --- a/x/avs/types/tx.pb.go +++ b/x/avs/types/tx.pb.go @@ -103,6 +103,8 @@ type AVSInfo struct { AvsSlash github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,17,opt,name=avs_slash,json=avsSlash,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"avs_slash"` // asset_reward_commission_epoch_basis is the avs reward distribution based on asset per eopch end. AssetRewardAmountEpochBasis map[string]int64 `protobuf:"bytes,18,rep,name=asset_reward_amount_epoch_basis,json=assetRewardAmountEpochBasis,proto3" json:"asset_reward_amount_epoch_basis,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + // whitelist_address are the bech32 addresses ,whitelist address of supported operators + WhitelistAddress []string `protobuf:"bytes,19,rep,name=whitelist_address,json=whitelistAddress,proto3" json:"whitelist_address,omitempty"` } func (m *AVSInfo) Reset() { *m = AVSInfo{} } @@ -250,6 +252,13 @@ func (m *AVSInfo) GetAssetRewardAmountEpochBasis() map[string]int64 { return nil } +func (m *AVSInfo) GetWhitelistAddress() []string { + if m != nil { + return m.WhitelistAddress + } + return nil +} + // Status and proof of each operator type OperatorStatus struct { // operator address @@ -1233,119 +1242,120 @@ func init() { func init() { proto.RegisterFile("exocore/avs/v1/tx.proto", fileDescriptor_ef1ed06249b07d86) } var fileDescriptor_ef1ed06249b07d86 = []byte{ - // 1787 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x41, 0x6f, 0x1b, 0xc7, - 0x15, 0xd6, 0x4a, 0x94, 0x44, 0x3e, 0x52, 0x14, 0x35, 0xa2, 0xc3, 0x35, 0xdd, 0x92, 0xc4, 0xba, - 0x76, 0x64, 0x39, 0x26, 0x6d, 0xa5, 0x28, 0x0c, 0xf7, 0x24, 0x59, 0x4a, 0x42, 0xa4, 0xb6, 0x88, - 0xa5, 0x9c, 0x16, 0xed, 0x61, 0x31, 0xe4, 0x8e, 0xc8, 0x85, 0xc8, 0x1d, 0x76, 0x67, 0x48, 0xdb, - 0x3d, 0x14, 0x85, 0x2f, 0x0d, 0x84, 0xa2, 0x68, 0x91, 0xb3, 0x81, 0x00, 0x3d, 0x16,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 0x96, 0x84, 0xa1, 0x85, 0x15, 0xc3, 0x7a, 0xec, 0x28, 0xd3, 0x3d, 0x5f, 0x06, - 0x8f, 0xed, 0x4b, 0xf4, 0x7c, 0x8d, 0xe2, 0x7d, 0xa8, 0xbc, 0xce, 0x01, 0xc9, 0xc1, 0xc2, 0x11, - 0x7b, 0xac, 0xdb, 0x50, 0x7d, 0x92, 0x3c, 0x2c, 0x8e, 0x68, 0x6f, 0xc8, 0xb0, 0xff, 0x16, 0xec, - 0x70, 0x71, 0x67, 0xfe, 0xb6, 0x61, 0x05, 0x90, 0x8d, 0xce, 0xbb, 0x29, 0xa9, 0x1c, 0xaa, 0xdb, - 0x9d, 0x8b, 0xae, 0xc6, 0xb8, 0x11, 0x42, 0x57, 0xab, 0x91, 0x3c, 0x6a, 0x84, 0x77, 0x60, 0x49, - 0xa0, 0x91, 0xee, 0x6b, 0xbd, 0x52, 0xcd, 0x38, 0x08, 0x38, 0x3f, 0x74, 0x5c, 0x2a, 0x29, 0x76, - 0x73, 0xc6, 0x4e, 0xa1, 0x64, 0x97, 0x4a, 0x6a, 0xfd, 0xdb, 0x80, 0x5c, 0x18, 0x3f, 0xd6, 0xb4, - 0xa1, 0x00, 0x52, 0x80, 0x65, 0xec, 0x6e, 0xcf, 0xd5, 0xbb, 0x2d, 0xa9, 0x65, 0xdd, 0x25, 0x5b, - 0x70, 0x01, 0x81, 0x36, 0xf7, 0x65, 0x40, 0xdb, 0x72, 0x8a, 0x4b, 0xd6, 0x15, 0x78, 0x57, 0x63, - 0x51, 0x60, 0x25, 0x00, 0xda, 0xe9, 0x04, 0xaa, 0x47, 0x78, 0x80, 0x01, 0x28, 0xd2, 0x19, 0x4b, - 0xa6, 0x59, 0x29, 0x31, 0xc3, 0x4a, 0x1f, 0xc2, 0x38, 0x59, 0x47, 0xa7, 0xb8, 0x88, 0xc7, 0x5a, - 0x9a, 0x3e, 0xd6, 0x78, 0xf5, 0xec, 0x2c, 0x8f, 0xad, 0xad, 0x67, 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34, 0x76, 0x3e, 0xfc, 0xf2, 0xa4, 0x64, 0x7c, 0x75, 0x52, 0x32, - 0xfe, 0x71, 0x52, 0x32, 0x7e, 0xf3, 0xa2, 0x34, 0xf7, 0xd5, 0x8b, 0xd2, 0xdc, 0xdf, 0x5e, 0x94, - 0xe6, 0x7e, 0x7c, 0x63, 0xe2, 0xb5, 0xb2, 0x17, 0xfa, 0xbb, 0xcf, 0xe4, 0x43, 0x1e, 0x1c, 0x8d, - 0xdd, 0x3f, 0xc2, 0x0d, 0xf0, 0xe1, 0xd2, 0x5a, 0xc2, 0x5f, 0x82, 0xde, 0xff, 0x4f, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xdb, 0xbf, 0x57, 0x92, 0xaf, 0x12, 0x00, 0x00, + // 1806 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4f, 0x6f, 0x1b, 0xc7, + 0x15, 0xd7, 0x4a, 0xd4, 0xbf, 0x47, 0x8a, 0x5a, 0x8d, 0xe8, 0x70, 0x43, 0xb7, 0x24, 0xb1, 0xae, + 0x1d, 0x59, 0x8e, 0x49, 0x5b, 0x29, 0x0a, 0xc3, 0x3d, 0x49, 0x96, 0x92, 0x10, 0xa9, 0x2d, 0x62, + 0x29, 0xa7, 0x45, 0x7b, 0x58, 0x0c, 0xb9, 0x23, 0x72, 0x21, 0x72, 0x87, 0xdd, 0x19, 0x52, 0x76, + 0x0f, 0x45, 0xe1, 0x4b, 0x03, 0xa1, 0x28, 0x5a, 0xe4, 0x6c, 0x20, 0x40, 0x8f, 0x45, 0x01, 0xa3, + 0xc8, 0xa5, 0x40, 0x3f, 0x40, 0x8e, 0x41, 0x7a, 0x29, 0x7a, 0x30, 0x0a, 0xb9, 0x80, 0xdb, 0x7e, + 0x8a, 0x62, 0xde, 0xce, 0x52, 0x5c, 0x52, 0xb2, 0xeb, 0xe6, 0xd0, 0x5c, 0x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52, 0xe8, 0x68, 0x49, 0x09, 0x94, 0x27, 0xf2, 0x6d, 0x00, 0xd1, 0xa5, 0xa2, 0x13, 0xa1, 0xf3, + 0x88, 0x2e, 0xa3, 0x04, 0xe1, 0x12, 0xa4, 0x43, 0x76, 0x4c, 0x43, 0x2f, 0xc2, 0x17, 0xa2, 0x30, + 0x22, 0x11, 0x2a, 0x6c, 0xc2, 0x9a, 0x8a, 0x93, 0x1f, 0x07, 0x2c, 0x1c, 0x45, 0xbb, 0x58, 0x9e, + 0xdb, 0x58, 0x76, 0x56, 0xe9, 0x50, 0xec, 0x2b, 0x79, 0x1c, 0xf2, 0x75, 0x58, 0xa6, 0x42, 0x30, + 0xe9, 0xfa, 0x9e, 0xb0, 0x96, 0x94, 0xce, 0x4e, 0xe6, 0xf4, 0x79, 0x69, 0x69, 0x5b, 0x09, 0x6b, + 0xbb, 0xc2, 0x59, 0x42, 0xb8, 0xe6, 0x09, 0x72, 0x0b, 0x72, 0xca, 0xed, 0x20, 0x68, 0xf2, 0xc0, + 0xf3, 0x83, 0xb6, 0xdb, 0x67, 0xa1, 0xcf, 0x3d, 0x6b, 0x19, 0x33, 0x24, 0x74, 0x28, 0x1e, 0xc6, + 0x50, 0x1d, 0x11, 0x52, 0x81, 0x75, 0xac, 0x07, 0xeb, 0x1e, 0xba, 0x1e, 0xeb, 0xb2, 0x36, 0x96, + 0xdb, 0x02, 0x34, 0x58, 0x53, 0x25, 0x61, 0xdd, 0xc3, 0xdd, 0x11, 0x40, 0xae, 0x83, 0xc9, 0xfa, + 0xbc, 0xd5, 0x71, 0x7d, 0x8f, 0x05, 0xd2, 0x3f, 0xf4, 0x59, 0x68, 0xa5, 0x31, 0xbd, 0x55, 0x94, + 0xd7, 0x46, 0x62, 0x52, 0x85, 0x9c, 0x72, 0xcd, 0xfb, 0xd2, 0xc5, 0x3f, 0x2c, 0xa4, 0x92, 0x87, + 0xc2, 0xca, 0x8c, 0x7c, 0xef, 0xf7, 0x65, 0x2d, 0xd8, 0x8f, 0x01, 0xf2, 0x1e, 0xbc, 0xa5, 0x0c, + 0x24, 0x97, 0xb4, 0x9b, 0x3c, 0xa1, 0x15, 0x34, 0x51, 0x91, 0x1e, 0x28, 0x70, 0xfc, 0x98, 0xae, + 0x42, 0x56, 0x48, 0x1a, 0x4a, 0x95, 0x2d, 0x46, 0x60, 0x65, 0x51, 0x79, 0x25, 0x96, 0xee, 0x29, + 0x21, 0x79, 0x1b, 0x96, 0x5a, 0x1d, 0xea, 0x07, 0xae, 0xef, 0x59, 0xab, 0x18, 0xef, 0x22, 0xae, + 0x6b, 0x1e, 0xb9, 0x0f, 0xaa, 0x41, 0xdc, 0xe8, 0x74, 0x2c, 0x53, 0x81, 0x3b, 0x95, 0x2f, 0x9e, + 0x97, 0x66, 0xfe, 0xf6, 0xbc, 0x74, 0xad, 0xed, 0xcb, 0xce, 0xa0, 0x59, 0x69, 0xf1, 0x9e, 0x6e, + 0x5e, 0xfd, 0xe7, 0xa6, 0xf0, 0x8e, 0xaa, 0xf2, 0x71, 0x9f, 0x89, 0xca, 0x2e, 0x6b, 0x39, 0xcb, + 0x74, 0x28, 0x1c, 0x74, 0x40, 0x3e, 0x02, 0xb5, 0x70, 0xb1, 0x19, 0xac, 0xb5, 0xff, 0xc9, 0xdb, + 0x12, 0x1d, 0x8a, 0x86, 0xb2, 0x27, 0x3f, 0x87, 0x52, 0x74, 0xf6, 0x71, 0x3b, 0x61, 0xd2, 0x51, + 0xa2, 0x6e, 0x93, 0x0a, 0x5f, 0x58, 0xa4, 0x3c, 0xb7, 0x91, 0xde, 0xba, 0x53, 0x49, 0x0e, 0x69, + 0x45, 0x4f, 0x49, 0x05, 0xbb, 0x24, 0x0a, 0x2d, 0xaa, 0x18, 0xd6, 0x63, 0x47, 0x99, 0xee, 0x05, + 0x32, 0x7c, 0xec, 0x5c, 0xa6, 0x17, 0x6b, 0x90, 0x1b, 0xb0, 0x76, 0xdc, 0xf1, 0x25, 0xeb, 0xfa, + 0x42, 0x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e, 0x3a, 0xb3, 0xff, 0x64, 0x00, 0x71, 0x58, 0xdb, 0x17, 0x92, + 0x85, 0xdb, 0x1f, 0x37, 0x0e, 0x90, 0x23, 0x7e, 0x4a, 0xbe, 0x0f, 0x99, 0xc3, 0x90, 0xf7, 0x92, + 0xb4, 0xb5, 0x63, 0x7d, 0xf5, 0xf9, 0xcd, 0x9c, 0x8e, 0x51, 0xb3, 0x56, 0x43, 0x86, 0x7e, 0xd0, + 0x76, 0xd2, 0x4a, 0x3b, 0x26, 0xb2, 0x77, 0x21, 0xa5, 0xba, 0x08, 0x03, 0x48, 0x6f, 0x59, 0x93, + 0x87, 0x15, 0x93, 0xa4, 0x83, 0x5a, 0x77, 0xef, 0x7c, 0xf2, 0x59, 0x69, 0xe6, 0x9f, 0x9f, 0x95, + 0x66, 0x9e, 0xbc, 0x7c, 0xb6, 0x99, 0x7e, 0xff, 0xcc, 0xcf, 0xc9, 0xcb, 0x67, 0x9b, 0x97, 0xc7, + 0x8a, 0x77, 0x30, 0xc6, 0x99, 0xca, 0xde, 0x7e, 0x1b, 0xf2, 0x53, 0xa1, 0x47, 0xf4, 0x66, 0xff, + 0xca, 0x80, 0xec, 0x18, 0xf6, 0xb5, 0x53, 0xba, 0x01, 0x29, 0x3f, 0x38, 0xe4, 0x3a, 0xa5, 0xfc, + 0x05, 0xcf, 0x03, 0x07, 0x95, 0xee, 0x9a, 0x93, 0x99, 0xd8, 0xbf, 0x35, 0x60, 0x3d, 0x11, 0x4e, + 0x14, 0xe6, 0xff, 0x35, 0xa6, 0x5f, 0x1b, 0x60, 0xee, 0xb2, 0x6f, 0x50, 0x91, 0x3e, 0x35, 0xe0, + 0xd2, 0x44, 0x40, 0xdf, 0x80, 0x32, 0xfd, 0x61, 0x16, 0xb2, 0xba, 0xb5, 0x06, 0x5d, 0xec, 0xbb, + 0x37, 0x79, 0x37, 0xbd, 0x0b, 0x24, 0x79, 0x25, 0xe3, 0x6d, 0x1e, 0x4d, 0xa6, 0x39, 0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28, 0xce, 0x7c, 0xf9, 0xa2, 0x38, + 0xf3, 0xd7, 0x17, 0xc5, 0x99, 0x1f, 0xdf, 0x1c, 0x7b, 0xad, 0xec, 0x45, 0xfe, 0x1e, 0x30, 0x79, + 0xcc, 0xc3, 0xa3, 0x91, 0xfb, 0x47, 0xb8, 0x01, 0x3e, 0x5c, 0x9a, 0x0b, 0xf8, 0xb3, 0xd1, 0x7b, + 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x64, 0x12, 0x7a, 0xae, 0xdc, 0x12, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1564,6 +1574,17 @@ func (m *AVSInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.WhitelistAddress) > 0 { + for iNdEx := len(m.WhitelistAddress) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.WhitelistAddress[iNdEx]) + copy(dAtA[i:], m.WhitelistAddress[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.WhitelistAddress[iNdEx]))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x9a + } + } if len(m.AssetRewardAmountEpochBasis) > 0 { for k := range m.AssetRewardAmountEpochBasis { v := m.AssetRewardAmountEpochBasis[k] @@ -2529,6 +2550,12 @@ func (m *AVSInfo) Size() (n int) { n += mapEntrySize + 2 + sovTx(uint64(mapEntrySize)) } } + if len(m.WhitelistAddress) > 0 { + for _, s := range m.WhitelistAddress { + l = len(s) + n += 2 + l + sovTx(uint64(l)) + } + } return n } @@ -3480,6 +3507,38 @@ func (m *AVSInfo) Unmarshal(dAtA []byte) error { } m.AssetRewardAmountEpochBasis[mapkey] = mapvalue iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WhitelistAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WhitelistAddress = append(m.WhitelistAddress, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/avs/types/types.go b/x/avs/types/types.go index c87f9a952..ac70762cc 100644 --- a/x/avs/types/types.go +++ b/x/avs/types/types.go @@ -78,6 +78,8 @@ type AVSRegisterOrDeregisterParams struct { AvsReward uint64 AvsSlash uint64 Action OperatorAction + // WhitelistAddress is the list of bech32 address of the operators. + WhitelistAddress []string } var ( diff --git a/x/operator/keeper/opt.go b/x/operator/keeper/opt.go index 9a4989435..34895dc95 100644 --- a/x/operator/keeper/opt.go +++ b/x/operator/keeper/opt.go @@ -29,6 +29,10 @@ func (k *Keeper) OptIn( if isAvs, _ := k.avsKeeper.IsAVS(ctx, avsAddr); !isAvs { return types.ErrNoSuchAvs.Wrapf("AVS not found %s", avsAddr) } + // check if operator is in the whitelist + if isWhite, err := k.avsKeeper.IsWhitelisted(ctx, avsAddr, operatorAddress.String()); !isWhite { + return err + } // check optedIn info if k.IsOptedIn(ctx, operatorAddress.String(), avsAddr) { return types.ErrAlreadyOptedIn diff --git a/x/operator/types/expected_keepers.go b/x/operator/types/expected_keepers.go index 900e0583d..7b508b42f 100644 --- a/x/operator/types/expected_keepers.go +++ b/x/operator/types/expected_keepers.go @@ -113,6 +113,7 @@ type AVSKeeper interface { IsAVSByChainID(ctx sdk.Context, chainID string) (bool, string) GetAVSEpochInfo(ctx sdk.Context, addr string) (*epochstypes.EpochInfo, error) GetAVSUnbondingDuration(ctx sdk.Context, avsAddr string) (uint64, error) + IsWhitelisted(ctx sdk.Context, avsAddr, operatorAddr string) (bool, error) } type SlashKeeper interface {