-
Notifications
You must be signed in to change notification settings - Fork 744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timelock support for transactions #46
Comments
Would this not bloat the tx-pool? This would also not guarantee that your TX gets included in that block, in case the block is already full. |
I don't get this, you can just send the transaction after the required block? Than you ensure that it isn't included before. |
Not more than any other transaction, also longevity is still a thing.
Of course, it is fine.
It doesn't work if we're talking about unsigned extrinsics that might become invalid by the time
I'd really like the transaction to be propagated across network in the meantime or else if the delay is just one block, there is a pretty good chance it will not reach next block author in time. More specifically if current block is N I'd like to submit an unsigned extrinsic that will be valid for block N+2 only (if it fits in the block of course). |
In sassafras, we envision users sending tx directly to the slot where they want the tx posted. As a similar aurababe hack, users could send a tx directly to the node with the aura secondary slot they like along with a "do not gossip until height N" message, so then they've a 75% chance the aura secondary slot occurs, and if the arua secondary slot gets replaced by a babe primary slot then the aura node could gossip the tx. In this form, we've no assurances the tx occurs only after this height, but it avoids memepool bloat and even saves memepool size 75% of the time. We could separately do an on-chain limiter like proposed here, which yes improves things, but if were worried about memepool bloat then we could simply choose to do the off-chain part first. We're starting sassafras spec work soon-ish so this could be bumped up earlier in the pipeline, and maybe generalized to aurababe although not sure about that part. |
We could probably support custom "provides". Maybe provided by the runtime. So, it could then for example return |
Yeah, I thought that might be the most natural way of doing it. |
A custom signed extension can certainly achieve this, either in a more rudimentary way, or by using the existing By rudimentary, I mean, you can simply have a an extra This basically makes a subset of what scheduler does available to all accounts. I am not entirely sure if allowing this is safe. |
scheduler is not really meant to be used by any origin IMO and is only for special origins. |
* Ensure no multiple finalize-block tasks at the same time * Remove major_sync_confirmation_depth * Start subcoin networking after the start of substrate networking * Disable subcoin block sync when substrate fast sync is on * Spawn a task for starting subcoin block sync when substrate state sync is complete * Start subcoin block sync * Fix clippy
Currently Substrate doesn't seem to support notion that is equivalent to Bitcoin's
timelock
, meaning preventing transaction from being included in the block until certain block height. Transaction can only be valid (and included in the block) or not valid (and removed from transaction pool).Would be handy to have such support for certain edge-cases though. Some dependencies can be expressed with provides/requires, but if the only dependency is block number then suddenly it is not possible to express.
The text was updated successfully, but these errors were encountered: