Skip to content

Conversation

@JustXxx
Copy link

@JustXxx JustXxx commented Nov 23, 2024

Description

Adapt AttackV2 and StepV2 functions in op-challenger2

Tests

  • Tests passed in this PR:
go test -run ^TestCalculateNextActions$ github.com/ethereum-optimism/optimism/op-challenger2/game/fault/solver
go test -run ^TestCalculateNextActions_ChallengeL2BlockNumber$ github.com/ethereum-optimism/optimism/op-challenger2/game/fault/solver
go test -run ^TestMultipleRoundsWithNbits1$ github.com/ethereum-optimism/optimism/op-challenger2/game/fault/solver
go test -run ^TestMultipleRoundsWithNbits2$ github.com/ethereum-optimism/optimism/op-challenger2/game/fault/solver
  • Tests in op-challengers all passed
cd op-challenger2
go test ./...

@JustXxx JustXxx requested review from dajuguan and qizhou November 23, 2024 15:19
return fmt.Errorf("failed to get correct trace at position %v: %w", poststateClaim.Position, err)
}
validStep := correctValue == poststateClaim.Value
validStep := correctValue == (*poststateClaim.SubValues)[0]

Choose a reason for hiding this comment

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

If poststateClaim is attacked by the non-0 branch, it might not be (*poststateClaim.SubValues)[0]


preState, proofData, oracleData, err := s.trace.GetStepData(ctx, game, claim, position)
if branch == game.MaxAttackBranch()-1 {
// If we are at the max attack branch, we need to step on the next branch

Choose a reason for hiding this comment

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

If we agree subValues in [0, maxAttackBranch-1], the max attack branch should be stepped. might be more clear?

Copy link
Author

Choose a reason for hiding this comment

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

I couldn't find this code. Has it been modified?

@dajuguan
Copy link

Deprecated in #105

@dajuguan dajuguan closed this Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants