Skip to content

fix(test-types): Loosen pydantic strictness on internal pydantic models#2000

Merged
fselmo merged 3 commits intoethereum:forks/amsterdamfrom
fselmo:fix/loosen-strictness-on-internal-rpc-models
Jan 9, 2026
Merged

fix(test-types): Loosen pydantic strictness on internal pydantic models#2000
fselmo merged 3 commits intoethereum:forks/amsterdamfrom
fselmo:fix/loosen-strictness-on-internal-rpc-models

Conversation

@fselmo
Copy link
Contributor

@fselmo fselmo commented Jan 9, 2026

🗒️ Description

Alternate solution to #1997.

Fix #1998 and #1999 by loosening restrictions on internal models. The goal of keeping some models strict and explicitly turning strictness off is so test writers have their code raise errors if they provide incorrect fields, not so we can be sticklers on internal models. This will only cause headaches I believe.

🔗 Related Issues or PRs

closes #1998
closes #1999

✅ Checklist

  • All: Ran fast tox checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    uvx tox -e static
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered adding an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@fselmo fselmo changed the title fix(test-types): Loosen pydantic strictness on internal rpc models fix(test-types): Loosen pydantic strictness on internal pydantic models Jan 9, 2026
@fselmo fselmo force-pushed the fix/loosen-strictness-on-internal-rpc-models branch from 2bb50ae to 14becb5 Compare January 9, 2026 17:20
@fselmo fselmo added A-test-types Area: execution_testing.base_types and execution_testing.test_types C-bug Category: this is a bug, deviation, or other problem labels Jan 9, 2026
@fselmo fselmo self-assigned this Jan 9, 2026
@fselmo fselmo requested a review from marioevz January 9, 2026 17:22
@fselmo fselmo marked this pull request as ready for review January 9, 2026 17:22
@fselmo fselmo force-pushed the fix/loosen-strictness-on-internal-rpc-models branch from 14becb5 to d1b880e Compare January 9, 2026 17:43
@fselmo fselmo force-pushed the fix/loosen-strictness-on-internal-rpc-models branch from d1b880e to 35cf414 Compare January 9, 2026 17:49
Copy link
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@fselmo fselmo merged commit 2b1d1c0 into ethereum:forks/amsterdam Jan 9, 2026
16 of 20 checks passed
@fselmo fselmo deleted the fix/loosen-strictness-on-internal-rpc-models branch January 9, 2026 18:09
@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.33%. Comparing base (8c9e889) to head (5a02229).
⚠️ Report is 3 commits behind head on forks/amsterdam.

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #2000   +/-   ##
================================================
  Coverage            86.33%   86.33%           
================================================
  Files                  538      538           
  Lines                34557    34557           
  Branches              3222     3222           
================================================
  Hits                 29835    29835           
  Misses                4148     4148           
  Partials               574      574           
Flag Coverage Δ
unittests 86.33% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

jsign pushed a commit to jsign/execution-specs that referenced this pull request Jan 20, 2026
…thereum#2000)

This adds test cases for BLS precompiles where one of the point (G1/G2)
coordinates is "slightly" above the value of the field prime P.
The "slightly above" means that a valid point is modified by adding P
to one of its field elements. Such test case has a chance of detecting
an invalid implementation where the field element is loaded as 384-bit
integer and converted to the Montgomery form. The Montgomery form
round-trip has the effect of computing a value mod P,
i.e. `(x + P) % P` gives `x` and the invalid point becomes valid.

In the similar way test cases may be extended to other BLS precompiles.
However, I assume BLS precompiles implementations share the input
validation code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-test-types Area: execution_testing.base_types and execution_testing.test_types C-bug Category: this is a bug, deviation, or other problem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extra inputs on internal RPC models are causing issues Extra inputs are not permitted if fill ... --traces

2 participants