Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

A mode for sandbox where it supports deterministic execution #8278

Open
pepyakin opened this issue Mar 5, 2021 · 3 comments
Open

A mode for sandbox where it supports deterministic execution #8278

pepyakin opened this issue Mar 5, 2021 · 3 comments

Comments

@pepyakin
Copy link
Contributor

pepyakin commented Mar 5, 2021

Right now, the sandboxing feature doesn't enforce any deterministic execution. It's deferred to the runtime. However, in the context of #8153 and PVF execution, we would want to make sandboxed execution deterministic.

@bkchr
Copy link
Member

bkchr commented Mar 5, 2021

Don't we always want deterministic execution? Or why do we only need this in the the PVF?

@pepyakin
Copy link
Contributor Author

pepyakin commented Mar 5, 2021

All the reasonable chains would want to have deterministic execution in sandboxes, but it is up to the Runtime to ensure that. We don't do that by default because the runtime can know better how to ensure that: e.g. if the Runtime uses sandbox to execute parts of itself, it can be pretty sure that no additional measures are needed because the Runtime is assumed to be deterministic. The Runtime can also generate code which is deterministic by construction.

It's actually similar to the determinism relationships between PVF and Substrate execution. Substrate Runtime can be not deterministic but it's up to the Runtime itself. If it exploits non determinism then only the chain itself will suffer. However, non-determinism in Polkadot is more serious since a malicious PVF that exploits non-determinism would consume validators and can trigger disputes, slashing and delay inclusion, etc.

So we should make sandbox execution deterministic in case it runs in the context of PVF execution

@stale
Copy link

stale bot commented Jul 7, 2021

Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Jul 7, 2021
@pepyakin pepyakin removed the A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Jul 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants