-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double-check our gas prices #1008
Comments
I think we should construct a basic benchmark (store reads/writes/iteration, expensive cryptographic operations), run it on a node-representative VM (midrange dedicated server?), and use the result of the benchmark to choose gas prices, adding in an extra cost for storage writes due to the persistent disk space requirement. This should provide a reasonable-enough initial configuration, which governance can vote to change later as necessary with |
Typical node: MacBook 13 inch latest gen. Run on multiple hardware setups, average somehow. Make sure benchmark is easily extensible. Benchmark should include overlapping execution, best-fit the results. |
Also see #1013 (comment), I wonder if we need a scratch space / storage space separation a la memory / storage in the EVM. |
We need to do a bit more rigorous of an analysis, but from plain benchmarks it seems that the only things that show up as significant amounts of time in block production are Golevel DB compaction, the way we do Reverse Iterators, and governance slashing for proposals. (Signature verification would also show up) My current thought is that for launch we can just have a constant gas then based on signatures, and then just make the deposit for governance proposals very large. We should still set all the relevant gas parameters so that they can be changed via governance though. We still need to improve the simulation time metrics a bit, and do a bit more benchmarking (i.e. several orders of magnitude larger block heights, less frequent gov proposals), but I do feel relatively safe with the above for launch. |
Per #2286 we probably should charge alot of gas for iterators. (Unless we get around to speeding that up prelaunch) My view atm is: proper gas for signatures, proper gas for iterator creation (e.g. nlogn on dirtyItems size), [significant] gas for submitProposal. |
I propose that we benchmark computation with With 1 gas = .1 ns, only using 52 bits of the 63 bits allocated for gas, we can already account for over computation thats greater than 24 hours. I don't think setting gas below |
@ValarDragon What needs to be done here? |
|
These still need to be in the params store. |
Related to #3248 |
Ref #3541 |
Note that we want to include this in 0.34, as we should increase the gas limit. Maybe along with that we should add a few more benchmarks. |
Hopefully the gas prices are reasonable, given that the network is live. :) |
Wait, unless I missed something we definitely didn't benchmark all the things we charge gas for and equalize them with time taken on some standard hardware. |
I think the transaction-associated compute costs pale in comparison to the cost of writing & storing data (it would still be useful to benchmark though, sure). |
Have we done this? I'm not convinced our gas prices have really been stress-tested. |
I also don't think that they are normalized. (1 unit of CPU time = x gas) |
Figure out a moderately coherent strategy for pricing compute & storage operations, answering the following questions:
GasKVStore
/ crypto wrapper functions (is that enough)?Put all gas prices in governance-controlled parameters.
Write this up in a spec doc (=> "Core SDK" spec doc).
The text was updated successfully, but these errors were encountered: