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

fix: use bigint gwei type for amount in requests instead of num 64 #7085

Merged
merged 3 commits into from
Sep 14, 2024

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Sep 14, 2024

amount type in the requests are 64 bit gwei which is to be treated as a uintbn64 ssz type and not uintnum64

the bug lead to incorrect amount deserializing in block because of inherent limitations of number type in javascript object leading to incorrect calculation of hash in a devnet3 block causing lodestar nodes to stall

this PR fixes

@g11tech g11tech requested a review from a team as a code owner September 14, 2024 08:32
twoeths
twoeths previously approved these changes Sep 14, 2024
@twoeths
Copy link
Contributor

twoeths commented Sep 14, 2024

amount type in the requests are 64 bit gwei which is to be treated as a uintbn64 ssz type and not uintnum64

@g11tech what's the amount value of the failed block?

@g11tech
Copy link
Contributor Author

g11tech commented Sep 14, 2024

amount type in the requests are 64 bit gwei which is to be treated as a uintbn64 ssz type and not uintnum64

@g11tech what's the amount value of the failed block?

https://dora.pectra-devnet-3.ethpandaops.io/slot/dd7d1f78dcb9c9413d558fe5fe34405fbd362c331c22954bdc91abdb449d1844

image

Copy link

codecov bot commented Sep 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.90%. Comparing base (d6e8c05) to head (75aef56).
Report is 1 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #7085   +/-   ##
=========================================
  Coverage     50.90%   50.90%           
=========================================
  Files           594      594           
  Lines         39611    39611           
  Branches       2248     2257    +9     
=========================================
+ Hits          20163    20164    +1     
+ Misses        19448    19447    -1     

@naiba4
Copy link

naiba4 commented Sep 14, 2024 via email

@g11tech g11tech merged commit 295690b into unstable Sep 14, 2024
20 checks passed
@g11tech g11tech deleted the electra-devnet3-fix branch September 14, 2024 09:14
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 1d196e5 Previous: d6e8c05 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.4178 ms/op 2.3492 ms/op 0.60
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 40.942 us/op 54.530 us/op 0.75
BLS verify - blst 862.52 us/op 980.96 us/op 0.88
BLS verifyMultipleSignatures 3 - blst 1.2706 ms/op 1.3224 ms/op 0.96
BLS verifyMultipleSignatures 8 - blst 1.5638 ms/op 2.2246 ms/op 0.70
BLS verifyMultipleSignatures 32 - blst 4.6306 ms/op 6.2633 ms/op 0.74
BLS verifyMultipleSignatures 64 - blst 8.3151 ms/op 10.263 ms/op 0.81
BLS verifyMultipleSignatures 128 - blst 16.008 ms/op 20.931 ms/op 0.76
BLS deserializing 10000 signatures 601.90 ms/op 691.80 ms/op 0.87
BLS deserializing 100000 signatures 6.0315 s/op 6.9257 s/op 0.87
BLS verifyMultipleSignatures - same message - 3 - blst 956.23 us/op 914.35 us/op 1.05
BLS verifyMultipleSignatures - same message - 8 - blst 1.0437 ms/op 1.1752 ms/op 0.89
BLS verifyMultipleSignatures - same message - 32 - blst 1.6547 ms/op 1.7094 ms/op 0.97
BLS verifyMultipleSignatures - same message - 64 - blst 2.4882 ms/op 2.5303 ms/op 0.98
BLS verifyMultipleSignatures - same message - 128 - blst 4.1437 ms/op 4.3086 ms/op 0.96
BLS aggregatePubkeys 32 - blst 18.018 us/op 19.276 us/op 0.93
BLS aggregatePubkeys 128 - blst 63.325 us/op 66.094 us/op 0.96
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 61.312 ms/op 77.159 ms/op 0.79
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 41.216 ms/op 58.638 ms/op 0.70
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 28.977 ms/op 30.586 ms/op 0.95
getSlashingsAndExits - default max 72.489 us/op 109.16 us/op 0.66
getSlashingsAndExits - 2k 273.22 us/op 279.24 us/op 0.98
proposeBlockBody type=full, size=empty 4.9507 ms/op 5.0360 ms/op 0.98
isKnown best case - 1 super set check 506.00 ns/op 734.00 ns/op 0.69
isKnown normal case - 2 super set checks 477.00 ns/op 686.00 ns/op 0.70
isKnown worse case - 16 super set checks 474.00 ns/op 713.00 ns/op 0.66
InMemoryCheckpointStateCache - add get delete 4.5640 us/op 4.7330 us/op 0.96
updateUnfinalizedPubkeys - updating 10 pubkeys 830.87 us/op 946.36 us/op 0.88
updateUnfinalizedPubkeys - updating 100 pubkeys 2.9274 ms/op 2.6107 ms/op 1.12
updateUnfinalizedPubkeys - updating 1000 pubkeys 36.776 ms/op 38.282 ms/op 0.96
validate api signedAggregateAndProof - struct 1.4282 ms/op 1.9584 ms/op 0.73
validate gossip signedAggregateAndProof - struct 1.4018 ms/op 1.9696 ms/op 0.71
validate gossip attestation - vc 640000 967.02 us/op 998.86 us/op 0.97
batch validate gossip attestation - vc 640000 - chunk 32 114.12 us/op 119.34 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 64 98.511 us/op 103.14 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 128 90.829 us/op 94.414 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 256 88.940 us/op 94.792 us/op 0.94
pickEth1Vote - no votes 815.20 us/op 883.39 us/op 0.92
pickEth1Vote - max votes 4.2512 ms/op 4.4794 ms/op 0.95
pickEth1Vote - Eth1Data hashTreeRoot value x2048 9.3172 ms/op 10.213 ms/op 0.91
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 17.836 ms/op 12.161 ms/op 1.47
pickEth1Vote - Eth1Data fastSerialize value x2048 326.51 us/op 382.23 us/op 0.85
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.6272 ms/op 1.9907 ms/op 1.82
bytes32 toHexString 538.00 ns/op 596.00 ns/op 0.90
bytes32 Buffer.toString(hex) 420.00 ns/op 444.00 ns/op 0.95
bytes32 Buffer.toString(hex) from Uint8Array 507.00 ns/op 533.00 ns/op 0.95
bytes32 Buffer.toString(hex) + 0x 415.00 ns/op 450.00 ns/op 0.92
Object access 1 prop 0.29800 ns/op 0.32500 ns/op 0.92
Map access 1 prop 0.30700 ns/op 0.32600 ns/op 0.94
Object get x1000 4.7760 ns/op 5.4620 ns/op 0.87
Map get x1000 5.3990 ns/op 5.9020 ns/op 0.91
Object set x1000 22.195 ns/op 22.705 ns/op 0.98
Map set x1000 18.873 ns/op 20.152 ns/op 0.94
Return object 10000 times 0.27690 ns/op 0.30270 ns/op 0.91
Throw Error 10000 times 2.6637 us/op 2.7440 us/op 0.97
toHex 111.46 ns/op 115.98 ns/op 0.96
Buffer.from 104.58 ns/op 107.33 ns/op 0.97
shared Buffer 70.797 ns/op 72.009 ns/op 0.98
fastMsgIdFn sha256 / 200 bytes 1.9820 us/op 2.0440 us/op 0.97
fastMsgIdFn h32 xxhash / 200 bytes 409.00 ns/op 424.00 ns/op 0.96
fastMsgIdFn h64 xxhash / 200 bytes 439.00 ns/op 473.00 ns/op 0.93
fastMsgIdFn sha256 / 1000 bytes 5.7330 us/op 6.0280 us/op 0.95
fastMsgIdFn h32 xxhash / 1000 bytes 545.00 ns/op 561.00 ns/op 0.97
fastMsgIdFn h64 xxhash / 1000 bytes 518.00 ns/op 526.00 ns/op 0.98
fastMsgIdFn sha256 / 10000 bytes 50.625 us/op 50.266 us/op 1.01
fastMsgIdFn h32 xxhash / 10000 bytes 1.9780 us/op 1.8790 us/op 1.05
fastMsgIdFn h64 xxhash / 10000 bytes 1.3930 us/op 1.3250 us/op 1.05
send data - 1000 256B messages 11.831 ms/op 9.5344 ms/op 1.24
send data - 1000 512B messages 13.069 ms/op 12.993 ms/op 1.01
send data - 1000 1024B messages 22.705 ms/op 22.964 ms/op 0.99
send data - 1000 1200B messages 21.361 ms/op 14.024 ms/op 1.52
send data - 1000 2048B messages 27.863 ms/op 30.683 ms/op 0.91
send data - 1000 4096B messages 24.772 ms/op 28.933 ms/op 0.86
send data - 1000 16384B messages 62.275 ms/op 66.187 ms/op 0.94
send data - 1000 65536B messages 240.27 ms/op 242.76 ms/op 0.99
enrSubnets - fastDeserialize 64 bits 1.2820 us/op 1.2250 us/op 1.05
enrSubnets - ssz BitVector 64 bits 520.00 ns/op 537.00 ns/op 0.97
enrSubnets - fastDeserialize 4 bits 331.00 ns/op 367.00 ns/op 0.90
enrSubnets - ssz BitVector 4 bits 514.00 ns/op 589.00 ns/op 0.87
prioritizePeers score -10:0 att 32-0.1 sync 2-0 117.58 us/op 155.43 us/op 0.76
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 154.35 us/op 147.70 us/op 1.05
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 210.17 us/op 251.36 us/op 0.84
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 513.72 us/op 458.38 us/op 1.12
prioritizePeers score 0:0 att 64-1 sync 4-1 627.91 us/op 690.04 us/op 0.91
array of 16000 items push then shift 1.2044 us/op 1.2538 us/op 0.96
LinkedList of 16000 items push then shift 7.1770 ns/op 7.5750 ns/op 0.95
array of 16000 items push then pop 82.722 ns/op 116.36 ns/op 0.71
LinkedList of 16000 items push then pop 6.0760 ns/op 6.2640 ns/op 0.97
array of 24000 items push then shift 1.8773 us/op 1.8408 us/op 1.02
LinkedList of 24000 items push then shift 6.4040 ns/op 7.0750 ns/op 0.91
array of 24000 items push then pop 105.38 ns/op 120.42 ns/op 0.88
LinkedList of 24000 items push then pop 6.3410 ns/op 6.9350 ns/op 0.91
intersect bitArray bitLen 8 5.4710 ns/op 5.6560 ns/op 0.97
intersect array and set length 8 40.075 ns/op 45.049 ns/op 0.89
intersect bitArray bitLen 128 26.411 ns/op 26.893 ns/op 0.98
intersect array and set length 128 587.12 ns/op 607.95 ns/op 0.97
bitArray.getTrueBitIndexes() bitLen 128 1.7700 us/op 1.6870 us/op 1.05
bitArray.getTrueBitIndexes() bitLen 248 2.9410 us/op 3.0180 us/op 0.97
bitArray.getTrueBitIndexes() bitLen 512 5.2550 us/op 6.2180 us/op 0.85
Buffer.concat 32 items 974.00 ns/op 1.1320 us/op 0.86
Uint8Array.set 32 items 1.2410 us/op 1.9000 us/op 0.65
Buffer.copy 1.4610 us/op 2.1620 us/op 0.68
Uint8Array.set - with subarray 1.9330 us/op 3.2630 us/op 0.59
Uint8Array.set - without subarray 1.2020 us/op 1.9300 us/op 0.62
getUint32 - dataview 391.00 ns/op 444.00 ns/op 0.88
getUint32 - manual 336.00 ns/op 489.00 ns/op 0.69
Set add up to 64 items then delete first 1.8160 us/op 2.6106 us/op 0.70
OrderedSet add up to 64 items then delete first 2.8144 us/op 4.7657 us/op 0.59
Set add up to 64 items then delete last 2.0686 us/op 2.5659 us/op 0.81
OrderedSet add up to 64 items then delete last 3.1070 us/op 5.2463 us/op 0.59
Set add up to 64 items then delete middle 2.0777 us/op 3.2003 us/op 0.65
OrderedSet add up to 64 items then delete middle 4.4966 us/op 6.2518 us/op 0.72
Set add up to 128 items then delete first 4.0659 us/op 5.7654 us/op 0.71
OrderedSet add up to 128 items then delete first 6.3253 us/op 9.6387 us/op 0.66
Set add up to 128 items then delete last 3.9807 us/op 5.8411 us/op 0.68
OrderedSet add up to 128 items then delete last 6.1654 us/op 9.9721 us/op 0.62
Set add up to 128 items then delete middle 3.9158 us/op 6.8906 us/op 0.57
OrderedSet add up to 128 items then delete middle 11.447 us/op 16.081 us/op 0.71
Set add up to 256 items then delete first 7.8923 us/op 11.990 us/op 0.66
OrderedSet add up to 256 items then delete first 12.491 us/op 14.782 us/op 0.85
Set add up to 256 items then delete last 7.7356 us/op 8.5474 us/op 0.91
OrderedSet add up to 256 items then delete last 11.785 us/op 12.868 us/op 0.92
Set add up to 256 items then delete middle 7.6363 us/op 8.1295 us/op 0.94
OrderedSet add up to 256 items then delete middle 33.884 us/op 41.302 us/op 0.82
transfer serialized Status (84 B) 1.3200 us/op 1.4760 us/op 0.89
copy serialized Status (84 B) 1.0930 us/op 1.4200 us/op 0.77
transfer serialized SignedVoluntaryExit (112 B) 1.3640 us/op 1.5120 us/op 0.90
copy serialized SignedVoluntaryExit (112 B) 1.1230 us/op 1.6070 us/op 0.70
transfer serialized ProposerSlashing (416 B) 1.5110 us/op 1.9580 us/op 0.77
copy serialized ProposerSlashing (416 B) 1.2950 us/op 2.1220 us/op 0.61
transfer serialized Attestation (485 B) 1.5310 us/op 2.5860 us/op 0.59
copy serialized Attestation (485 B) 1.3010 us/op 2.3620 us/op 0.55
transfer serialized AttesterSlashing (33232 B) 1.6900 us/op 3.1170 us/op 0.54
copy serialized AttesterSlashing (33232 B) 3.6060 us/op 13.457 us/op 0.27
transfer serialized Small SignedBeaconBlock (128000 B) 2.0020 us/op 2.1050 us/op 0.95
copy serialized Small SignedBeaconBlock (128000 B) 9.1940 us/op 19.126 us/op 0.48
transfer serialized Avg SignedBeaconBlock (200000 B) 2.1990 us/op 2.5890 us/op 0.85
copy serialized Avg SignedBeaconBlock (200000 B) 14.992 us/op 18.154 us/op 0.83
transfer serialized BlobsSidecar (524380 B) 2.7040 us/op 3.3700 us/op 0.80
copy serialized BlobsSidecar (524380 B) 118.78 us/op 89.004 us/op 1.33
transfer serialized Big SignedBeaconBlock (1000000 B) 3.2050 us/op 3.1450 us/op 1.02
copy serialized Big SignedBeaconBlock (1000000 B) 143.49 us/op 322.54 us/op 0.44
pass gossip attestations to forkchoice per slot 2.3406 ms/op 3.1065 ms/op 0.75
forkChoice updateHead vc 100000 bc 64 eq 0 383.02 us/op 421.86 us/op 0.91
forkChoice updateHead vc 600000 bc 64 eq 0 2.4999 ms/op 2.7109 ms/op 0.92
forkChoice updateHead vc 1000000 bc 64 eq 0 4.2871 ms/op 4.4629 ms/op 0.96
forkChoice updateHead vc 600000 bc 320 eq 0 2.3866 ms/op 2.5530 ms/op 0.93
forkChoice updateHead vc 600000 bc 1200 eq 0 2.3520 ms/op 2.6440 ms/op 0.89
forkChoice updateHead vc 600000 bc 7200 eq 0 2.8831 ms/op 3.1152 ms/op 0.93
forkChoice updateHead vc 600000 bc 64 eq 1000 9.6079 ms/op 10.047 ms/op 0.96
forkChoice updateHead vc 600000 bc 64 eq 10000 9.5816 ms/op 10.006 ms/op 0.96
forkChoice updateHead vc 600000 bc 64 eq 300000 11.080 ms/op 29.972 ms/op 0.37
computeDeltas 500000 validators 300 proto nodes 2.9736 ms/op 3.0967 ms/op 0.96
computeDeltas 500000 validators 1200 proto nodes 2.9858 ms/op 3.1126 ms/op 0.96
computeDeltas 500000 validators 7200 proto nodes 3.0823 ms/op 3.0239 ms/op 1.02
computeDeltas 750000 validators 300 proto nodes 4.4617 ms/op 4.6973 ms/op 0.95
computeDeltas 750000 validators 1200 proto nodes 4.2170 ms/op 4.5838 ms/op 0.92
computeDeltas 750000 validators 7200 proto nodes 4.4994 ms/op 4.4933 ms/op 1.00
computeDeltas 1400000 validators 300 proto nodes 8.0460 ms/op 8.4347 ms/op 0.95
computeDeltas 1400000 validators 1200 proto nodes 8.2578 ms/op 8.2559 ms/op 1.00
computeDeltas 1400000 validators 7200 proto nodes 8.3860 ms/op 8.4346 ms/op 0.99
computeDeltas 2100000 validators 300 proto nodes 12.253 ms/op 12.625 ms/op 0.97
computeDeltas 2100000 validators 1200 proto nodes 12.141 ms/op 12.488 ms/op 0.97
computeDeltas 2100000 validators 7200 proto nodes 12.672 ms/op 12.861 ms/op 0.99
altair processAttestation - 250000 vs - 7PWei normalcase 1.4194 ms/op 1.4297 ms/op 0.99
altair processAttestation - 250000 vs - 7PWei worstcase 2.0861 ms/op 2.1990 ms/op 0.95
altair processAttestation - setStatus - 1/6 committees join 71.901 us/op 67.257 us/op 1.07
altair processAttestation - setStatus - 1/3 committees join 144.67 us/op 132.79 us/op 1.09
altair processAttestation - setStatus - 1/2 committees join 211.91 us/op 210.72 us/op 1.01
altair processAttestation - setStatus - 2/3 committees join 274.81 us/op 255.68 us/op 1.07
altair processAttestation - setStatus - 4/5 committees join 398.39 us/op 397.22 us/op 1.00
altair processAttestation - setStatus - 100% committees join 463.17 us/op 485.88 us/op 0.95
altair processBlock - 250000 vs - 7PWei normalcase 3.6410 ms/op 3.4438 ms/op 1.06
altair processBlock - 250000 vs - 7PWei normalcase hashState 24.539 ms/op 24.147 ms/op 1.02
altair processBlock - 250000 vs - 7PWei worstcase 36.818 ms/op 41.110 ms/op 0.90
altair processBlock - 250000 vs - 7PWei worstcase hashState 65.723 ms/op 59.160 ms/op 1.11
phase0 processBlock - 250000 vs - 7PWei normalcase 1.7287 ms/op 1.7388 ms/op 0.99
phase0 processBlock - 250000 vs - 7PWei worstcase 20.880 ms/op 22.125 ms/op 0.94
altair processEth1Data - 250000 vs - 7PWei normalcase 234.44 us/op 241.35 us/op 0.97
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 4.4090 us/op 4.9780 us/op 0.89
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 27.378 us/op 29.500 us/op 0.93
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 4.3560 us/op 8.9720 us/op 0.49
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 5.6760 us/op 5.2830 us/op 1.07
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 121.44 us/op 125.53 us/op 0.97
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.4476 ms/op 825.35 us/op 1.75
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.1166 ms/op 1.1502 ms/op 0.97
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.0817 ms/op 1.0882 ms/op 0.99
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.5847 ms/op 2.8821 ms/op 0.90
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.1318 ms/op 1.1497 ms/op 0.98
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 2.8678 ms/op 3.1784 ms/op 0.90
Tree 40 250000 create 180.20 ms/op 184.84 ms/op 0.97
Tree 40 250000 get(125000) 106.61 ns/op 108.12 ns/op 0.99
Tree 40 250000 set(125000) 530.94 ns/op 528.18 ns/op 1.01
Tree 40 250000 toArray() 12.520 ms/op 15.609 ms/op 0.80
Tree 40 250000 iterate all - toArray() + loop 12.678 ms/op 16.182 ms/op 0.78
Tree 40 250000 iterate all - get(i) 40.614 ms/op 44.961 ms/op 0.90
Array 250000 create 2.3902 ms/op 2.7386 ms/op 0.87
Array 250000 clone - spread 1.2822 ms/op 1.2039 ms/op 1.07
Array 250000 get(125000) 0.56000 ns/op 0.57700 ns/op 0.97
Array 250000 set(125000) 0.56900 ns/op 0.57900 ns/op 0.98
Array 250000 iterate all - loop 73.322 us/op 75.599 us/op 0.97
phase0 afterProcessEpoch - 250000 vs - 7PWei 71.480 ms/op 76.817 ms/op 0.93
Array.fill - length 1000000 2.4680 ms/op 2.5428 ms/op 0.97
Array push - length 1000000 13.719 ms/op 14.509 ms/op 0.95
Array.get 0.24626 ns/op 0.26122 ns/op 0.94
Uint8Array.get 0.32744 ns/op 0.34796 ns/op 0.94
phase0 beforeProcessEpoch - 250000 vs - 7PWei 14.597 ms/op 12.552 ms/op 1.16
altair processEpoch - mainnet_e81889 300.74 ms/op 318.16 ms/op 0.95
mainnet_e81889 - altair beforeProcessEpoch 18.167 ms/op 16.359 ms/op 1.11
mainnet_e81889 - altair processJustificationAndFinalization 10.344 us/op 9.9270 us/op 1.04
mainnet_e81889 - altair processInactivityUpdates 4.2182 ms/op 4.0619 ms/op 1.04
mainnet_e81889 - altair processRewardsAndPenalties 53.864 ms/op 51.829 ms/op 1.04
mainnet_e81889 - altair processRegistryUpdates 1.9060 us/op 1.8540 us/op 1.03
mainnet_e81889 - altair processSlashings 757.00 ns/op 755.00 ns/op 1.00
mainnet_e81889 - altair processEth1DataReset 648.00 ns/op 717.00 ns/op 0.90
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.6629 ms/op 1.7821 ms/op 0.93
mainnet_e81889 - altair processSlashingsReset 2.4420 us/op 2.3220 us/op 1.05
mainnet_e81889 - altair processRandaoMixesReset 2.9150 us/op 3.1260 us/op 0.93
mainnet_e81889 - altair processHistoricalRootsUpdate 1.3230 us/op 766.00 ns/op 1.73
mainnet_e81889 - altair processParticipationFlagUpdates 1.7220 us/op 1.7700 us/op 0.97
mainnet_e81889 - altair processSyncCommitteeUpdates 633.00 ns/op 693.00 ns/op 0.91
mainnet_e81889 - altair afterProcessEpoch 74.855 ms/op 82.359 ms/op 0.91
capella processEpoch - mainnet_e217614 913.43 ms/op 945.52 ms/op 0.97
mainnet_e217614 - capella beforeProcessEpoch 62.781 ms/op 64.280 ms/op 0.98
mainnet_e217614 - capella processJustificationAndFinalization 11.186 us/op 16.671 us/op 0.67
mainnet_e217614 - capella processInactivityUpdates 14.947 ms/op 14.476 ms/op 1.03
mainnet_e217614 - capella processRewardsAndPenalties 227.89 ms/op 233.76 ms/op 0.97
mainnet_e217614 - capella processRegistryUpdates 11.145 us/op 12.501 us/op 0.89
mainnet_e217614 - capella processSlashings 735.00 ns/op 804.00 ns/op 0.91
mainnet_e217614 - capella processEth1DataReset 682.00 ns/op 752.00 ns/op 0.91
mainnet_e217614 - capella processEffectiveBalanceUpdates 5.7114 ms/op 4.8631 ms/op 1.17
mainnet_e217614 - capella processSlashingsReset 1.6620 us/op 3.1780 us/op 0.52
mainnet_e217614 - capella processRandaoMixesReset 3.1480 us/op 4.1060 us/op 0.77
mainnet_e217614 - capella processHistoricalRootsUpdate 658.00 ns/op 794.00 ns/op 0.83
mainnet_e217614 - capella processParticipationFlagUpdates 1.7780 us/op 4.1260 us/op 0.43
mainnet_e217614 - capella afterProcessEpoch 195.75 ms/op 215.34 ms/op 0.91
phase0 processEpoch - mainnet_e58758 362.30 ms/op 458.38 ms/op 0.79
mainnet_e58758 - phase0 beforeProcessEpoch 75.822 ms/op 90.411 ms/op 0.84
mainnet_e58758 - phase0 processJustificationAndFinalization 12.607 us/op 19.718 us/op 0.64
mainnet_e58758 - phase0 processRewardsAndPenalties 24.346 ms/op 23.592 ms/op 1.03
mainnet_e58758 - phase0 processRegistryUpdates 5.9540 us/op 8.8100 us/op 0.68
mainnet_e58758 - phase0 processSlashings 755.00 ns/op 934.00 ns/op 0.81
mainnet_e58758 - phase0 processEth1DataReset 682.00 ns/op 893.00 ns/op 0.76
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.3986 ms/op 1.4351 ms/op 0.97
mainnet_e58758 - phase0 processSlashingsReset 2.4040 us/op 5.1190 us/op 0.47
mainnet_e58758 - phase0 processRandaoMixesReset 3.3170 us/op 6.5420 us/op 0.51
mainnet_e58758 - phase0 processHistoricalRootsUpdate 684.00 ns/op 810.00 ns/op 0.84
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.7990 us/op 3.9690 us/op 0.71
mainnet_e58758 - phase0 afterProcessEpoch 64.239 ms/op 73.603 ms/op 0.87
phase0 processEffectiveBalanceUpdates - 250000 normalcase 956.04 us/op 1.0615 ms/op 0.90
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.6629 ms/op 1.7397 ms/op 0.96
altair processInactivityUpdates - 250000 normalcase 13.723 ms/op 17.175 ms/op 0.80
altair processInactivityUpdates - 250000 worstcase 15.121 ms/op 16.454 ms/op 0.92
phase0 processRegistryUpdates - 250000 normalcase 2.7650 us/op 6.2720 us/op 0.44
phase0 processRegistryUpdates - 250000 badcase_full_deposits 290.44 us/op 345.02 us/op 0.84
phase0 processRegistryUpdates - 250000 worstcase 0.5 106.90 ms/op 100.50 ms/op 1.06
altair processRewardsAndPenalties - 250000 normalcase 34.214 ms/op 40.596 ms/op 0.84
altair processRewardsAndPenalties - 250000 worstcase 36.739 ms/op 46.169 ms/op 0.80
phase0 getAttestationDeltas - 250000 normalcase 5.8868 ms/op 5.4286 ms/op 1.08
phase0 getAttestationDeltas - 250000 worstcase 6.0177 ms/op 5.5345 ms/op 1.09
phase0 processSlashings - 250000 worstcase 95.892 us/op 90.929 us/op 1.05
altair processSyncCommitteeUpdates - 250000 99.955 ms/op 107.96 ms/op 0.93
BeaconState.hashTreeRoot - No change 475.00 ns/op 454.00 ns/op 1.05
BeaconState.hashTreeRoot - 1 full validator 105.76 us/op 120.14 us/op 0.88
BeaconState.hashTreeRoot - 32 full validator 1.1161 ms/op 986.96 us/op 1.13
BeaconState.hashTreeRoot - 512 full validator 12.573 ms/op 12.688 ms/op 0.99
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 148.32 us/op 145.37 us/op 1.02
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.7429 ms/op 2.0629 ms/op 0.84
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 23.758 ms/op 27.066 ms/op 0.88
BeaconState.hashTreeRoot - 1 balances 87.604 us/op 106.90 us/op 0.82
BeaconState.hashTreeRoot - 32 balances 735.55 us/op 1.0090 ms/op 0.73
BeaconState.hashTreeRoot - 512 balances 9.8124 ms/op 9.8894 ms/op 0.99
BeaconState.hashTreeRoot - 250000 balances 151.27 ms/op 152.03 ms/op 1.00
aggregationBits - 2048 els - zipIndexesInBitList 21.306 us/op 20.497 us/op 1.04
byteArrayEquals 32 45.810 ns/op 46.080 ns/op 0.99
Buffer.compare 32 14.363 ns/op 14.777 ns/op 0.97
byteArrayEquals 1024 1.2053 us/op 1.2190 us/op 0.99
Buffer.compare 1024 22.519 ns/op 21.566 ns/op 1.04
byteArrayEquals 16384 18.873 us/op 19.256 us/op 0.98
Buffer.compare 16384 197.11 ns/op 189.64 ns/op 1.04
byteArrayEquals 123687377 150.30 ms/op 151.05 ms/op 1.00
Buffer.compare 123687377 3.5716 ms/op 4.5277 ms/op 0.79
byteArrayEquals 32 - diff last byte 46.976 ns/op 48.516 ns/op 0.97
Buffer.compare 32 - diff last byte 16.808 ns/op 16.620 ns/op 1.01
byteArrayEquals 1024 - diff last byte 1.2547 us/op 1.2950 us/op 0.97
Buffer.compare 1024 - diff last byte 24.656 ns/op 24.768 ns/op 1.00
byteArrayEquals 16384 - diff last byte 19.926 us/op 20.143 us/op 0.99
Buffer.compare 16384 - diff last byte 208.13 ns/op 186.99 ns/op 1.11
byteArrayEquals 123687377 - diff last byte 150.68 ms/op 153.30 ms/op 0.98
Buffer.compare 123687377 - diff last byte 3.7982 ms/op 5.0026 ms/op 0.76
byteArrayEquals 32 - random bytes 4.9050 ns/op 5.1030 ns/op 0.96
Buffer.compare 32 - random bytes 16.485 ns/op 15.797 ns/op 1.04
byteArrayEquals 1024 - random bytes 4.8470 ns/op 5.0200 ns/op 0.97
Buffer.compare 1024 - random bytes 16.348 ns/op 15.174 ns/op 1.08
byteArrayEquals 16384 - random bytes 4.8480 ns/op 4.8070 ns/op 1.01
Buffer.compare 16384 - random bytes 16.737 ns/op 15.206 ns/op 1.10
byteArrayEquals 123687377 - random bytes 7.8400 ns/op 7.8600 ns/op 1.00
Buffer.compare 123687377 - random bytes 19.890 ns/op 18.180 ns/op 1.09
regular array get 100000 times 30.710 us/op 30.336 us/op 1.01
wrappedArray get 100000 times 30.706 us/op 30.307 us/op 1.01
arrayWithProxy get 100000 times 10.459 ms/op 9.2918 ms/op 1.13
ssz.Root.equals 43.633 ns/op 43.484 ns/op 1.00
byteArrayEquals 43.006 ns/op 43.096 ns/op 1.00
Buffer.compare 10.365 ns/op 8.8490 ns/op 1.17
shuffle list - 16384 els 5.4120 ms/op 5.4271 ms/op 1.00
shuffle list - 250000 els 80.119 ms/op 80.549 ms/op 0.99
processSlot - 1 slots 11.783 us/op 15.300 us/op 0.77
processSlot - 32 slots 2.8367 ms/op 2.8402 ms/op 1.00
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 41.159 ms/op 37.573 ms/op 1.10
getCommitteeAssignments - req 1 vs - 250000 vc 1.6455 ms/op 1.8387 ms/op 0.89
getCommitteeAssignments - req 100 vs - 250000 vc 3.2065 ms/op 3.6158 ms/op 0.89
getCommitteeAssignments - req 1000 vs - 250000 vc 3.4665 ms/op 3.8633 ms/op 0.90
findModifiedValidators - 10000 modified validators 218.51 ms/op 258.06 ms/op 0.85
findModifiedValidators - 1000 modified validators 133.79 ms/op 172.22 ms/op 0.78
findModifiedValidators - 100 modified validators 146.82 ms/op 163.20 ms/op 0.90
findModifiedValidators - 10 modified validators 133.57 ms/op 146.47 ms/op 0.91
findModifiedValidators - 1 modified validators 141.96 ms/op 147.35 ms/op 0.96
findModifiedValidators - no difference 139.45 ms/op 157.85 ms/op 0.88
compare ViewDUs 3.2430 s/op 3.2735 s/op 0.99
compare each validator Uint8Array 1.7541 s/op 1.5125 s/op 1.16
compare ViewDU to Uint8Array 627.74 ms/op 1.1122 s/op 0.56
migrate state 1000000 validators, 24 modified, 0 new 581.12 ms/op 728.56 ms/op 0.80
migrate state 1000000 validators, 1700 modified, 1000 new 805.28 ms/op 964.32 ms/op 0.84
migrate state 1000000 validators, 3400 modified, 2000 new 1.0446 s/op 1.1199 s/op 0.93
migrate state 1500000 validators, 24 modified, 0 new 618.37 ms/op 574.67 ms/op 1.08
migrate state 1500000 validators, 1700 modified, 1000 new 825.07 ms/op 785.22 ms/op 1.05
migrate state 1500000 validators, 3400 modified, 2000 new 1.0323 s/op 967.23 ms/op 1.07
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.1200 ns/op 7.3200 ns/op 0.84
state getBlockRootAtSlot - 250000 vs - 7PWei 891.29 ns/op 463.41 ns/op 1.92
computeProposers - vc 250000 7.0864 ms/op 6.7299 ms/op 1.05
computeEpochShuffling - vc 250000 80.739 ms/op 81.845 ms/op 0.99
getNextSyncCommittee - vc 250000 115.92 ms/op 95.107 ms/op 1.22
computeSigningRoot for AttestationData 29.840 us/op 22.310 us/op 1.34
hash AttestationData serialized data then Buffer.toString(base64) 1.2000 us/op 1.2057 us/op 1.00
toHexString serialized data 798.30 ns/op 805.61 ns/op 0.99
Buffer.toString(base64) 142.54 ns/op 136.06 ns/op 1.05
nodejs block root to RootHex using toHex 115.89 ns/op 112.61 ns/op 1.03
nodejs block root to RootHex using toRootHex 77.200 ns/op 71.702 ns/op 1.08
browser block root to RootHex using the deprecated toHexString 212.00 ns/op 200.74 ns/op 1.06
browser block root to RootHex using toHex 166.95 ns/op 164.31 ns/op 1.02
browser block root to RootHex using toRootHex 146.05 ns/op 148.82 ns/op 0.98

by benchmarkbot/action

@ensi321
Copy link
Contributor

ensi321 commented Sep 20, 2024

I don't think in mainnet there would ever be a withdrawal request with 18 billion ETH. Total Ethereum supply is 120 million ETH. Shall we consider converting it back to UintNum64 after devnet testing is over? @g11tech @twoeths

@g11tech
Copy link
Contributor Author

g11tech commented Sep 20, 2024

What about gnosis we support them as well

@nflaig
Copy link
Member

nflaig commented Sep 20, 2024

What about gnosis we support them as well

Gnosis chain uses GNO as stake which has a total supply of 3 million (see marketcap) so we should be fine there as well.

@twoeths
Copy link
Contributor

twoeths commented Sep 23, 2024

I don't think in mainnet there would ever be a withdrawal request with 18 billion ETH. Total Ethereum supply is 120 million ETH. Shall we consider converting it back to UintNum64 after devnet testing is over? @g11tech @twoeths

it's good to know we're safe on mainnet using either UintNum64 or Gwei, but I'd keep it unless there are more reasons to revert imo

philknows pushed a commit that referenced this pull request Sep 27, 2024
…7085)

* fix: use bigint gwei type for amount in requests instead of num 64

* revert deposit amount to uintnum64 as unlikely to get a high amount

* fix
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.

5 participants