This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add two pieces of function to banking_stage:
1. CostModel as immutable ref shared between threads, to provide estimated cost for transactions. 2. CostTracker shared between threads, to track transaction costs for a block. * replace hard coded program ID with id() calls * Add Account Access Cost as part of TransactionCost. Accout Access cost are weighted differently between read and write, signed and non-signed. * Establish instruction_execution_cost_table, add function to update or insert instructino cost, unittested. It is read-only for now; next PR will allow Replay to insert realtime insturcction execution cost 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
- Loading branch information