dcrdex icon indicating copy to clipboard operation
dcrdex copied to clipboard

epoch progress bar/line

Open chappjc opened this issue 5 years ago • 4 comments
trafficstars

The market page could use a epoch progress indicator somewhere. Maybe one of those very very thin lines that perpetually cycles. I'd suggest below the "Place order to Buy/Sell Asset" button

chappjc avatar Nov 11 '20 05:11 chappjc

Any thoughts on how to handle time syncrhonization? Does the epoch end at now%dur == 0, or our best guess for the server's srv_time%dur == 0?

buck54321 avatar Dec 22 '20 20:12 buck54321

For a while I thought we'd do our best based on the orderbook messages we have, maybe add a new one, but even if there is one that occurs right at epoch change (not after preimage responses), it would still be subject to network latencies. Now I'm thinking we take the now approach because this will encourage users to sync their clocks. On the other hand, that would only be fair if the server itself had some ntp capability.

chappjc avatar Dec 22 '20 20:12 chappjc

No one else has asked for this, and given the clock sync challenges, I'm OK with this issue. We can reopen if it still seems like a good feature.

chappjc avatar Apr 20 '21 20:04 chappjc

@jholdstock Has requested this, so reopening.

The solution isn't clear though. There is no message from the server when the epoch cycles (match_proof ntfn can be delayed seconds after epoch close). Also such a message would have network latency. Alternatively, client could do this on their own (without server message) using their knowledge of epoch duration and their own system clock. This carries inaccuracies from their own clock and server's clock.

Also, just because a user submits their order on the frontend before this progress indicator cycles does NOT mean that the order makes it into that epoch. The user only knows what epoch the order is in when they receive a response from the server. (As an aside, this is why we probably need to make the order verification dialog modal.) So I have concerns about misleading the user.

chappjc avatar Jun 27 '21 16:06 chappjc