-
Notifications
You must be signed in to change notification settings - Fork 86
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
Where are the header checks from the chain specification in PBFT? #878
Comments
mrBliss
added a commit
that referenced
this issue
Aug 5, 2019
Closes #878. From "4.2 Permissive BFT Header Processing": 2. We check that the previous block hash contained in the block header corresponds to the known hash of the previous block. We were implicitly checking this with the `:>` constructor of `AnchoredFragment`, but this would only throw an `error` when assertions are enabled. Now, we throw a proper exception.
Thank you for the comprehensive answer, this clears up all confusion on my part. The issue can be closed via the PR. |
mrBliss
added a commit
that referenced
this issue
Aug 5, 2019
Closes #878. From "4.2 Permissive BFT Header Processing": 2. We check that the previous block hash contained in the block header corresponds to the known hash of the previous block. We were implicitly checking this with the `:>` constructor of `AnchoredFragment`, but this would only throw an `error` when assertions are enabled. Now, we throw a proper exception.
mrBliss
added a commit
that referenced
this issue
Aug 6, 2019
Closes #878. From "4.2 Permissive BFT Header Processing": 2. We check that the previous block hash contained in the block header corresponds to the known hash of the previous block. We were implicitly checking this with the `:>` constructor of `AnchoredFragment`, but this would only throw an `error` when assertions are enabled. Now, we throw a proper exception.
iohk-bors bot
added a commit
that referenced
this issue
Aug 6, 2019
879: ChainSyncClient: throw an exception when the header doesn't fit r=mrBliss a=mrBliss Closes #878. From "4.2 Permissive BFT Header Processing": 2. We check that the previous block hash contained in the block header corresponds to the known hash of the previous block. We were implicitly checking this with the `:>` constructor of `AnchoredFragment`, but this would only throw an `error` when assertions are enabled. Now, we throw a proper exception. Co-authored-by: Thomas Winant <thomas@well-typed.com>
mrBliss
added a commit
that referenced
this issue
Oct 15, 2020
mrBliss
added a commit
that referenced
this issue
Oct 16, 2020
mrBliss
added a commit
that referenced
this issue
Oct 16, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This isn't so much an issue as it is a question from the code audit. The chain specification, section 4.2 "Permissive BFT Header Processing" specifies some checks to do when processing the block header, and among them:
While I could see the other processing rules in
applyChainState
, I couldn't find these two, so this issue is to ask where they are implemented. There are checks inChainFragment
that seem to implement rule 3, but how does control from PBFT.hs reach them?The text was updated successfully, but these errors were encountered: