Skip to content
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

Secure collator mode #3387

Open
2 tasks done
tmpolaczyk opened this issue Feb 19, 2024 · 1 comment
Open
2 tasks done

Secure collator mode #3387

tmpolaczyk opened this issue Feb 19, 2024 · 1 comment
Labels
I5-enhancement An additional feature request.

Comments

@tmpolaczyk
Copy link
Contributor

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Motivation

Validators can already run in secure mode. This hardens the validation process making it more difficult for malicious code to cause any harm if it escapes the wasm sandbox. See #1444 for more information. But collators do not have that option, they always run the runtime in the same process.

Request

We propose to add a secure collator mode, to help mitigate the risk of running untrusted runtimes. This could be benefitial for projects like tanssi in which collators rotate between several runtimes, or for sequencers that run L2s that might not necessarily trust the runtime, or even for full nodes or RPC providers that want to harden their security.

Solution

Since validation and collation have many similarities, most of the PVF code could be reused to support secure collators. This could be implemented as a new WasmExecutionMethod that's similar to "Compiled" but runs the code in a new process:

To avoid problems related to performance, this option can be disabled by default.

Are you willing to help with this request?

Yes!

@tmpolaczyk tmpolaczyk added the I5-enhancement An additional feature request. label Feb 19, 2024
@bkchr
Copy link
Member

bkchr commented Jun 24, 2024

We propose to add a secure collator mode, to help mitigate the risk of running untrusted runtimes.

Everything is build around the assumption that the runtime is trusted code. Changing this assumption, would probably require a lot of refactorings etc. Just running the code in some external process will not help that much. Why isn't the collator just running in some clean VM or similar to keep it isolated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I5-enhancement An additional feature request.
Projects
None yet
Development

No branches or pull requests

2 participants