Open ngua opened 2 years ago
We should ping Ogmios devs to add it to ws interface if it is not there. I think it's best to enable it by default and throw an error instead of waiting (to minimize the amount of user confusion).
that takes a Contract as an argument
There's no need for taking Contract
as argument, we can delay in Aff
perfectly fine, without taking any arguments. Besides, we have multiple ways to run Contract
, so adding waitUntilSynched
will lead to either number of helper function explosion or incomplete interface.
I think it's also better not to rely on just sync progress percentage. 99% can still be weeks in the past.
We can estimate lag using slot-to-time conversion, like in QueryM.WaitUntilSlot.getLag
, and just wait until lag value reaches certain threshold.
We can use Ogmios' health check endpoint (HTTP only though) to get the network synchronization value. The endpoint should be called and execution should be delayed until it returns
0.99
This should not be enabled by default. We can just add a function (
waitUntilSynced
?) that takes aContract
as an argument