contracts_test.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. // Copyright 2017 The go-ethereum Authors
  2. // This file is part of the go-ethereum library.
  3. //
  4. // The go-ethereum library is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU Lesser General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (at your option) any later version.
  8. //
  9. // The go-ethereum library is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU Lesser General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU Lesser General Public License
  15. // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
  16. package vm
  17. import (
  18. "bytes"
  19. "encoding/json"
  20. "fmt"
  21. "io/ioutil"
  22. "testing"
  23. "time"
  24. "github.com/ethereum/go-ethereum/common"
  25. )
  26. // precompiledTest defines the input/output pairs for precompiled contract tests.
  27. type precompiledTest struct {
  28. Input, Expected string
  29. Gas uint64
  30. Name string
  31. NoBenchmark bool // Benchmark primarily the worst-cases
  32. }
  33. // precompiledFailureTest defines the input/error pairs for precompiled
  34. // contract failure tests.
  35. type precompiledFailureTest struct {
  36. Input string
  37. ExpectedError string
  38. Name string
  39. }
  40. // allPrecompiles does not map to the actual set of precompiles, as it also contains
  41. // repriced versions of precompiles at certain slots
  42. var allPrecompiles = map[common.Address]PrecompiledContract{
  43. common.BytesToAddress([]byte{1}): &ecrecover{},
  44. common.BytesToAddress([]byte{2}): &sha256hash{},
  45. common.BytesToAddress([]byte{3}): &ripemd160hash{},
  46. common.BytesToAddress([]byte{4}): &dataCopy{},
  47. common.BytesToAddress([]byte{5}): &bigModExp{eip2565: false},
  48. common.BytesToAddress([]byte{0xf5}): &bigModExp{eip2565: true},
  49. common.BytesToAddress([]byte{6}): &bn256AddIstanbul{},
  50. common.BytesToAddress([]byte{7}): &bn256ScalarMulIstanbul{},
  51. common.BytesToAddress([]byte{8}): &bn256PairingIstanbul{},
  52. common.BytesToAddress([]byte{9}): &blake2F{},
  53. common.BytesToAddress([]byte{10}): &bls12381G1Add{},
  54. common.BytesToAddress([]byte{11}): &bls12381G1Mul{},
  55. common.BytesToAddress([]byte{12}): &bls12381G1MultiExp{},
  56. common.BytesToAddress([]byte{13}): &bls12381G2Add{},
  57. common.BytesToAddress([]byte{14}): &bls12381G2Mul{},
  58. common.BytesToAddress([]byte{15}): &bls12381G2MultiExp{},
  59. common.BytesToAddress([]byte{16}): &bls12381Pairing{},
  60. common.BytesToAddress([]byte{17}): &bls12381MapG1{},
  61. common.BytesToAddress([]byte{18}): &bls12381MapG2{},
  62. }
  63. // EIP-152 test vectors
  64. var blake2FMalformedInputTests = []precompiledFailureTest{
  65. {
  66. Input: "",
  67. ExpectedError: errBlake2FInvalidInputLength.Error(),
  68. Name: "vector 0: empty input",
  69. },
  70. {
  71. Input: "00000c48c9bdf267e6096a3ba7ca8485ae67bb2bf894fe72f36e3cf1361d5f3af54fa5d182e6ad7f520e511f6c3e2b8c68059b6bbd41fbabd9831f79217e1319cde05b61626300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000001",
  72. ExpectedError: errBlake2FInvalidInputLength.Error(),
  73. Name: "vector 1: less than 213 bytes input",
  74. },
  75. {
  76. Input: "000000000c48c9bdf267e6096a3ba7ca8485ae67bb2bf894fe72f36e3cf1361d5f3af54fa5d182e6ad7f520e511f6c3e2b8c68059b6bbd41fbabd9831f79217e1319cde05b61626300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000001",
  77. ExpectedError: errBlake2FInvalidInputLength.Error(),
  78. Name: "vector 2: more than 213 bytes input",
  79. },
  80. {
  81. Input: "0000000c48c9bdf267e6096a3ba7ca8485ae67bb2bf894fe72f36e3cf1361d5f3af54fa5d182e6ad7f520e511f6c3e2b8c68059b6bbd41fbabd9831f79217e1319cde05b61626300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000002",
  82. ExpectedError: errBlake2FInvalidFinalFlag.Error(),
  83. Name: "vector 3: malformed final block indicator flag",
  84. },
  85. }
  86. func testPrecompiled(addr string, test precompiledTest, t *testing.T) {
  87. p := allPrecompiles[common.HexToAddress(addr)]
  88. in := common.Hex2Bytes(test.Input)
  89. gas := p.RequiredGas(in)
  90. t.Run(fmt.Sprintf("%s-Gas=%d", test.Name, gas), func(t *testing.T) {
  91. if res, _, err := RunPrecompiledContract(p, in, gas); err != nil {
  92. t.Error(err)
  93. } else if common.Bytes2Hex(res) != test.Expected {
  94. t.Errorf("Expected %v, got %v", test.Expected, common.Bytes2Hex(res))
  95. }
  96. if expGas := test.Gas; expGas != gas {
  97. t.Errorf("%v: gas wrong, expected %d, got %d", test.Name, expGas, gas)
  98. }
  99. // Verify that the precompile did not touch the input buffer
  100. exp := common.Hex2Bytes(test.Input)
  101. if !bytes.Equal(in, exp) {
  102. t.Errorf("Precompiled %v modified input data", addr)
  103. }
  104. })
  105. }
  106. func testPrecompiledOOG(addr string, test precompiledTest, t *testing.T) {
  107. p := allPrecompiles[common.HexToAddress(addr)]
  108. in := common.Hex2Bytes(test.Input)
  109. gas := p.RequiredGas(in) - 1
  110. t.Run(fmt.Sprintf("%s-Gas=%d", test.Name, gas), func(t *testing.T) {
  111. _, _, err := RunPrecompiledContract(p, in, gas)
  112. if err.Error() != "out of gas" {
  113. t.Errorf("Expected error [out of gas], got [%v]", err)
  114. }
  115. // Verify that the precompile did not touch the input buffer
  116. exp := common.Hex2Bytes(test.Input)
  117. if !bytes.Equal(in, exp) {
  118. t.Errorf("Precompiled %v modified input data", addr)
  119. }
  120. })
  121. }
  122. func testPrecompiledFailure(addr string, test precompiledFailureTest, t *testing.T) {
  123. p := allPrecompiles[common.HexToAddress(addr)]
  124. in := common.Hex2Bytes(test.Input)
  125. gas := p.RequiredGas(in)
  126. t.Run(test.Name, func(t *testing.T) {
  127. _, _, err := RunPrecompiledContract(p, in, gas)
  128. if err.Error() != test.ExpectedError {
  129. t.Errorf("Expected error [%v], got [%v]", test.ExpectedError, err)
  130. }
  131. // Verify that the precompile did not touch the input buffer
  132. exp := common.Hex2Bytes(test.Input)
  133. if !bytes.Equal(in, exp) {
  134. t.Errorf("Precompiled %v modified input data", addr)
  135. }
  136. })
  137. }
  138. func benchmarkPrecompiled(addr string, test precompiledTest, bench *testing.B) {
  139. if test.NoBenchmark {
  140. return
  141. }
  142. p := allPrecompiles[common.HexToAddress(addr)]
  143. in := common.Hex2Bytes(test.Input)
  144. reqGas := p.RequiredGas(in)
  145. var (
  146. res []byte
  147. err error
  148. data = make([]byte, len(in))
  149. )
  150. bench.Run(fmt.Sprintf("%s-Gas=%d", test.Name, reqGas), func(bench *testing.B) {
  151. bench.ReportAllocs()
  152. start := time.Now()
  153. bench.ResetTimer()
  154. for i := 0; i < bench.N; i++ {
  155. copy(data, in)
  156. res, _, err = RunPrecompiledContract(p, data, reqGas)
  157. }
  158. bench.StopTimer()
  159. elapsed := uint64(time.Since(start))
  160. if elapsed < 1 {
  161. elapsed = 1
  162. }
  163. gasUsed := reqGas * uint64(bench.N)
  164. bench.ReportMetric(float64(reqGas), "gas/op")
  165. // Keep it as uint64, multiply 100 to get two digit float later
  166. mgasps := (100 * 1000 * gasUsed) / elapsed
  167. bench.ReportMetric(float64(mgasps)/100, "mgas/s")
  168. //Check if it is correct
  169. if err != nil {
  170. bench.Error(err)
  171. return
  172. }
  173. if common.Bytes2Hex(res) != test.Expected {
  174. bench.Error(fmt.Sprintf("Expected %v, got %v", test.Expected, common.Bytes2Hex(res)))
  175. return
  176. }
  177. })
  178. }
  179. // Benchmarks the sample inputs from the ECRECOVER precompile.
  180. func BenchmarkPrecompiledEcrecover(bench *testing.B) {
  181. t := precompiledTest{
  182. Input: "38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e000000000000000000000000000000000000000000000000000000000000001b38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e789d1dd423d25f0772d2748d60f7e4b81bb14d086eba8e8e8efb6dcff8a4ae02",
  183. Expected: "000000000000000000000000ceaccac640adf55b2028469bd36ba501f28b699d",
  184. Name: "",
  185. }
  186. benchmarkPrecompiled("01", t, bench)
  187. }
  188. // Benchmarks the sample inputs from the SHA256 precompile.
  189. func BenchmarkPrecompiledSha256(bench *testing.B) {
  190. t := precompiledTest{
  191. Input: "38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e000000000000000000000000000000000000000000000000000000000000001b38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e789d1dd423d25f0772d2748d60f7e4b81bb14d086eba8e8e8efb6dcff8a4ae02",
  192. Expected: "811c7003375852fabd0d362e40e68607a12bdabae61a7d068fe5fdd1dbbf2a5d",
  193. Name: "128",
  194. }
  195. benchmarkPrecompiled("02", t, bench)
  196. }
  197. // Benchmarks the sample inputs from the RIPEMD precompile.
  198. func BenchmarkPrecompiledRipeMD(bench *testing.B) {
  199. t := precompiledTest{
  200. Input: "38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e000000000000000000000000000000000000000000000000000000000000001b38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e789d1dd423d25f0772d2748d60f7e4b81bb14d086eba8e8e8efb6dcff8a4ae02",
  201. Expected: "0000000000000000000000009215b8d9882ff46f0dfde6684d78e831467f65e6",
  202. Name: "128",
  203. }
  204. benchmarkPrecompiled("03", t, bench)
  205. }
  206. // Benchmarks the sample inputs from the identiy precompile.
  207. func BenchmarkPrecompiledIdentity(bench *testing.B) {
  208. t := precompiledTest{
  209. Input: "38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e000000000000000000000000000000000000000000000000000000000000001b38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e789d1dd423d25f0772d2748d60f7e4b81bb14d086eba8e8e8efb6dcff8a4ae02",
  210. Expected: "38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e000000000000000000000000000000000000000000000000000000000000001b38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e789d1dd423d25f0772d2748d60f7e4b81bb14d086eba8e8e8efb6dcff8a4ae02",
  211. Name: "128",
  212. }
  213. benchmarkPrecompiled("04", t, bench)
  214. }
  215. // Tests the sample inputs from the ModExp EIP 198.
  216. func TestPrecompiledModExp(t *testing.T) { testJson("modexp", "05", t) }
  217. func BenchmarkPrecompiledModExp(b *testing.B) { benchJson("modexp", "05", b) }
  218. func TestPrecompiledModExpEip2565(t *testing.T) { testJson("modexp_eip2565", "f5", t) }
  219. func BenchmarkPrecompiledModExpEip2565(b *testing.B) { benchJson("modexp_eip2565", "f5", b) }
  220. // Tests the sample inputs from the elliptic curve addition EIP 213.
  221. func TestPrecompiledBn256Add(t *testing.T) { testJson("bn256Add", "06", t) }
  222. func BenchmarkPrecompiledBn256Add(b *testing.B) { benchJson("bn256Add", "06", b) }
  223. // Tests OOG
  224. func TestPrecompiledModExpOOG(t *testing.T) {
  225. modexpTests, err := loadJson("modexp")
  226. if err != nil {
  227. t.Fatal(err)
  228. }
  229. for _, test := range modexpTests {
  230. testPrecompiledOOG("05", test, t)
  231. }
  232. }
  233. // Tests the sample inputs from the elliptic curve scalar multiplication EIP 213.
  234. func TestPrecompiledBn256ScalarMul(t *testing.T) { testJson("bn256ScalarMul", "07", t) }
  235. func BenchmarkPrecompiledBn256ScalarMul(b *testing.B) { benchJson("bn256ScalarMul", "07", b) }
  236. // Tests the sample inputs from the elliptic curve pairing check EIP 197.
  237. func TestPrecompiledBn256Pairing(t *testing.T) { testJson("bn256Pairing", "08", t) }
  238. func BenchmarkPrecompiledBn256Pairing(b *testing.B) { benchJson("bn256Pairing", "08", b) }
  239. func TestPrecompiledBlake2F(t *testing.T) { testJson("blake2F", "09", t) }
  240. func BenchmarkPrecompiledBlake2F(b *testing.B) { benchJson("blake2F", "09", b) }
  241. func TestPrecompileBlake2FMalformedInput(t *testing.T) {
  242. for _, test := range blake2FMalformedInputTests {
  243. testPrecompiledFailure("09", test, t)
  244. }
  245. }
  246. func TestPrecompiledEcrecover(t *testing.T) { testJson("ecRecover", "01", t) }
  247. func testJson(name, addr string, t *testing.T) {
  248. tests, err := loadJson(name)
  249. if err != nil {
  250. t.Fatal(err)
  251. }
  252. for _, test := range tests {
  253. testPrecompiled(addr, test, t)
  254. }
  255. }
  256. func testJsonFail(name, addr string, t *testing.T) {
  257. tests, err := loadJsonFail(name)
  258. if err != nil {
  259. t.Fatal(err)
  260. }
  261. for _, test := range tests {
  262. testPrecompiledFailure(addr, test, t)
  263. }
  264. }
  265. func benchJson(name, addr string, b *testing.B) {
  266. tests, err := loadJson(name)
  267. if err != nil {
  268. b.Fatal(err)
  269. }
  270. for _, test := range tests {
  271. benchmarkPrecompiled(addr, test, b)
  272. }
  273. }
  274. func TestPrecompiledBLS12381G1Add(t *testing.T) { testJson("blsG1Add", "0a", t) }
  275. func TestPrecompiledBLS12381G1Mul(t *testing.T) { testJson("blsG1Mul", "0b", t) }
  276. func TestPrecompiledBLS12381G1MultiExp(t *testing.T) { testJson("blsG1MultiExp", "0c", t) }
  277. func TestPrecompiledBLS12381G2Add(t *testing.T) { testJson("blsG2Add", "0d", t) }
  278. func TestPrecompiledBLS12381G2Mul(t *testing.T) { testJson("blsG2Mul", "0e", t) }
  279. func TestPrecompiledBLS12381G2MultiExp(t *testing.T) { testJson("blsG2MultiExp", "0f", t) }
  280. func TestPrecompiledBLS12381Pairing(t *testing.T) { testJson("blsPairing", "10", t) }
  281. func TestPrecompiledBLS12381MapG1(t *testing.T) { testJson("blsMapG1", "11", t) }
  282. func TestPrecompiledBLS12381MapG2(t *testing.T) { testJson("blsMapG2", "12", t) }
  283. func BenchmarkPrecompiledBLS12381G1Add(b *testing.B) { benchJson("blsG1Add", "0a", b) }
  284. func BenchmarkPrecompiledBLS12381G1Mul(b *testing.B) { benchJson("blsG1Mul", "0b", b) }
  285. func BenchmarkPrecompiledBLS12381G1MultiExp(b *testing.B) { benchJson("blsG1MultiExp", "0c", b) }
  286. func BenchmarkPrecompiledBLS12381G2Add(b *testing.B) { benchJson("blsG2Add", "0d", b) }
  287. func BenchmarkPrecompiledBLS12381G2Mul(b *testing.B) { benchJson("blsG2Mul", "0e", b) }
  288. func BenchmarkPrecompiledBLS12381G2MultiExp(b *testing.B) { benchJson("blsG2MultiExp", "0f", b) }
  289. func BenchmarkPrecompiledBLS12381Pairing(b *testing.B) { benchJson("blsPairing", "10", b) }
  290. func BenchmarkPrecompiledBLS12381MapG1(b *testing.B) { benchJson("blsMapG1", "11", b) }
  291. func BenchmarkPrecompiledBLS12381MapG2(b *testing.B) { benchJson("blsMapG2", "12", b) }
  292. // Failure tests
  293. func TestPrecompiledBLS12381G1AddFail(t *testing.T) { testJsonFail("blsG1Add", "0a", t) }
  294. func TestPrecompiledBLS12381G1MulFail(t *testing.T) { testJsonFail("blsG1Mul", "0b", t) }
  295. func TestPrecompiledBLS12381G1MultiExpFail(t *testing.T) { testJsonFail("blsG1MultiExp", "0c", t) }
  296. func TestPrecompiledBLS12381G2AddFail(t *testing.T) { testJsonFail("blsG2Add", "0d", t) }
  297. func TestPrecompiledBLS12381G2MulFail(t *testing.T) { testJsonFail("blsG2Mul", "0e", t) }
  298. func TestPrecompiledBLS12381G2MultiExpFail(t *testing.T) { testJsonFail("blsG2MultiExp", "0f", t) }
  299. func TestPrecompiledBLS12381PairingFail(t *testing.T) { testJsonFail("blsPairing", "10", t) }
  300. func TestPrecompiledBLS12381MapG1Fail(t *testing.T) { testJsonFail("blsMapG1", "11", t) }
  301. func TestPrecompiledBLS12381MapG2Fail(t *testing.T) { testJsonFail("blsMapG2", "12", t) }
  302. func loadJson(name string) ([]precompiledTest, error) {
  303. data, err := ioutil.ReadFile(fmt.Sprintf("testdata/precompiles/%v.json", name))
  304. if err != nil {
  305. return nil, err
  306. }
  307. var testcases []precompiledTest
  308. err = json.Unmarshal(data, &testcases)
  309. return testcases, err
  310. }
  311. func loadJsonFail(name string) ([]precompiledFailureTest, error) {
  312. data, err := ioutil.ReadFile(fmt.Sprintf("testdata/precompiles/fail-%v.json", name))
  313. if err != nil {
  314. return nil, err
  315. }
  316. var testcases []precompiledFailureTest
  317. err = json.Unmarshal(data, &testcases)
  318. return testcases, err
  319. }
  320. // BenchmarkPrecompiledBLS12381G1MultiExpWorstCase benchmarks the worst case we could find that still fits a gaslimit of 10MGas.
  321. func BenchmarkPrecompiledBLS12381G1MultiExpWorstCase(b *testing.B) {
  322. task := "0000000000000000000000000000000008d8c4a16fb9d8800cce987c0eadbb6b3b005c213d44ecb5adeed713bae79d606041406df26169c35df63cf972c94be1" +
  323. "0000000000000000000000000000000011bc8afe71676e6730702a46ef817060249cd06cd82e6981085012ff6d013aa4470ba3a2c71e13ef653e1e223d1ccfe9" +
  324. "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
  325. input := task
  326. for i := 0; i < 4787; i++ {
  327. input = input + task
  328. }
  329. testcase := precompiledTest{
  330. Input: input,
  331. Expected: "0000000000000000000000000000000005a6310ea6f2a598023ae48819afc292b4dfcb40aabad24a0c2cb6c19769465691859eeb2a764342a810c5038d700f18000000000000000000000000000000001268ac944437d15923dc0aec00daa9250252e43e4b35ec7a19d01f0d6cd27f6e139d80dae16ba1c79cc7f57055a93ff5",
  332. Name: "WorstCaseG1",
  333. NoBenchmark: false,
  334. }
  335. benchmarkPrecompiled("0c", testcase, b)
  336. }
  337. // BenchmarkPrecompiledBLS12381G2MultiExpWorstCase benchmarks the worst case we could find that still fits a gaslimit of 10MGas.
  338. func BenchmarkPrecompiledBLS12381G2MultiExpWorstCase(b *testing.B) {
  339. task := "000000000000000000000000000000000d4f09acd5f362e0a516d4c13c5e2f504d9bd49fdfb6d8b7a7ab35a02c391c8112b03270d5d9eefe9b659dd27601d18f" +
  340. "000000000000000000000000000000000fd489cb75945f3b5ebb1c0e326d59602934c8f78fe9294a8877e7aeb95de5addde0cb7ab53674df8b2cfbb036b30b99" +
  341. "00000000000000000000000000000000055dbc4eca768714e098bbe9c71cf54b40f51c26e95808ee79225a87fb6fa1415178db47f02d856fea56a752d185f86b" +
  342. "000000000000000000000000000000001239b7640f416eb6e921fe47f7501d504fadc190d9cf4e89ae2b717276739a2f4ee9f637c35e23c480df029fd8d247c7" +
  343. "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
  344. input := task
  345. for i := 0; i < 1040; i++ {
  346. input = input + task
  347. }
  348. testcase := precompiledTest{
  349. Input: input,
  350. Expected: "0000000000000000000000000000000018f5ea0c8b086095cfe23f6bb1d90d45de929292006dba8cdedd6d3203af3c6bbfd592e93ecb2b2c81004961fdcbb46c00000000000000000000000000000000076873199175664f1b6493a43c02234f49dc66f077d3007823e0343ad92e30bd7dc209013435ca9f197aca44d88e9dac000000000000000000000000000000000e6f07f4b23b511eac1e2682a0fc224c15d80e122a3e222d00a41fab15eba645a700b9ae84f331ae4ed873678e2e6c9b000000000000000000000000000000000bcb4849e460612aaed79617255fd30c03f51cf03d2ed4163ca810c13e1954b1e8663157b957a601829bb272a4e6c7b8",
  351. Name: "WorstCaseG2",
  352. NoBenchmark: false,
  353. }
  354. benchmarkPrecompiled("0f", testcase, b)
  355. }