oasislabs / oasis.js

🕸A web client for the Oasis platform
Apache License 2.0
33 stars 11 forks source link

Extend polling timeout #350

Closed mitjat closed 4 years ago

mitjat commented 4 years ago

PR #342 had an unexpected side effect where IDLE_TIMELAPSE started being heeded correctly. So all event polling ran for at most 60s. This is way too little for the offchain worker (that needs to wait possibly for days between jobs), and even for the offchain compute client (that needs to wait for the job to complete).

This PR extends the timeout to the point where it is practically disabled, but given that that is how we operated this whole time, the change should be non-controversial.

Should we do the same in Go?

More context: https://github.com/oasislabs/private-parcel/issues/842

mitjat commented 4 years ago

I'll change it to 0 (and implement it being a special value). We can add parametrization later, when/if needed.

lukaw3d commented 4 years ago

Yep, we should port this to go too.

No timeout? I think polling forever if there's a bug is a bad idea

mitjat commented 4 years ago

No timeout? I think polling forever if there's a bug is a bad idea

It's not great, agreed. But it's what we've been doing all along.

I'd say the right solution to "what if we poll too much due to a bug" is:

I'm just restoring pre-#342 behavior to un-break offchain compute.

mitar commented 4 years ago

Opened an issue for go client as well.