solana-with-rpc-optimizations/core
Tao Zhu b000d490ce
Cost Model to limit transactions which are not parallelizeable (#16694)
* * Add following to banking_stage:
  1. CostModel as immutable ref shared between threads, to provide estimated cost for transactions.
  2. CostTracker which is shared between threads, tracks transaction costs for each block.

* replace hard coded program ID with id() calls

* Add Account Access Cost as part of TransactionCost. Account Access cost are weighted differently between read and write, signed and non-signed.

* Establish instruction_execution_cost_table, add function to update or insert instruction cost, unit tested. It is read-only for now; it allows Replay to insert realtime instruction execution costs to the table.

* add test for cost_tracker atomically try_add operation, serves as safety guard for future changes

* check cost against local copy of cost_tracker, return transactions that would exceed limit as unprocessed transaction to be buffered; only apply bank processed transactions cost to tracker;

* bencher to new banking_stage with max cost limit to allow cost model being hit consistently during bench iterations
2021-06-01 09:16:17 -05:00
..
benches Cost Model to limit transactions which are not parallelizeable (#16694) 2021-06-01 09:16:17 -05:00
src Cost Model to limit transactions which are not parallelizeable (#16694) 2021-06-01 09:16:17 -05:00
tests Avoid full-range compactions with periodic filtered b.g. ones (#16697) 2021-05-28 16:42:56 +09:00
.gitignore
Cargo.toml Cost Model to limit transactions which are not parallelizeable (#16694) 2021-06-01 09:16:17 -05:00
build.rs