-
Notifications
You must be signed in to change notification settings - Fork 13
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
Prove an equivalence between the two ledgers #585
Comments
Is there a precise(ish) description of what the difference should be? I'm expecting there will be some places where |
If I'm not forgetting anything, the only actual difference should be in how the deposits are handled. Any other difference is probably unintentional drift between the two implementations. I think you're right, it's probably more likely that in that case |
Getting deeper into the proof, I'm getting confused about how the conformance rules are supposed to work (and consequently what the precise equivalence statement should be). In particular, in the Conformance rules, there are three separate formal-ledger-specifications/src/Ledger/Conway/Conformance/Certs.agda Lines 103 to 114 in d61bd38
formal-ledger-specifications/src/Ledger/Conway/Conformance/Certs.agda Lines 127 to 135 in d61bd38
and never synced up formal-ledger-specifications/src/Ledger/Conway/Conformance/Certs.agda Lines 151 to 165 in d61bd38
The deposits in formal-ledger-specifications/src/Ledger/Conway/Conformance/Utxo.agda Lines 127 to 142 in d61bd38
and updated after the fact in the
I think I can prove that the deposits in the @WhatisRT @Soupstraw your input here would be welcome. |
Ah, it seems this is a bit of a mess. First, the preferred semantics of the deposits is that the union of all three deposit pots on the Conformance side equals the deposit pot on the Ledger side. They are split by
However, it turns out that this split doesn't actually work! To compute things properly, This data duplication also makes things a bit more annoying, since there is now an extra invariant that I don't know how to fit in the picture. Specifically, both deposits in For
I hope this helps! |
We have two models right now, one under
Ledger
and one underLedger.Conway.Conformance
. They differ by some logic being moved fromCERTS
intoUTXO
but are otherwise identical. This means that there should be a theorem of the formexcept that we need to translate some of the types being involved (otherwise this won't type check). In the end, we need to prove this for
CHAIN
, but that should be trivial once we have it forLEDGER
.Our current strategy for maintenance is based on this being proven, otherwise these could drift out of sync. So the sooner this is done the better.
See also #512, which will actually make this provable once finished and #525.
Blocked by #512 and it would be a good idea to do #582 first.
The text was updated successfully, but these errors were encountered: