Unverified Commit ff2e7dbd authored by Alexandru Gheorghe's avatar Alexandru Gheorghe Committed by GitHub
Browse files

Move candidate-validation on blocking tasks (#3122)



Candidate validation has a lot of operations that are cpu bound on its
main loop things, like:
```
validation_code.hash()
sp_maybe_compressed_blob::decompress(
		&validation_code.0,
		VALIDATION_CODE_BOMB_LIMIT,
)

sp_maybe_compressed_blob::decompress(&pov.block_data.0, POV_BOMB_LIMIT) 
let code_hash = sp_crypto_hashing::blake2_256(&code).into();
```

When you add all that you for large POV and CODE it is going to take in
the order of 10s of ms and because these are cpu bound operation it is
going to hog the executor thread and negatively affect other subsystems
around it, so it is better to just move the subsystem on the blocking
pool to make sure such unexpected behaviour is avoided.

Note! In practice this subsystem does not have a high number of work to
be done, so probably the impact of it is really low, but better safe
than sorry.

Signed-off-by: default avatarAlexandru Gheorghe <[email protected]>
parent 85191e94
Pipeline #439551 canceled with stages
in 46 minutes and 48 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment