Skip to content
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

DTrx: Protocol Feature removing deferred transactions #1555

Closed
Tracked by #1480
bhazzard opened this issue Aug 24, 2023 · 0 comments · Fixed by #1697
Closed
Tracked by #1480

DTrx: Protocol Feature removing deferred transactions #1555

bhazzard opened this issue Aug 24, 2023 · 0 comments · Fixed by #1697
Assignees

Comments

@bhazzard
Copy link

bhazzard commented Aug 24, 2023

Disabling deferred transactions via protocol features will come in two stages.

DISABLED_DEFERRED_TRXS_STAGE_1:

Once this first protocol feature is activated, the behavior of the send_deferred and cancel_deferred host functions changes so that they become no-ops. In addition, any block that retires a deferred transaction with a status other than expired is invalid. Also, a deferred transaction can be retired as expired at any time regardless of whether its delay_until or expiration times have been reached.

Furthermore, the changes to the producer_plugin for the resolution of #1556 should be enhanced to be aware of when this protocol feature is activated. When it is activated, the retire_expired_deferred_trxs function in the producer plugin will not break from the loop if expired_itr->expiration >= pending_block_time. It will expire deferred transactions (any order is okay) until it reaches the hard-coded wall-clock deadline for that block.

DISABLED_DEFERRED_TRXS_STAGE_2:

This second protocol feature should depend on the first one (using the dependency mechanism in the protocol feature system to enforce this).

Its activation handler (on_activation) should iterate through any remaining deferred transactions in generated_transaction_multi_index to refund the RAM paid for the sender of that deferred transaction and to delete the deferred transaction from the state. It should clear out all deferred transactions within the activation handler.

Furthermore, the block validation rules should be changed again to not allow any deferred transactions to be retired in a block (not even as expired).

@bhazzard bhazzard changed the title DTrx: Remove deferred transactions, either force expire (hardcode config) or throw error on deferred trans (protocol feature) DTrx: Protocol Feature removing deferred transactions (Stretch Goal for Leap v5.0.0) Aug 24, 2023
@bhazzard bhazzard added 👍 lgtm and removed triage labels Aug 24, 2023
@bhazzard bhazzard changed the title DTrx: Protocol Feature removing deferred transactions (Stretch Goal for Leap v5.0.0) DTrx: Protocol Feature removing deferred transactions Sep 14, 2023
@bhazzard bhazzard added this to the Leap v5.0.0-rc1 milestone Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
4 participants