Cannot create RPC client: Rpc(ClientError(Call(ErrorObject { code: ServerError(-32000), message: "Client error: UnknownBlock: State already discarded for 0xc5aa6d4d5929c8bd22af44f51db17bb5121e248d5eb7e1482f92c90ee5f2c625", data: None })))
I do not know why I did not encounter this error before (maybe because of the higher sampling period), but it makes sense since:
my validator node is configured with light pruning profile (keeps states of latest 256 block only)
my distance oracle is configured to fetch wot from my validator RPC
There are multiple solutions to this problem:
increase the retaining duration of smith node up to the needs of distance oracle
set the distance oracle endpoint to an other node which keeps more states
start the distance oracle more frequently to request latest state as soon as possible
Right now the distance sessions are based on sessions (1h = 600 blocks > 256). But when we will use runtime 802 (with #202 (closed) in !252 (merged)), it will be based on evaluation period (3*7 blocks = 21 block = 126 s ~= 2 min):
type EvaluationPeriod = frame_support::traits::ConstU32<7>;
By chance this falls below the 256 value, but this should at least be mentioned in the oracle documentation.