Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

epoch query for x/meshsecurity #52

Open
Anmol1696 opened this issue Jul 7, 2023 · 2 comments
Open

epoch query for x/meshsecurity #52

Anmol1696 opened this issue Jul 7, 2023 · 2 comments
Milestone

Comments

@Anmol1696
Copy link
Contributor

Anmol1696 commented Jul 7, 2023

Overview

Currently there is no way of knowing what the current epoch is and when the next epoch is going to be.

Proposal

Add meshd q meshsecurity epoch query to get the current and next epoch. Should follow the interface as the epoch module in osmosis.

EpochInfos and current epochs: https://github.com/osmosis-labs/osmosis/blob/main/proto/osmosis/epochs/query.proto#L12

NOTE: Default genesis creation does not have epoch information in the params. So it would be nice to be added too. Overwriting the genesis file would be enabled then.

@Anmol1696
Copy link
Contributor Author

Anmol1696 commented Jul 7, 2023

Ahh, I guess this is a bit more tricky than that, since the default epoch module is not being used here, and the code seems to be such that, each task has a block at which it is scheduled based on the epoch length.

@alexanderbez @ethanfrey would that be correct? I am not sure in that case this epoch info would be useful.

Use case I had in mind was to know how much time/block to wait, so that specific tasks are triggered. I think this information should be generically available as well.

// when an epoch ends, the delegation rebalance is triggered

Maybe we can expose of the block on which the task is supposed to take black then?

@alpe
Copy link
Contributor

alpe commented Jul 19, 2023

It makes sense to have a query to return the next scheduled block for an rebalance.
It is not necessarily calculable by the fixed block distance as epoch but may be triggered by a slashing or other chain event as well.

Can you elaborate on your use case so that we return the "right data"?

@alpe alpe added this to the v0.3.0 milestone Jul 19, 2023
@alpe alpe modified the milestones: v0.3.0, v0.4.0 Nov 23, 2023
@pinosu pinosu modified the milestones: v0.4.0, v0.5.0 Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants