-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
precompiled: adjust the gas cost of consortium precompiled contract
This commit adds the benchmarks and calculated gas cost from the benchmarks to validator sorting, pick validator set and verify double sign proof precompiled contracts. Ethereum aims for 30 mgas/s when setting gas cost for precompiled contracts, we aims for 60 mgas/s. Benchmark results: BenchmarkConsortiumValidatorSorting/validator-sort-Gas=4620-8 228014 54940 ns/op 4620 gas/op 84.09 mgas/s 35755 B/op 560 allocs/op BenchmarkConsortiumValidatorSorting/validator-sort-Gas=19560-8 60619 182986 ns/op 19560 gas/op 106.9 mgas/s 148101 B/op 2342 allocs/op BenchmarkConsortiumVerifyHeaders/verify-headers-Gas=24000-8 32920 354968 ns/op 24000 gas/op 67.61 mgas/s 97101 B/op 924 allocs/op BenchmarkConsortiumPickValidatorSet/pick-validator-set-Gas=7080-8 128181 86701 ns/op 7080 gas/op 81.65 mgas/s 50221 B/op 684 allocs/op BenchmarkConsortiumPickValidatorSet/pick-validator-set-Gas=29580-8 53889 244067 ns/op 29580 gas/op 121.2 mgas/s 179618 B/op 2597 allocs/op
- Loading branch information
Showing
4 changed files
with
231 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.