Skip to content

Commit

Permalink
docs: tiny ADR fix (#1618)
Browse files Browse the repository at this point in the history
nit fix; remove fraction

Co-authored-by: insumity <[email protected]>
  • Loading branch information
insumity and insumity authored Feb 1, 2024
1 parent f5afcb7 commit 849b1c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/docs/adrs/adr-015-partial-set-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@ In a future version of PSS, we intend to introduce a `ConsumerModificationPropos
We augment the provider module’s state to keep track of the `top_N` value for each consumer chain. The key to store this information would be:

```
topNFractionBytePrefix | len(chainID) | chainID
topNBytePrefix | len(chainID) | chainID
```
To create the above key, we can use [`ChainIdWithLenKey`](https://github.com/cosmos/interchain-security/blob/v4.0.0/x/ccv/provider/types/keys.go#L418).

Then in the [keeper](https://github.com/cosmos/interchain-security/blob/v4.0.0/x/ccv/provider/keeper/keeper.go) we introduce methods as follows:
```golang
func (k Keeper) SetTopNFraction(ctx sdk.Context, chainID string, topNFraction string)
func (k Keeper) SetTopN(ctx sdk.Context, chainID string, topN uint32)
func (k Keeper) IsTopN(ctx sdk.Context, chainID string) bool
func (k Keeper) IsOptIn(ctx sdk.Context, chainID string) bool

// returns the N if Top N chain, otherwise an error
func (k Keeper) GetTopNFraction(ctx sdk.Context, chainID string) (Dec, error)
func (k Keeper) GetTopN(ctx sdk.Context, chainID string) (uint32, error)
```

We also extend the `interchain-security-pd query provider list-consumer-chains` query to return information on whether a consumer chain is an Opt In or a Top N chain and with what N.
Expand Down

0 comments on commit 849b1c8

Please sign in to comment.