Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: v1.27.1 release #7493

Merged
merged 3 commits into from
Feb 24, 2025
Merged

chore: v1.27.1 release #7493

merged 3 commits into from
Feb 24, 2025

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Feb 24, 2025

Supersedes #7492. This release fixes bug found on Gnosis via #7478 and also includes Chiado fork params via #7489

nflaig and others added 3 commits February 24, 2025 14:58
…() (#7478)

**Motivation**

- got this issue in Gnosis

Tested this but on first consolidation same target and source validator
it apparently worked fine. However, the erigon-lodestar validator node
that proposed the consolidation request transaction rejected all peers
and forked. It is stuck on this slot:
[link](http://45.79.201.144:8083/slot/68121)


Lodestar shows these errors:
```
Feb-17 07:11:09.621[chain]           debug: Block error slot=68121, code=BLOCK_ERROR_INVALID_STATE_ROOT, slot=68121, root=0xb8362da32e9ba60bb4e76aa3dae3cf3722404f97be7d674a1ba2d61140bae2f0, expectedRoot=0xb3e18d8a01cb01ac43a0e2fc4d11f6f9298d74ed51ed8520f0597001e4499516
Error: BLOCK_ERROR_INVALID_STATE_ROOT
    at verifyBlocksStateTransitionOnly (file:///usr/app/packages/beacon-node/src/chain/blocks/verifyBlocksStateTransitionOnly.ts:71:13)
    at BeaconChain.verifyBlocksInEpoch (file:///usr/app/packages/beacon-node/src/chain/blocks/verifyBlock.ts:114:7)
    at BeaconChain.processBlocks (file:///usr/app/packages/beacon-node/src/chain/blocks/index.ts:74:7)
    at JobItemQueue.runJob (file:///usr/app/packages/beacon-node/src/util/queue/itemQueue.ts:102:22)
Feb-17 07:11:09.622[sync]          verbose: Batch process error id=Finalized, startEpoch=4257, status=Processing, code=BLOCK_ERROR_INVALID_STATE_ROOT, slot=68121, root=0xb8362da32e9ba60bb4e76aa3dae3cf3722404f97be7d674a1ba2d61140bae2f0, expectedRoot=0xb3e18d8a01cb01ac43a0e2fc4d11f6f9298d74ed51ed8520f0597001e4499516
Error: BLOCK_ERROR_INVALID_STATE_ROOT
    at verifyBlocksStateTransitionOnly (file:///usr/app/packages/beacon-node/src/chain/blocks/verifyBlocksStateTransitionOnly.ts:71:13)
    at BeaconChain.verifyBlocksInEpoch (file:///usr/app/packages/beacon-node/src/chain/blocks/verifyBlock.ts:114:7)
    at BeaconChain.processBlocks (file:///usr/app/packages/beacon-node/src/chain/blocks/index.ts:74:7)
    at JobItemQueue.runJob (file:///usr/app/packages/beacon-node/src/util/queue/itemQueue.ts:102:22)
```

The rest of the nodes are working the fine, even nethermind-lodestar,
and the validator seems to have updated to 0x02 withdrawal credentials
type. [link](http://45.79.201.144:8083/validator/2000)

closes #7487

**Description**

- although it's not proved to fix the issue, we should ensure we always
create a new `withdrawalCredentials` by enforcing the use of
`Uint8Array.slice()`, just in case backed data is a Buffer
- the similar "Invalid state root" was found in the past due to this
code place, as noted in the comment
- this pattern was used in a lot of places anyway

**Update**
just found this

```typescript
describe("Buffer", () => {
  it("slice", () => {
    const buffer = Buffer.alloc(32, 1);
    const sliced = Uint8Array.prototype.slice.call(buffer, 0, buffer.length);
    sliced[0] = 2;
    expect(sliced[0]).toBe(2);
    expect(buffer[0]).toBe(1);
    expect(sliced instanceof Buffer).toBe(false);
  });
});
```

```
- Expected
+ Received

- false
+ true
```

even we used this pattern a lot `Uint8Array.prototype.slice.call` in ssz
to deserialize state it still return a Buffer
when we deserialize state from leveldb, the state bytes there is really
the Buffer
that's one possibilities how this issue happened


**Conclusion**

The state root mismatch happens because the proposer calls
`stateTransition` twice for the same block, first time when
[computeNewStateRoot](https://github.com/ChainSafe/lodestar/blob/9a2cf748d3a2d63180fdfca6a948731e976b75d8/packages/beacon-node/src/chain/chain.ts#L726)
is called and second time when processing / importing the block when it
is publishing.

Based on these observations it seems like the condition is that
- lodestar needs to be proposer of block
- the block needs to contain consolidation request switching validator
to compounding
- the validator being switched needs to be part of state that was loaded
from the db / genesis ssz file

Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com>
@nflaig nflaig requested a review from a team as a code owner February 24, 2025 15:02
Copy link

codecov bot commented Feb 24, 2025

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 50.44%. Comparing base (11be432) to head (59484f0).
Report is 4 commits behind head on stable.

Additional details and impacted files
@@            Coverage Diff             @@
##           stable    #7493      +/-   ##
==========================================
- Coverage   50.51%   50.44%   -0.07%     
==========================================
  Files         602      602              
  Lines       40583    40587       +4     
  Branches     2229     2227       -2     
==========================================
- Hits        20500    20474      -26     
- Misses      20044    20073      +29     
- Partials       39       40       +1     

Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 550aca2 Previous: null Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 975.79 us/op
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 36.283 us/op
BLS verify - blst 884.76 us/op
BLS verifyMultipleSignatures 3 - blst 1.2291 ms/op
BLS verifyMultipleSignatures 8 - blst 1.6797 ms/op
BLS verifyMultipleSignatures 32 - blst 5.0120 ms/op
BLS verifyMultipleSignatures 64 - blst 9.8846 ms/op
BLS verifyMultipleSignatures 128 - blst 17.842 ms/op
BLS deserializing 10000 signatures 706.34 ms/op
BLS deserializing 100000 signatures 7.2344 s/op
BLS verifyMultipleSignatures - same message - 3 - blst 933.34 us/op
BLS verifyMultipleSignatures - same message - 8 - blst 1.1032 ms/op
BLS verifyMultipleSignatures - same message - 32 - blst 1.7947 ms/op
BLS verifyMultipleSignatures - same message - 64 - blst 2.6908 ms/op
BLS verifyMultipleSignatures - same message - 128 - blst 4.5372 ms/op
BLS aggregatePubkeys 32 - blst 20.477 us/op
BLS aggregatePubkeys 128 - blst 74.658 us/op
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 72.704 ms/op
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 57.442 ms/op
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 40.088 ms/op
getSlashingsAndExits - default max 84.851 us/op
getSlashingsAndExits - 2k 442.69 us/op
proposeBlockBody type=full, size=empty 6.9504 ms/op
isKnown best case - 1 super set check 272.00 ns/op
isKnown normal case - 2 super set checks 229.00 ns/op
isKnown worse case - 16 super set checks 226.00 ns/op
InMemoryCheckpointStateCache - add get delete 2.6560 us/op
validate api signedAggregateAndProof - struct 1.7276 ms/op
validate gossip signedAggregateAndProof - struct 1.8655 ms/op
batch validate gossip attestation - vc 640000 - chunk 32 143.39 us/op
batch validate gossip attestation - vc 640000 - chunk 64 135.45 us/op
batch validate gossip attestation - vc 640000 - chunk 128 129.41 us/op
batch validate gossip attestation - vc 640000 - chunk 256 128.15 us/op
pickEth1Vote - no votes 1.3113 ms/op
pickEth1Vote - max votes 10.890 ms/op
pickEth1Vote - Eth1Data hashTreeRoot value x2048 20.550 ms/op
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 27.011 ms/op
pickEth1Vote - Eth1Data fastSerialize value x2048 486.65 us/op
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.9489 ms/op
bytes32 toHexString 391.00 ns/op
bytes32 Buffer.toString(hex) 267.00 ns/op
bytes32 Buffer.toString(hex) from Uint8Array 493.00 ns/op
bytes32 Buffer.toString(hex) + 0x 346.00 ns/op
Object access 1 prop 0.12800 ns/op
Map access 1 prop 0.15400 ns/op
Object get x1000 6.6480 ns/op
Map get x1000 6.9140 ns/op
Object set x1000 41.939 ns/op
Map set x1000 32.767 ns/op
Return object 10000 times 0.38020 ns/op
Throw Error 10000 times 5.7372 us/op
toHex 217.64 ns/op
Buffer.from 201.63 ns/op
shared Buffer 96.099 ns/op
fastMsgIdFn sha256 / 200 bytes 2.7390 us/op
fastMsgIdFn h32 xxhash / 200 bytes 214.00 ns/op
fastMsgIdFn h64 xxhash / 200 bytes 284.00 ns/op
fastMsgIdFn sha256 / 1000 bytes 7.9810 us/op
fastMsgIdFn h32 xxhash / 1000 bytes 353.00 ns/op
fastMsgIdFn h64 xxhash / 1000 bytes 356.00 ns/op
fastMsgIdFn sha256 / 10000 bytes 69.731 us/op
fastMsgIdFn h32 xxhash / 10000 bytes 2.1340 us/op
fastMsgIdFn h64 xxhash / 10000 bytes 1.3420 us/op
send data - 1000 256B messages 19.681 ms/op
send data - 1000 512B messages 31.704 ms/op
send data - 1000 1024B messages 34.301 ms/op
send data - 1000 1200B messages 36.207 ms/op
send data - 1000 2048B messages 37.150 ms/op
send data - 1000 4096B messages 42.798 ms/op
send data - 1000 16384B messages 68.962 ms/op
send data - 1000 65536B messages 358.85 ms/op
enrSubnets - fastDeserialize 64 bits 1.2970 us/op
enrSubnets - ssz BitVector 64 bits 366.00 ns/op
enrSubnets - fastDeserialize 4 bits 142.00 ns/op
enrSubnets - ssz BitVector 4 bits 373.00 ns/op
prioritizePeers score -10:0 att 32-0.1 sync 2-0 143.32 us/op
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 159.85 us/op
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 228.97 us/op
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 422.88 us/op
prioritizePeers score 0:0 att 64-1 sync 4-1 685.27 us/op
array of 16000 items push then shift 1.8126 us/op
LinkedList of 16000 items push then shift 9.4960 ns/op
array of 16000 items push then pop 101.58 ns/op
LinkedList of 16000 items push then pop 11.394 ns/op
array of 24000 items push then shift 2.7934 us/op
LinkedList of 24000 items push then shift 15.517 ns/op
array of 24000 items push then pop 131.58 ns/op
LinkedList of 24000 items push then pop 9.1990 ns/op
intersect bitArray bitLen 8 7.0220 ns/op
intersect array and set length 8 42.533 ns/op
intersect bitArray bitLen 128 33.152 ns/op
intersect array and set length 128 838.71 ns/op
bitArray.getTrueBitIndexes() bitLen 128 1.4290 us/op
bitArray.getTrueBitIndexes() bitLen 248 2.6170 us/op
bitArray.getTrueBitIndexes() bitLen 512 6.3100 us/op
Buffer.concat 32 items 914.00 ns/op
Uint8Array.set 32 items 2.2700 us/op
Buffer.copy 3.4830 us/op
Uint8Array.set - with subarray 3.2120 us/op
Uint8Array.set - without subarray 2.1310 us/op
getUint32 - dataview 287.00 ns/op
getUint32 - manual 134.00 ns/op
Set add up to 64 items then delete first 3.2637 us/op
OrderedSet add up to 64 items then delete first 4.6596 us/op
Set add up to 64 items then delete last 3.4295 us/op
OrderedSet add up to 64 items then delete last 5.6802 us/op
Set add up to 64 items then delete middle 3.5453 us/op
OrderedSet add up to 64 items then delete middle 8.2879 us/op
Set add up to 128 items then delete first 6.9004 us/op
OrderedSet add up to 128 items then delete first 11.015 us/op
Set add up to 128 items then delete last 6.9055 us/op
OrderedSet add up to 128 items then delete last 10.875 us/op
Set add up to 128 items then delete middle 7.4925 us/op
OrderedSet add up to 128 items then delete middle 20.558 us/op
Set add up to 256 items then delete first 14.087 us/op
OrderedSet add up to 256 items then delete first 21.744 us/op
Set add up to 256 items then delete last 14.880 us/op
OrderedSet add up to 256 items then delete last 22.315 us/op
Set add up to 256 items then delete middle 13.616 us/op
OrderedSet add up to 256 items then delete middle 51.141 us/op
transfer serialized Status (84 B) 3.2790 us/op
copy serialized Status (84 B) 2.2690 us/op
transfer serialized SignedVoluntaryExit (112 B) 3.4530 us/op
copy serialized SignedVoluntaryExit (112 B) 2.5870 us/op
transfer serialized ProposerSlashing (416 B) 3.8560 us/op
copy serialized ProposerSlashing (416 B) 3.2090 us/op
transfer serialized Attestation (485 B) 4.9780 us/op
copy serialized Attestation (485 B) 3.3780 us/op
transfer serialized AttesterSlashing (33232 B) 4.0200 us/op
copy serialized AttesterSlashing (33232 B) 6.5710 us/op
transfer serialized Small SignedBeaconBlock (128000 B) 4.2050 us/op
copy serialized Small SignedBeaconBlock (128000 B) 47.392 us/op
transfer serialized Avg SignedBeaconBlock (200000 B) 4.9750 us/op
copy serialized Avg SignedBeaconBlock (200000 B) 26.396 us/op
transfer serialized BlobsSidecar (524380 B) 5.3500 us/op
copy serialized BlobsSidecar (524380 B) 78.184 us/op
transfer serialized Big SignedBeaconBlock (1000000 B) 5.7130 us/op
copy serialized Big SignedBeaconBlock (1000000 B) 195.13 us/op
pass gossip attestations to forkchoice per slot 3.0938 ms/op
forkChoice updateHead vc 100000 bc 64 eq 0 487.90 us/op
forkChoice updateHead vc 600000 bc 64 eq 0 3.7090 ms/op
forkChoice updateHead vc 1000000 bc 64 eq 0 8.1912 ms/op
forkChoice updateHead vc 600000 bc 320 eq 0 3.2921 ms/op
forkChoice updateHead vc 600000 bc 1200 eq 0 3.3536 ms/op
forkChoice updateHead vc 600000 bc 7200 eq 0 4.0312 ms/op
forkChoice updateHead vc 600000 bc 64 eq 1000 11.213 ms/op
forkChoice updateHead vc 600000 bc 64 eq 10000 11.206 ms/op
forkChoice updateHead vc 600000 bc 64 eq 300000 17.928 ms/op
computeDeltas 500000 validators 300 proto nodes 4.4372 ms/op
computeDeltas 500000 validators 1200 proto nodes 4.2835 ms/op
computeDeltas 500000 validators 7200 proto nodes 4.2632 ms/op
computeDeltas 750000 validators 300 proto nodes 6.1877 ms/op
computeDeltas 750000 validators 1200 proto nodes 6.1889 ms/op
computeDeltas 750000 validators 7200 proto nodes 6.1175 ms/op
computeDeltas 1400000 validators 300 proto nodes 11.847 ms/op
computeDeltas 1400000 validators 1200 proto nodes 11.623 ms/op
computeDeltas 1400000 validators 7200 proto nodes 12.579 ms/op
computeDeltas 2100000 validators 300 proto nodes 20.913 ms/op
computeDeltas 2100000 validators 1200 proto nodes 19.097 ms/op
computeDeltas 2100000 validators 7200 proto nodes 19.066 ms/op
altair processAttestation - 250000 vs - 7PWei normalcase 2.9732 ms/op
altair processAttestation - 250000 vs - 7PWei worstcase 4.3161 ms/op
altair processAttestation - setStatus - 1/6 committees join 181.92 us/op
altair processAttestation - setStatus - 1/3 committees join 296.21 us/op
altair processAttestation - setStatus - 1/2 committees join 373.12 us/op
altair processAttestation - setStatus - 2/3 committees join 473.74 us/op
altair processAttestation - setStatus - 4/5 committees join 676.57 us/op
altair processAttestation - setStatus - 100% committees join 801.50 us/op
altair processBlock - 250000 vs - 7PWei normalcase 5.2648 ms/op
altair processBlock - 250000 vs - 7PWei normalcase hashState 39.930 ms/op
altair processBlock - 250000 vs - 7PWei worstcase 42.179 ms/op
altair processBlock - 250000 vs - 7PWei worstcase hashState 102.84 ms/op
phase0 processBlock - 250000 vs - 7PWei normalcase 2.3574 ms/op
phase0 processBlock - 250000 vs - 7PWei worstcase 27.392 ms/op
altair processEth1Data - 250000 vs - 7PWei normalcase 421.22 us/op
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.1510 us/op
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 37.793 us/op
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 10.609 us/op
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 8.2430 us/op
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 162.86 us/op
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.0347 ms/op
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.4312 ms/op
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.4413 ms/op
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.9351 ms/op
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.5286 ms/op
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.1175 ms/op
Tree 40 250000 create 652.65 ms/op
Tree 40 250000 get(125000) 153.90 ns/op
Tree 40 250000 set(125000) 2.5178 us/op
Tree 40 250000 toArray() 26.973 ms/op
Tree 40 250000 iterate all - toArray() + loop 23.377 ms/op
Tree 40 250000 iterate all - get(i) 66.216 ms/op
Array 250000 create 2.9457 ms/op
Array 250000 clone - spread 2.2115 ms/op
Array 250000 get(125000) 0.44800 ns/op
Array 250000 set(125000) 0.48700 ns/op
Array 250000 iterate all - loop 120.20 us/op
phase0 afterProcessEpoch - 250000 vs - 7PWei 56.534 ms/op
Array.fill - length 1000000 7.9873 ms/op
Array push - length 1000000 18.896 ms/op
Array.get 0.29597 ns/op
Uint8Array.get 0.47569 ns/op
phase0 beforeProcessEpoch - 250000 vs - 7PWei 24.276 ms/op
altair processEpoch - mainnet_e81889 291.41 ms/op
mainnet_e81889 - altair beforeProcessEpoch 20.111 ms/op
mainnet_e81889 - altair processJustificationAndFinalization 6.0740 us/op
mainnet_e81889 - altair processInactivityUpdates 4.9857 ms/op
mainnet_e81889 - altair processRewardsAndPenalties 42.837 ms/op
mainnet_e81889 - altair processRegistryUpdates 778.00 ns/op
mainnet_e81889 - altair processSlashings 192.00 ns/op
mainnet_e81889 - altair processEth1DataReset 188.00 ns/op
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.3406 ms/op
mainnet_e81889 - altair processSlashingsReset 914.00 ns/op
mainnet_e81889 - altair processRandaoMixesReset 1.1840 us/op
mainnet_e81889 - altair processHistoricalRootsUpdate 184.00 ns/op
mainnet_e81889 - altair processParticipationFlagUpdates 534.00 ns/op
mainnet_e81889 - altair processSyncCommitteeUpdates 147.00 ns/op
mainnet_e81889 - altair afterProcessEpoch 54.547 ms/op
capella processEpoch - mainnet_e217614 1.1431 s/op
mainnet_e217614 - capella beforeProcessEpoch 75.677 ms/op
mainnet_e217614 - capella processJustificationAndFinalization 5.8760 us/op
mainnet_e217614 - capella processInactivityUpdates 18.627 ms/op
mainnet_e217614 - capella processRewardsAndPenalties 194.05 ms/op
mainnet_e217614 - capella processRegistryUpdates 7.0890 us/op
mainnet_e217614 - capella processSlashings 199.00 ns/op
mainnet_e217614 - capella processEth1DataReset 195.00 ns/op
mainnet_e217614 - capella processEffectiveBalanceUpdates 16.232 ms/op
mainnet_e217614 - capella processSlashingsReset 966.00 ns/op
mainnet_e217614 - capella processRandaoMixesReset 1.4000 us/op
mainnet_e217614 - capella processHistoricalRootsUpdate 216.00 ns/op
mainnet_e217614 - capella processParticipationFlagUpdates 942.00 ns/op
mainnet_e217614 - capella afterProcessEpoch 138.57 ms/op
phase0 processEpoch - mainnet_e58758 418.44 ms/op
mainnet_e58758 - phase0 beforeProcessEpoch 110.07 ms/op
mainnet_e58758 - phase0 processJustificationAndFinalization 6.1640 us/op
mainnet_e58758 - phase0 processRewardsAndPenalties 40.220 ms/op
mainnet_e58758 - phase0 processRegistryUpdates 3.4100 us/op
mainnet_e58758 - phase0 processSlashings 201.00 ns/op
mainnet_e58758 - phase0 processEth1DataReset 200.00 ns/op
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.9041 ms/op
mainnet_e58758 - phase0 processSlashingsReset 1.2340 us/op
mainnet_e58758 - phase0 processRandaoMixesReset 1.7170 us/op
mainnet_e58758 - phase0 processHistoricalRootsUpdate 191.00 ns/op
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.0750 us/op
mainnet_e58758 - phase0 afterProcessEpoch 45.066 ms/op
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.6778 ms/op
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.2795 ms/op
altair processInactivityUpdates - 250000 normalcase 30.716 ms/op
altair processInactivityUpdates - 250000 worstcase 24.570 ms/op
phase0 processRegistryUpdates - 250000 normalcase 11.236 us/op
phase0 processRegistryUpdates - 250000 badcase_full_deposits 381.88 us/op
phase0 processRegistryUpdates - 250000 worstcase 0.5 144.97 ms/op
altair processRewardsAndPenalties - 250000 normalcase 55.266 ms/op
altair processRewardsAndPenalties - 250000 worstcase 36.292 ms/op
phase0 getAttestationDeltas - 250000 normalcase 8.5226 ms/op
phase0 getAttestationDeltas - 250000 worstcase 6.4856 ms/op
phase0 processSlashings - 250000 worstcase 105.49 us/op
altair processSyncCommitteeUpdates - 250000 148.94 ms/op
BeaconState.hashTreeRoot - No change 274.00 ns/op
BeaconState.hashTreeRoot - 1 full validator 82.453 us/op
BeaconState.hashTreeRoot - 32 full validator 942.47 us/op
BeaconState.hashTreeRoot - 512 full validator 12.725 ms/op
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 112.25 us/op
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.7911 ms/op
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 39.456 ms/op
BeaconState.hashTreeRoot - 1 balances 147.66 us/op
BeaconState.hashTreeRoot - 32 balances 1.1683 ms/op
BeaconState.hashTreeRoot - 512 balances 11.651 ms/op
BeaconState.hashTreeRoot - 250000 balances 239.33 ms/op
aggregationBits - 2048 els - zipIndexesInBitList 27.176 us/op
byteArrayEquals 32 61.793 ns/op
Buffer.compare 32 20.054 ns/op
byteArrayEquals 1024 1.8142 us/op
Buffer.compare 1024 27.811 ns/op
byteArrayEquals 16384 27.075 us/op
Buffer.compare 16384 205.25 ns/op
byteArrayEquals 123687377 214.00 ms/op
Buffer.compare 123687377 8.6951 ms/op
byteArrayEquals 32 - diff last byte 53.914 ns/op
Buffer.compare 32 - diff last byte 18.268 ns/op
byteArrayEquals 1024 - diff last byte 1.7165 us/op
Buffer.compare 1024 - diff last byte 27.448 ns/op
byteArrayEquals 16384 - diff last byte 26.608 us/op
Buffer.compare 16384 - diff last byte 199.94 ns/op
byteArrayEquals 123687377 - diff last byte 194.83 ms/op
Buffer.compare 123687377 - diff last byte 8.7120 ms/op
byteArrayEquals 32 - random bytes 5.3220 ns/op
Buffer.compare 32 - random bytes 17.558 ns/op
byteArrayEquals 1024 - random bytes 5.4170 ns/op
Buffer.compare 1024 - random bytes 18.157 ns/op
byteArrayEquals 16384 - random bytes 5.4410 ns/op
Buffer.compare 16384 - random bytes 18.052 ns/op
byteArrayEquals 123687377 - random bytes 6.7200 ns/op
Buffer.compare 123687377 - random bytes 19.130 ns/op
regular array get 100000 times 45.537 us/op
wrappedArray get 100000 times 34.080 us/op
arrayWithProxy get 100000 times 16.009 ms/op
ssz.Root.equals 46.559 ns/op
byteArrayEquals 46.607 ns/op
Buffer.compare 10.495 ns/op
processSlot - 1 slots 11.880 us/op
processSlot - 32 slots 2.0772 ms/op
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 52.688 ms/op
getCommitteeAssignments - req 1 vs - 250000 vc 2.1885 ms/op
getCommitteeAssignments - req 100 vs - 250000 vc 4.2419 ms/op
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5691 ms/op
findModifiedValidators - 10000 modified validators 827.80 ms/op
findModifiedValidators - 1000 modified validators 827.44 ms/op
findModifiedValidators - 100 modified validators 292.51 ms/op
findModifiedValidators - 10 modified validators 229.62 ms/op
findModifiedValidators - 1 modified validators 257.86 ms/op
findModifiedValidators - no difference 204.81 ms/op
compare ViewDUs 7.0027 s/op
compare each validator Uint8Array 1.5113 s/op
compare ViewDU to Uint8Array 1.8492 s/op
migrate state 1000000 validators, 24 modified, 0 new 1.0678 s/op
migrate state 1000000 validators, 1700 modified, 1000 new 1.2829 s/op
migrate state 1000000 validators, 3400 modified, 2000 new 1.4189 s/op
migrate state 1500000 validators, 24 modified, 0 new 861.65 ms/op
migrate state 1500000 validators, 1700 modified, 1000 new 1.1942 s/op
migrate state 1500000 validators, 3400 modified, 2000 new 1.4903 s/op
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.3900 ns/op
state getBlockRootAtSlot - 250000 vs - 7PWei 572.48 ns/op
naive computeProposerIndex 100000 validators 51.549 ms/op
computeProposerIndex 100000 validators 9.2324 ms/op
naiveGetNextSyncCommitteeIndices 1000 validators 7.8242 s/op
getNextSyncCommitteeIndices 1000 validators 249.93 ms/op
naiveGetNextSyncCommitteeIndices 10000 validators 7.4810 s/op
getNextSyncCommitteeIndices 10000 validators 270.14 ms/op
naiveGetNextSyncCommitteeIndices 100000 validators 7.9245 s/op
getNextSyncCommitteeIndices 100000 validators 291.73 ms/op
naive computeShuffledIndex 100000 validators 24.627 s/op
cached computeShuffledIndex 100000 validators 577.01 ms/op
naive computeShuffledIndex 2000000 validators 535.78 s/op
cached computeShuffledIndex 2000000 validators 60.696 s/op
computeProposers - vc 250000 28.674 ms/op
computeEpochShuffling - vc 250000 47.070 ms/op
getNextSyncCommittee - vc 250000 279.53 ms/op
computeSigningRoot for AttestationData 42.494 us/op
hash AttestationData serialized data then Buffer.toString(base64) 1.6750 us/op
toHexString serialized data 2.2464 us/op
Buffer.toString(base64) 165.14 ns/op
nodejs block root to RootHex using toHex 150.21 ns/op
nodejs block root to RootHex using toRootHex 94.266 ns/op
browser block root to RootHex using the deprecated toHexString 253.91 ns/op
browser block root to RootHex using toHex 192.26 ns/op
browser block root to RootHex using toRootHex 170.32 ns/op

by benchmarkbot/action

@philknows philknows merged commit ff574a5 into stable Feb 24, 2025
31 checks passed
@philknows philknows deleted the rc/v1.27.1 branch February 24, 2025 16:28
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.27.1 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants