You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now messages relay that works with parachains polls target node every 12s (parachain block time) to read state updates. If it awakes at T and actual parachain block time is e.g. T + 1s, it means that the relayer will get the updated state in another 11s. During that period, it may decide to submit some transaction that contain obsolete nonces. And this transaction may be invalidated when e.g. next block is built. So it'll be ~40s for the whole scheme. We may decrease it down to 12-24s just just by switching to
Possible solutions:
use new heads subscription instead of manual polling. This is a good solution, but let's have subscription sharing + caching (Cache results of RPC requests #1820) first;
dumb, but easy-to-implement solution. We may just decrease the polling interval. We also may try to guess next block time. I.e. sleep 1s first, then when we see block, schedule next awake in 11s. If we don't see block, awake in 1s and so on.
The text was updated successfully, but these errors were encountered:
Right now messages relay that works with parachains polls target node every
12s
(parachain block time) to read state updates. If it awakes atT
and actual parachain block time is e.g.T + 1s
, it means that the relayer will get the updated state in another11s
. During that period, it may decide to submit some transaction that contain obsolete nonces. And this transaction may be invalidated when e.g. next block is built. So it'll be ~40s for the whole scheme. We may decrease it down to12-24s
just just by switching toPossible solutions:
1s
first, then when we see block, schedule next awake in11s
. If we don't see block, awake in1s
and so on.The text was updated successfully, but these errors were encountered: