Skip to content

Commit

Permalink
feat: future pool increase option
Browse files Browse the repository at this point in the history
  • Loading branch information
CertainLach committed Jul 10, 2024
1 parent 0ceea0a commit 7503002
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .baedeker/forkless-data.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ local unique = {
[name]: {
bin: $.bin,
wantedKeys: 'para',
extraArgs: [
'--increase-future-pool',
],
},
for name in ['alice', 'bob']
},
Expand Down
3 changes: 3 additions & 0 deletions .baedeker/node-only.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ local unique = {
[name]: {
bin: $.bin,
wantedKeys: 'para',
extraArgs: [
'--increase-future-pool',
],
},
for name in ['alice', 'bob']
},
Expand Down
3 changes: 3 additions & 0 deletions .baedeker/xcm-opal-async-backing.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ local opal = {
[name]: {
bin: $.bin,
wantedKeys: 'para',
extraArgs: [
'--increase-future-pool',
],
},
for name in ['alice', 'bob', 'charlie', 'dave', 'eve']
},
Expand Down
3 changes: 3 additions & 0 deletions .baedeker/xcm-opal.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ local opal = {
[name]: {
bin: $.bin,
wantedKeys: 'para',
extraArgs: [
'--increase-future-pool',
],
},
for name in ['alice', 'bob']
},
Expand Down
3 changes: 3 additions & 0 deletions .baedeker/xcm-quartz.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ local quartz = {
[name]: {
bin: $.bin,
wantedKeys: 'para',
extraArgs: [
'--increase-future-pool',
],
},
for name in ['alice', 'bob']
},
Expand Down
3 changes: 3 additions & 0 deletions .baedeker/xcm-unique.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ local unique = {
[name]: {
bin: $.bin,
wantedKeys: 'para',
extraArgs: [
'--increase-future-pool',
],
},
for name in ['alice', 'bob']
},
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/node-only-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ jobs:
inputs: |
.baedeker/node-only.jsonnet
snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'${{ steps.polkadot.outputs.name }}'}})
ephemeral:snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}})
# extra_node_mixin due to mainnet unique node not supporting --increase-future-pool
ephemeral:snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}}, extra_node_mixin={extraArgs: []})
- name: Run Parallel tests before Node Parachain upgrade
working-directory: ${{ matrix.mainnet_branch }}/tests
Expand Down
9 changes: 9 additions & 0 deletions node/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,15 @@ pub struct Cli {
#[clap(long)]
pub no_hardware_benchmarks: bool,

/// Make future pool the same size as the ready pool.
///
/// By default, future pool is factor 10 smaler than the ready pool, which causes transactions to be dropped as they
/// are retracted, without the ability to move them back to the ready pool after revalidation.
///
/// This switch makes that transactions still can be dropped, but only when there is more transactions than the pool
/// size configured with `--pool-limit` (amount of txes), `--pool-kbytes` (size of all txes in kbytes).
pub increase_future_pool: bool,

/// Relaychain arguments
#[structopt(raw = true)]
pub relaychain_args: Vec<String>,
Expand Down
4 changes: 4 additions & 0 deletions node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,10 @@ pub fn run() -> Result<()> {
} else {
None
};

if cli.increase_future_pool {
config.transaction_pool.future = config.transaction_pool.ready;
}

let extensions = chain_spec::Extensions::try_get(&*config.chain_spec);

Expand Down

0 comments on commit 7503002

Please sign in to comment.