-
Notifications
You must be signed in to change notification settings - Fork 2.6k
refactor(sc-executor): use wasm executor builder instead of old apis #13740
refactor(sc-executor): use wasm executor builder instead of old apis #13740
Conversation
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.
Ty!
@bkchr Hi, anything need to be improved? |
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.
Looks mostly fine to me.
client/service/src/builder.rs
Outdated
@@ -228,6 +230,27 @@ where | |||
Ok((client, backend, keystore_container, task_manager)) | |||
} | |||
|
|||
/// Creates a [`NativeElseWasmExecutor`] according to [`Configuration`]. | |||
pub fn new_native_executor<D: NativeExecutionDispatch>( |
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.
pub fn new_native_executor<D: NativeExecutionDispatch>( | |
pub fn new_native_or_wasm_executor<D: NativeExecutionDispatch>( |
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.
Ok, though I find somewhere use this name when work with NativeElseWasmExecutor
.
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.
Yeah, our current naming might not be the best. (But we're going to remove the native executor soon-ish, so I guess it doesn't really matter all that much.)
client/service/src/builder.rs
Outdated
.with_onchain_heap_alloc_strategy(strategy) | ||
.with_onchain_heap_alloc_strategy(strategy) |
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.
You've copy-pasted the same thing twice. (:
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.
Should be offchain
@koute Any other problem? |
/tip small |
@bkchr A small tip was successfully submitted for yjhmelody (15ouFh2SHpGbHtDPsJ6cXQfes9Cx1gEFnJJsJVqPGzBSTudr on polkadot). https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/treasury/tips |
bot merge |
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/april-updates-for-substrate-and-polkadot-devs/2764/1 |
…aritytech#13740) * refactor: use builder api for all executors * improve a lot * remove unused args * cleanup deps * fix inconsistency about heap alloc * add `heap_pages` back to try-runtime * fix * chore: reduce duplicated code for sc-service-test * cleanup code * fmt * improve test executor * improve * use #[deprecated] * set runtime_cache_size: 4 * fix and improve * refactor builder * fix * fix bench * fix tests * fix warnings * fix warnings * fix * fix * update by suggestions * update name
builder
style apis to create runtime executornew
api for executormax_runtime_instances
withruntime_cache_size
).new_native_executor
to reduce boilerplate code.polkadot address: 15ouFh2SHpGbHtDPsJ6cXQfes9Cx1gEFnJJsJVqPGzBSTudr