Skip to content

Conversation

@tomaka
Copy link
Contributor

@tomaka tomaka commented Apr 1, 2022

(not finished, opening as a draft to pick it up later)

We have so-called "call proofs": we ask a node to execute a runtime function and build up a Merkle proof of all the storage values that are accessed during this call.
The proof is then sent back, and the executes the runtime function locally, using the proof in order to "replay" the storage accesses.

What the code currently doesn't handle is the situation where the peer has sent us an incomplete proof, where some storage values are missing. If that happens, we just fail the call altogether, while in reality we should consider that the peer is malicious and retry the request with a different peer.

Copy link
Contributor

@mergify mergify bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automatically approving tomaka's pull requests. This auto-approval will be removed once more maintainers are active.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2022

twiggy diff report

Difference in .wasm size before and after this pull request.


 Delta Bytes │ Item
─────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────
       +6225 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h92fde01c47057b70
       -6220 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hbda3c90fbca11f60
       -5029 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::he9fbacfdaef179eb
       -4798 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::ha1114a14b8133b39
       -4674 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h0b58c6c1308f460c
       -4647 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h80d91430cbe6b21a
       +3926 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h1d0c8e0bd6c40363
       -3892 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h3152e1f316e99983
       +3828 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h9a7ee62eba5423cf
       +3813 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h02773eab663c1e7b
       +3692 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::haa851e7aca74a297
       +2969 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h448fa5f2e7939094
       -1694 ┊ smoldot::transactions::validate::validate_transaction::h2dcb91928e6619df
       +1595 ┊ smoldot::transactions::validate::validate_transaction::h31d228f2c2680543
       +1299 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h92491bd8b5e70fed
       -1283 ┊ smoldot_light_base::runtime_service::RuntimeCallLock::storage_prefix_keys_ordered::h2e43c5271ef3dd75
       +1283 ┊ smoldot_light_base::runtime_service::RuntimeCallLock::storage_prefix_keys_ordered::h5ba49961e125a8b9
       +1256 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::habad09639da9ef00
       -1239 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h1c008a9acc30701f
       +1213 ┊ <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h5c8e59261f6efd0f
        +530 ┊ ... and 67 more.
        -472 ┊ Σ [87 Total Rows]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant