Skip to content
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

feat(fraud): extend fraud information upon detection #1237

Merged
merged 115 commits into from
Nov 19, 2024

Conversation

faultytolly
Copy link
Contributor

@faultytolly faultytolly commented Nov 18, 2024

PR Standards

Opening a pull request should be able to meet the following requirements

--

PR naming convention: https://hackmd.io/@nZpxHZ0CT7O5ngTp0TP9mg/HJP_jrm7A


Close #1156

<-- Briefly describe the content of this pull request -->

For Author:

  • Targeted PR against correct branch
  • included the correct type prefix in the PR title
  • Linked to Github issue with discussion and accepted design
  • Targets only one github issue
  • Wrote unit and integration tests
  • All CI checks have passed
  • Added relevant godoc comments

For Reviewer:

  • confirmed the correct type prefix in the PR title
  • Reviewers assigned
  • confirmed all author checklist items have been addressed

After reviewer approval:

  • In case targets main branch, PR should be squashed and merged.
  • In case PR targets a release branch, PR should be rebased.

@faultytolly faultytolly marked this pull request as ready for review November 18, 2024 16:01
@faultytolly faultytolly requested a review from a team as a code owner November 18, 2024 16:01
types/errors.go Outdated
}

func NewErrInvalidHeaderDataHashFraud(expected [32]byte, actual [32]byte) error {
func NewErrInvalidHeaderDataHashFraud(expected [32]byte, actual [32]byte, header Header) error {
return &ErrInvalidHeaderDataHashFraud{
Expected: expected,
Copy link
Contributor

Choose a reason for hiding this comment

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

actual is redundant. same as header.DataHash

types/errors.go Outdated
Proposer []byte
}

// NewErrFraudAppHashMismatch creates a new ErrFraudAppHashMismatch error.
func NewErrFraudAppHashMismatch(expected [32]byte, actual [32]byte, block *Block) error {
func NewErrFraudAppHashMismatch(expected [32]byte, block *Block) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

can use Header instead of Block

types/errors.go Outdated
@@ -38,10 +38,12 @@ type ErrFraudHeightMismatch struct {
}

// NewErrFraudHeightMismatch creates a new ErrFraudHeightMismatch error.
func NewErrFraudHeightMismatch(expected uint64, actual uint64, block *Block) error {
func NewErrFraudHeightMismatch(expected uint64, block *Block) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

can use Header instead of Block

types/errors.go Outdated
@@ -91,8 +99,10 @@ type ErrLastResultsHashMismatch struct {
// NewErrLastResultsHashMismatch creates a new ErrLastResultsHashMismatch error.
func NewErrLastResultsHashMismatch(expected [32]byte, block *Block) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

can use Header instead of Block

Base automatically changed from srene/hardfork-fix to main November 19, 2024 10:06
@omritoptix omritoptix changed the title feat (fraud): include information related to fraud feat(fraud): include information related to fraud Nov 19, 2024
@omritoptix omritoptix changed the title feat(fraud): include information related to fraud feat(fraud): extend fraud information upon detection Nov 19, 2024
@mtsitrin mtsitrin merged commit 377dc7c into main Nov 19, 2024
4 checks passed
@mtsitrin mtsitrin deleted the feat/increase-fraud-information branch November 19, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write more details in case a fraud is detected
6 participants