New Transaction Queue implementation (#8074)
* Implementation of Verifier, Scoring and Ready. * Queue in progress. * TransactionPool. * Prepare for txpool release. * Miner refactor [WiP] * WiP reworking miner. * Make it compile. * Add some docs. * Split blockchain access to a separate file. * Work on miner API. * Fix ethcore tests. * Refactor miner interface for sealing/work packages. * Implement next nonce. * RPC compiles. * Implement couple of missing methdods for RPC. * Add transaction queue listeners. * Compiles! * Clean-up and parallelize. * Get rid of RefCell in header. * Revert "Get rid of RefCell in header." This reverts commit 0f2424c9b7319a786e1565ea2a8a6d801a21b4fb. * Override Sync requirement. * Fix status display. * Unify logging. * Extract some cheap checks. * Measurements and optimizations. * Fix scoring bug, heap size of bug and add cache * Disable tx queueing and parallel verification. * Make ethcore and ethcore-miner compile again. * Make RPC compile again. * Bunch of txpool tests. * Migrate transaction queue tests. * Nonce Cap * Nonce cap cache and tests. * Remove stale future transactions from the queue. * Optimize scoring and write some tests. * Simple penalization. * Clean up and support for different scoring algorithms. * Add CLI parameters for the new queue. * Remove banning queue. * Disable debug build. * Change per_sender limit to be 1% instead of 5% * Avoid cloning when propagating transactions. * Remove old todo. * Post-review fixes. * Fix miner options default. * Implement back ready transactions for light client. * Get rid of from_pending_block * Pass rejection reason. * Add more details to drop. * Rollback heap size of. * Avoid cloning hashes when propagating and include more details on rejection. * Fix tests. * Introduce nonces cache. * Remove uneccessary hashes allocation. * Lower the mem limit. * Re-enable parallel verification. * Add miner log. Don't check the type if not below min_gas_price. * Add more traces, fix disabling miner. * Fix creating pending blocks twice on AuRa authorities. * Fix tests. * re-use pending blocks in AuRa * Use reseal_min_period to prevent too frequent update_sealing. * Fix log to contain hash not sender. * Optimize local transactions. * Fix aura tests. * Update locks comments. * Get rid of unsafe Sync impl. * Review fixes. * Remove excessive matches. * Fix compilation errors. * Use new pool in private transactions. * Fix private-tx test. * Fix secret store tests. * Actually use gas_floor_target * Fix config tests. * Fix pool tests. * Address grumbles.
This commit is contained in:
committed by
Marek Kotewicz
parent
03b96a7c0a
commit
1cd93e4ceb
@@ -721,29 +721,25 @@ usage! {
|
||||
"--gas-cap=[GAS]",
|
||||
"A cap on how large we will raise the gas limit per block due to transaction volume.",
|
||||
|
||||
ARG arg_tx_queue_mem_limit: (u32) = 2u32, or |c: &Config| c.mining.as_ref()?.tx_queue_mem_limit.clone(),
|
||||
ARG arg_tx_queue_mem_limit: (u32) = 4u32, or |c: &Config| c.mining.as_ref()?.tx_queue_mem_limit.clone(),
|
||||
"--tx-queue-mem-limit=[MB]",
|
||||
"Maximum amount of memory that can be used by the transaction queue. Setting this parameter to 0 disables limiting.",
|
||||
|
||||
ARG arg_tx_queue_size: (usize) = 8192usize, or |c: &Config| c.mining.as_ref()?.tx_queue_size.clone(),
|
||||
ARG arg_tx_queue_size: (usize) = 8_192usize, or |c: &Config| c.mining.as_ref()?.tx_queue_size.clone(),
|
||||
"--tx-queue-size=[LIMIT]",
|
||||
"Maximum amount of transactions in the queue (waiting to be included in next block).",
|
||||
|
||||
ARG arg_tx_queue_per_sender: (Option<usize>) = None, or |c: &Config| c.mining.as_ref()?.tx_queue_per_sender.clone(),
|
||||
"--tx-queue-per-sender=[LIMIT]",
|
||||
"Maximum number of transactions per sender in the queue. By default it's 1% of the entire queue, but not less than 16.",
|
||||
|
||||
ARG arg_tx_queue_gas: (String) = "off", or |c: &Config| c.mining.as_ref()?.tx_queue_gas.clone(),
|
||||
"--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 20x the current block gas limit.",
|
||||
|
||||
ARG arg_tx_queue_strategy: (String) = "gas_price", or |c: &Config| c.mining.as_ref()?.tx_queue_strategy.clone(),
|
||||
"--tx-queue-strategy=[S]",
|
||||
"Prioritization strategy used to order transactions in the queue. S may be: gas - Prioritize txs with low gas limit; gas_price - Prioritize txs with high gas price; gas_factor - Prioritize txs using gas price and gas limit ratio.",
|
||||
|
||||
ARG arg_tx_queue_ban_count: (u16) = 1u16, or |c: &Config| c.mining.as_ref()?.tx_queue_ban_count.clone(),
|
||||
"--tx-queue-ban-count=[C]",
|
||||
"Number of times maximal time for execution (--tx-time-limit) can be exceeded before banning sender/recipient/code.",
|
||||
|
||||
ARG arg_tx_queue_ban_time: (u16) = 180u16, or |c: &Config| c.mining.as_ref()?.tx_queue_ban_time.clone(),
|
||||
"--tx-queue-ban-time=[SEC]",
|
||||
"Banning time (in seconds) for offenders of specified execution time limit. Also number of offending actions have to reach the threshold within that time.",
|
||||
"Prioritization strategy used to order transactions in the queue. S may be: gas_price - Prioritize txs with high gas price",
|
||||
|
||||
ARG arg_stratum_interface: (String) = "local", or |c: &Config| c.stratum.as_ref()?.interface.clone(),
|
||||
"--stratum-interface=[IP]",
|
||||
@@ -775,7 +771,7 @@ usage! {
|
||||
|
||||
ARG arg_tx_time_limit: (Option<u64>) = None, or |c: &Config| c.mining.as_ref()?.tx_time_limit.clone(),
|
||||
"--tx-time-limit=[MS]",
|
||||
"Maximal time for processing single transaction. If enabled senders/recipients/code of transactions offending the limit will be banned from being included in transaction queue for 180 seconds.",
|
||||
"Maximal time for processing single transaction. If enabled senders of transactions offending the limit will get other transactions penalized.",
|
||||
|
||||
ARG arg_extra_data: (Option<String>) = None, or |c: &Config| c.mining.as_ref()?.extra_data.clone(),
|
||||
"--extra-data=[STRING]",
|
||||
@@ -1028,6 +1024,13 @@ usage! {
|
||||
"--cache=[MB]",
|
||||
"Equivalent to --cache-size MB.",
|
||||
|
||||
ARG arg_tx_queue_ban_count: (u16) = 1u16, or |c: &Config| c.mining.as_ref()?.tx_queue_ban_count.clone(),
|
||||
"--tx-queue-ban-count=[C]",
|
||||
"Not supported.",
|
||||
|
||||
ARG arg_tx_queue_ban_time: (u16) = 180u16, or |c: &Config| c.mining.as_ref()?.tx_queue_ban_time.clone(),
|
||||
"--tx-queue-ban-time=[SEC]",
|
||||
"Not supported.",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1232,6 +1235,7 @@ struct Mining {
|
||||
gas_cap: Option<String>,
|
||||
extra_data: Option<String>,
|
||||
tx_queue_size: Option<usize>,
|
||||
tx_queue_per_sender: Option<usize>,
|
||||
tx_queue_mem_limit: Option<u32>,
|
||||
tx_queue_gas: Option<String>,
|
||||
tx_queue_strategy: Option<String>,
|
||||
@@ -1654,7 +1658,8 @@ mod tests {
|
||||
arg_gas_cap: "6283184".into(),
|
||||
arg_extra_data: Some("Parity".into()),
|
||||
arg_tx_queue_size: 8192usize,
|
||||
arg_tx_queue_mem_limit: 2u32,
|
||||
arg_tx_queue_per_sender: None,
|
||||
arg_tx_queue_mem_limit: 4u32,
|
||||
arg_tx_queue_gas: "off".into(),
|
||||
arg_tx_queue_strategy: "gas_factor".into(),
|
||||
arg_tx_queue_ban_count: 1u16,
|
||||
@@ -1911,6 +1916,7 @@ mod tests {
|
||||
gas_floor_target: None,
|
||||
gas_cap: None,
|
||||
tx_queue_size: Some(8192),
|
||||
tx_queue_per_sender: None,
|
||||
tx_queue_mem_limit: None,
|
||||
tx_queue_gas: Some("off".into()),
|
||||
tx_queue_strategy: None,
|
||||
|
||||
Reference in New Issue
Block a user