-
Notifications
You must be signed in to change notification settings - Fork 156
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
Committee query - implement next epoch change #3878
Conversation
2313c61
to
1d167ee
Compare
If you look at the haddock for |
They will be removed at the next epoch, otherwise that Map could grow with garbage CC keys forever |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite right, but it is really good first attempt. Could you also add a couple of test cases for the new functionality?
That brings me an idea, we could add an extra status: |
There is a test for it: It's still not clear to me what we want to achieve. I have assumed this, if we look at an example ( not saying it's the right thing ,because I can see quite a few things that are confusing, as i pointed out in the description) :
Then a query without any filters, would have the domain all the cold keys: so a union of: current committee, next committee and the keyset of committeeState:
But if I understand from your comment, you would prefer to not have the
as it does now? In this case, we won't be able to set |
So something like this?
So the difference between this and the implementation in this PR would be:
|
As discussed, the result for this would be:
|
1d167ee
to
d20e6d4
Compare
8ad77ee
to
d191696
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've suggested some minor changes.
We can discuss them tomorrow if you have questions about it.
libs/cardano-ledger-api/test/Test/Cardano/Ledger/Api/State/QuerySpec.hs
Outdated
Show resolved
Hide resolved
libs/cardano-ledger-api/test/Test/Cardano/Ledger/Api/State/QuerySpec.hs
Outdated
Show resolved
Hide resolved
libs/cardano-ledger-api/test/Test/Cardano/Ledger/Api/State/QuerySpec.hs
Outdated
Show resolved
Hide resolved
libs/cardano-ledger-api/test/Test/Cardano/Ledger/Api/State/QuerySpec.hs
Outdated
Show resolved
Hide resolved
78d886d
to
e5b85cd
Compare
Updated with the suggested changes, and also reflected them in the ImpTests in the other PR: #3883 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a test failure on CI due to a faulty tes, otherwise it looks great.
libs/cardano-ledger-api/test/Test/Cardano/Ledger/Api/State/QuerySpec.hs
Outdated
Show resolved
Hide resolved
3d7fec6
to
43b1122
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work!
43b1122
to
e2310f7
Compare
with default empty implementation
by looking at the committee that will be enacted at the next epoch boundary.
and refactor data generation functions to use `Committee` and `CommitteeState` types instead of the underlying types
e2310f7
to
eaab9e7
Compare
e1adbd7
to
7661330
Compare
Description
Closes: #3810
I'm not convinced about a few things in this implementation:
Active
(with the only difference between them being that the former hasNextEpochChange
eitherToBeRemoved
orNoChangeExpected
and the latterToBeEnacted
).In the current acceptance of the Query,
Active
means not expired, so it is technically compatible with the above, but I think it can be confusing.What can we do ?
ActiveNextEpoch
? Maybe, but it would kinda mix the categories. Is it possible for a member from the nextCommittee to be already expired? Then which value would this field take, ActiveNextEpoch or Expired?ToBeEnacted
would never appear as a value in this implementation.NoChangeExpected
. Because what else can it be?ToBeRemoved
doesn't really match, since they are not in the committee.ToBeEnacted
also no, because they are not in the next committee.So i thought it would be better to keep the two separate.
Checklist
.cabal
andCHANGELOG.md
files according to theversioning process.
.cabal
files for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)CHANGELOG.md
for the affected packages. New section is never added with the code changes. (See RELEASING.md)fourmolu
(usescripts/fourmolize.sh
)scripts/cabal-format.sh
)hie.yaml
has been updated (usescripts/gen-hie.sh
)