Fix 7702 signature bound checks#7641
Merged
macfarla merged 6 commits intobesu-eth:mainfrom Sep 20, 2024
Merged
Conversation
…ferent bound checks Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
fab-10
approved these changes
Sep 19, 2024
|
|
||
| env: | ||
| GRADLE_OPTS: "-Xmx6g" | ||
| GRADLE_OPTS: "-Xmx7g" |
Contributor
There was a problem hiding this comment.
if you want to reduce the failure rate of ATs, then increase the number of total runners, maybe you can move 2 from reference-tests, that are faster, here
pinges
reviewed
Sep 20, 2024
| checkNotNull(r); | ||
| checkNotNull(s); | ||
|
|
||
| if (r.compareTo(TWO_POW_256) >= 0) { |
Contributor
There was a problem hiding this comment.
We could be a bit more precise here and check whether r and s are smaller than the prime of the curve, which is p = 2^256-2^32-977. But that still does not guarantee that (r, s) is a point on the curve.
Contributor
There was a problem hiding this comment.
Looking at the code this could be any curve that is being used here, so 2^256 might be better for an initial check?
daniellehrner
added a commit
to daniellehrner/besu
that referenced
this pull request
Sep 20, 2024
* create separate signature class for code delegations as they have different bound checks Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * test if increasing xmx let's failing acceptance test pass Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * javadoc Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> --------- Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Wolmin
pushed a commit
to lukso-network/network-besu
that referenced
this pull request
Sep 27, 2024
* create separate signature class for code delegations as they have different bound checks Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * test if increasing xmx let's failing acceptance test pass Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * javadoc Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> --------- Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: Wolmin <lamonos123@gmail.com>
This was referenced Oct 5, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR description
7702 signatures have different bound checks than regular transaction signatures. This PR create a new signature class for them with their own checks.