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yschulte
garyschulte / gist:1cf488a6d270e5d7ea20aa3ce1ab3a3b
Created October 20, 2025 18:18
workaround mining configuration. stashing here
/*
* Copyright contributors to Hyperledger Besu.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
@garyschulte
garyschulte / gist:a91282e98349ce1cba60a7d9aa8f1e88
Created July 10, 2025 14:53
generate r1 ecrecover test cases
/*
* Copyright Hyperledger Besu contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
curl --location 'http://localhost:8545' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": [
"0x263701006ce07d22ba36fed4cee0bea5e4ce96ae71ae4027b3148129263a85dd"
],
"id": 1
}' |jq
@garyschulte
garyschulte / gist:e3d44ba57d90e3b95756f5066aab1d15
Created December 12, 2024 20:57
besu g1/g2 MSM perf, with Pawel's curve, straight mul/add loop for pair count <=2, pippengers for higher pair count
NUC 13 Intel i5-1340P
bls12381bench git:(bls-bench) ✗ GETH_EVM=./besu_wrapper.sh ./benchmark_g1msm.sh ; GETH_EVM=./besu_wrapper.sh ./benchmark_g2msm.sh
benchmarking g1msm
1 pairs: 109 mgas/sec
2 pairs: 105 mgas/sec
3 pairs: 94 mgas/sec
4 pairs: 96 mgas/sec
5 pairs: 94 mgas/sec
6 pairs: 95 mgas/sec
@garyschulte
garyschulte / gist:33deb7465640b08f39e3c8b77f797755
Last active December 12, 2024 20:57
g1/g2 msm besu perf with Pawel's curve, parallel pippengers algo, mul @ 22.5k
NUC 13 Intel i5-1340P
bls12381bench git:(bls-bench) ✗ GETH_EVM=./besu_wrapper.sh ./benchmark_g1msm.sh ; GETH_EVM=./besu_wrapper.sh ./benchmark_g2msm.sh
benchmarking g1msm
1 pairs: 52 mgas/sec
2 pairs: 78 mgas/sec
3 pairs: 93 mgas/sec
4 pairs: 99 mgas/sec
5 pairs: 99 mgas/sec
6 pairs: 92 mgas/sec
@garyschulte
garyschulte / gist:ba828407b166dc1efa23aef5887c9078
Last active December 9, 2024 21:16
Besu MSM benchmarks uncapped task limit
Benchmark machine NUC 13 Intel i5-1340P
using jwasinger https://github.com/jwasinger/goevmlab.git
commit 723c3aebf0ee91d508a9e60debe4ebbcb26e3000 (HEAD -> bls-bench, jwasinger/bls-bench)
➜ bls12381bench git:(bls-bench) ✗ GETH_EVM=./besu_wrapper.sh ./benchmark_g1msm.sh ; GETH_EVM=./besu_wrapper.sh ./benchmark_g2msm.sh
benchmarking g1msm
1 pairs: 107 mgas/sec
2 pairs: 73 mgas/sec
3 pairs: 97 mgas/sec
@garyschulte
garyschulte / gist:7de012b3caf1ac72a3e9cfcd90943e6d
Last active December 9, 2024 21:16
Besu MSM benchmarks task limit set to 1
Benchmark machine NUC 13 Intel i5-1340P
using jwasinger https://github.com/jwasinger/goevmlab.git
commit 723c3aebf0ee91d508a9e60debe4ebbcb26e3000 (HEAD -> bls-bench, jwasinger/bls-bench)
➜ bls12381bench git:(bls-bench) ✗ GETH_EVM=./besu_wrapper.sh ./benchmark_g1msm.sh ; GETH_EVM=./besu_wrapper.sh ./benchmark_g2msm.sh
benchmarking g1msm
1 pairs: 61 mgas/sec
2 pairs: 49 mgas/sec
3 pairs: 68 mgas/sec
Using BLS gas costs from:
https://github.com/ethereum/EIPs/pull/9097/files
https://github.com/ethereum/EIPs/pull/9098/files
Benchmark machine is NUC 13, 13th Gen Intel i5-1340P
Benchmarks for EcRecover
ecrecover 3,000 gas @ 39.7 µs / 75.6 MGps
ecrecover 3,000 gas @ 36.1 µs / 83.1 MGps
ecrecover 3,000 gas @ 36.2 µs / 82.9 MGps
@garyschulte
garyschulte / gist:38ba756f6bec1dc67a54d8f28049a16d
Created October 13, 2023 16:56
snap sync fail with sorted map
Genesis: {
"config": {
"ethash": {},
"chainID": 19763,
"homesteadBlock": 0,
"eip150Block": 0,
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0
},