This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Modify Fraud Proof ABCI Interface to combine Trigger and Generate#63
Merged
tzdybal merged 3 commits intoabci_fraud_proofsfrom Oct 11, 2022
Merged
Modify Fraud Proof ABCI Interface to combine Trigger and Generate#63tzdybal merged 3 commits intoabci_fraud_proofsfrom
tzdybal merged 3 commits intoabci_fraud_proofsfrom
Conversation
f6a6b50 to
a747496
Compare
11d9a85 to
469a600
Compare
469a600 to
effa465
Compare
This was referenced Aug 24, 2022
tzdybal
approved these changes
Oct 10, 2022
tzdybal
left a comment
There was a problem hiding this comment.
This also resolves my comments from previous PR down the stack 😂
effa465 to
a0b60a4
Compare
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The initial ABCI interface for Fraud Proof Generation looked as follows:
GetAppHash () -> appHashTriggerFraudProofGenerationMode () -> ModeEnabledSuccessGenerateFraudProof () -> FraudProofHowever, this design requires
Optimintto callBeginBlock,DeliverTx,EndBlockagain on a new cosmos-sdk app with a reverted state. It does so to fast-forward it to right before the fraudulent state transition so that it can then generate a fraud proof from that state. Ideally, we’d have all this just take place incosmos-sdkand not haveOptimintworry about it.Since an ABCI method can call another ABCI method within itself, we combine two of the methods in the initially proposed design. The modified design looks as follows:
GetAppHash () -> appHashGenerateFraudProof (beginBlockRequest, []deliverTxRequests, endBlockRequest) -> FraudProofThis new
GenerateFraudProofwould take in the partial relevant requests made during the execution of a block corresponding toBeginBlock,DeliverTx, andEndBlockrespectively needed to generate a Fraud Proof. Note that this set of requests is only made of state transitions right before a fraudulent block and the last state transition in this set of requests refers to the fraudulent state transition.