difftreelog
feat future pool increase option
in: master
9 files changed
.baedeker/forkless-data.jsonnetdiffbeforeafterboth--- a/.baedeker/forkless-data.jsonnet
+++ b/.baedeker/forkless-data.jsonnet
@@ -54,6 +54,9 @@
[name]: {
bin: $.bin,
wantedKeys: 'para',
+ extraArgs: [
+ '--increase-future-pool',
+ ],
},
for name in ['alice', 'bob']
},
.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.jsonnetdiffbeforeafterboth1local2m = import 'baedeker-library/mixin/spec.libsonnet',3;45function(relay_spec)67local relay = {8 name: 'relay',9 bin: 'bin/polkadot',10 validatorIdAssignment: 'staking',11 spec: {Genesis:{12 chain: relay_spec,13 modify:: m.genericRelay($, hrmp = std.join([], [14 // [[$.parachains[a].paraId, $.parachains[b].paraId, 8, 512], [$.parachains[b].paraId, $.parachains[a].paraId, 8, 512]],15 // for [a, b] in [16 // ['unique', 'acala'],17 // ['unique', 'moonbeam'],18 // ['unique', 'statemint'],19 // ['unique', 'astar'],20 // ['unique', 'polkadex'],21 // ]22 ])),23 }},24 nodes: {25 [name]: {26 bin: $.bin,27 wantedKeys: 'relay',28 },29 for name in ['alice', 'bob', 'charlie', 'dave', 'eve', 'ferdie', 'gregory', 'holly']30 },31};3233local unique = {34 name: 'unique',35 bin: 'bin/unique',36 paraId: 1001,37 spec: {Genesis:{38 modify:: m.genericPara($),39 }},40 nodes: {41 [name]: {42 bin: $.bin,43 wantedKeys: 'para',44 },45 for name in ['alice', 'bob']46 },47};4849local acala = {50 name: 'acala',51 bin: 'bin/acala',52 paraId: 1002,53 spec: {Genesis:{54 chain: 'acala-dev',55 modify:: bdk.mixer([56 m.genericPara($),57 function(prev) prev {id+: '-local'},58 ]),59 }},60 nodes: {61 [name]: {62 bin: $.bin,63 wantedKeys: 'para',64 },65 for name in ['alice', 'bob']66 },67};6869local moonbeam = {70 name: 'moonbeam',71 bin: 'bin/moonbeam',72 signatureSchema: 'Ethereum',73 paraId: 1003,74 spec: {Genesis:{75 chain: 'moonbeam-local',76 specFilePrefix: 'moonbeam-local-',77 modify:: m.genericPara($),78 }},79 nodes: {80 [name]: {81 bin: $.bin,82 wantedKeys: 'para-nimbus',83 },84 for name in ['alith', 'baltathar']85 },86};8788local statemint = {89 name: 'statemint',90 bin: 'bin/cumulus',91 paraId: 1004,92 spec: {Genesis:{93 chain: 'statemint-local',94 modify:: m.genericPara($),95 }},96 nodes: {97 [name]: {98 bin: $.bin,99 wantedKeys: 'para-ed',100 },101 for name in ['alice', 'bob']102 },103};104105local astar = {106 name: 'astar',107 bin: 'bin/astar',108 paraId: 1005,109 spec: {Genesis:{110 chain: 'astar-dev',111 modify:: m.genericPara($),112 }},113 nodes: {114 [name]: {115 bin: $.bin,116 wantedKeys: 'para',117 },118 for name in ['alice', 'bob']119 },120};121122local polkadex = {123 name: 'polkadex',124 bin: 'bin/polkadex',125 paraId: 1006,126 spec: {Genesis:{127 chain: 'mainnet',128 modify:: m.genericPara($),129 }},130 nodes: {131 [name]: {132 bin: $.bin,133 wantedKeys: 'para',134 },135 for name in ['alice', 'bob']136 },137};138139local hydraDx = {140 name: 'hydraDx',141 bin: 'bin/hydradx',142 paraId: 1007,143 spec: {Genesis:{144 chain: 'local',145 modify:: m.genericPara($),146 }},147 nodes: {148 [name]: {149 bin: $.bin,150 wantedKeys: 'para',151 legacyRpc: true,152 },153 for name in ['alice', 'bob']154 },155};156157158relay + {159 parachains: {160 [para.name]: para,161 for para in [unique, acala, moonbeam, statemint, astar, polkadex, hydraDx]162 },163}1local2m = import 'baedeker-library/mixin/spec.libsonnet',3;45function(relay_spec)67local relay = {8 name: 'relay',9 bin: 'bin/polkadot',10 validatorIdAssignment: 'staking',11 spec: {Genesis:{12 chain: relay_spec,13 modify:: m.genericRelay($, hrmp = std.join([], [14 // [[$.parachains[a].paraId, $.parachains[b].paraId, 8, 512], [$.parachains[b].paraId, $.parachains[a].paraId, 8, 512]],15 // for [a, b] in [16 // ['unique', 'acala'],17 // ['unique', 'moonbeam'],18 // ['unique', 'statemint'],19 // ['unique', 'astar'],20 // ['unique', 'polkadex'],21 // ]22 ])),23 }},24 nodes: {25 [name]: {26 bin: $.bin,27 wantedKeys: 'relay',28 },29 for name in ['alice', 'bob', 'charlie', 'dave', 'eve', 'ferdie', 'gregory', 'holly']30 },31};3233local unique = {34 name: 'unique',35 bin: 'bin/unique',36 paraId: 1001,37 spec: {Genesis:{38 modify:: m.genericPara($),39 }},40 nodes: {41 [name]: {42 bin: $.bin,43 wantedKeys: 'para',44 extraArgs: [45 '--increase-future-pool',46 ],47 },48 for name in ['alice', 'bob']49 },50};5152local acala = {53 name: 'acala',54 bin: 'bin/acala',55 paraId: 1002,56 spec: {Genesis:{57 chain: 'acala-dev',58 modify:: bdk.mixer([59 m.genericPara($),60 function(prev) prev {id+: '-local'},61 ]),62 }},63 nodes: {64 [name]: {65 bin: $.bin,66 wantedKeys: 'para',67 },68 for name in ['alice', 'bob']69 },70};7172local moonbeam = {73 name: 'moonbeam',74 bin: 'bin/moonbeam',75 signatureSchema: 'Ethereum',76 paraId: 1003,77 spec: {Genesis:{78 chain: 'moonbeam-local',79 specFilePrefix: 'moonbeam-local-',80 modify:: m.genericPara($),81 }},82 nodes: {83 [name]: {84 bin: $.bin,85 wantedKeys: 'para-nimbus',86 },87 for name in ['alith', 'baltathar']88 },89};9091local statemint = {92 name: 'statemint',93 bin: 'bin/cumulus',94 paraId: 1004,95 spec: {Genesis:{96 chain: 'statemint-local',97 modify:: m.genericPara($),98 }},99 nodes: {100 [name]: {101 bin: $.bin,102 wantedKeys: 'para-ed',103 },104 for name in ['alice', 'bob']105 },106};107108local astar = {109 name: 'astar',110 bin: 'bin/astar',111 paraId: 1005,112 spec: {Genesis:{113 chain: 'astar-dev',114 modify:: m.genericPara($),115 }},116 nodes: {117 [name]: {118 bin: $.bin,119 wantedKeys: 'para',120 },121 for name in ['alice', 'bob']122 },123};124125local polkadex = {126 name: 'polkadex',127 bin: 'bin/polkadex',128 paraId: 1006,129 spec: {Genesis:{130 chain: 'mainnet',131 modify:: m.genericPara($),132 }},133 nodes: {134 [name]: {135 bin: $.bin,136 wantedKeys: 'para',137 },138 for name in ['alice', 'bob']139 },140};141142local hydraDx = {143 name: 'hydraDx',144 bin: 'bin/hydradx',145 paraId: 1007,146 spec: {Genesis:{147 chain: 'local',148 modify:: m.genericPara($),149 }},150 nodes: {151 [name]: {152 bin: $.bin,153 wantedKeys: 'para',154 legacyRpc: true,155 },156 for name in ['alice', 'bob']157 },158};159160161relay + {162 parachains: {163 [para.name]: para,164 for para in [unique, acala, moonbeam, statemint, astar, polkadex, hydraDx]165 },166}.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);