-
Notifications
You must be signed in to change notification settings - Fork 1k
Shadow support #10055
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
base: master
Are you sure you want to change the base?
Shadow support #10055
Conversation
note = "`OnRuntimeUpgrade` parameter in Executive is deprecated, will be removed after September 2026. \ | ||
Use type `SingleBlockMigrations` in frame_system::Config instead." | ||
)] OnRuntimeUpgrade = (), | ||
OnRuntimeUpgrade = (), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error: `#[deprecated]` attribute cannot be used on function params
--> /Users/di/Projects/polkadot/substrate/frame/executive/src/lib.rs:205:2
|
205 | / #[deprecated(
206 | | note = "`OnRuntimeUpgrade` parameter in Executive is deprecated, will be removed after September 2026. \
207 | | Use type `SingleBlockMigrations` in frame_system::Config instead."
208 | | )] OnRuntimeUpgrade = (),
| |______^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= help: `#[deprecated]` can be applied to functions, data types, modules, unions, constants, statics, macro defs, type aliases, use statements, foreign statics, struct fields, traits, associated types, associated consts, enum variants, inherent impl blocks, and crates
= note: `#[deny(useless_deprecated)]` on by default
That's why I deleted it. Anyway, this message had already been left in the doc-comment.
Just briefly skimmed it for now. Main though is, given that you don't need resource counters, process isolation, and sandboxing per se, why do you want to complicate it with TCP sockets at all? Wouldn't it be more straightforward to get rid of workers altogether and execute PVFs inside the candidate validation subsystem? |
It would be reasonable. Could you give some hint how to do it? |
I'd create a hacked version of |
Description
This PR introduces the
x-shadow
feature flag that enables building binaries compatible with the Shadow network simulation environment. When this feature is enabled, several runtime and I/O adjustments are applied to ensure the Polkadot binaries can run correctly within simulated network conditions.Summary of changes
jemalloc
, as its internal locking can lead to deadlocks in Shadow simulations.madvise
) required for fine-grained sandboxing are unavailable in Shadow.getrusage
syscall is not supported in Shadow.litep2p
, which includes internal fixes and API adjustments (Add x-shadow feature for Shadow simulation compatibility litep2p#446)The result is a cleanly switchable configuration via the
x-shadow
feature flag, allowing builds for both real-world and simulated environments without code duplication.Integration
When building for Shadow simulations, enable the feature flag:
No external configuration changes are required for downstream projects unless they depend directly on the modified worker interfaces. Existing builds and runtime behavior remain unchanged when the feature is disabled.
Integration testing was performed in a Shadow simulation with multiple configurations of:
The following setups were used:
rococo-local
specification, binarypolkadot
asset-hub-rococo-local
specification, binarypolkadot-parachain
All tested combinations ran successfully and stably in the simulated environment.
Review Notes
Implementation focuses on compatibility and isolation of Shadow-specific logic using conditional compilation via the
x-shadow
feature flag. This ensures minimal divergence from the mainline codebase.Key technical changes include:
UnixStream
/UnixListener
withTcpStream
/TcpListener
in PVF worker communication.#[cfg(feature = "x-shadow")]
.No new dependencies introduced. Manual simulation testing performed under Shadow confirmed expected runtime behavior.