Skip to content

Commit

Permalink
fix: stabilize unknown block sync e2e test (#6364)
Browse files Browse the repository at this point in the history
fix: stabalize unknown block sync e2e test
  • Loading branch information
twoeths authored Jan 29, 2024
1 parent 54c2069 commit 3bbb3d9
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/beacon-node/test/e2e/sync/unknownBlockSync.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {waitForEvent} from "../../utils/events/resolver.js";
import {getAndInitDevValidators} from "../../utils/node/validator.js";
import {ChainEvent} from "../../../src/chain/index.js";
import {NetworkEvent} from "../../../src/network/index.js";
import {connect} from "../../utils/network.js";
import {connect, onPeerConnect} from "../../utils/network.js";
import {testLogger, LogLevel, TestLoggerOpts} from "../../utils/logger.js";
import {BlockError, BlockErrorCode} from "../../../src/chain/errors/index.js";
import {BlockSource, getBlockInput} from "../../../src/chain/blocks/types.js";
Expand Down Expand Up @@ -48,7 +48,7 @@ describe("sync / unknown block sync", function () {
for (const {id, event} of testCases) {
it(id, async function () {
// the node needs time to transpile/initialize bls worker threads
const genesisSlotsDelay = 7;
const genesisSlotsDelay = 4;
const genesisTime = Math.floor(Date.now() / 1000) + genesisSlotsDelay * testParams.SECONDS_PER_SLOT;
const testLoggerOpts: TestLoggerOpts = {
level: LogLevel.info,
Expand All @@ -71,6 +71,7 @@ describe("sync / unknown block sync", function () {
chain: {blsVerifyAllMainThread: true},
},
validatorCount,
genesisTime,
logger: loggerNodeA,
});

Expand Down Expand Up @@ -100,7 +101,7 @@ describe("sync / unknown block sync", function () {
chain: {blsVerifyAllMainThread: true},
},
validatorCount,
genesisTime: bn.chain.getHeadState().genesisTime,
genesisTime,
logger: loggerNodeB,
});

Expand All @@ -116,7 +117,11 @@ describe("sync / unknown block sync", function () {
({block}) => block === headSummary.blockRoot
);

const connected = Promise.all([onPeerConnect(bn2.network), onPeerConnect(bn.network)]);
await connect(bn2.network, bn.network);
await connected;
loggerNodeA.info("Node A connected to Node B");

const headInput = getBlockInput.preDeneb(config, head, BlockSource.gossip, null);

switch (event) {
Expand Down Expand Up @@ -147,4 +152,4 @@ describe("sync / unknown block sync", function () {
await waitForSynced;
});
}
}, {timeout: 30_000});
}, {timeout: 40_000});

1 comment on commit 3bbb3d9

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for some benchmarks.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold.

Benchmark suite Current: 3bbb3d9 Previous: d6a7a39 Ratio
Map set x1000 57.921 ns/op 16.540 ns/op 3.50
Set add up to 64 items then delete first 5.2868 us/op 1.7617 us/op 3.00
Set add up to 64 items then delete last 5.6329 us/op 1.8479 us/op 3.05
Set add up to 64 items then delete middle 5.9517 us/op 1.8831 us/op 3.16
Set add up to 128 items then delete first 11.826 us/op 3.5771 us/op 3.31
Set add up to 128 items then delete last 11.324 us/op 3.5616 us/op 3.18
Set add up to 128 items then delete middle 11.330 us/op 3.5986 us/op 3.15
Set add up to 256 items then delete first 22.932 us/op 7.0796 us/op 3.24
OrderedSet add up to 256 items then delete first 35.728 us/op 10.859 us/op 3.29
Set add up to 256 items then delete last 22.468 us/op 7.0729 us/op 3.18
Set add up to 256 items then delete middle 21.885 us/op 7.0402 us/op 3.11
Full benchmark results
Benchmark suite Current: 3bbb3d9 Previous: d6a7a39 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 559.30 us/op 857.75 us/op 0.65
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 118.06 us/op 50.720 us/op 2.33
BLS verify - blst-native 1.3351 ms/op 1.1352 ms/op 1.18
BLS verifyMultipleSignatures 3 - blst-native 2.7904 ms/op 2.5603 ms/op 1.09
BLS verifyMultipleSignatures 8 - blst-native 6.1706 ms/op 5.4056 ms/op 1.14
BLS verifyMultipleSignatures 32 - blst-native 22.539 ms/op 20.897 ms/op 1.08
BLS verifyMultipleSignatures 64 - blst-native 44.022 ms/op 37.952 ms/op 1.16
BLS verifyMultipleSignatures 128 - blst-native 91.549 ms/op 74.079 ms/op 1.24
BLS deserializing 10000 signatures 982.31 ms/op 801.72 ms/op 1.23
BLS deserializing 100000 signatures 9.4881 s/op 8.4671 s/op 1.12
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3757 ms/op 1.1229 ms/op 1.23
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.5733 ms/op 1.2663 ms/op 1.24
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.3582 ms/op 2.0216 ms/op 1.17
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.5320 ms/op 3.0303 ms/op 1.17
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.9148 ms/op 4.9513 ms/op 1.19
BLS aggregatePubkeys 32 - blst-native 26.858 us/op 21.955 us/op 1.22
BLS aggregatePubkeys 128 - blst-native 103.66 us/op 86.139 us/op 1.20
getAttestationsForBlock 60.085 ms/op 54.717 ms/op 1.10
getSlashingsAndExits - default max 176.28 us/op 125.70 us/op 1.40
getSlashingsAndExits - 2k 479.50 us/op 322.50 us/op 1.49
proposeBlockBody type=full, size=empty 7.6590 ms/op 3.7599 ms/op 2.04
isKnown best case - 1 super set check 652.00 ns/op 323.00 ns/op 2.02
isKnown normal case - 2 super set checks 667.00 ns/op 325.00 ns/op 2.05
isKnown worse case - 16 super set checks 636.00 ns/op 322.00 ns/op 1.98
CheckpointStateCache - add get delete 6.8120 us/op 4.3920 us/op 1.55
validate api signedAggregateAndProof - struct 2.9176 ms/op 2.2879 ms/op 1.28
validate gossip signedAggregateAndProof - struct 2.9948 ms/op 2.2527 ms/op 1.33
validate gossip attestation - vc 640000 1.4446 ms/op 1.0994 ms/op 1.31
batch validate gossip attestation - vc 640000 - chunk 32 210.00 us/op 138.35 us/op 1.52
batch validate gossip attestation - vc 640000 - chunk 64 188.41 us/op 122.60 us/op 1.54
batch validate gossip attestation - vc 640000 - chunk 128 191.04 us/op 115.36 us/op 1.66
batch validate gossip attestation - vc 640000 - chunk 256 150.78 us/op 108.24 us/op 1.39
pickEth1Vote - no votes 1.4839 ms/op 901.50 us/op 1.65
pickEth1Vote - max votes 12.833 ms/op 8.1677 ms/op 1.57
pickEth1Vote - Eth1Data hashTreeRoot value x2048 21.744 ms/op 18.679 ms/op 1.16
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 31.447 ms/op 22.414 ms/op 1.40
pickEth1Vote - Eth1Data fastSerialize value x2048 764.07 us/op 404.94 us/op 1.89
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.1006 ms/op 6.2554 ms/op 0.98
bytes32 toHexString 844.00 ns/op 438.00 ns/op 1.93
bytes32 Buffer.toString(hex) 343.00 ns/op 296.00 ns/op 1.16
bytes32 Buffer.toString(hex) from Uint8Array 585.00 ns/op 416.00 ns/op 1.41
bytes32 Buffer.toString(hex) + 0x 303.00 ns/op 305.00 ns/op 0.99
Object access 1 prop 0.24300 ns/op 0.19200 ns/op 1.27
Map access 1 prop 0.15800 ns/op 0.17900 ns/op 0.88
Object get x1000 8.5000 ns/op 4.6860 ns/op 1.81
Map get x1000 0.93100 ns/op 0.69200 ns/op 1.35
Object set x1000 76.904 ns/op 27.519 ns/op 2.79
Map set x1000 57.921 ns/op 16.540 ns/op 3.50
Return object 10000 times 0.27230 ns/op 0.20820 ns/op 1.31
Throw Error 10000 times 4.0494 us/op 2.4740 us/op 1.64
fastMsgIdFn sha256 / 200 bytes 3.5330 us/op 1.8210 us/op 1.94
fastMsgIdFn h32 xxhash / 200 bytes 356.00 ns/op 278.00 ns/op 1.28
fastMsgIdFn h64 xxhash / 200 bytes 430.00 ns/op 328.00 ns/op 1.31
fastMsgIdFn sha256 / 1000 bytes 11.978 us/op 5.8310 us/op 2.05
fastMsgIdFn h32 xxhash / 1000 bytes 525.00 ns/op 410.00 ns/op 1.28
fastMsgIdFn h64 xxhash / 1000 bytes 499.00 ns/op 389.00 ns/op 1.28
fastMsgIdFn sha256 / 10000 bytes 107.69 us/op 49.808 us/op 2.16
fastMsgIdFn h32 xxhash / 10000 bytes 2.0720 us/op 1.7320 us/op 1.20
fastMsgIdFn h64 xxhash / 10000 bytes 1.4130 us/op 1.1930 us/op 1.18
send data - 1000 256B messages 22.730 ms/op 10.373 ms/op 2.19
send data - 1000 512B messages 29.573 ms/op 18.748 ms/op 1.58
send data - 1000 1024B messages 46.300 ms/op 22.568 ms/op 2.05
send data - 1000 1200B messages 44.541 ms/op 29.319 ms/op 1.52
send data - 1000 2048B messages 57.882 ms/op 31.415 ms/op 1.84
send data - 1000 4096B messages 56.516 ms/op 29.822 ms/op 1.90
send data - 1000 16384B messages 128.48 ms/op 91.674 ms/op 1.40
send data - 1000 65536B messages 521.13 ms/op 397.18 ms/op 1.31
enrSubnets - fastDeserialize 64 bits 1.6820 us/op 946.00 ns/op 1.78
enrSubnets - ssz BitVector 64 bits 562.00 ns/op 416.00 ns/op 1.35
enrSubnets - fastDeserialize 4 bits 247.00 ns/op 202.00 ns/op 1.22
enrSubnets - ssz BitVector 4 bits 538.00 ns/op 420.00 ns/op 1.28
prioritizePeers score -10:0 att 32-0.1 sync 2-0 124.27 us/op 67.682 us/op 1.84
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 150.87 us/op 82.173 us/op 1.84
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 208.20 us/op 105.43 us/op 1.97
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 352.95 us/op 175.36 us/op 2.01
prioritizePeers score 0:0 att 64-1 sync 4-1 381.72 us/op 198.74 us/op 1.92
array of 16000 items push then shift 1.7887 us/op 1.2006 us/op 1.49
LinkedList of 16000 items push then shift 10.427 ns/op 6.7950 ns/op 1.53
array of 16000 items push then pop 119.96 ns/op 60.333 ns/op 1.99
LinkedList of 16000 items push then pop 9.4250 ns/op 5.5240 ns/op 1.71
array of 24000 items push then shift 2.8329 us/op 1.7328 us/op 1.63
LinkedList of 24000 items push then shift 10.466 ns/op 6.3920 ns/op 1.64
array of 24000 items push then pop 161.40 ns/op 88.411 ns/op 1.83
LinkedList of 24000 items push then pop 9.6590 ns/op 5.4530 ns/op 1.77
intersect bitArray bitLen 8 6.8240 ns/op 4.6120 ns/op 1.48
intersect array and set length 8 75.281 ns/op 46.216 ns/op 1.63
intersect bitArray bitLen 128 35.665 ns/op 25.976 ns/op 1.37
intersect array and set length 128 1.0863 us/op 645.45 ns/op 1.68
bitArray.getTrueBitIndexes() bitLen 128 1.8120 us/op 1.2010 us/op 1.51
bitArray.getTrueBitIndexes() bitLen 248 3.1330 us/op 1.8980 us/op 1.65
bitArray.getTrueBitIndexes() bitLen 512 6.3720 us/op 3.7920 us/op 1.68
Buffer.concat 32 items 1.1210 us/op 785.00 ns/op 1.43
Uint8Array.set 32 items 2.0090 us/op 1.6840 us/op 1.19
Set add up to 64 items then delete first 5.2868 us/op 1.7617 us/op 3.00
OrderedSet add up to 64 items then delete first 7.2512 us/op 2.6707 us/op 2.72
Set add up to 64 items then delete last 5.6329 us/op 1.8479 us/op 3.05
OrderedSet add up to 64 items then delete last 7.4400 us/op 2.9006 us/op 2.56
Set add up to 64 items then delete middle 5.9517 us/op 1.8831 us/op 3.16
OrderedSet add up to 64 items then delete middle 9.1158 us/op 4.0653 us/op 2.24
Set add up to 128 items then delete first 11.826 us/op 3.5771 us/op 3.31
OrderedSet add up to 128 items then delete first 15.814 us/op 5.3789 us/op 2.94
Set add up to 128 items then delete last 11.324 us/op 3.5616 us/op 3.18
OrderedSet add up to 128 items then delete last 15.515 us/op 5.6587 us/op 2.74
Set add up to 128 items then delete middle 11.330 us/op 3.5986 us/op 3.15
OrderedSet add up to 128 items then delete middle 20.784 us/op 10.080 us/op 2.06
Set add up to 256 items then delete first 22.932 us/op 7.0796 us/op 3.24
OrderedSet add up to 256 items then delete first 35.728 us/op 10.859 us/op 3.29
Set add up to 256 items then delete last 22.468 us/op 7.0729 us/op 3.18
OrderedSet add up to 256 items then delete last 30.773 us/op 11.247 us/op 2.74
Set add up to 256 items then delete middle 21.885 us/op 7.0402 us/op 3.11
OrderedSet add up to 256 items then delete middle 53.478 us/op 28.691 us/op 1.86
transfer serialized Status (84 B) 1.9610 us/op 1.3560 us/op 1.45
copy serialized Status (84 B) 1.4520 us/op 1.0990 us/op 1.32
transfer serialized SignedVoluntaryExit (112 B) 2.1980 us/op 1.4620 us/op 1.50
copy serialized SignedVoluntaryExit (112 B) 1.7340 us/op 1.1590 us/op 1.50
transfer serialized ProposerSlashing (416 B) 3.6890 us/op 2.1640 us/op 1.70
copy serialized ProposerSlashing (416 B) 3.3420 us/op 2.0220 us/op 1.65
transfer serialized Attestation (485 B) 3.7550 us/op 1.9270 us/op 1.95
copy serialized Attestation (485 B) 3.2790 us/op 1.9910 us/op 1.65
transfer serialized AttesterSlashing (33232 B) 3.2140 us/op 2.5540 us/op 1.26
copy serialized AttesterSlashing (33232 B) 12.244 us/op 4.7830 us/op 2.56
transfer serialized Small SignedBeaconBlock (128000 B) 3.4100 us/op 2.4590 us/op 1.39
copy serialized Small SignedBeaconBlock (128000 B) 34.983 us/op 9.4250 us/op 3.71
transfer serialized Avg SignedBeaconBlock (200000 B) 3.6830 us/op 2.1000 us/op 1.75
copy serialized Avg SignedBeaconBlock (200000 B) 45.619 us/op 51.165 us/op 0.89
transfer serialized BlobsSidecar (524380 B) 4.2710 us/op 2.3860 us/op 1.79
copy serialized BlobsSidecar (524380 B) 104.50 us/op 125.11 us/op 0.84
transfer serialized Big SignedBeaconBlock (1000000 B) 4.4600 us/op 2.5290 us/op 1.76
copy serialized Big SignedBeaconBlock (1000000 B) 476.74 us/op 258.11 us/op 1.85
pass gossip attestations to forkchoice per slot 4.9967 ms/op 2.6864 ms/op 1.86
forkChoice updateHead vc 100000 bc 64 eq 0 709.58 us/op 444.92 us/op 1.59
forkChoice updateHead vc 600000 bc 64 eq 0 4.6258 ms/op 3.2377 ms/op 1.43
forkChoice updateHead vc 1000000 bc 64 eq 0 8.1365 ms/op 4.4957 ms/op 1.81
forkChoice updateHead vc 600000 bc 320 eq 0 4.4284 ms/op 2.7433 ms/op 1.61
forkChoice updateHead vc 600000 bc 1200 eq 0 4.9479 ms/op 2.6807 ms/op 1.85
forkChoice updateHead vc 600000 bc 7200 eq 0 6.2625 ms/op 3.3894 ms/op 1.85
forkChoice updateHead vc 600000 bc 64 eq 1000 11.634 ms/op 9.5215 ms/op 1.22
forkChoice updateHead vc 600000 bc 64 eq 10000 12.938 ms/op 9.7469 ms/op 1.33
forkChoice updateHead vc 600000 bc 64 eq 300000 21.856 ms/op 11.813 ms/op 1.85
computeDeltas 500000 validators 300 proto nodes 7.0677 ms/op 3.1537 ms/op 2.24
computeDeltas 500000 validators 1200 proto nodes 7.0241 ms/op 3.1598 ms/op 2.22
computeDeltas 500000 validators 7200 proto nodes 6.6303 ms/op 3.0109 ms/op 2.20
computeDeltas 750000 validators 300 proto nodes 10.388 ms/op 4.4981 ms/op 2.31
computeDeltas 750000 validators 1200 proto nodes 10.469 ms/op 4.6063 ms/op 2.27
computeDeltas 750000 validators 7200 proto nodes 10.201 ms/op 4.5964 ms/op 2.22
computeDeltas 1400000 validators 300 proto nodes 20.069 ms/op 9.0436 ms/op 2.22
computeDeltas 1400000 validators 1200 proto nodes 19.970 ms/op 9.4783 ms/op 2.11
computeDeltas 1400000 validators 7200 proto nodes 18.830 ms/op 9.4813 ms/op 1.99
computeDeltas 2100000 validators 300 proto nodes 32.154 ms/op 13.895 ms/op 2.31
computeDeltas 2100000 validators 1200 proto nodes 31.838 ms/op 13.796 ms/op 2.31
computeDeltas 2100000 validators 7200 proto nodes 32.438 ms/op 13.529 ms/op 2.40
altair processAttestation - 250000 vs - 7PWei normalcase 4.2148 ms/op 1.5414 ms/op 2.73
altair processAttestation - 250000 vs - 7PWei worstcase 8.4653 ms/op 3.1955 ms/op 2.65
altair processAttestation - setStatus - 1/6 committees join 163.95 us/op 74.986 us/op 2.19
altair processAttestation - setStatus - 1/3 committees join 321.09 us/op 149.61 us/op 2.15
altair processAttestation - setStatus - 1/2 committees join 450.74 us/op 214.87 us/op 2.10
altair processAttestation - setStatus - 2/3 committees join 602.11 us/op 289.64 us/op 2.08
altair processAttestation - setStatus - 4/5 committees join 736.63 us/op 399.63 us/op 1.84
altair processAttestation - setStatus - 100% committees join 894.26 us/op 490.71 us/op 1.82
altair processBlock - 250000 vs - 7PWei normalcase 11.276 ms/op 7.5527 ms/op 1.49
altair processBlock - 250000 vs - 7PWei normalcase hashState 38.496 ms/op 29.516 ms/op 1.30
altair processBlock - 250000 vs - 7PWei worstcase 44.165 ms/op 33.745 ms/op 1.31
altair processBlock - 250000 vs - 7PWei worstcase hashState 107.50 ms/op 71.949 ms/op 1.49
phase0 processBlock - 250000 vs - 7PWei normalcase 3.5130 ms/op 2.5947 ms/op 1.35
phase0 processBlock - 250000 vs - 7PWei worstcase 35.508 ms/op 25.569 ms/op 1.39
altair processEth1Data - 250000 vs - 7PWei normalcase 650.51 us/op 392.94 us/op 1.66
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 19.208 us/op 6.8590 us/op 2.80
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 110.54 us/op 62.340 us/op 1.77
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 41.164 us/op 23.484 us/op 1.75
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 34.221 us/op 13.904 us/op 2.46
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 240.49 us/op 144.61 us/op 1.66
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.9303 ms/op 1.2626 ms/op 1.53
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.3478 ms/op 1.2403 ms/op 1.89
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.5554 ms/op 1.3078 ms/op 1.95
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 5.7690 ms/op 3.0048 ms/op 1.92
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 3.6561 ms/op 1.9943 ms/op 1.83
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 7.6640 ms/op 5.1940 ms/op 1.48
Tree 40 250000 create 550.48 ms/op 339.35 ms/op 1.62
Tree 40 250000 get(125000) 213.96 ns/op 118.73 ns/op 1.80
Tree 40 250000 set(125000) 1.1686 us/op 825.84 ns/op 1.42
Tree 40 250000 toArray() 24.005 ms/op 22.261 ms/op 1.08
Tree 40 250000 iterate all - toArray() + loop 26.284 ms/op 24.844 ms/op 1.06
Tree 40 250000 iterate all - get(i) 76.633 ms/op 57.459 ms/op 1.33
MutableVector 250000 create 13.746 ms/op 13.659 ms/op 1.01
MutableVector 250000 get(125000) 6.6570 ns/op 5.8650 ns/op 1.14
MutableVector 250000 set(125000) 302.94 ns/op 204.96 ns/op 1.48
MutableVector 250000 toArray() 3.8460 ms/op 2.6019 ms/op 1.48
MutableVector 250000 iterate all - toArray() + loop 4.4918 ms/op 2.5716 ms/op 1.75
MutableVector 250000 iterate all - get(i) 1.5481 ms/op 1.3904 ms/op 1.11
Array 250000 create 3.7180 ms/op 2.4428 ms/op 1.52
Array 250000 clone - spread 1.3554 ms/op 1.2242 ms/op 1.11
Array 250000 get(125000) 1.1260 ns/op 1.0800 ns/op 1.04
Array 250000 set(125000) 4.3830 ns/op 1.2560 ns/op 3.49
Array 250000 iterate all - loop 169.67 us/op 160.45 us/op 1.06
effectiveBalanceIncrements clone Uint8Array 300000 42.030 us/op 14.988 us/op 2.80
effectiveBalanceIncrements clone MutableVector 300000 384.00 ns/op 409.00 ns/op 0.94
effectiveBalanceIncrements rw all Uint8Array 300000 223.53 us/op 191.34 us/op 1.17
effectiveBalanceIncrements rw all MutableVector 300000 153.83 ms/op 73.981 ms/op 2.08
phase0 afterProcessEpoch - 250000 vs - 7PWei 123.48 ms/op 79.042 ms/op 1.56
phase0 beforeProcessEpoch - 250000 vs - 7PWei 79.331 ms/op 52.114 ms/op 1.52
altair processEpoch - mainnet_e81889 568.83 ms/op 405.77 ms/op 1.40
mainnet_e81889 - altair beforeProcessEpoch 123.64 ms/op 78.034 ms/op 1.58
mainnet_e81889 - altair processJustificationAndFinalization 26.770 us/op 14.263 us/op 1.88
mainnet_e81889 - altair processInactivityUpdates 10.113 ms/op 4.4271 ms/op 2.28
mainnet_e81889 - altair processRewardsAndPenalties 71.430 ms/op 61.847 ms/op 1.15
mainnet_e81889 - altair processRegistryUpdates 3.7090 us/op 2.1760 us/op 1.70
mainnet_e81889 - altair processSlashings 531.00 ns/op 836.00 ns/op 0.64
mainnet_e81889 - altair processEth1DataReset 676.00 ns/op 1.0200 us/op 0.66
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.4488 ms/op 1.1534 ms/op 1.26
mainnet_e81889 - altair processSlashingsReset 3.5120 us/op 5.6040 us/op 0.63
mainnet_e81889 - altair processRandaoMixesReset 4.5350 us/op 9.0600 us/op 0.50
mainnet_e81889 - altair processHistoricalRootsUpdate 662.00 ns/op 2.0010 us/op 0.33
mainnet_e81889 - altair processParticipationFlagUpdates 1.8100 us/op 3.4930 us/op 0.52
mainnet_e81889 - altair processSyncCommitteeUpdates 684.00 ns/op 1.3130 us/op 0.52
mainnet_e81889 - altair afterProcessEpoch 122.57 ms/op 86.410 ms/op 1.42
capella processEpoch - mainnet_e217614 2.2884 s/op 2.2910 s/op 1.00
mainnet_e217614 - capella beforeProcessEpoch 555.81 ms/op 727.13 ms/op 0.76
mainnet_e217614 - capella processJustificationAndFinalization 31.937 us/op 28.582 us/op 1.12
mainnet_e217614 - capella processInactivityUpdates 33.079 ms/op 48.268 ms/op 0.69
mainnet_e217614 - capella processRewardsAndPenalties 497.90 ms/op 570.34 ms/op 0.87
mainnet_e217614 - capella processRegistryUpdates 40.962 us/op 31.526 us/op 1.30
mainnet_e217614 - capella processSlashings 1.3120 us/op 986.00 ns/op 1.33
mainnet_e217614 - capella processEth1DataReset 1.3280 us/op 992.00 ns/op 1.34
mainnet_e217614 - capella processEffectiveBalanceUpdates 24.137 ms/op 5.1605 ms/op 4.68
mainnet_e217614 - capella processSlashingsReset 10.387 us/op 6.0490 us/op 1.72
mainnet_e217614 - capella processRandaoMixesReset 12.743 us/op 10.817 us/op 1.18
mainnet_e217614 - capella processHistoricalRootsUpdate 1.6860 us/op 1.0350 us/op 1.63
mainnet_e217614 - capella processParticipationFlagUpdates 5.2100 us/op 3.1260 us/op 1.67
mainnet_e217614 - capella afterProcessEpoch 365.48 ms/op 225.67 ms/op 1.62
phase0 processEpoch - mainnet_e58758 706.41 ms/op 471.24 ms/op 1.50
mainnet_e58758 - phase0 beforeProcessEpoch 228.96 ms/op 151.76 ms/op 1.51
mainnet_e58758 - phase0 processJustificationAndFinalization 27.910 us/op 22.721 us/op 1.23
mainnet_e58758 - phase0 processRewardsAndPenalties 74.530 ms/op 55.631 ms/op 1.34
mainnet_e58758 - phase0 processRegistryUpdates 19.314 us/op 12.250 us/op 1.58
mainnet_e58758 - phase0 processSlashings 1.5620 us/op 687.00 ns/op 2.27
mainnet_e58758 - phase0 processEth1DataReset 1.1660 us/op 909.00 ns/op 1.28
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.0490 ms/op 1.5049 ms/op 1.36
mainnet_e58758 - phase0 processSlashingsReset 6.2090 us/op 3.0060 us/op 2.07
mainnet_e58758 - phase0 processRandaoMixesReset 9.7790 us/op 3.0390 us/op 3.22
mainnet_e58758 - phase0 processHistoricalRootsUpdate 679.00 ns/op 680.00 ns/op 1.00
mainnet_e58758 - phase0 processParticipationRecordUpdates 5.1520 us/op 5.1620 us/op 1.00
mainnet_e58758 - phase0 afterProcessEpoch 98.521 ms/op 67.163 ms/op 1.47
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.4525 ms/op 1.8363 ms/op 0.79
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4506 ms/op 1.1790 ms/op 1.23
altair processInactivityUpdates - 250000 normalcase 25.381 ms/op 28.441 ms/op 0.89
altair processInactivityUpdates - 250000 worstcase 29.457 ms/op 22.751 ms/op 1.29
phase0 processRegistryUpdates - 250000 normalcase 8.4110 us/op 10.762 us/op 0.78
phase0 processRegistryUpdates - 250000 badcase_full_deposits 397.17 us/op 430.42 us/op 0.92
phase0 processRegistryUpdates - 250000 worstcase 0.5 127.95 ms/op 134.62 ms/op 0.95
altair processRewardsAndPenalties - 250000 normalcase 58.862 ms/op 58.749 ms/op 1.00
altair processRewardsAndPenalties - 250000 worstcase 58.162 ms/op 59.256 ms/op 0.98
phase0 getAttestationDeltas - 250000 normalcase 9.2820 ms/op 9.7515 ms/op 0.95
phase0 getAttestationDeltas - 250000 worstcase 11.541 ms/op 6.5635 ms/op 1.76
phase0 processSlashings - 250000 worstcase 105.64 us/op 92.873 us/op 1.14
altair processSyncCommitteeUpdates - 250000 157.69 ms/op 120.25 ms/op 1.31
BeaconState.hashTreeRoot - No change 618.00 ns/op 757.00 ns/op 0.82
BeaconState.hashTreeRoot - 1 full validator 136.54 us/op 114.36 us/op 1.19
BeaconState.hashTreeRoot - 32 full validator 1.3829 ms/op 1.1232 ms/op 1.23
BeaconState.hashTreeRoot - 512 full validator 16.427 ms/op 12.888 ms/op 1.27
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 168.46 us/op 144.54 us/op 1.17
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.3384 ms/op 2.1090 ms/op 1.11
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 27.528 ms/op 25.374 ms/op 1.08
BeaconState.hashTreeRoot - 1 balances 123.46 us/op 117.35 us/op 1.05
BeaconState.hashTreeRoot - 32 balances 1.2017 ms/op 932.73 us/op 1.29
BeaconState.hashTreeRoot - 512 balances 12.546 ms/op 9.2084 ms/op 1.36
BeaconState.hashTreeRoot - 250000 balances 219.68 ms/op 191.07 ms/op 1.15
aggregationBits - 2048 els - zipIndexesInBitList 19.663 us/op 15.931 us/op 1.23
byteArrayEquals 32 76.839 ns/op 66.829 ns/op 1.15
Buffer.compare 32 57.216 ns/op 38.864 ns/op 1.47
byteArrayEquals 1024 2.0885 us/op 1.8153 us/op 1.15
Buffer.compare 1024 73.301 ns/op 44.708 ns/op 1.64
byteArrayEquals 16384 33.295 us/op 29.020 us/op 1.15
Buffer.compare 16384 279.44 ns/op 233.58 ns/op 1.20
byteArrayEquals 123687377 249.34 ms/op 214.84 ms/op 1.16
Buffer.compare 123687377 7.7715 ms/op 7.5528 ms/op 1.03
byteArrayEquals 32 - diff last byte 75.900 ns/op 63.227 ns/op 1.20
Buffer.compare 32 - diff last byte 64.723 ns/op 38.993 ns/op 1.66
byteArrayEquals 1024 - diff last byte 2.0644 us/op 1.8279 us/op 1.13
Buffer.compare 1024 - diff last byte 73.864 ns/op 46.243 ns/op 1.60
byteArrayEquals 16384 - diff last byte 32.971 us/op 28.473 us/op 1.16
Buffer.compare 16384 - diff last byte 263.06 ns/op 242.06 ns/op 1.09
byteArrayEquals 123687377 - diff last byte 256.84 ms/op 203.38 ms/op 1.26
Buffer.compare 123687377 - diff last byte 7.9029 ms/op 7.1411 ms/op 1.11
byteArrayEquals 32 - random bytes 6.4700 ns/op 5.6950 ns/op 1.14
Buffer.compare 32 - random bytes 65.716 ns/op 38.941 ns/op 1.69
byteArrayEquals 1024 - random bytes 6.1620 ns/op 5.4180 ns/op 1.14
Buffer.compare 1024 - random bytes 62.458 ns/op 36.512 ns/op 1.71
byteArrayEquals 16384 - random bytes 5.8860 ns/op 5.8910 ns/op 1.00
Buffer.compare 16384 - random bytes 61.993 ns/op 37.192 ns/op 1.67
byteArrayEquals 123687377 - random bytes 8.9200 ns/op 9.1100 ns/op 0.98
Buffer.compare 123687377 - random bytes 72.870 ns/op 40.260 ns/op 1.81
regular array get 100000 times 45.646 us/op 42.525 us/op 1.07
wrappedArray get 100000 times 46.260 us/op 42.477 us/op 1.09
arrayWithProxy get 100000 times 15.783 ms/op 10.474 ms/op 1.51
ssz.Root.equals 56.092 ns/op 57.379 ns/op 0.98
byteArrayEquals 55.057 ns/op 55.377 ns/op 0.99
Buffer.compare 12.134 ns/op 9.3610 ns/op 1.30
shuffle list - 16384 els 7.2007 ms/op 4.7634 ms/op 1.51
shuffle list - 250000 els 106.38 ms/op 69.721 ms/op 1.53
processSlot - 1 slots 18.297 us/op 13.036 us/op 1.40
processSlot - 32 slots 3.4905 ms/op 2.2483 ms/op 1.55
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 70.772 ms/op 41.879 ms/op 1.69
getCommitteeAssignments - req 1 vs - 250000 vc 2.6548 ms/op 2.2523 ms/op 1.18
getCommitteeAssignments - req 100 vs - 250000 vc 4.4559 ms/op 3.3676 ms/op 1.32
getCommitteeAssignments - req 1000 vs - 250000 vc 4.3357 ms/op 3.6734 ms/op 1.18
findModifiedValidators - 10000 modified validators 618.37 ms/op 431.39 ms/op 1.43
findModifiedValidators - 1000 modified validators 463.36 ms/op 318.92 ms/op 1.45
findModifiedValidators - 100 modified validators 445.37 ms/op 381.26 ms/op 1.17
findModifiedValidators - 10 modified validators 485.12 ms/op 347.17 ms/op 1.40
findModifiedValidators - 1 modified validators 443.40 ms/op 343.69 ms/op 1.29
findModifiedValidators - no difference 455.98 ms/op 332.58 ms/op 1.37
compare ViewDUs 4.5512 s/op 4.1719 s/op 1.09
compare each validator Uint8Array 1.5691 s/op 1.5447 s/op 1.02
compare ViewDU to Uint8Array 1.2598 s/op 940.84 ms/op 1.34
migrate state 1000000 validators, 24 modified, 0 new 804.15 ms/op 708.29 ms/op 1.14
migrate state 1000000 validators, 1700 modified, 1000 new 1.0333 s/op 984.82 ms/op 1.05
migrate state 1000000 validators, 3400 modified, 2000 new 1.3589 s/op 1.1667 s/op 1.16
migrate state 1500000 validators, 24 modified, 0 new 812.52 ms/op 708.25 ms/op 1.15
migrate state 1500000 validators, 1700 modified, 1000 new 1.0964 s/op 920.37 ms/op 1.19
migrate state 1500000 validators, 3400 modified, 2000 new 1.3003 s/op 1.2737 s/op 1.02
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.4100 ns/op 4.9700 ns/op 0.89
state getBlockRootAtSlot - 250000 vs - 7PWei 782.12 ns/op 968.65 ns/op 0.81
computeProposers - vc 250000 9.6816 ms/op 7.2706 ms/op 1.33
computeEpochShuffling - vc 250000 104.87 ms/op 69.538 ms/op 1.51
getNextSyncCommittee - vc 250000 153.96 ms/op 124.23 ms/op 1.24
computeSigningRoot for AttestationData 29.793 us/op 25.713 us/op 1.16
hash AttestationData serialized data then Buffer.toString(base64) 2.3271 us/op 1.2639 us/op 1.84
toHexString serialized data 1.0703 us/op 822.38 ns/op 1.30
Buffer.toString(base64) 224.34 ns/op 158.72 ns/op 1.41

Please sign in to comment.