mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
node-bench no-op block import (#5869)
* start to try and implement noop * txs as input * better comment * Add transfer reaping * rename to avoid filter matching * Update base weights based on results * fix priority * fix logic on reaping transfer * Update bin/node/bench/src/import.rs Co-authored-by: Nikolay Volf <nikvolf@gmail.com> * Update bin/node/bench/src/main.rs Co-authored-by: Nikolay Volf <nikvolf@gmail.com> * add back size type (in-progress) * bring back size type with custom * update comment * nit * block type then size * Use `transfer_keep_alive` Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
This commit is contained in:
@@ -123,16 +123,19 @@ parameter_types! {
|
||||
pub const BlockHashCount: BlockNumber = 250;
|
||||
/// We allow for 2 seconds of compute with a 6 second average block time.
|
||||
pub const MaximumBlockWeight: Weight = 2_000_000_000_000;
|
||||
pub const ExtrinsicBaseWeight: Weight = 10_000_000;
|
||||
/// Executing 10,000 System remarks (no-op) txs takes ~1.26 seconds -> ~125 µs per tx
|
||||
pub const ExtrinsicBaseWeight: Weight = 125_000_000;
|
||||
pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
|
||||
pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;
|
||||
pub const Version: RuntimeVersion = VERSION;
|
||||
/// This probably should not be changed unless you have specific
|
||||
/// disk i/o conditions for the node.
|
||||
pub const DbWeight: RuntimeDbWeight = RuntimeDbWeight {
|
||||
read: 25_000_000, // ~25 µs
|
||||
write: 100_000_000, // ~100 µs
|
||||
read: 25_000_000, // ~25 µs @ 200,000 items
|
||||
write: 100_000_000, // ~100 µs @ 200,000 items
|
||||
};
|
||||
/// Importing a block with 0 txs takes ~5 ms
|
||||
pub const BlockExecutionWeight: Weight = 5_000_000_000;
|
||||
}
|
||||
|
||||
impl system::Trait for Runtime {
|
||||
@@ -164,7 +167,7 @@ impl system::Trait for Runtime {
|
||||
type DbWeight = DbWeight;
|
||||
/// The weight of the overhead invoked on the block import process, independent of the
|
||||
/// extrinsics included in that block.
|
||||
type BlockExecutionWeight = ();
|
||||
type BlockExecutionWeight = BlockExecutionWeight;
|
||||
/// The base weight of any extrinsic processed by the runtime, independent of the
|
||||
/// logic of that extrinsic. (Signature verification, nonce increment, fee, etc...)
|
||||
type ExtrinsicBaseWeight = ExtrinsicBaseWeight;
|
||||
|
||||
Reference in New Issue
Block a user