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

Remove defer transaction configuration options and block incoming delayed transactions #1643

Merged
merged 35 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c69b589
Remove defer transaction options --max-scheduled-transaction-time-per…
linh2931 Sep 15, 2023
d233ed6
Merge branch 'main' into remove_defer_trx_config
linh2931 Sep 15, 2023
2578ead
remove _blacklisted_transactions, remove_expired_blacklisted_trxs, an…
linh2931 Sep 16, 2023
013b20f
retire expired deferred transactions
linh2931 Sep 18, 2023
c495ab1
use >= for expiration check and logging improvement
linh2931 Sep 18, 2023
8067ad2
Merge branch 'main' into remove_defer_trx_config
linh2931 Sep 18, 2023
eeea80d
add back missing num_processed++;
linh2931 Sep 18, 2023
191d07f
Merge branch 'remove_defer_trx_config' of https://github.com/Antelope…
linh2931 Sep 18, 2023
076e18a
changedeferred_trxs_deadline to 10ms
linh2931 Sep 19, 2023
840c05b
block delayed transactions
linh2931 Sep 19, 2023
fe45fc4
add and update tests for blocking delayed transactions
linh2931 Sep 21, 2023
4603c86
remove delay member from transaction_context class
linh2931 Sep 21, 2023
d995791
remove final trx.delay_sec left behind in transaction_context.cpp
linh2931 Sep 21, 2023
5b1f7f2
Merge branch 'main' into remove_defer_trx_config
linh2931 Sep 21, 2023
8ad615a
Merge branch 'main' into remove_defer_trx_config
linh2931 Sep 21, 2023
54c9384
Merge branch 'main' into remove_defer_trx_config
linh2931 Sep 23, 2023
0310c57
adapt protocol_feature_tests/no_duplicate_deferred_id_test for delay_…
linh2931 Sep 23, 2023
218f933
move delete_auth from delay_tests.cpp to auth_tests.cpp
linh2931 Sep 25, 2023
55c51c8
simplify delayed_action_blocked and minor refactor
linh2931 Sep 25, 2023
0b47abe
restore link_delay_direct_test and link_delay_direct_parent_permissio…
linh2931 Sep 25, 2023
41a5c3b
move generated_transaction_multi_index size checks to delayed_trx_blo…
linh2931 Sep 25, 2023
508397d
restore and adpat link_delay_direct_walk_parent_permissions_test
linh2931 Sep 25, 2023
de5e3c7
restore and adapt link_delay_permission_change_test
linh2931 Sep 25, 2023
b2418c9
restore and adapt link_delay_permission_change_with_delay_heirarchy_test
linh2931 Sep 25, 2023
41ceb75
restore and adapt link_delay_link_change_test
linh2931 Sep 25, 2023
7c78c44
restore and adapt link_delay_unlink_test
linh2931 Sep 25, 2023
43a5082
restore and adapt link_delay_link_change_heirarchy_test
linh2931 Sep 25, 2023
a4d2c5d
rewrite canceldelay_test
linh2931 Sep 26, 2023
604b0e1
rewrite canceldelay_test2
linh2931 Sep 27, 2023
c7032c5
restore max_transaction_delay_create
linh2931 Sep 27, 2023
0ef0175
update max_transaction_delay_execute
linh2931 Sep 27, 2023
c07caf2
minor refactoring
linh2931 Sep 27, 2023
2d7811d
incorporate review comments for producer_plugin.cpp
linh2931 Sep 27, 2023
907d54d
move modify_gto_for_canceldelay_test out of controller to delay_test
linh2931 Sep 27, 2023
35321c9
add missing permission delay back to link_delay_direct_parent_permiss…
linh2931 Sep 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions docs/01_nodeos/03_plugins/producer_plugin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,6 @@ Config Options for eosio::producer_plugin:
consider block full; when within
threshold of max-block-net-usage block
can be produced immediately
--max-scheduled-transaction-time-per-block-ms arg (=100)
Maximum wall-clock time, in
milliseconds, spent retiring scheduled
transactions (and incoming transactions
according to incoming-defer-ratio) in
any block before returning to normal
transaction processing.
--subjective-cpu-leeway-us arg (=31000)
Time in microseconds allowed for a
transaction that starts with
Expand All @@ -114,9 +107,6 @@ Config Options for eosio::producer_plugin:
--subjective-account-decay-time-minutes arg (=1440)
Sets the time to return full subjective
cpu for accounts
--incoming-defer-ratio arg (=1) ratio between incoming transactions and
deferred transactions when both are
queued for execution
--incoming-transaction-queue-size-mb arg (=1024)
Maximum size (in MiB) of the incoming
transaction queue. Exceeding this value
Expand All @@ -142,21 +132,6 @@ Config Options for eosio::producer_plugin:

* [`chain_plugin`](../chain_plugin/index.md)

## The priority of transaction

You can give one of the transaction types priority over another when the producer plugin has a queue of transactions pending.

The option below sets the ratio between the incoming transaction and the deferred transaction:

```console
--incoming-defer-ratio arg (=1)
```

By default value of `1`, the `producer` plugin processes one incoming transaction per deferred transaction. When `arg` sets to `10`, the `producer` plugin processes 10 incoming transactions per deferred transaction.

If the `arg` is set to a sufficiently large number, the plugin always processes the incoming transaction first until the queue of the incoming transactions is empty. Respectively, if the `arg` is 0, the `producer` plugin processes the deferred transactions queue first.


### Load Dependency Examples

```console
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ class producer_plugin : public appbase::plugin<producer_plugin> {
std::optional<int32_t> max_transaction_time;
std::optional<int32_t> max_irreversible_block_age;
std::optional<int32_t> cpu_effort_us;
std::optional<int32_t> max_scheduled_transaction_time_per_block_ms;
std::optional<int32_t> subjective_cpu_leeway_us;
std::optional<double> incoming_defer_ratio;
std::optional<uint32_t> greylist_limit;
};

Expand Down Expand Up @@ -162,7 +160,6 @@ class producer_plugin : public appbase::plugin<producer_plugin> {

struct produced_block_metrics : public speculative_block_metrics {
std::size_t unapplied_transactions_total = 0;
std::size_t blacklisted_transactions_total = 0;
std::size_t subjective_bill_account_size_total = 0;
std::size_t scheduled_trxs_total = 0;
std::size_t trxs_produced_total = 0;
Expand Down Expand Up @@ -199,7 +196,7 @@ class producer_plugin : public appbase::plugin<producer_plugin> {

} //eosio

FC_REFLECT(eosio::producer_plugin::runtime_options, (max_transaction_time)(max_irreversible_block_age)(cpu_effort_us)(max_scheduled_transaction_time_per_block_ms)(subjective_cpu_leeway_us)(incoming_defer_ratio)(greylist_limit));
FC_REFLECT(eosio::producer_plugin::runtime_options, (max_transaction_time)(max_irreversible_block_age)(cpu_effort_us)(subjective_cpu_leeway_us)(greylist_limit));
FC_REFLECT(eosio::producer_plugin::greylist_params, (accounts));
FC_REFLECT(eosio::producer_plugin::whitelist_blacklist, (actor_whitelist)(actor_blacklist)(contract_whitelist)(contract_blacklist)(action_blacklist)(key_blacklist) )
FC_REFLECT(eosio::producer_plugin::integrity_hash_information, (head_block_id)(integrity_hash))
Expand Down
Loading
Loading