-
Notifications
You must be signed in to change notification settings - Fork 39
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
Validate tests #26
Validate tests #26
Conversation
0119018
to
87e292e
Compare
This is good, will be very helpful 🚀 |
87e292e
to
4e441fb
Compare
3a2b182
to
ee44d6c
Compare
} | ||
} | ||
|
||
fn validate(_user_op: UserOperation) -> anyhow::Result<()> { |
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.
tests/validate_tests.rs
Outdated
} | ||
|
||
#[tokio::test] | ||
#[should_panic] |
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.
@Vid201 The #[should_panic]
flag should be removed when the validating function is implemented. The case panic right now is because validate
always return Ok
Looks good @zsluedem. I wonder if these tests will stay relevant in the future or if we should focus on https://github.com/eth-infinitism/bundler-spec-tests. This was released two weeks ago and will be the official test suite for bundlers (maybe integrate running these tests instead in the repo). What do you think? |
Hm...I didn't know the test suite. I read the test codes there today and compare. They got very similar test contracts for opcode-banning parts. The test suite would be run with a bundler client and an execution client from higher-layer integration perspective. I think we could have both because this could help you develop the simulation checking function (I think). You don't need to have a fully functional bundler to run the test suite right now. But I am Ok if you want to just use the test suite. |
Ok, great. I didn't go into many details yet. Let's have both tests then, one for easier and faster development, and the other for validating everything and getting official results. |
ee44d6c
to
4d55d1d
Compare
294479c
to
89cf398
Compare
89cf398
to
27ec0f4
Compare
LGTM 🚀 |
** You have to install
Yarn
andfoundry
to make it work**Install foundry
This is the rust codes of validating tests in https://github.com/eth-infinitism/bundler/blob/main/packages/bundler/test/ValidateManager.test.ts .