Cosmos-sdk: Query Slashing Parameters

Created on 25 Sep 2018  Â·  11Comments  Â·  Source: cosmos/cosmos-sdk

Summary

Expose slashing params via Gaia-lite and CLI

Problem Definition

On voyager we were trying to track validator uptime (in this case defined as the amount of blocks they signed), which is possible with using the signing_info, but the problem is that we rely on the defaultSignedBlocksWindow to calculate the uptime on the rolling window. That means if the parameter is changed through governance clients won't be able to get the new parameter (besides of hardcoding the value).

Proposal

@alexanderbez : I think we should just expose everything that has a getter in slashing/params.go

Create a GET /slashing/parameters endpoint and CLI cmd to expose the params


For Admin Use

  • [ ] Not duplicate issue
  • [x] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned
CLI Legacy API REST slashing

Most helpful comment

I think this should use the paramstore once thats merged, and should be generalizable. More along the lines of either: params/param_name or params/slashing/sub_param_name

All 11 comments

I think this should use the paramstore once thats merged, and should be generalizable. More along the lines of either: params/param_name or params/slashing/sub_param_name

For sure! We can still have the endpoint and update later.

This proposal is accepted! Is there anyone working on implementation here?

The paramstore isn't merged yet.

And params/slashing/ should return all of them.

I think we should serve the params from the routes of the module that instantiates them so that would be /slashing/params

Just want to note that we can still do that in a standardized way from params.

Personally I like params coming first, but you probably have a better understanding of how clear it would be to the average user so I'm fine with slashing/params

is this still blocked ?

@ValarDragon @jackzampolin do you guys know if the param store got merged so we can move forward with the implementation of this issue?

Param store is merged afaik.

That would unblock this...

Was this page helpful?
0 / 5 - 0 ratings