-
Notifications
You must be signed in to change notification settings - Fork 171
feat(fill): add a plugin for optional execution witness generation #2066
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
Conversation
The `witness-filler` tool doesn't recognise Paris: Re-write `fixture.fork` to Merge if its value is Paris and then write it back to Paris afterwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much sir!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a huge fan of how hacky this is tbh, but if it's a single use case I can live with it once the changes are applied.
1. Avoid `hasattr` by checking that the provided fixture is of the required pydantic model type (`BlockchainFixture`). 2. Add a clean solution for the `witness-filler` fork naming incompatibility by subclassing `Paris` as `Merge`.
Hey @marioevz I think I've addressed your concerns, please take another look! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, other than the cargo install.
Don't build it using cargo install; this must be done by the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
@danceratopz, @marioevz, thanks again for this. 🙏 |
🗒️ Description
executionWitness
field to the blockchain fixture base class.pytest_addoption()
: add a boolean--witness
flag.pytest_configure()
:Compileschecks whether thewitness-filler
tool is in PATH if--witness
is enabled; hard error if not.generate_witness
that generates a fixture's execution witness using thewitness-filler
tool.generate_witness
fixture inBaseTestParametrizer
. If--witness
is not enabled, there is not change infill
behavior.Usage
🔗 Related Issues or PRs
#2031
✅ Checklist
tox
checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:uvx --with=tox-uv tox -e lint,typecheck,spellcheck,markdownlint
type(scope):
.