UncheckedExtrinsic: lazily decode the call#7902
UncheckedExtrinsic: lazily decode the call#7902serban300 wants to merge 7 commits intoparitytech:masterfrom
UncheckedExtrinsic: lazily decode the call#7902Conversation
368c27a to
4e1cafb
Compare
UncheckedExtrinsic: lazy decoding + set a memory limit when decoding the callUncheckedExtrinsic: lazily decode and limit the call
520f415 to
099a094
Compare
099a094 to
dbee656
Compare
506a5bf to
51b5cb4
Compare
51b5cb4 to
1b70876
Compare
bb5a405 to
7a77636
Compare
UncheckedExtrinsic: lazily decode and limit the callUncheckedExtrinsic: lazily decode and limit the call
5930635 to
000d75c
Compare
c729ad0 to
c8053ff
Compare
Stumbled upon this while working on other issue (#7902). I thought I might need to change the `CheckInherentsResult` and this deduplication would have made everything easier. Probably changing `CheckInherentsResult` won't be needed in the end, but even so it would be nice to reduce the duplication. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
c9f3ede to
5fe90bf
Compare
Define: - TransactionPayment::query_info_from_runtime_api() - TransactionPayment::query_fee_details_from_runtime_api()
Define: - InherentDataExt::check_extrinsics_from_runtime_api()
5fe90bf to
ce076ac
Compare
bkchr
left a comment
There was a problem hiding this comment.
When looking at this pr again, we only need the lazy decoding in two situations:
execute_blockvalidate_block
Instead of concentrating the "fallout" on these two situations, right now we just change everything. However, I don't see the need given that we only need this in two situations. Or do I miss something?
Something like is_inherent and other calls should not be changed at all, because when we reach them the extrinsic should be already decoded and available.
Thanks for the suggestion ! Opened a new PR that implements this approach: #9480 Closing this PR in favor of the new one |
Stumbled upon this while working on other issue (#7902). I thought I might need to change the `CheckInherentsResult` and this deduplication would have made everything easier. Probably changing `CheckInherentsResult` won't be needed in the end, but even so it would be nice to reduce the duplication. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Related to #4255 Addresses #7902 (review) This PR enables us to lazily decode the block extrinsics when needed. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Related to #4255
This PR changes some core logic in order to lazily decode the
RuntimeCallinside anUncheckedExtrinsicThis is a significant rework of #4296. The main problem with #4296 was that it was always decoding a call at least twice. This PR comes with a different approach, that avoids the need to decode twice.