Companion for init the RuntimeLogger automatically#2522
Conversation
Fixing You mention:
Are you saying calling May I also ask you the reason to build by default with the logging for the wasm runtime enabled ? |
The build isn't less safe when logging is enabled ;) Just some kilobytes bigger. I see this as some kind of consideration between a on-chain build and some development build. Where the later one will happen much more often, thus I think it is fine to optimize for this use-case, especially as their is not security downside or whatever of the logging. |
Update as per paritytech/polkadot#2522 See merge request chevdor/srtool!4
The pr in Substrate paritytech/substrate#8128 will change how we initialize the
RuntimeLogger. It will now be enabled automatically for each runtime api call. However, as always, with great power comes great responsibility, this means that this generates more code and more code means a bigger wasm runtime. To prevent this bigger wasm runtime, the is theon-chain-release-buildfeature to disable logging for the wasm runtime. This feature should be enabled when we build the runtime for on chain.@s3krit this is important for you, you need to change the runtime build script to go into the polkadot/kusama runtime folder and call
cargo build --release --features on-chain-release-buildto build the runtime wasm. Better you speak with @chevdor to adapt hissrtool.