Can someone explain to me this subjective cpu billing thing, the PR description isn't making sense to me and from the commits, it looks like there was a 10% check on the CPU being added to ensure that the trx was at least within the realm of making it into the block if it takes a little longer to process on the block producing node, but now it uses this subjective leeway to determine that assertion. How does it accumulate and why is this a better solution than the 10%?


1 Answer 1

--subjective-cpu-leeway-us arg (=31000)
Time in microseconds allowed for a 
transaction that starts with 
insufficient CPU quota to complete and 
cover its CPU usage.

This seems like the best explanation from the ol' reliable nodeos -h.

So to me this sounds like a static amount of CPU leeway that is given to a user who on the node passing the trx did not have enough CPU, but perhaps the supercharged block producing node that gets the trx is much more CPU efficient and can process the trx within that users remaining CPU time.

So to me, this is a nice option to ensure that just about all eligible trxs can be accepted and not turned away if an API node just doesn't feel the need to pay for the most efficient CPU.

So a step in the right direction from an across the board 10% check to this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.