-
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=2310-8 548737 20101 ns/op 2310 gas/op 114.9 mgas/s 11616 B/op 224 allocs/op BenchmarkConsortiumValidatorSorting/validator-sort-Gas=9780-8 205410 66083 ns/op 9780 gas/op 148.0 mgas/s 49280 B/op 852 allocs/op BenchmarkConsortiumVerifyHeaders/verify-headers-Gas=21000-8 48445 232612 ns/op 21000 gas/op 90.27 mgas/s 53043 B/op 477 allocs/op BenchmarkConsortiumPickValidatorSet/pick-validator-set-Gas=3540-8 377305 32748 ns/op 3540 gas/op 108.1 mgas/s 19775 B/op 299 allocs/op BenchmarkConsortiumPickValidatorSet/pick-validator-set-Gas=14790-8 113479 129076 ns/op 14790 gas/op 114.6 mgas/s 76689 B/op 1092 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.