difftreelog
feat future pool increase option
in: master
9 files changed
.baedeker/forkless-data.jsonnetdiffbeforeafterboth1local2m = import 'baedeker-library/mixin/spec.libsonnet',3rm = import 'baedeker-library/mixin/raw-spec.libsonnet',4;56function(relay_spec, forked_spec, fork_source)78local relay = {9 name: 'relay',10 bin: 'bin/polkadot',11 validatorIdAssignment: 'staking',12 spec: {Genesis:{13 chain: relay_spec,14 modify:: m.genericRelay($),15 }},16 nodes: {17 [name]: {18 bin: $.bin,19 wantedKeys: 'relay',20 },21 for name in ['alice', 'bob', 'charlie', 'dave', 'eve']22 },23};2425local unique = {26 name: 'unique',27 bin: 'bin/unique',28 paraId: 1001,29 spec: {Raw:{30 local modifyRaw = bdk.mixer([31 rm.resetNetworking($),32 rm.decodeSpec(),33 rm.polkaLaunchPara($),34 rm.reencodeSpec(),35 ]),36 raw_spec: modifyRaw({37 name: "Unused",38 id: "%s_local" % forked_spec,39 bootNodes: error "override me",40 chainType: error "override me",41 telemetryEndpoints: error "override me",42 codeSubstitutes: error "override me",43 para_id: error "override me",44 relay_chain: "unused",45 genesis: {46 raw: {47 top: cql.chain(fork_source).latest._preloadKeys._raw,48 childrenDefault: {},49 },50 },51 }),52 }},53 nodes: {54 [name]: {55 bin: $.bin,56 wantedKeys: 'para',57 extraArgs: [58 '--increase-future-pool',59 ],60 },61 for name in ['alice', 'bob']62 },63};6465relay + {66 parachains: {67 [para.name]: para,68 for para in [unique]69 },70}.baedeker/node-only.jsonnetdiffbeforeafterboth--- a/.baedeker/node-only.jsonnet
+++ b/.baedeker/node-only.jsonnet
@@ -30,6 +30,9 @@
[name]: {
bin: $.bin,
wantedKeys: 'para',
+ extraArgs: [
+ '--increase-future-pool',
+ ],
},
for name in ['alice', 'bob']
},
.baedeker/xcm-opal-async-backing.jsonnetdiffbeforeafterboth--- a/.baedeker/xcm-opal-async-backing.jsonnet
+++ b/.baedeker/xcm-opal-async-backing.jsonnet
@@ -55,6 +55,9 @@
[name]: {
bin: $.bin,
wantedKeys: 'para',
+ extraArgs: [
+ '--increase-future-pool',
+ ],
},
for name in ['alice', 'bob', 'charlie', 'dave', 'eve']
},
.baedeker/xcm-opal.jsonnetdiffbeforeafterboth--- a/.baedeker/xcm-opal.jsonnet
+++ b/.baedeker/xcm-opal.jsonnet
@@ -35,6 +35,9 @@
[name]: {
bin: $.bin,
wantedKeys: 'para',
+ extraArgs: [
+ '--increase-future-pool',
+ ],
},
for name in ['alice', 'bob']
},
.baedeker/xcm-quartz.jsonnetdiffbeforeafterboth--- a/.baedeker/xcm-quartz.jsonnet
+++ b/.baedeker/xcm-quartz.jsonnet
@@ -40,6 +40,9 @@
[name]: {
bin: $.bin,
wantedKeys: 'para',
+ extraArgs: [
+ '--increase-future-pool',
+ ],
},
for name in ['alice', 'bob']
},
.baedeker/xcm-unique.jsonnetdiffbeforeafterboth--- a/.baedeker/xcm-unique.jsonnet
+++ b/.baedeker/xcm-unique.jsonnet
@@ -41,6 +41,9 @@
[name]: {
bin: $.bin,
wantedKeys: 'para',
+ extraArgs: [
+ '--increase-future-pool',
+ ],
},
for name in ['alice', 'bob']
},
.github/workflows/node-only-update.ymldiffbeforeafterboth--- a/.github/workflows/node-only-update.yml
+++ b/.github/workflows/node-only-update.yml
@@ -161,7 +161,8 @@
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
node/cli/src/cli.rsdiffbeforeafterboth--- a/node/cli/src/cli.rs
+++ b/node/cli/src/cli.rs
@@ -106,6 +106,15 @@
#[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>,
node/cli/src/command.rsdiffbeforeafterboth--- a/node/cli/src/command.rs
+++ b/node/cli/src/command.rs
@@ -458,7 +458,7 @@
let runner = cli.create_runner(&cli.run.normalize())?;
let collator_options = cli.run.collator_options();
- runner.run_node_until_exit(|config| async move {
+ runner.run_node_until_exit(|mut config| async move {
let hwbench = if !cli.no_hardware_benchmarks {
config.database.path().map(|database_path| {
let _ = std::fs::create_dir_all(database_path);
@@ -467,6 +467,10 @@
} else {
None
};
+
+ if cli.increase_future_pool {
+ config.transaction_pool.future = config.transaction_pool.ready.clone();
+ }
let extensions = chain_spec::Extensions::try_get(&*config.chain_spec);