Skip to content
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
manav/abci_modify_generate
Oct 11, 2022
Merged

Modify Fraud Proof ABCI Interface to combine Trigger and Generate#63
tzdybal merged 3 commits intoabci_fraud_proofsfrom
manav/abci_modify_generate

Conversation

@Manav-Aggarwal
Copy link
Copy Markdown
Member

@Manav-Aggarwal Manav-Aggarwal commented Aug 24, 2022

The initial ABCI interface for Fraud Proof Generation looked as follows:

  1. GetAppHash () -> appHash
  2. TriggerFraudProofGenerationMode () -> ModeEnabledSuccess
  3. GenerateFraudProof () -> FraudProof

However, this design requires Optimint to call BeginBlock, DeliverTx , EndBlock again 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 in cosmos-sdk and not have Optimint worry 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:

  1. GetAppHash () -> appHash
  2. GenerateFraudProof (beginBlockRequest, []deliverTxRequests, endBlockRequest) -> FraudProof

This new GenerateFraudProof would take in the partial relevant requests made during the execution of a block corresponding toBeginBlock, DeliverTx, and EndBlock respectively 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.

Copy link
Copy Markdown

@tzdybal tzdybal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also resolves my comments from previous PR down the stack 😂

@tzdybal tzdybal force-pushed the manav/abci_modify_generate branch from effa465 to a0b60a4 Compare October 11, 2022 11:51
@tzdybal tzdybal changed the base branch from manav/abci_add_generate to abci_fraud_proofs October 11, 2022 11:58
@tzdybal tzdybal merged commit 5e59226 into abci_fraud_proofs Oct 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modify Fraud Proof ABCI Interface to combine Trigger and Generate

3 participants