TX queue gas limit config and allow local transactions over the gas limit (#2553)

* Gas limit config; Allow local transactions over the limit

* Fix typo

[ci:skip]
This commit is contained in:
Arkadiy Paronyan
2016-10-10 23:04:43 +02:00
committed by Gav Wood
parent 64f6f836ab
commit 26d7712d30
10 changed files with 70 additions and 12 deletions

View File

@@ -68,6 +68,7 @@ price_update_period = "hourly"
gas_floor_target = "4700000"
gas_cap = "6283184"
tx_queue_size = 2048
tx_queue_gas = "auto"
tx_gas_limit = "6283184"
extra_data = "Parity"
remove_solved = false

View File

@@ -41,6 +41,7 @@ reseal_on_txs = "all"
reseal_min_period = 4000
price_update_period = "hourly"
tx_queue_size = 2048
tx_queue_gas = "auto"
[footprint]
tracing = "on"

View File

@@ -195,6 +195,8 @@ usage! {
or |c: &Config| otry!(c.mining).extra_data.clone().map(Some),
flag_tx_queue_size: usize = 2048usize,
or |c: &Config| otry!(c.mining).tx_queue_size.clone(),
flag_tx_queue_gas: String = "auto",
or |c: &Config| otry!(c.mining).tx_queue_gas.clone(),
flag_remove_solved: bool = false,
or |c: &Config| otry!(c.mining).remove_solved.clone(),
flag_notify_work: Option<String> = None,
@@ -348,6 +350,7 @@ struct Mining {
gas_cap: Option<String>,
extra_data: Option<String>,
tx_queue_size: Option<usize>,
tx_queue_gas: Option<String>,
remove_solved: Option<bool>,
notify_work: Option<Vec<String>>,
}
@@ -523,6 +526,7 @@ mod tests {
flag_gas_cap: "6283184".into(),
flag_extra_data: Some("Parity".into()),
flag_tx_queue_size: 2048usize,
flag_tx_queue_gas: "auto".into(),
flag_remove_solved: false,
flag_notify_work: Some("http://localhost:3001".into()),
@@ -673,6 +677,7 @@ mod tests {
gas_floor_target: None,
gas_cap: None,
tx_queue_size: Some(2048),
tx_queue_gas: Some("auto".into()),
tx_gas_limit: None,
extra_data: None,
remove_solved: None,

View File

@@ -184,6 +184,10 @@ Sealing/Mining Options:
more than 32 characters. (default: {flag_extra_data:?})
--tx-queue-size LIMIT Maximum amount of transactions in the queue (waiting
to be included in next block) (default: {flag_tx_queue_size}).
--tx-queue-gas LIMIT Maximum amount of total gas for external transactions in
the queue. LIMIT can be either an amount of gas or
'auto' or 'off'. 'auto' sets the limit to be 2x
the current block gas limit. (default: {flag_tx_queue_gas}).
--remove-solved Move solved blocks from the work package queue
instead of cloning them. This gives a slightly
faster import speed, but means that extra solutions