-
Notifications
You must be signed in to change notification settings - Fork 839
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
[Draft][WIP] Set a memory limit when decoding an UncheckedExtrinsic
#7759
base: master
Are you sure you want to change the base?
Conversation
5d6c84f
to
5911b82
Compare
UncheckedExtrinsic
or a Block
UncheckedExtrinsic
@@ -59,6 +61,9 @@ pub const LEGACY_EXTRINSIC_FORMAT_VERSION: ExtrinsicVersion = 4; | |||
/// [UncheckedExtrinsic] implementation. | |||
const EXTENSION_VERSION: ExtensionVersion = 0; | |||
|
|||
/// Maximum heap size for an extrinsic (in bytes). | |||
const MAX_EXTRINSIC_HEAP_SIZE: usize = 10 * 1024 * 1024; // 10 MiB |
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.
const MAX_EXTRINSIC_HEAP_SIZE: usize = 10 * 1024 * 1024; // 10 MiB | |
pub const MAX_EXTRINSIC_HEAP_SIZE: usize = 10 * 1024 * 1024; // 10 MiB |
For integration testing.
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.
Done and also added a unit test. PTAL !
UncheckedExtrinsic
UncheckedExtrinsic
Converting to draft since I'm still working on some changes related to |
UncheckedExtrinsic
UncheckedExtrinsic
Related to #7360