From 9fda0cc63d22796883b7abf655d44d6efdcc675a Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Thu, 23 Mar 2023 16:08:50 +0400 Subject: [PATCH] chore: remove the `monitoringp` module (#211) --- app/app.go | 36 +--- docs/static/openapi.yml | 438 ++-------------------------------------- go.mod | 2 +- 3 files changed, 16 insertions(+), 460 deletions(-) diff --git a/app/app.go b/app/app.go index 13709e414..9c2b927a1 100644 --- a/app/app.go +++ b/app/app.go @@ -97,10 +97,6 @@ import ( "github.com/ignite/cli/ignite/pkg/cosmoscmd" "github.com/ignite/cli/ignite/pkg/openapiconsole" - monitoringp "github.com/tendermint/spn/x/monitoringp" - monitoringpkeeper "github.com/tendermint/spn/x/monitoringp/keeper" - monitoringptypes "github.com/tendermint/spn/x/monitoringp/types" - "github.com/dymensionxyz/dymension/docs" rollappmodule "github.com/dymensionxyz/dymension/x/rollapp" rollappmodulekeeper "github.com/dymensionxyz/dymension/x/rollapp/keeper" @@ -180,7 +176,6 @@ var ( evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, vesting.AppModuleBasic{}, - monitoringp.AppModuleBasic{}, rollappmodule.AppModuleBasic{}, sequencermodule.AppModuleBasic{}, router.AppModuleBasic{}, @@ -256,13 +251,11 @@ type App struct { EvidenceKeeper evidencekeeper.Keeper TransferKeeper ibctransferkeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper - MonitoringKeeper monitoringpkeeper.Keeper RouterKeeper routerkeeper.Keeper // make scoped keepers public for test purposes - ScopedIBCKeeper capabilitykeeper.ScopedKeeper - ScopedTransferKeeper capabilitykeeper.ScopedKeeper - ScopedMonitoringKeeper capabilitykeeper.ScopedKeeper + ScopedIBCKeeper capabilitykeeper.ScopedKeeper + ScopedTransferKeeper capabilitykeeper.ScopedKeeper RollappKeeper rollappmodulekeeper.Keeper @@ -341,7 +334,7 @@ func New( authtypes.StoreKey, authz.ModuleName, banktypes.StoreKey, stakingtypes.StoreKey, minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey, - evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey, monitoringptypes.StoreKey, + evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey, rollappmoduletypes.StoreKey, sequencermoduletypes.StoreKey, routertypes.StoreKey, @@ -491,21 +484,6 @@ func New( &stakingKeeper, govRouter, ) - scopedMonitoringKeeper := app.CapabilityKeeper.ScopeToModule(monitoringptypes.ModuleName) - app.MonitoringKeeper = *monitoringpkeeper.NewKeeper( - appCodec, - keys[monitoringptypes.StoreKey], - keys[monitoringptypes.MemStoreKey], - app.GetSubspace(monitoringptypes.ModuleName), - app.StakingKeeper, - app.IBCKeeper.ClientKeeper, - app.IBCKeeper.ConnectionKeeper, - app.IBCKeeper.ChannelKeeper, - &app.IBCKeeper.PortKeeper, - scopedMonitoringKeeper, - ) - monitoringModule := monitoringp.NewAppModule(appCodec, app.MonitoringKeeper) - app.IRCKeeper = ircmodulekeeper.NewKeeper( appCodec, keys[ircmoduletypes.StoreKey], @@ -540,7 +518,6 @@ func New( // Create static IBC router, add transfer route, then set and seal it ibcRouter := ibcporttypes.NewRouter() ibcRouter.AddRoute(ibctransfertypes.ModuleName, routerModule) - ibcRouter.AddRoute(monitoringptypes.ModuleName, monitoringModule) // this line is used by starport scaffolding # ibc/app/router app.IBCKeeper.SetRouter(ibcRouter) @@ -576,7 +553,6 @@ func New( params.NewAppModule(app.ParamsKeeper), routerModule, transferModule, - monitoringModule, rollappModule, sequencerModule, ircModule, @@ -607,7 +583,6 @@ func New( genutiltypes.ModuleName, feegrant.ModuleName, paramstypes.ModuleName, - monitoringptypes.ModuleName, rollappmoduletypes.ModuleName, sequencermoduletypes.ModuleName, ircmoduletypes.ModuleName, @@ -634,7 +609,6 @@ func New( ibchost.ModuleName, ibctransfertypes.ModuleName, routertypes.ModuleName, - monitoringptypes.ModuleName, rollappmoduletypes.ModuleName, sequencermoduletypes.ModuleName, ircmoduletypes.ModuleName, @@ -666,7 +640,6 @@ func New( ibctransfertypes.ModuleName, routertypes.ModuleName, feegrant.ModuleName, - monitoringptypes.ModuleName, rollappmoduletypes.ModuleName, sequencermoduletypes.ModuleName, ircmoduletypes.ModuleName, @@ -694,7 +667,6 @@ func New( ibcModule, transferModule, routerModule, - monitoringModule, rollappModule, sequencerModule, ircModule, @@ -735,7 +707,6 @@ func New( app.ScopedIBCKeeper = scopedIBCKeeper app.ScopedTransferKeeper = scopedTransferKeeper - app.ScopedMonitoringKeeper = scopedMonitoringKeeper // this line is used by starport scaffolding # stargate/app/beforeInitReturn return app @@ -887,7 +858,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino paramsKeeper.Subspace(routertypes.ModuleName).WithKeyTable(routertypes.ParamKeyTable()) paramsKeeper.Subspace(ibctransfertypes.ModuleName) paramsKeeper.Subspace(ibchost.ModuleName) - paramsKeeper.Subspace(monitoringptypes.ModuleName) paramsKeeper.Subspace(rollappmoduletypes.ModuleName) paramsKeeper.Subspace(sequencermoduletypes.ModuleName) paramsKeeper.Subspace(ircmoduletypes.ModuleName) diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 5c29321a4..c358ee1a1 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -6343,8 +6343,8 @@ paths: type: string tags: - Query - /cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}: - get: + ? /cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address} + : get: summary: DelegationRewards queries the total rewards accrued by a delegation. operationId: CosmosDistributionV1Beta1DelegationRewards responses: @@ -6600,8 +6600,8 @@ paths: type: string tags: - Query - /cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards: - get: + ? /cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards + : get: summary: ValidatorOutstandingRewards queries rewards of a validator address. operationId: CosmosDistributionV1Beta1ValidatorOutstandingRewards responses: @@ -12960,8 +12960,8 @@ paths: type: boolean tags: - Query - /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}: - get: + ? /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr} + : get: summary: |- DelegatorValidator queries validator info for given delegator validator pair. @@ -15474,8 +15474,8 @@ paths: type: boolean tags: - Query - /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}: - get: + ? /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr} + : get: summary: Delegation queries delegate info for given validator delegator pair. operationId: CosmosStakingV1Beta1Delegation responses: @@ -15730,8 +15730,8 @@ paths: type: string tags: - Query - /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation: - get: + ? /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation + : get: summary: |- UnbondingDelegation queries unbonding info for given validator delegator pair. @@ -18991,8 +18991,8 @@ paths: type: boolean tags: - Query - /dymensionxyz/dymension/rollapp/block_height_to_finalization_queue/{finalizationHeight}: - get: + ? /dymensionxyz/dymension/rollapp/block_height_to_finalization_queue/{finalizationHeight} + : get: summary: Queries a BlockHeightToFinalizationQueue by index. operationId: DymensionxyzDymensionRollappBlockHeightToFinalizationQueue responses: @@ -22545,202 +22545,6 @@ paths: type: string tags: - Query - /tendermint/spn/monitoringp/connection_channel_id: - get: - summary: Queries a ConnectionChannelID by index. - operationId: TendermintSpnMonitoringpConnectionChannelID - responses: - '200': - description: A successful response. - schema: - type: object - properties: - ConnectionChannelID: - type: object - properties: - channelID: - type: string - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - tags: - - Query - /tendermint/spn/monitoringp/consumer_client_id: - get: - summary: Queries a ConsumerClientID by index. - operationId: TendermintSpnMonitoringpConsumerClientID - responses: - '200': - description: A successful response. - schema: - type: object - properties: - ConsumerClientID: - type: object - properties: - clientID: - type: string - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - tags: - - Query - /tendermint/spn/monitoringp/monitoring_info: - get: - summary: Queries a MonitoringInfo by index. - operationId: TendermintSpnMonitoringpMonitoringInfo - responses: - '200': - description: A successful response. - schema: - type: object - properties: - MonitoringInfo: - type: object - properties: - transmitted: - type: boolean - signatureCounts: - type: object - properties: - blockCount: - type: string - format: uint64 - counts: - type: array - items: - type: object - properties: - opAddress: - type: string - RelativeSignatures: - type: string - title: >- - SignatureCount contains information of signature - reporting for one specific validator with consensus - address - - RelativeSignatures is the sum of all signatures - relative to the validator set size - title: >- - SignatureCounts contains information about signature - reporting for a number of blocks - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - tags: - - Query - /tendermint/spn/monitoringp/params: - get: - summary: Params queries the parameters of the module. - operationId: TendermintSpnMonitoringpParams - responses: - '200': - description: A successful response. - schema: - type: object - properties: - params: - type: object - properties: - lastBlockHeight: - type: string - format: int64 - consumerChainID: - type: string - consumerConsensusState: - type: object - properties: - nextValidatorsHash: - type: string - timestamp: - type: string - root: - type: object - properties: - hash: - type: string - title: MerkelRool represents a Merkel Root in ConsensusState - title: >- - ConsensusState represents a Consensus State - - it is compatible with the dumped state from `appd q ibc - client self-consensus-state` command - consumerUnbondingPeriod: - type: string - format: int64 - consumerRevisionHeight: - type: string - format: uint64 - description: Params defines the parameters for the module. - description: >- - QueryParamsResponse is response type for the Query/Params RPC - method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - tags: - - Query definitions: cosmos.auth.v1beta1.Params: type: object @@ -40080,221 +39884,3 @@ definitions: - OPERATING_STATUS_PROPOSER: OPERATING_STATUS_PROPOSER defines a sequencer that is active and can propose state updates - OPERATING_STATUS_INACTIVE: OPERATING_STATUS_INACTIVE defines a sequencer that is not active and won't be scheduled description: SequencerInfo holds information for user query. - tendermint.spn.monitoringp.ConnectionChannelID: - type: object - properties: - channelID: - type: string - tendermint.spn.monitoringp.ConsumerClientID: - type: object - properties: - clientID: - type: string - tendermint.spn.monitoringp.MonitoringInfo: - type: object - properties: - transmitted: - type: boolean - signatureCounts: - type: object - properties: - blockCount: - type: string - format: uint64 - counts: - type: array - items: - type: object - properties: - opAddress: - type: string - RelativeSignatures: - type: string - title: >- - SignatureCount contains information of signature reporting for - one specific validator with consensus address - - RelativeSignatures is the sum of all signatures relative to the - validator set size - title: >- - SignatureCounts contains information about signature reporting for a - number of blocks - tendermint.spn.monitoringp.Params: - type: object - properties: - lastBlockHeight: - type: string - format: int64 - consumerChainID: - type: string - consumerConsensusState: - type: object - properties: - nextValidatorsHash: - type: string - timestamp: - type: string - root: - type: object - properties: - hash: - type: string - title: MerkelRool represents a Merkel Root in ConsensusState - title: >- - ConsensusState represents a Consensus State - - it is compatible with the dumped state from `appd q ibc client - self-consensus-state` command - consumerUnbondingPeriod: - type: string - format: int64 - consumerRevisionHeight: - type: string - format: uint64 - description: Params defines the parameters for the module. - tendermint.spn.monitoringp.QueryGetConnectionChannelIDResponse: - type: object - properties: - ConnectionChannelID: - type: object - properties: - channelID: - type: string - tendermint.spn.monitoringp.QueryGetConsumerClientIDResponse: - type: object - properties: - ConsumerClientID: - type: object - properties: - clientID: - type: string - tendermint.spn.monitoringp.QueryGetMonitoringInfoResponse: - type: object - properties: - MonitoringInfo: - type: object - properties: - transmitted: - type: boolean - signatureCounts: - type: object - properties: - blockCount: - type: string - format: uint64 - counts: - type: array - items: - type: object - properties: - opAddress: - type: string - RelativeSignatures: - type: string - title: >- - SignatureCount contains information of signature reporting - for one specific validator with consensus address - - RelativeSignatures is the sum of all signatures relative to - the validator set size - title: >- - SignatureCounts contains information about signature reporting for - a number of blocks - tendermint.spn.monitoringp.QueryParamsResponse: - type: object - properties: - params: - type: object - properties: - lastBlockHeight: - type: string - format: int64 - consumerChainID: - type: string - consumerConsensusState: - type: object - properties: - nextValidatorsHash: - type: string - timestamp: - type: string - root: - type: object - properties: - hash: - type: string - title: MerkelRool represents a Merkel Root in ConsensusState - title: >- - ConsensusState represents a Consensus State - - it is compatible with the dumped state from `appd q ibc client - self-consensus-state` command - consumerUnbondingPeriod: - type: string - format: int64 - consumerRevisionHeight: - type: string - format: uint64 - description: Params defines the parameters for the module. - description: QueryParamsResponse is response type for the Query/Params RPC method. - tendermint.spn.types.ConsensusState: - type: object - properties: - nextValidatorsHash: - type: string - timestamp: - type: string - root: - type: object - properties: - hash: - type: string - title: MerkelRool represents a Merkel Root in ConsensusState - title: >- - ConsensusState represents a Consensus State - - it is compatible with the dumped state from `appd q ibc client - self-consensus-state` command - tendermint.spn.types.MerkelRool: - type: object - properties: - hash: - type: string - title: MerkelRool represents a Merkel Root in ConsensusState - tendermint.spn.types.SignatureCount: - type: object - properties: - opAddress: - type: string - RelativeSignatures: - type: string - title: >- - SignatureCount contains information of signature reporting for one - specific validator with consensus address - - RelativeSignatures is the sum of all signatures relative to the validator - set size - tendermint.spn.types.SignatureCounts: - type: object - properties: - blockCount: - type: string - format: uint64 - counts: - type: array - items: - type: object - properties: - opAddress: - type: string - RelativeSignatures: - type: string - title: >- - SignatureCount contains information of signature reporting for one - specific validator with consensus address - - RelativeSignatures is the sum of all signatures relative to the - validator set size - title: >- - SignatureCounts contains information about signature reporting for a - number of blocks diff --git a/go.mod b/go.mod index 358fb26d3..658f76eaa 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,6 @@ require ( github.com/spf13/cobra v1.5.0 github.com/strangelove-ventures/packet-forward-middleware/v3 v3.0.0 github.com/stretchr/testify v1.8.1 - github.com/tendermint/spn v0.2.1-0.20220708132853-26a17f03c072 github.com/tendermint/tendermint v0.34.22 github.com/tendermint/tm-db v0.6.7 google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 @@ -154,6 +153,7 @@ require ( github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 // indirect github.com/tendermint/fundraising v0.3.1-0.20220613014523-03b4a2d4481a // indirect github.com/tendermint/go-amino v0.16.0 // indirect + github.com/tendermint/spn v0.2.1-0.20220708132853-26a17f03c072 // indirect github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce // indirect github.com/xanzy/ssh-agent v0.2.1 // indirect github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect