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

feat: verify attestation gossip messages in batch #5729

Closed
wants to merge 16 commits into from

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Jul 5, 2023

Motivation

  • verifying multiple messages are >=10x faster than verifyMultipleSignatures - this includes aggregating pubkey and signatures and do a simple aggregatedSignature.verify(), this is the number from the bls.test.ts performance test
num messages 32 64 128
verifyMultipleSignatures 33.1 ms/op 65.4 ms/op 130.5 ms/op
batch verify signatures with same message 3.49 ms/op 5.16 ms/op 8.97 ms/op

Description

  • Define new IndexedGossipQueue, when beacon_attestation gossip messages come, we index by attestation data base64, new param for this queue
    • indexFn: function to index to store as key
    • minChunkSize: keys with at least min chunk size will be processed first, this is 32
    • maxChunkSize: get up to maxChunkSize to process in batch, this is 128
  • Define new validateGossipAttestationsSameAttData function to verify attestations with the same attestation data:
    • Phase0: Verify attestations following the spec without the signature check, and get signatures from there
    • Phase1: Verify signatures of these attestations
      • Do a quick check: aggregate pubkeys and signatures and verify, this takes 10ms for 128 signatures
      • If one of the signature is invalid, retry with the old way (bls.verifySignatureSets) with batchable: false

Closes #5416

Test result

  • can process all attestations on a mainnet node subscribing to all subnets
  • time to process an attestation is reduced to <10ms per message
  • around 90% of attestations are verified in batch and main thread, so cpu time is reduced a lot to 140% -160%(>=300% on unstable)
  • IndexedGossipQueue works well: 0.06% cpu for next() and 0.28% for add()

TODOs

  • validateGossipAttestationsSameAttData take 15% of cpu time, verifying signatures on main thread seem only suitable for network thread (useWorker=true)
  • we may still want to offload the new batch signature verification to a worker thread if useWorker=false

@twoeths twoeths changed the base branch from unstable to stable July 5, 2023 06:26
@twoeths twoeths changed the base branch from stable to unstable July 5, 2023 06:26
@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: d547303 Previous: 56ee70c Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 485.79 us/op 648.92 us/op 0.75
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 79.135 us/op 88.635 us/op 0.89
BLS verify - blst-native 1.3436 ms/op 1.2322 ms/op 1.09
BLS verifyMultipleSignatures 3 - blst-native 2.7858 ms/op 2.5089 ms/op 1.11
BLS verifyMultipleSignatures 8 - blst-native 6.0419 ms/op 5.4097 ms/op 1.12
BLS verifyMultipleSignatures 32 - blst-native 21.889 ms/op 19.557 ms/op 1.12
BLS verifyMultipleSignatures 64 - blst-native 43.064 ms/op
BLS verifyMultipleSignatures 128 - blst-native 85.545 ms/op
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3382 ms/op
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.5002 ms/op
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.2933 ms/op
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.3889 ms/op
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.3272 ms/op
BLS aggregatePubkeys 32 - blst-native 27.083 us/op 26.025 us/op 1.04
BLS aggregatePubkeys 128 - blst-native 100.43 us/op 101.65 us/op 0.99
getAttestationsForBlock 60.124 ms/op 58.111 ms/op 1.03
isKnown best case - 1 super set check 343.00 ns/op 353.00 ns/op 0.97
isKnown normal case - 2 super set checks 306.00 ns/op 419.00 ns/op 0.73
isKnown worse case - 16 super set checks 289.00 ns/op 423.00 ns/op 0.68
CheckpointStateCache - add get delete 5.1230 us/op 5.8760 us/op 0.87
validate api signedAggregateAndProof - struct 2.8044 ms/op 2.8672 ms/op 0.98
validate gossip signedAggregateAndProof - struct 2.8257 ms/op 2.8841 ms/op 0.98
validate gossip attestation - vc 640000 1.3829 ms/op
batch validate gossip attestation - vc 640000 - chunk 32 156.02 us/op
batch validate gossip attestation - vc 640000 - chunk 64 135.30 us/op
batch validate gossip attestation - vc 640000 - chunk 128 124.33 us/op
batch validate gossip attestation - vc 640000 - chunk 256 113.84 us/op
pickEth1Vote - no votes 1.1135 ms/op 1.3518 ms/op 0.82
pickEth1Vote - max votes 12.376 ms/op 13.279 ms/op 0.93
pickEth1Vote - Eth1Data hashTreeRoot value x2048 8.7460 ms/op 9.6951 ms/op 0.90
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 16.996 ms/op 15.810 ms/op 1.08
pickEth1Vote - Eth1Data fastSerialize value x2048 589.20 us/op 677.99 us/op 0.87
pickEth1Vote - Eth1Data fastSerialize tree x2048 8.5423 ms/op 7.7672 ms/op 1.10
bytes32 toHexString 456.00 ns/op 584.00 ns/op 0.78
bytes32 Buffer.toString(hex) 283.00 ns/op 305.00 ns/op 0.93
bytes32 Buffer.toString(hex) from Uint8Array 426.00 ns/op 497.00 ns/op 0.86
bytes32 Buffer.toString(hex) + 0x 281.00 ns/op 310.00 ns/op 0.91
Object access 1 prop 0.15100 ns/op 0.20200 ns/op 0.75
Map access 1 prop 0.14300 ns/op 0.15200 ns/op 0.94
Object get x1000 7.5940 ns/op 7.5400 ns/op 1.01
Map get x1000 0.53400 ns/op 0.62400 ns/op 0.86
Object set x1000 46.909 ns/op 63.970 ns/op 0.73
Map set x1000 37.206 ns/op 48.629 ns/op 0.77
Return object 10000 times 0.23370 ns/op 0.24720 ns/op 0.95
Throw Error 10000 times 3.8255 us/op 3.9568 us/op 0.97
fastMsgIdFn sha256 / 200 bytes 3.1900 us/op 3.4210 us/op 0.93
fastMsgIdFn h32 xxhash / 200 bytes 253.00 ns/op 356.00 ns/op 0.71
fastMsgIdFn h64 xxhash / 200 bytes 334.00 ns/op 393.00 ns/op 0.85
fastMsgIdFn sha256 / 1000 bytes 11.164 us/op 12.021 us/op 0.93
fastMsgIdFn h32 xxhash / 1000 bytes 380.00 ns/op 473.00 ns/op 0.80
fastMsgIdFn h64 xxhash / 1000 bytes 404.00 ns/op 473.00 ns/op 0.85
fastMsgIdFn sha256 / 10000 bytes 102.61 us/op 106.29 us/op 0.97
fastMsgIdFn h32 xxhash / 10000 bytes 1.8710 us/op 2.0560 us/op 0.91
fastMsgIdFn h64 xxhash / 10000 bytes 1.3000 us/op 1.3480 us/op 0.96
enrSubnets - fastDeserialize 64 bits 1.1570 us/op 1.4480 us/op 0.80
enrSubnets - ssz BitVector 64 bits 419.00 ns/op 517.00 ns/op 0.81
enrSubnets - fastDeserialize 4 bits 155.00 ns/op 216.00 ns/op 0.72
enrSubnets - ssz BitVector 4 bits 419.00 ns/op 504.00 ns/op 0.83
prioritizePeers score -10:0 att 32-0.1 sync 2-0 104.80 us/op 116.02 us/op 0.90
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 120.84 us/op 155.58 us/op 0.78
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 155.97 us/op 189.20 us/op 0.82
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 275.58 us/op 342.69 us/op 0.80
prioritizePeers score 0:0 att 64-1 sync 4-1 322.50 us/op 374.79 us/op 0.86
array of 16000 items push then shift 1.5744 us/op 1.6306 us/op 0.97
LinkedList of 16000 items push then shift 8.6270 ns/op 9.5910 ns/op 0.90
array of 16000 items push then pop 65.976 ns/op 62.382 ns/op 1.06
LinkedList of 16000 items push then pop 8.7620 ns/op 10.266 ns/op 0.85
array of 24000 items push then shift 2.4002 us/op 2.5330 us/op 0.95
LinkedList of 24000 items push then shift 8.8140 ns/op 9.4400 ns/op 0.93
array of 24000 items push then pop 92.948 ns/op 124.50 ns/op 0.75
LinkedList of 24000 items push then pop 8.6580 ns/op 9.0230 ns/op 0.96
intersect bitArray bitLen 8 6.8390 ns/op 7.2140 ns/op 0.95
intersect array and set length 8 54.628 ns/op 81.559 ns/op 0.67
intersect bitArray bitLen 128 31.921 ns/op 32.850 ns/op 0.97
intersect array and set length 128 754.89 ns/op 1.0881 us/op 0.69
bitArray.getTrueBitIndexes() bitLen 128 1.4840 us/op 2.1370 us/op 0.69
bitArray.getTrueBitIndexes() bitLen 248 2.4090 us/op 3.3330 us/op 0.72
bitArray.getTrueBitIndexes() bitLen 512 4.6480 us/op 6.7160 us/op 0.69
Buffer.concat 32 items 970.00 ns/op 1.1740 us/op 0.83
Uint8Array.set 32 items 2.3660 us/op 2.1240 us/op 1.11
Set add up to 64 items then delete first 4.1901 us/op 5.0644 us/op 0.83
OrderedSet add up to 64 items then delete first 5.2909 us/op 6.1592 us/op 0.86
Set add up to 64 items then delete last 4.5025 us/op 5.4009 us/op 0.83
OrderedSet add up to 64 items then delete last 5.5724 us/op 6.9662 us/op 0.80
Set add up to 64 items then delete middle 4.4447 us/op 5.3091 us/op 0.84
OrderedSet add up to 64 items then delete middle 6.7987 us/op 8.5932 us/op 0.79
Set add up to 128 items then delete first 9.0445 us/op 10.926 us/op 0.83
OrderedSet add up to 128 items then delete first 12.024 us/op 15.251 us/op 0.79
Set add up to 128 items then delete last 9.0109 us/op 10.941 us/op 0.82
OrderedSet add up to 128 items then delete last 11.286 us/op 14.481 us/op 0.78
Set add up to 128 items then delete middle 8.8809 us/op 10.685 us/op 0.83
OrderedSet add up to 128 items then delete middle 16.427 us/op 20.056 us/op 0.82
Set add up to 256 items then delete first 18.154 us/op 22.421 us/op 0.81
OrderedSet add up to 256 items then delete first 24.478 us/op 30.293 us/op 0.81
Set add up to 256 items then delete last 17.884 us/op 21.229 us/op 0.84
OrderedSet add up to 256 items then delete last 22.614 us/op 25.572 us/op 0.88
Set add up to 256 items then delete middle 17.783 us/op 20.444 us/op 0.87
OrderedSet add up to 256 items then delete middle 44.053 us/op 51.788 us/op 0.85
transfer serialized Status (84 B) 1.9860 us/op 2.0230 us/op 0.98
copy serialized Status (84 B) 1.7110 us/op 1.7450 us/op 0.98
transfer serialized SignedVoluntaryExit (112 B) 2.2800 us/op 2.1710 us/op 1.05
copy serialized SignedVoluntaryExit (112 B) 1.8220 us/op 1.7940 us/op 1.02
transfer serialized ProposerSlashing (416 B) 3.1850 us/op 2.3790 us/op 1.34
copy serialized ProposerSlashing (416 B) 3.2070 us/op 1.9770 us/op 1.62
transfer serialized Attestation (485 B) 3.4070 us/op 2.3040 us/op 1.48
copy serialized Attestation (485 B) 3.2670 us/op 1.9720 us/op 1.66
transfer serialized AttesterSlashing (33232 B) 3.3120 us/op 2.2590 us/op 1.47
copy serialized AttesterSlashing (33232 B) 6.7830 us/op 5.1570 us/op 1.32
transfer serialized Small SignedBeaconBlock (128000 B) 3.3870 us/op 2.5570 us/op 1.32
copy serialized Small SignedBeaconBlock (128000 B) 13.310 us/op 13.546 us/op 0.98
transfer serialized Avg SignedBeaconBlock (200000 B) 3.5820 us/op 2.9690 us/op 1.21
copy serialized Avg SignedBeaconBlock (200000 B) 18.312 us/op 19.804 us/op 0.92
transfer serialized BlobsSidecar (524380 B) 3.2070 us/op 3.0360 us/op 1.06
copy serialized BlobsSidecar (524380 B) 196.04 us/op 76.778 us/op 2.55
transfer serialized Big SignedBeaconBlock (1000000 B) 3.2290 us/op 3.2120 us/op 1.01
copy serialized Big SignedBeaconBlock (1000000 B) 144.94 us/op 154.66 us/op 0.94
pass gossip attestations to forkchoice per slot 3.7997 ms/op 3.8247 ms/op 0.99
forkChoice updateHead vc 100000 bc 64 eq 0 693.78 us/op 680.98 us/op 1.02
forkChoice updateHead vc 600000 bc 64 eq 0 5.2203 ms/op 4.2630 ms/op 1.22
forkChoice updateHead vc 1000000 bc 64 eq 0 6.8246 ms/op 7.5275 ms/op 0.91
forkChoice updateHead vc 600000 bc 320 eq 0 4.2478 ms/op 4.3326 ms/op 0.98
forkChoice updateHead vc 600000 bc 1200 eq 0 4.2854 ms/op 4.4023 ms/op 0.97
forkChoice updateHead vc 600000 bc 7200 eq 0 5.3876 ms/op 6.0487 ms/op 0.89
forkChoice updateHead vc 600000 bc 64 eq 1000 11.239 ms/op 11.895 ms/op 0.94
forkChoice updateHead vc 600000 bc 64 eq 10000 12.216 ms/op 13.741 ms/op 0.89
forkChoice updateHead vc 600000 bc 64 eq 300000 15.622 ms/op 22.757 ms/op 0.69
computeDeltas 500000 validators 300 proto nodes 6.3072 ms/op 6.4952 ms/op 0.97
computeDeltas 500000 validators 1200 proto nodes 6.2729 ms/op 6.5890 ms/op 0.95
computeDeltas 500000 validators 7200 proto nodes 6.2440 ms/op 6.2947 ms/op 0.99
computeDeltas 750000 validators 300 proto nodes 9.5802 ms/op 9.4340 ms/op 1.02
computeDeltas 750000 validators 1200 proto nodes 9.6148 ms/op 9.4207 ms/op 1.02
computeDeltas 750000 validators 7200 proto nodes 9.5262 ms/op 9.3872 ms/op 1.01
computeDeltas 1400000 validators 300 proto nodes 17.916 ms/op 18.183 ms/op 0.99
computeDeltas 1400000 validators 1200 proto nodes 18.135 ms/op 20.626 ms/op 0.88
computeDeltas 1400000 validators 7200 proto nodes 18.050 ms/op 19.333 ms/op 0.93
computeDeltas 2100000 validators 300 proto nodes 27.251 ms/op 28.846 ms/op 0.94
computeDeltas 2100000 validators 1200 proto nodes 27.027 ms/op 29.395 ms/op 0.92
computeDeltas 2100000 validators 7200 proto nodes 27.277 ms/op 29.030 ms/op 0.94
computeProposerBoostScoreFromBalances 500000 validators 3.2799 ms/op 3.5236 ms/op 0.93
computeProposerBoostScoreFromBalances 750000 validators 3.2698 ms/op 3.5894 ms/op 0.91
computeProposerBoostScoreFromBalances 1400000 validators 3.3233 ms/op 3.3119 ms/op 1.00
computeProposerBoostScoreFromBalances 2100000 validators 3.3188 ms/op 3.2866 ms/op 1.01
altair processAttestation - 250000 vs - 7PWei normalcase 2.5541 ms/op 2.7283 ms/op 0.94
altair processAttestation - 250000 vs - 7PWei worstcase 3.6061 ms/op 3.5743 ms/op 1.01
altair processAttestation - setStatus - 1/6 committees join 194.12 us/op 151.19 us/op 1.28
altair processAttestation - setStatus - 1/3 committees join 379.02 us/op 290.43 us/op 1.31
altair processAttestation - setStatus - 1/2 committees join 502.41 us/op 387.50 us/op 1.30
altair processAttestation - setStatus - 2/3 committees join 636.03 us/op 486.64 us/op 1.31
altair processAttestation - setStatus - 4/5 committees join 875.67 us/op 709.07 us/op 1.23
altair processAttestation - setStatus - 100% committees join 1.0028 ms/op 800.09 us/op 1.25
altair processBlock - 250000 vs - 7PWei normalcase 9.9180 ms/op 10.005 ms/op 0.99
altair processBlock - 250000 vs - 7PWei normalcase hashState 17.265 ms/op 20.862 ms/op 0.83
altair processBlock - 250000 vs - 7PWei worstcase 40.998 ms/op 47.575 ms/op 0.86
altair processBlock - 250000 vs - 7PWei worstcase hashState 64.196 ms/op 66.267 ms/op 0.97
phase0 processBlock - 250000 vs - 7PWei normalcase 3.0772 ms/op 3.2837 ms/op 0.94
phase0 processBlock - 250000 vs - 7PWei worstcase 32.174 ms/op 35.783 ms/op 0.90
altair processEth1Data - 250000 vs - 7PWei normalcase 473.19 us/op 629.58 us/op 0.75
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 7.1690 us/op 15.986 us/op 0.45
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 82.608 us/op 92.489 us/op 0.89
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 15.718 us/op 26.504 us/op 0.59
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 11.607 us/op 12.748 us/op 0.91
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 205.33 us/op 160.29 us/op 1.28
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.4412 ms/op 1.3351 ms/op 1.08
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.3329 ms/op 2.3861 ms/op 0.98
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.3303 ms/op 2.2878 ms/op 1.02
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.4361 ms/op 5.4250 ms/op 0.63
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.2012 ms/op 4.3019 ms/op 0.51
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.3114 ms/op 8.3317 ms/op 0.64
Tree 40 250000 create 349.26 ms/op 517.14 ms/op 0.68
Tree 40 250000 get(125000) 199.69 ns/op 228.21 ns/op 0.88
Tree 40 250000 set(125000) 983.80 ns/op 1.9739 us/op 0.50
Tree 40 250000 toArray() 20.945 ms/op 24.024 ms/op 0.87
Tree 40 250000 iterate all - toArray() + loop 18.484 ms/op 23.794 ms/op 0.78
Tree 40 250000 iterate all - get(i) 66.575 ms/op 75.348 ms/op 0.88
MutableVector 250000 create 22.400 ms/op 15.262 ms/op 1.47
MutableVector 250000 get(125000) 6.6510 ns/op 7.4400 ns/op 0.89
MutableVector 250000 set(125000) 239.83 ns/op 381.85 ns/op 0.63
MutableVector 250000 toArray() 3.0669 ms/op 3.0450 ms/op 1.01
MutableVector 250000 iterate all - toArray() + loop 2.8497 ms/op 3.4309 ms/op 0.83
MutableVector 250000 iterate all - get(i) 1.6281 ms/op 1.5773 ms/op 1.03
Array 250000 create 2.7181 ms/op 3.4589 ms/op 0.79
Array 250000 clone - spread 1.0235 ms/op 1.0445 ms/op 0.98
Array 250000 get(125000) 0.51700 ns/op 0.52800 ns/op 0.98
Array 250000 set(125000) 0.59700 ns/op 0.62600 ns/op 0.95
Array 250000 iterate all - loop 90.507 us/op 84.421 us/op 1.07
effectiveBalanceIncrements clone Uint8Array 300000 24.282 us/op 36.820 us/op 0.66
effectiveBalanceIncrements clone MutableVector 300000 286.00 ns/op 283.00 ns/op 1.01
effectiveBalanceIncrements rw all Uint8Array 300000 182.94 us/op 181.02 us/op 1.01
effectiveBalanceIncrements rw all MutableVector 300000 78.037 ms/op 88.204 ms/op 0.88
phase0 afterProcessEpoch - 250000 vs - 7PWei 116.91 ms/op 117.49 ms/op 1.00
phase0 beforeProcessEpoch - 250000 vs - 7PWei 46.667 ms/op 41.761 ms/op 1.12
altair processEpoch - mainnet_e81889 347.96 ms/op 337.59 ms/op 1.03
mainnet_e81889 - altair beforeProcessEpoch 65.028 ms/op 65.955 ms/op 0.99
mainnet_e81889 - altair processJustificationAndFinalization 24.443 us/op 16.959 us/op 1.44
mainnet_e81889 - altair processInactivityUpdates 6.4770 ms/op 6.4616 ms/op 1.00
mainnet_e81889 - altair processRewardsAndPenalties 85.323 ms/op 72.318 ms/op 1.18
mainnet_e81889 - altair processRegistryUpdates 4.0250 us/op 2.7370 us/op 1.47
mainnet_e81889 - altair processSlashings 879.00 ns/op 508.00 ns/op 1.73
mainnet_e81889 - altair processEth1DataReset 682.00 ns/op 648.00 ns/op 1.05
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.4183 ms/op 1.2908 ms/op 1.87
mainnet_e81889 - altair processSlashingsReset 4.4880 us/op 4.2420 us/op 1.06
mainnet_e81889 - altair processRandaoMixesReset 7.7930 us/op 5.6090 us/op 1.39
mainnet_e81889 - altair processHistoricalRootsUpdate 1.3610 us/op 1.0330 us/op 1.32
mainnet_e81889 - altair processParticipationFlagUpdates 3.5650 us/op 1.8930 us/op 1.88
mainnet_e81889 - altair processSyncCommitteeUpdates 903.00 ns/op 703.00 ns/op 1.28
mainnet_e81889 - altair afterProcessEpoch 125.94 ms/op 129.75 ms/op 0.97
capella processEpoch - mainnet_e217614 1.0887 s/op 1.0564 s/op 1.03
mainnet_e217614 - capella beforeProcessEpoch 233.83 ms/op 239.92 ms/op 0.97
mainnet_e217614 - capella processJustificationAndFinalization 20.433 us/op 13.822 us/op 1.48
mainnet_e217614 - capella processInactivityUpdates 18.168 ms/op 19.212 ms/op 0.95
mainnet_e217614 - capella processRewardsAndPenalties 348.20 ms/op 293.42 ms/op 1.19
mainnet_e217614 - capella processRegistryUpdates 26.669 us/op 20.542 us/op 1.30
mainnet_e217614 - capella processSlashings 899.00 ns/op 656.00 ns/op 1.37
mainnet_e217614 - capella processEth1DataReset 651.00 ns/op 727.00 ns/op 0.90
mainnet_e217614 - capella processEffectiveBalanceUpdates 3.9524 ms/op 4.0073 ms/op 0.99
mainnet_e217614 - capella processSlashingsReset 4.0440 us/op 2.8450 us/op 1.42
mainnet_e217614 - capella processRandaoMixesReset 7.2360 us/op 3.9510 us/op 1.83
mainnet_e217614 - capella processHistoricalRootsUpdate 981.00 ns/op 524.00 ns/op 1.87
mainnet_e217614 - capella processParticipationFlagUpdates 2.2690 us/op 2.0530 us/op 1.11
mainnet_e217614 - capella afterProcessEpoch 302.75 ms/op 301.72 ms/op 1.00
phase0 processEpoch - mainnet_e58758 392.24 ms/op 342.35 ms/op 1.15
mainnet_e58758 - phase0 beforeProcessEpoch 129.42 ms/op 126.24 ms/op 1.03
mainnet_e58758 - phase0 processJustificationAndFinalization 24.397 us/op 22.674 us/op 1.08
mainnet_e58758 - phase0 processRewardsAndPenalties 68.949 ms/op 53.280 ms/op 1.29
mainnet_e58758 - phase0 processRegistryUpdates 14.474 us/op 9.1530 us/op 1.58
mainnet_e58758 - phase0 processSlashings 932.00 ns/op 519.00 ns/op 1.80
mainnet_e58758 - phase0 processEth1DataReset 713.00 ns/op 449.00 ns/op 1.59
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.9530 ms/op 988.28 us/op 1.98
mainnet_e58758 - phase0 processSlashingsReset 3.3930 us/op 2.1180 us/op 1.60
mainnet_e58758 - phase0 processRandaoMixesReset 6.0440 us/op 3.7500 us/op 1.61
mainnet_e58758 - phase0 processHistoricalRootsUpdate 733.00 ns/op 481.00 ns/op 1.52
mainnet_e58758 - phase0 processParticipationRecordUpdates 7.0850 us/op 4.6330 us/op 1.53
mainnet_e58758 - phase0 afterProcessEpoch 107.61 ms/op 102.78 ms/op 1.05
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.3109 ms/op 1.2180 ms/op 1.90
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 3.6065 ms/op 1.4433 ms/op 2.50
altair processInactivityUpdates - 250000 normalcase 27.038 ms/op 19.738 ms/op 1.37
altair processInactivityUpdates - 250000 worstcase 26.904 ms/op 22.316 ms/op 1.21
phase0 processRegistryUpdates - 250000 normalcase 13.440 us/op 10.392 us/op 1.29
phase0 processRegistryUpdates - 250000 badcase_full_deposits 566.78 us/op 425.57 us/op 1.33
phase0 processRegistryUpdates - 250000 worstcase 0.5 134.25 ms/op 136.34 ms/op 0.98
altair processRewardsAndPenalties - 250000 normalcase 79.617 ms/op 58.074 ms/op 1.37
altair processRewardsAndPenalties - 250000 worstcase 73.157 ms/op 56.876 ms/op 1.29
phase0 getAttestationDeltas - 250000 normalcase 7.9313 ms/op 8.1987 ms/op 0.97
phase0 getAttestationDeltas - 250000 worstcase 7.8385 ms/op 7.9655 ms/op 0.98
phase0 processSlashings - 250000 worstcase 2.4721 ms/op 2.3195 ms/op 1.07
altair processSyncCommitteeUpdates - 250000 155.79 ms/op 151.32 ms/op 1.03
BeaconState.hashTreeRoot - No change 262.00 ns/op 255.00 ns/op 1.03
BeaconState.hashTreeRoot - 1 full validator 60.029 us/op 51.678 us/op 1.16
BeaconState.hashTreeRoot - 32 full validator 535.62 us/op 508.35 us/op 1.05
BeaconState.hashTreeRoot - 512 full validator 6.9138 ms/op 5.5480 ms/op 1.25
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 69.530 us/op 62.801 us/op 1.11
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 934.09 us/op 882.14 us/op 1.06
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 11.845 ms/op 11.967 ms/op 0.99
BeaconState.hashTreeRoot - 1 balances 56.753 us/op 49.441 us/op 1.15
BeaconState.hashTreeRoot - 32 balances 519.91 us/op 447.91 us/op 1.16
BeaconState.hashTreeRoot - 512 balances 4.9020 ms/op 4.3099 ms/op 1.14
BeaconState.hashTreeRoot - 250000 balances 87.907 ms/op 72.796 ms/op 1.21
aggregationBits - 2048 els - zipIndexesInBitList 16.011 us/op 17.435 us/op 0.92
regular array get 100000 times 45.122 us/op 33.050 us/op 1.37
wrappedArray get 100000 times 34.394 us/op 35.570 us/op 0.97
arrayWithProxy get 100000 times 14.565 ms/op 14.030 ms/op 1.04
ssz.Root.equals 220.00 ns/op 227.00 ns/op 0.97
byteArrayEquals 218.00 ns/op 200.00 ns/op 1.09
shuffle list - 16384 els 7.0425 ms/op 6.9792 ms/op 1.01
shuffle list - 250000 els 102.85 ms/op 102.07 ms/op 1.01
processSlot - 1 slots 8.7060 us/op 8.3650 us/op 1.04
processSlot - 32 slots 1.2984 ms/op 1.4644 ms/op 0.89
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 54.628 ms/op 49.368 ms/op 1.11
getCommitteeAssignments - req 1 vs - 250000 vc 2.5803 ms/op 2.5314 ms/op 1.02
getCommitteeAssignments - req 100 vs - 250000 vc 3.8142 ms/op 3.7351 ms/op 1.02
getCommitteeAssignments - req 1000 vs - 250000 vc 4.1899 ms/op 4.0896 ms/op 1.02
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.2700 ns/op 4.9600 ns/op 1.06
state getBlockRootAtSlot - 250000 vs - 7PWei 1.0651 us/op 793.14 ns/op 1.34
computeProposers - vc 250000 9.8551 ms/op 9.2467 ms/op 1.07
computeEpochShuffling - vc 250000 109.15 ms/op 105.46 ms/op 1.03
getNextSyncCommittee - vc 250000 165.19 ms/op 158.56 ms/op 1.04
computeSigningRoot for AttestationData 14.320 us/op 14.206 us/op 1.01
hash AttestationData serialized data then Buffer.toString(base64) 2.3823 us/op 2.3748 us/op 1.00
toHexString serialized data 1.1946 us/op 1.2625 us/op 0.95
Buffer.toString(base64) 242.97 ns/op 256.62 ns/op 0.95

by benchmarkbot/action

@wemeetagain wemeetagain changed the title feat: verify attestataion gossip messages in batch feat: verify attestation gossip messages in batch Jul 5, 2023
@twoeths twoeths force-pushed the tuyen/verify_gossip_messages_in_batch branch from a830c42 to 447ba94 Compare July 18, 2023 04:16
@twoeths twoeths force-pushed the tuyen/verify_gossip_messages_in_batch branch from 447ba94 to 8966fbb Compare August 15, 2023 08:13
@twoeths twoeths force-pushed the tuyen/verify_gossip_messages_in_batch branch from 71485cc to 13040de Compare August 17, 2023 03:05
@twoeths twoeths force-pushed the tuyen/verify_gossip_messages_in_batch branch from 13040de to f1c5043 Compare August 17, 2023 07:04
@twoeths twoeths closed this Aug 20, 2023
@twoeths
Copy link
Contributor Author

twoeths commented Aug 20, 2023

replaced by #5896

@twoeths twoeths deleted the tuyen/verify_gossip_messages_in_batch branch December 14, 2023 04:24
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.

Batch gossip validation
1 participant