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
{{ message }}
Repository navigation
Transaction expiration calculation -> change times to only block time #1060
Is your feature request related to a problem? Please describe.
Now it is possible to set transaction expiration in two ways (block-time and also normal time-to-live before expiration).
Describe the solution you'd like
The only true and measurable time is block height and so in this case also transaction expiration should be set, in explicit value of block height when it should expires.transaction: {
expiration: 5980000
}
For usability the client applications would still calculate this in a time-spam, so we can show more friendly information to the user sending the transaction. The clients can also suggest like 10 blocks, 2 rounds and then the explicit block expiration height is calculated in the background.
Introduce new transaction.expirationHeight
If 2. is set then override/ignore 1. and expire based on blocks, if 2. is not set then do as the current code does (expire by seconds).
Get the user-facing apps to set 2.
Delete 1. from the code as it will be unused after 3.
IMO the user-facing apps should present the user time-based expiration dialogs, like "expire after N hours approximately" or "expire at 14:56 on Nov 1 2018 approximately" and convert into block number under the hood. Then maybe have some advanced, geeks-only option to set/view expiration block number directly.
Activity
kristjank commentedon Oct 31, 2018
@vasild did you manage to check into this
vasild commentedon Oct 31, 2018
No, but I have a rough idea:
transaction.expiration->transaction.expirationSecondsSinceGenesistransaction.expirationHeightIf 2. is set then override/ignore 1. and expire based on blocks, if 2. is not set then do as the current code does (expire by seconds).
IMO the user-facing apps should present the user time-based expiration dialogs, like "expire after N hours approximately" or "expire at 14:56 on Nov 1 2018 approximately" and convert into block number under the hood. Then maybe have some advanced, geeks-only option to set/view expiration block number directly.
9 remaining items
feat(core-transaction-pool): Switch expiration to chain height
feat(core-transaction-pool): Switch expiration to chain height
vasild commentedon Apr 26, 2019
Implemented in #2461