Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cl/phase1/core/state/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

// Curr: 4358340
func BenchmarkStateRootNonCached(b *testing.B) {
for i := 0; i < b.N; i++ {
for b.Loop() {
base := state.New(&clparams.MainnetBeaconConfig)
base.HashSSZ()
}
Expand All @@ -36,7 +36,7 @@ func BenchmarkStateRootNonCached(b *testing.B) {
func BenchmarkStateRootCached(b *testing.B) {
// Re-use same fields
base := state.New(&clparams.MainnetBeaconConfig)
for i := 0; i < b.N; i++ {
for b.Loop() {
base.HashSSZ()
}
}
13 changes: 6 additions & 7 deletions cl/phase1/core/state/shuffling/shuffling_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@
_ "embed"
"testing"

"github.com/stretchr/testify/require"

"github.com/erigontech/erigon-lib/common/eth2shuffle"

Check failure on line 23 in cl/phase1/core/state/shuffling/shuffling_test.go

View workflow job for this annotation

GitHub Actions / win (windows-2025)

no required module provides package github.com/erigontech/erigon-lib/common/eth2shuffle; to add it:

Check failure on line 23 in cl/phase1/core/state/shuffling/shuffling_test.go

View workflow job for this annotation

GitHub Actions / linux (macos-latest)

no required module provides package github.com/erigontech/erigon-lib/common/eth2shuffle; to add it:

Check failure on line 23 in cl/phase1/core/state/shuffling/shuffling_test.go

View workflow job for this annotation

GitHub Actions / tests-windows (windows-2025)

no required module provides package github.com/erigontech/erigon-lib/common/eth2shuffle; to add it:

Check failure on line 23 in cl/phase1/core/state/shuffling/shuffling_test.go

View workflow job for this annotation

GitHub Actions / tests-mac-linux (macos-15)

no required module provides package github.com/erigontech/erigon-lib/common/eth2shuffle; to add it:
"github.com/erigontech/erigon/cl/clparams"
"github.com/erigontech/erigon/cl/phase1/core/state"
"github.com/erigontech/erigon/cl/phase1/core/state/raw"
"github.com/erigontech/erigon/cl/phase1/core/state/shuffling"
"github.com/erigontech/erigon/cl/utils"
"github.com/erigontech/erigon/cl/utils/eth2shuffle"
"github.com/stretchr/testify/require"
)

func BenchmarkLambdaShuffledIndex(b *testing.B) {
Expand All @@ -37,8 +36,8 @@
return hashed[:]
}
seed := [32]byte{2, 35, 6}
b.ResetTimer()
for i := 0; i < b.N; i++ {

for b.Loop() {
eth2shuffle.PermuteIndex(eth2ShuffleHash, uint8(clparams.MainnetBeaconConfig.ShuffleRoundCount), 10, 1000, seed)
}
}
Expand All @@ -50,8 +49,8 @@

seed := [32]byte{2, 35, 6}
preInputs := shuffling.ComputeShuffledIndexPreInputs(s.BeaconConfig(), seed)
b.ResetTimer()
for i := 0; i < b.N; i++ {

for b.Loop() {
shuffling.ComputeShuffledIndex(s.BeaconConfig(), 10, 1000, seed, preInputs, keccakOptimized)
}
}
Expand Down
4 changes: 2 additions & 2 deletions cl/utils/bls/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func BenchmarkAggregateSigCached(b *testing.B) {
bls.LoadPublicKeyIntoCache(convertHexToPublicKey("b301803f8b5ac4a1133581fc676dfedc60d891dd5fa99028805e5ea5b08d3491af75d0707adab3b70c6a6a580217bf81"), false)
bls.LoadPublicKeyIntoCache(convertHexToPublicKey("b53d21a4cfd562c469cc81514d4ce5a6b577d8403d32a394dc265dd190b47fa9f829fdd7963afdf972e5e77854051f6f"), false)

for i := 0; i < b.N; i++ {
for b.Loop() {
bls.VerifyAggregate(
convertHexToSignature("9712c3edd73a209c742b8250759db12549b3eaf43b5ca61376d9f30e2747dbcf842d8b2ac0901d2a093713e20284a7670fcf6954e9ab93de991bb9b313e664785a075fc285806fa5224c82bde146561b446ccfc706a64b8579513cfc4ff1d930"),
convertHexToMessage("abababababababababababababababababababababababababababababababab"),
Expand Down Expand Up @@ -66,7 +66,7 @@ PASS
*/
func BenchmarkAggregateSigNonCached(b *testing.B) {
bls.SetEnabledCaching(false)
for i := 0; i < b.N; i++ {
for b.Loop() {
bls.VerifyAggregate(
convertHexToSignature("9712c3edd73a209c742b8250759db12549b3eaf43b5ca61376d9f30e2747dbcf842d8b2ac0901d2a093713e20284a7670fcf6954e9ab93de991bb9b313e664785a075fc285806fa5224c82bde146561b446ccfc706a64b8579513cfc4ff1d930"),
convertHexToMessage("abababababababababababababababababababababababababababababababab"),
Expand Down
Loading