You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have two different measures of gas eaten by a contract:
consumed - actual amount computed by the EVM (+ our charges for system contract methods + intrinsic minimum)
used - amount charged caller which is consumed + the 80% tariff for overestimating the gas limit on submitting a transaction
The gas throttle limiting how many contract executions we run per second is done based on the gas limit - because the transaction hasn't run yet. But after the transaction is run and we know how much gas was actually used, we "refund" the excess back to the throttle so that we can accept more work in that period.
This happens in DispatchUsageManager.leakUnusedGas.
And if I'm reading that correctly, it's based on gas used. But since this is a performance limit (on the network) it should be based instead on gas consumed.
Acceptance Criteria
Difference in amount refunded to throttle based on transactions with gas limit, gas consumed, and gas used (based on overestimates of gas limit).
Performance testing showing that after this change you get more contract execution tx/sec accepted and executed even though those contract txs together would hit the 15M throttle based on gas limit, or based on total gas used, but not with total gas consumed.
Dependencies
No response
Definition of Ready (DoR) Checklist
Clear acceptance criteria
Clear and detailed description
Dependencies identified
Links to documentation
Should be completable in 2-3 Days
Initial draft of Low-level design document
At least high level test plan
Groomed/Estimated
Definition of Done (DoD) Checklist
Acceptance Criteria complete
No Codacy issues greater than minor (in new code)
JavaDocs updated/created
Code commented
Unit tests created/updated
80% test code coverage (in new code)
Happy Path and major negative cases in HAPI tests as applicable
The text was updated successfully, but these errors were encountered:
Background
We have two different measures of gas eaten by a contract:
The gas throttle limiting how many contract executions we run per second is done based on the gas limit - because the transaction hasn't run yet. But after the transaction is run and we know how much gas was actually used, we "refund" the excess back to the throttle so that we can accept more work in that period.
This happens in
DispatchUsageManager.leakUnusedGas
.And if I'm reading that correctly, it's based on gas used. But since this is a performance limit (on the network) it should be based instead on gas consumed.
Acceptance Criteria
Dependencies
No response
Definition of Ready (DoR) Checklist
Definition of Done (DoD) Checklist
The text was updated successfully, but these errors were encountered: