-
Notifications
You must be signed in to change notification settings - Fork 15
Made CERTBASE
get applied at the end of CERTS
#710
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
Open
Soupstraw
wants to merge
3
commits into
master
Choose a base branch
from
jj/dereg-remove-delegs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,7 +74,6 @@ let | |
|
||
in rec | ||
{ | ||
|
||
agdaWithDeps = agdaWithPkgs deps; | ||
|
||
latex = texlive.combine { | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@Soupstraw I see you moved these two premises to the
LEDGER
rule. Could you explain why they can't remain here? (I need them here for the proof of theCERTBASE-pov
lemma, which is used in the proof ofCERTS-pov
.)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.
The problem with the first premise is that in the implementation we check it in the
LEDGER
rule. I guess we could keep it in the same place in the spec and change the implementation instead. The important part is that it's still checked before the certs are applied, like it was before this PR.The thing that was wrong was that
validVoteDelegs
was applied before the certificates had been applied. This caused DRep delegations to not get removed when the transaction had aunregdrep
certificate, because the filter function used the olddReps
map, where the DRep was still registered.I think the second one could actually stay here as well if we call
CERTBASE
at the start, but I think it makes way more sense to do anything related to withdrawals in theLEDGER
rule. The fact that we do the withrawals logic inCERTS
is because that's how it was done in Shelley, before we had a dedicatedCERTS
rule. The withdrawals don't really have anything to do with certificates, so I don't think it makes sense to keep it here, and I've talked with @WhatisRT and @lehins about this and they both agreed. I've already moved that check toLEDGER
in the implementation, so I think it'd be good to do it here also.I think the best solution would be to have two base cases in the
CERTS
rule, one that gets applied at the start and then another that gets applied at the end. That way we can do the checks before we apply the certificates, and then update thevoteDelegs
only once we have applied all the certificates.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.
Okay, I'll have to take a closer look at this to refresh my memory and really understand exactly what's going on. My impression was that the premises that were moved were required for the
CERTS-pov
proof... but it's possible the statement of that property turns out to be wrong and/or not actually what we want. I think you understand this issue better than anyone right now, so I trust your judgment on it, and would be grateful if you could take some time at the water cooler today to explain it. I will then help with this PR by fixing theCERTS-pov
theorem statement and construct a new proof of it.