Replace sp_io::trie host functions with sp_trie equivalents#344
Conversation
7aac4d5 to
79023f5
Compare
|
You need to use a more recent block for tests, the one that you mentioned in the issue description uses an old runtime and causes weird issues. I checked with a recent block ( |
79023f5 to
a7f6921
Compare
Not sure I understand this one, could you provide the error log ? |
With the previous block number (the one you have in the issue) I am getting: |
|
@x3c41a, this change seem to move the calculations from the native/host execution to the WASM code - avoiding the host calls that are not implemented by smoldot. Im not sure about all the implications yet but lets start with re-doing the benchmarks / re-generate weights (at least for affected calls like (check_proof, store, renew) -> we will see how/if that affects in any meaningful way and compare WASM sizes if something doesn't blow up there |
|
I will also do some stress testing using this change, WASM memory is quite limited - I'm not sure if this change will not increase the WASM memory usage and affect the overall throuput or cause some OOM issues. But I'm just speculating - I dont have experience with this. But lets also wait for my stress testing results |
Hmm, let's be very sure about merging this change. I don't know what are the trade-offs here, but what about just adding those host functions to the smoldot like we did here: paritytech/smoldot-archive#2189 ? |
I agree that would probably be a more safe approach. Definitely worth to explore and compare both |
35c6b8f to
2bf475e
Compare
|
Yeah, good calls, guys! I was feeling a danger with this PR (also remembered that smoldot PR that @bkontur mentioned) but switched into RPC nodes design doc and then got caught by the UI changes. Lesson learned: do not take new/risky things on Fridays |
Summary
sp_io::trie::blake2_256_ordered_rootandsp_io::trie::blake2_256_verify_proofhost function calls inpallet-transaction-storagewith directsp_triepure-Rust equivalentsext_trie_blake2_256_verify_proof_version_2Closes #341