Open tac0turtle opened 1 month ago
So user will pass timeout_height
as a timestamp right?
we should think about possibly renaming it to timeout. need to have a discussion internally about this
Yep, will be a big refactor
👍 much better UX from a client perspective
Tangibly at the API layer, adding a field like
google.protobuf.Timestamp timeout_timestamp = 5;
would be non-breaking, and timeout_height
(at pos 3) would remain in the spec. So I think it looks like we support both? I tried to estimate the complexity of this but couldn't find where TimeoutHeight is used in the SDK.
Tangibly at the API layer, adding a field like
google.protobuf.Timestamp timeout_timestamp = 5;
would be non-breaking, and
timeout_height
(at pos 3) would remain in the spec. So I think it looks like we support both? I tried to estimate the complexity of this but couldn't find where TimeoutHeight is used in the SDK.
we use it here only: https://github.com/cosmos/cosmos-sdk/blob/720c1086cb3f1c938a8dbd64bf4349154fdbc5eb/x/auth/ante/basic.go#L250-L270, we would make this work with time as well.
Summary
Dydx recently brought up wanting to use time instead of block height for unordered txs. This would need a new field in the TX, which is the opposite direction we wanted to go with making the tx simpler.
Using time is simpler because its easier to understand time as a user than block height since blocks have different times.
Problem Definition
No response
Proposed Feature
Modify timeout_height to be time based instead of block height.
We would need to use the blocks time to check the timeout instead of local time. This would simplify the UX for end users since its easier to understand time over heights.