-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Use background tasks properly in candidate-validation #4002
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.
Looks reasonable.
I wonder if we should be using spawn_blocking
because of wasm decompression thing might be CPU heavy, but OTOH we don't want to spawn too many threads.
}) | ||
.and_then(|res| { | ||
res.map_err(|e| { | ||
tracing::debug!( |
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.
What's the reasoning behind making those two debug!
?
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.
They are unexpected but non-fatal - trace! is too low, but warn! is too high.
My reasoning behind not using spawn-blocking was that the heaviest part of it is the actual execution which happens in a separate task. I don't expect the decompression to be very heavy. |
* master: (138 commits) Allow an Offset to Lease Periods (#3980) Bump quote from 1.0.9 to 1.0.10 (#4013) Companion for #9834 (Transaction Priority) (#3901) chore: update `builder` image (#3884) Free disputed cores before processing bitfields (#4008) Make candidate validation timeouts configurable (#4001) Add extrinsic ordering filtering (#3631) chore: ci list files that spellcheck finds (#3992) Use background tasks properly in candidate-validation (#4002) Fix unoccupied bitfields (#4004) Bump syn from 1.0.77 to 1.0.78 (#4006) Bump jsonrpsee-ws-client from 0.3.0 to 0.3.1 (#3931) fix clock drift for assignments issued before the block (#3851) Remove unoccupied bit check (#3999) bump substrate (#4000) change genesis authority set for wococo-local, revert rococo-local (#3998) ignore irrelevant approvals in logs (#3859) avoid expect, on free availability core (#3994) preserve finalized block in active leaves (#3997) some tweaks to rococo-local (#3996) ...
Also does some refactoring of error handling and runtime API requests.