Skip to content

Commit

Permalink
Add command to CLI endpoint and document
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Jul 26, 2024
1 parent b9e8cf3 commit 88854c8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/docs/frequently-asked-questions.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,12 @@ By setting the commission rate ahead of time, they can make sure that they immed
Yes, by issuing a [`ConsumerModificationProposal`](./features/proposals.md#consumermodificationproposal).

## Can a Top N consumer chain become Opt-In or vice versa?
Yes, by issuing a [`ConsumerModificationProposal`](./features/proposals.md#consumermodificationproposal).
Yes, by issuing a [`ConsumerModificationProposal`](./features/proposals.md#consumermodificationproposal).

## How I know when the next validator update will be sent to the consumer chain?
Validator updates are sent to the consumer chain every `BlocksPerEpoch` blocks.
To query how many blocks are left until the next epoch starts,
run the following command:
```bash
interchain-security-pd query provider blocks-until-next-epoch
```
1 change: 1 addition & 0 deletions x/ccv/provider/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func NewQueryCmd() *cobra.Command {
cmd.AddCommand(CmdConsumerChainsValidatorHasToValidate())
cmd.AddCommand(CmdValidatorConsumerCommissionRate())
cmd.AddCommand(CmdOldestUnconfirmedVsc())
cmd.AddCommand(CmdBlocksUntilNextEpoch())
return cmd
}

Expand Down
1 change: 1 addition & 0 deletions x/ccv/provider/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ func (k Keeper) QueryOldestUnconfirmedVsc(goCtx context.Context, req *types.Quer
return &types.QueryOldestUnconfirmedVscResponse{VscSendTimestamp: ts}, nil
}

// QueryBlocksUntilNextEpoch returns the number of blocks until the next epoch
func (k Keeper) QueryBlocksUntilNextEpoch(goCtx context.Context, req *types.QueryBlocksUntilNextEpochRequest) (*types.QueryBlocksUntilNextEpochResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

Expand Down

0 comments on commit 88854c8

Please sign in to comment.