-
Notifications
You must be signed in to change notification settings - Fork 526
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
Extract validation out of External_transition #10780
Extract validation out of External_transition #10780
Conversation
* 'staged_ledger_diff | ||
* 'protocol_versions | ||
|
||
(* TODO commented out because of weird type errors *) |
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.
After discussing with you are reviewing, I think it is fine to just delete these constraints altogether.
in | ||
validated_transition | ||
(* TODO: the delta transition chain proof is incorrect (same behavior the daemon used to have, but we should probably fix this?) *) |
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.
Let's log an issue to review this. It's fine to merge as is, but we should review this because it could be hiding a subtle bug (if we serve these proofs to bootstrapping nodes or something).
…t-validated-out-of-external-transition
…t-validated-out-of-external-transition
ffe4d1a
to
3839ef9
Compare
…t-validated-out-of-external-transition
af76a6a
to
2f4f657
Compare
a19ddec
to
192d567
Compare
…t-validated-out-of-external-transition
@@ -82,7 +82,7 @@ let g:syntastic_ocaml_checkers=['merlin'] | |||
- Now `/usr/bin/opam install merlin ocp-indent core async ppx_jane ppx_deriving` (everything we depend on, that you want autocompletes for) for doc reasons | |||
- Make sure you have `au FileType ocaml set omnifunc=merlin#Complete` in your vimrc | |||
- Install an auto-completer (such as YouCompleteMe) and a syntastic (such syntastic or ALE) | |||
- If you use vscode, you might like these extensions | |||
- If you use vscode, you might like this extension |
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.
It should be these extensions
, right?
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.
Oh yeah, this is an accidental change. I will fix it as a separate micro-PR
let b1 = Transition_frontier.Breadcrumb.validated_transition br1 in | ||
let b2 = Transition_frontier.Breadcrumb.validated_transition br2 in | ||
(* We force evaluation of state body hash for both blocks for further equality check *) | ||
let _hash1 = Mina_block.Validated.state_body_hash b1 in |
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'm not sure if I follow the necessity of this. If the state body hashes are equal, that implies that the state body hashes are equal, even if we don't have those values cached.
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.
State body hash is stored in a mutable variable which is set once the value is actually calculated.
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 arises when we compare this field for blocks computed in different code paths: one might have mutable variable set to None
(because state body hash was not ever calculated up until the moment of execution of the line) and the other is Some x
. Hence I force that both state hashes are evaluated and equal to Some x
.
Refactoring that further reorganizes
External_transition
module and associated typesExplain your changes:
Validated
andValidation
submodules out ofExternal_transition
Explain how you tested your changes: no functionality is touched, existing tests will cover it well.
Checklist: