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

fix(fraud): invalid sig is not a fraud #1312

Closed
wants to merge 2 commits into from

Conversation

danwt
Copy link
Contributor

@danwt danwt commented Jan 7, 2025

PR Standards

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

--

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


Close #1160

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

@danwt danwt changed the title invalid sig fraud fix(fraud): invalid sig is not a fraud Jan 8, 2025
@danwt danwt marked this pull request as ready for review January 8, 2025 12:07
@danwt danwt requested a review from a team as a code owner January 8, 2025 12:07
Copy link
Contributor

@srene srene left a comment

Choose a reason for hiding this comment

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

Im thinking, that in case of p2p block, its true that invalid signature is not a fraud.
But in case of block applied from da, can it not be considered a fraud in this case (since we know the block is coming from the sequencer)? i guess can be considered equivalent to blob corrupted fraud or non-matching batch info fraud...
actually, in case of p2p block i think fraud detection caused by signature will never happen because the block will be discarded in p2p block validation because invalid signature and it will never by validated before apply.
Therefore, i think its fine in leaving invalid signature as a fraud, since it will only happen when applying blocks from da.

@danwt
Copy link
Contributor Author

danwt commented Jan 8, 2025

@srene I was thinking similar but I think the code is messier as is right now.
How about a check in ValidateDaBlocks which converts an ErrInvalidSignature to a fraud?

@srene
Copy link
Contributor

srene commented Jan 8, 2025

@srene I was thinking similar but I think the code is messier as is right now. How about a check in ValidateDaBlocks which converts an ErrInvalidSignature to a fraud?

Imo is better to keep fraud detection for invalid signature in da block. if you think is better to have specific signature check in ValidateDaBlocks, instead of leaving the code as it is, im ok with that.

@@ -14,7 +14,7 @@ import (
)

var (
ErrInvalidSignature = errors.New("invalid signature")
ErrInvalidSignature = gerrc.ErrInvalidArgument.Wrap("signature")
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe set wrap ErrFault? so it will trigger the fraud handler

@danwt
Copy link
Contributor Author

danwt commented Jan 8, 2025

Gonna close, it, not worth worrying about

@danwt danwt closed this Jan 8, 2025
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.

Remove invalid signature 'fraud'
3 participants