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

Companion for PR 8913 #3114

Merged
merged 3 commits into from
Jun 1, 2021
Merged

Companion for PR 8913 #3114

merged 3 commits into from
Jun 1, 2021

Conversation

pepyakin
Copy link
Contributor

polkadot companion: paritytech/substrate#8913

@pepyakin pepyakin added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit. A3-in_progress Pull request is in progress. No review needed at this stage. and removed A0-please_review Pull request needs code review. labels May 26, 2021
// SAFETY: this should be safe since the compiled artifact passed here comes from the
// file created by the prepare workers. These files are obtained by calling
// [`executor_intf::prepare`].
crate::executor_intf::execute(compiled_artifact, params, spawner.clone())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure if this is enough TBH. The data that comes here is from a file. The file can in theory be compromised or corrupted (e.g. due to hardware failure).

However, there is also little sense in extending the unsafe blocks further. It's awkward and will probably lead marking all the worker_common machinery. Yet, it won't provide any additional benefit - we ultimately will walk into the cross process boundary. Ultimately, it's up to validation host to decide what file will be passed here.

I think we do not take into account the compromisation concern. We mostly assume that if the node is compromised the attacker can do way worse things anyway. The corruption is a bit more severe. However, I am not sure if it's likely: after all, to my knowledge, ELFs do not have checksums.

Copy link
Member

Choose a reason for hiding this comment

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

If you want to be 100% sure, you could hash them. However, I'm not sure that is really required.

#
# Another safeguard is a test `ensure_wasmtime_version` that will fail on each bump and prompt the
# developer to correspondingly act upon the change.
wasmtime-jit = "0.24"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is now removed along with the test before because as per #3084 we no longer leave artifacts in the cache and remove them each start. That means we do not need to foresee a possibility of an old artifact getting into the new engine.

@ghost
Copy link

ghost commented Jun 1, 2021

Waiting for commit status.

@ghost
Copy link

ghost commented Jun 1, 2021

Merge aborted: Checks failed for 3fcf7bf

@bkchr bkchr merged commit 04b2383 into master Jun 1, 2021
@bkchr bkchr deleted the ser-comp-8913 branch June 1, 2021 11:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A3-in_progress Pull request is in progress. No review needed at this stage. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants