-
Notifications
You must be signed in to change notification settings - Fork 732
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
WithMaxSize #4188
WithMaxSize #4188
Conversation
@@ -48,6 +48,7 @@ pub trait ExecuteControllerWeightInfo { | |||
|
|||
parameter_types! { | |||
pub const MaxXcmEncodedSize: u32 = xcm::MAX_XCM_ENCODED_SIZE; | |||
pub const MaxXcmEncodedSizeUsize: usize = xcm::MAX_XCM_ENCODED_SIZE as usize; |
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 sure what's the best way to handle this
The CI pipeline was cancelled due to failure one of the required jobs. |
Please let me know what should I do with the changes in pallet-xcm
|
} | ||
|
||
pub fn value(self) -> T { | ||
self.value |
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.
Could make sense to impl the Deref
trait and mark with WrapperTypeEncode
and WrapperTypeDecode
.
I guess @franciscoaguirre you are the right person to ping? |
@xlc let me verify this fully fixes the issue please before putting in more effort here, can't promise to do it today, but latest Monday |
if into.len() > self.remaining_len { | ||
return Err("Not enough data to fill buffer".into()); | ||
} | ||
self.input.read(into) |
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.
self.input.read(into) | |
let res = self.input.read(into)?; | |
self.remaining_len -= into.len(); | |
Ok(res) |
We actually need to remove it from the remaining length :D
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.
I really need some tests XD
and do we need to remove it before the read or it wouldn’t matter?
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.
I thought about it. If this returns an error, I would assume that we bubble that up any way and the decoding failed.
lazy decode the Call will be a better way |
closes #4092
we may want to revert #3749
TODOs:
execute
andsend
in favor ofexecute_blob
andsend_blob
#3749 either fully or partially