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

Implement DISABLE_DEFERRED_TRXS_STAGE_1 and DISABLE_DEFERRED_TRXS_STAGE_2 protocol features #1697

Merged
merged 27 commits into from
Oct 4, 2023

Conversation

linh2931
Copy link
Member

Resolved #1555

Once DISABLE_DEFERRED_TRXS_STAGE_1 is activated, the behavior of the send_deferred and cancel_deferred host functions and canceldelay native action changes so that they become no-ops. In addition, a block will expire deferred transactions until it reaches the hard-coded wall-clock deadline for that block; 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.

DISABLE_DEFERRED_TRXS_STAGE_2 depends on DISABLE_DEFERRED_TRXS_STAGE_11. On activation of DISABLE_DEFERRED_TRXS_STAGE_2`, its activation handler iterates through any remaining deferred transactions to refund the RAM paid for the sender of that deferred transaction and to delete the deferred transaction from the state. All deferred transactions are cleared out within the activation handler.

@linh2931 linh2931 requested review from heifner and arhag September 29, 2023 15:19
…_2 from full protocol feature activation in tests
libraries/chain/protocol_feature_manager.cpp Outdated Show resolved Hide resolved
libraries/chain/protocol_feature_manager.cpp Outdated Show resolved Hide resolved
libraries/chain/protocol_feature_manager.cpp Outdated Show resolved Hide resolved
plugins/producer_plugin/producer_plugin.cpp Outdated Show resolved Hide resolved
plugins/producer_plugin/producer_plugin.cpp Show resolved Hide resolved
unittests/delay_tests.cpp Outdated Show resolved Hide resolved
.cicd/defaults.json Outdated Show resolved Hide resolved
libraries/chain/controller.cpp Outdated Show resolved Hide resolved
libraries/chain/controller.cpp Outdated Show resolved Hide resolved
libraries/chain/protocol_feature_manager.cpp Outdated Show resolved Hide resolved
libraries/chain/protocol_feature_manager.cpp Outdated Show resolved Hide resolved
libraries/testing/include/eosio/testing/tester.hpp Outdated Show resolved Hide resolved
libraries/testing/include/eosio/testing/tester.hpp Outdated Show resolved Hide resolved
libraries/testing/include/eosio/testing/tester.hpp Outdated Show resolved Hide resolved
unittests/deep_mind_tests.cpp Outdated Show resolved Hide resolved
unittests/currency_tests.cpp Outdated Show resolved Hide resolved
@linh2931 linh2931 merged commit 7efa226 into main Oct 4, 2023
21 checks passed
@linh2931 linh2931 deleted the disable_deferred_trxs_prot_features branch October 4, 2023 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DTrx: Protocol Feature removing deferred transactions
3 participants