-
Notifications
You must be signed in to change notification settings - Fork 721
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
Need to access epoch nonce from ChainDepState #3864
Need to access epoch nonce from ChainDepState #3864
Comments
Copied from my Slack message:
|
It looks like |
@nc6 assuming If it's in Consensus, I imagine it'd be named Sound right? Or should it be in Ledger/is there already something like that in Ledger? Or maybe there are plans to lift this |
Yes I imagined a type class that had a method to retrieve the nonce.
So AFAIU the
There is getLeaderSchedule in the ledger which I based my functions on. So far there are no plans to lift my functions out of the node into the ledger. |
I'm at least going to begin with a focus on It's polymorphic over a type variable I think step 1 will be to declare another family along side in On the Consensus side, I think we'll define this:
I think if you add |
I would be tempted to avoid going down this route, and instead add a specific query |
This also works |
At least Ah, I see now that the
I suspect we'll need a broader plan for So I'll prepare a PR that just adds the class for Jordan to use now. We can remove it later as part of the aforementioned plan. |
Fixes Issue IntersectMBO/cardano-node#3864. This is a continuation of the somewhat kludgy implementation of some of the Cardano API queries via what Consensus at least currently considers `Debug*` queries. So this new `PraosProtocolSupportsNode` class should likely be removed once that situation is improved with a plan that is more stable/maintainable in the long term.
Fixes Issue IntersectMBO/cardano-node#3864. This is a continuation of the somewhat kludgy implementation of some of the Cardano API queries via what Consensus at least currently considers `Debug*` queries. So this new `PraosProtocolSupportsNode` class should likely be removed once that situation is improved with a plan that is more stable/maintainable in the long term.
Fixes Issue IntersectMBO/cardano-node#3864. This is a continuation of the somewhat kludgy implementation of some of the Cardano API queries via what Consensus at least currently considers `Debug*` queries. So this new `PraosProtocolSupportsNode` class should likely be removed once that situation is improved with a plan that is more stable/maintainable in the long term.
Fixes Issue IntersectMBO/cardano-node#3864. This is a continuation of the somewhat kludgy implementation of some of the Cardano API queries via what Consensus at least currently considers `Debug*` queries. So this new `PraosProtocolSupportsNode` class should likely be removed once that situation is improved with a plan that is more stable/maintainable in the long term.
I agree that "doing this properly" would mean not using debug queries to just grab the state, but introducing new queries. Probably those ought to be per-era queries, since it's not guaranteed that future eras are Praos and thus support all these things. The alternative is a query to actually calculate the leader schedule for the current / next era. |
Fixes Issue IntersectMBO/cardano-node#3864. This is a continuation of the somewhat kludgy implementation of some of the Cardano API queries via what Consensus at least currently considers `Debug*` queries. So this new `PraosProtocolSupportsNode` class should likely be removed once that situation is improved with a plan that is more stable/maintainable in the long term.
3758: protocol: add PraosProtocolSupportsNode class r=nfrisby a=nfrisby Fixes IntersectMBO/cardano-node#3864. Single commit; see its message. Co-authored-by: Nicolas Frisby <nick.frisby@iohk.io>
We need a way to access the epoch nonce from the ChainDepState while using TPraos and Praos
The text was updated successfully, but these errors were encountered: