Skip to content

feat: Generate fraud proof after trigger#498

Closed
Manav-Aggarwal wants to merge 6 commits intomanav/fraud_proofsfrom
manav/generate_fraudproof_post_FPGM
Closed

feat: Generate fraud proof after trigger#498
Manav-Aggarwal wants to merge 6 commits intomanav/fraud_proofsfrom
manav/generate_fraudproof_post_FPGM

Conversation

@Manav-Aggarwal
Copy link
Copy Markdown
Member

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

In an optimint full node, after a fraudulent state transition is detected, a Fraud Proof should be generated.

Uses evstack/tendermint#63 for ABCI interface

Closes: #499

@Manav-Aggarwal Manav-Aggarwal changed the title Add skeleton to catch up and generate fraudproof after FPGM Fast-forward to right before the fraudulent transaction was executed and Generate Fraud Proof Aug 24, 2022
@Manav-Aggarwal Manav-Aggarwal self-assigned this Aug 24, 2022
@Manav-Aggarwal Manav-Aggarwal changed the title Fast-forward to right before the fraudulent transaction was executed and Generate Fraud Proof Generate fraud proof after trigger and gossip it over p2p network Aug 24, 2022
@Manav-Aggarwal Manav-Aggarwal linked an issue Aug 24, 2022 that may be closed by this pull request
@Manav-Aggarwal Manav-Aggarwal changed the title Generate fraud proof after trigger and gossip it over p2p network Generate fraud proof after trigger Aug 24, 2022
@Manav-Aggarwal Manav-Aggarwal marked this pull request as ready for review August 24, 2022 20:46
@Manav-Aggarwal Manav-Aggarwal changed the title Generate fraud proof after trigger feat: Generate fraud proof after trigger Aug 26, 2022
Copy link
Copy Markdown
Contributor

@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.

Left few comments. I need to look at this in IDE ;)

Comment thread state/executor.go
"github.com/celestiaorg/optimint/types"
)

var fraudProofsEnabled = true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This shouldn't be global. Please move it to BlockExecutor struct.

Comment thread state/executor.go
}

func (e *BlockExecutor) checkFraudProofTrigger(generatedIsr []byte, currentIsrs [][]byte, index int) error {
func (e *BlockExecutor) checkFraudProofTrigger(generatedIsr []byte, currentIsrs [][]byte, index int) bool {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Instead of passing [][]byte and index, you can pass element of currentIsrs directly.

@jbowen93 jbowen93 added the C:state-fraud-proofs Component: State Fraud Proofs (generation and validation) label Aug 30, 2022
Comment thread state/executor.go
if len(currentIsrs) != expectedLength {
return nil, fmt.Errorf("invalid length of ISR list: %d, expected length: %d", len(currentIsrs), expectedLength)
if fraudProofsEnabled {
if currentIsrs != nil {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

add an else here and halt there

@tzdybal
Copy link
Copy Markdown
Contributor

tzdybal commented Oct 25, 2022

Replaced by #567

@tzdybal tzdybal closed this Oct 25, 2022
@Manav-Aggarwal Manav-Aggarwal deleted the manav/generate_fraudproof_post_FPGM branch May 2, 2023 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C:state-fraud-proofs Component: State Fraud Proofs (generation and validation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generate Fraud Proof after trigger

3 participants