-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 WASM on txpool level before allowing upgrade tx #2080
Conversation
@@ -172,6 +178,16 @@ pub(crate) fn random_predicate( | |||
.into_default_estimated() | |||
} | |||
|
|||
pub struct MockWasmChecker; |
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.
nit: I'd name this Fake
instead of Mock
, since it's not "mocking" behavior.
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.
The terminology seems to be all over the place, e.g. https://stackoverflow.com/questions/346372/whats-the-difference-between-faking-mocking-and-stubbing shows that there's no consensus around the naming. I don't think we them that consistently either.
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.
Looks good to me! 👍
Closes #2078
When submitting an Upgrade tx, validate the WASM before it can be added into the txpool. This is technically a breaking change, as previously-accepted but semantically invalid transactions are no longer accepted.
Checklist
Before requesting review