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 7702 signature bound checks #7641

Merged

Conversation

daniellehrner
Copy link
Contributor

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.

@@ -11,7 +11,7 @@ concurrency:
cancel-in-progress: true

env:
GRADLE_OPTS: "-Xmx6g"
GRADLE_OPTS: "-Xmx7g"
Copy link
Contributor

Choose a reason for hiding this comment

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

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

checkNotNull(r);
checkNotNull(s);

if (r.compareTo(TWO_POW_256) >= 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at the code this could be any curve that is being used here, so 2^256 might be better for an initial check?

Signed-off-by: Sally MacFarlane <[email protected]>
@macfarla macfarla merged commit cb1e36a into hyperledger:main Sep 20, 2024
41 checks passed
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 <[email protected]>

* test if increasing xmx let's failing acceptance test pass

Signed-off-by: Daniel Lehrner <[email protected]>

* javadoc

Signed-off-by: Sally MacFarlane <[email protected]>

---------

Signed-off-by: Daniel Lehrner <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Co-authored-by: Sally MacFarlane <[email protected]>
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 <[email protected]>

* test if increasing xmx let's failing acceptance test pass

Signed-off-by: Daniel Lehrner <[email protected]>

* javadoc

Signed-off-by: Sally MacFarlane <[email protected]>

---------

Signed-off-by: Daniel Lehrner <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Co-authored-by: Sally MacFarlane <[email protected]>
Signed-off-by: Wolmin <[email protected]>
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.

4 participants