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: update engine_getPayloadBodiesByHashV1 params to pass array #5957

Merged
merged 2 commits into from
Sep 22, 2023

Conversation

matthewkeil
Copy link
Member

@matthewkeil matthewkeil commented Sep 14, 2023

Motivation

Found a bug in our engine httpClient when e2e testing the blinded/unblinded blocks. The current implementation is not correct per the spec and the EL was throwing an error for the api call. We had unit tests to make sure the functions were built and working to our types but we did not have an e2e test that verified we were sending the correct payload/params. We also did not have this method called anywhere outside of mocked implementations so the error was masked. When e2e testing the blinded blocks an actual rpc call was made to retrieve transactions and withdrawals and the error emerged.

Screenshot 2023-09-14 at 2 55 39 PM

Screenshot 2023-09-14 at 12 29 36 PM

Description

We were passing an array of hex strings as params[0] - params[x] and the spec calls for an array of block hashes in param[0]. Updated engine client to pass an array as the first param.

Steps to test or reproduce

Unit tests were updated to meet the spec.

Quick script to test this works

// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
import {initializeExecutionEngine} from "../../packages/beacon-node/src/execution/index.js";
import {testLogger} from "../../packages/beacon-node/test/utils/logger.js";

const controller = new AbortController();
const executionEngine = initializeExecutionEngine(
  {
    mode: "http",
    urls: ["http://localhost:8888"],
    jwtSecretHex: "************ ssh into stable-mainnet and get jwt key ****************",
    retryAttempts: 1,
    retryDelay: 2000,
  },
  {signal: controller.signal, logger: testLogger("Node-A-Engine")}
);

const res = await executionEngine.getPayloadBodiesByHash([
  "0xa2d32fdb78582554e93dd4b2508b8ede2266cdeff4a1e99aefac2539f82d5b97",
]);

console.log(res);
> ssh -L 8888:127.0.0.1:8551 admin@stable-mainnet  # setup ssh tunnel from localhost:8888
> node --loader=ts-node/esm ./src/test.ts

(node:80017) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
{
  url: 'http://localhost:8888',
  json: {
    jsonrpc: '2.0',
    id: 1,
    method: 'engine_getPayloadBodiesByHashV1',
    params: [ [Array] ]
  },
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'Bearer **************************************'
  }
}
[
  {
    transactions: [
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array], [Uint8Array],
      ... 45 more items
    ],
    withdrawals: [
      [Object], [Object],
      [Object], [Object],
      [Object], [Object],
      [Object], [Object],
      [Object], [Object],
      [Object], [Object],
      [Object], [Object],
      [Object], [Object]
    ]
  }
]

@github-actions
Copy link
Contributor

github-actions bot commented Sep 14, 2023

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: b0d822f Previous: 4fd3d4d Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 553.26 us/op 371.23 us/op 1.49
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 47.505 us/op 46.649 us/op 1.02
BLS verify - blst-native 1.1100 ms/op 1.0971 ms/op 1.01
BLS verifyMultipleSignatures 3 - blst-native 2.3670 ms/op 2.3688 ms/op 1.00
BLS verifyMultipleSignatures 8 - blst-native 5.2002 ms/op 5.0347 ms/op 1.03
BLS verifyMultipleSignatures 32 - blst-native 19.096 ms/op 18.746 ms/op 1.02
BLS verifyMultipleSignatures 64 - blst-native 37.632 ms/op 39.066 ms/op 0.96
BLS verifyMultipleSignatures 128 - blst-native 75.544 ms/op 73.104 ms/op 1.03
BLS deserializing 10000 signatures 773.19 ms/op 777.11 ms/op 0.99
BLS deserializing 100000 signatures 7.8626 s/op 7.9852 s/op 0.98
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.0891 ms/op 1.1714 ms/op 0.93
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.2380 ms/op 1.2914 ms/op 0.96
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.1826 ms/op 2.1296 ms/op 1.02
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.3311 ms/op 3.0462 ms/op 1.09
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.0002 ms/op 5.3830 ms/op 0.93
BLS aggregatePubkeys 32 - blst-native 22.680 us/op 23.532 us/op 0.96
BLS aggregatePubkeys 128 - blst-native 88.617 us/op 87.781 us/op 1.01
getAttestationsForBlock 26.028 ms/op 35.675 ms/op 0.73
isKnown best case - 1 super set check 319.00 ns/op 480.00 ns/op 0.66
isKnown normal case - 2 super set checks 318.00 ns/op 366.00 ns/op 0.87
isKnown worse case - 16 super set checks 315.00 ns/op 328.00 ns/op 0.96
CheckpointStateCache - add get delete 3.4660 us/op 4.1750 us/op 0.83
validate api signedAggregateAndProof - struct 2.4222 ms/op 2.3785 ms/op 1.02
validate gossip signedAggregateAndProof - struct 2.4291 ms/op 2.3849 ms/op 1.02
validate gossip attestation - vc 640000 1.1503 ms/op 1.1619 ms/op 0.99
batch validate gossip attestation - vc 640000 - chunk 32 133.00 us/op 145.22 us/op 0.92
batch validate gossip attestation - vc 640000 - chunk 64 118.73 us/op 127.26 us/op 0.93
batch validate gossip attestation - vc 640000 - chunk 128 111.42 us/op 109.77 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 256 108.72 us/op 108.90 us/op 1.00
pickEth1Vote - no votes 859.31 us/op 836.17 us/op 1.03
pickEth1Vote - max votes 7.9239 ms/op 8.6167 ms/op 0.92
pickEth1Vote - Eth1Data hashTreeRoot value x2048 16.446 ms/op 15.251 ms/op 1.08
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 17.526 ms/op 16.148 ms/op 1.09
pickEth1Vote - Eth1Data fastSerialize value x2048 375.63 us/op 407.20 us/op 0.92
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.6971 ms/op 3.5510 ms/op 1.04
bytes32 toHexString 485.00 ns/op 448.00 ns/op 1.08
bytes32 Buffer.toString(hex) 336.00 ns/op 342.00 ns/op 0.98
bytes32 Buffer.toString(hex) from Uint8Array 441.00 ns/op 512.00 ns/op 0.86
bytes32 Buffer.toString(hex) + 0x 312.00 ns/op 333.00 ns/op 0.94
Object access 1 prop 0.19400 ns/op 0.21800 ns/op 0.89
Map access 1 prop 0.18400 ns/op 0.19300 ns/op 0.95
Object get x1000 5.3010 ns/op 5.4820 ns/op 0.97
Map get x1000 0.51300 ns/op 0.58500 ns/op 0.88
Object set x1000 23.696 ns/op 24.437 ns/op 0.97
Map set x1000 16.215 ns/op 17.411 ns/op 0.93
Return object 10000 times 0.22150 ns/op 0.24140 ns/op 0.92
Throw Error 10000 times 2.6405 us/op 2.8445 us/op 0.93
fastMsgIdFn sha256 / 200 bytes 1.9800 us/op 2.1330 us/op 0.93
fastMsgIdFn h32 xxhash / 200 bytes 297.00 ns/op 324.00 ns/op 0.92
fastMsgIdFn h64 xxhash / 200 bytes 372.00 ns/op 389.00 ns/op 0.96
fastMsgIdFn sha256 / 1000 bytes 6.0610 us/op 6.4500 us/op 0.94
fastMsgIdFn h32 xxhash / 1000 bytes 442.00 ns/op 441.00 ns/op 1.00
fastMsgIdFn h64 xxhash / 1000 bytes 429.00 ns/op 465.00 ns/op 0.92
fastMsgIdFn sha256 / 10000 bytes 51.264 us/op 55.020 us/op 0.93
fastMsgIdFn h32 xxhash / 10000 bytes 1.7950 us/op 1.9030 us/op 0.94
fastMsgIdFn h64 xxhash / 10000 bytes 1.2220 us/op 1.3230 us/op 0.92
send data - 1000 256B messages 11.493 ms/op 14.890 ms/op 0.77
send data - 1000 512B messages 15.634 ms/op 18.735 ms/op 0.83
send data - 1000 1024B messages 22.708 ms/op 26.541 ms/op 0.86
send data - 1000 1200B messages 21.613 ms/op 23.893 ms/op 0.90
send data - 1000 2048B messages 17.031 ms/op 25.708 ms/op 0.66
send data - 1000 4096B messages 19.364 ms/op 25.367 ms/op 0.76
send data - 1000 16384B messages 53.018 ms/op 56.487 ms/op 0.94
send data - 1000 65536B messages 217.86 ms/op 229.14 ms/op 0.95
enrSubnets - fastDeserialize 64 bits 918.00 ns/op 912.00 ns/op 1.01
enrSubnets - ssz BitVector 64 bits 442.00 ns/op 429.00 ns/op 1.03
enrSubnets - fastDeserialize 4 bits 196.00 ns/op 196.00 ns/op 1.00
enrSubnets - ssz BitVector 4 bits 420.00 ns/op 420.00 ns/op 1.00
prioritizePeers score -10:0 att 32-0.1 sync 2-0 67.112 us/op 65.881 us/op 1.02
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 81.094 us/op 75.621 us/op 1.07
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 119.30 us/op 101.63 us/op 1.17
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 181.32 us/op 179.06 us/op 1.01
prioritizePeers score 0:0 att 64-1 sync 4-1 210.22 us/op 204.55 us/op 1.03
array of 16000 items push then shift 1.3033 us/op 1.3092 us/op 1.00
LinkedList of 16000 items push then shift 5.8350 ns/op 5.9650 ns/op 0.98
array of 16000 items push then pop 64.877 ns/op 52.410 ns/op 1.24
LinkedList of 16000 items push then pop 5.7530 ns/op 5.6840 ns/op 1.01
array of 24000 items push then shift 1.8453 us/op 1.9046 us/op 0.97
LinkedList of 24000 items push then shift 6.4910 ns/op 6.0980 ns/op 1.06
array of 24000 items push then pop 89.325 ns/op 107.07 ns/op 0.83
LinkedList of 24000 items push then pop 5.6450 ns/op 5.7700 ns/op 0.98
intersect bitArray bitLen 8 5.4140 ns/op 5.8060 ns/op 0.93
intersect array and set length 8 40.337 ns/op 41.610 ns/op 0.97
intersect bitArray bitLen 128 25.622 ns/op 26.042 ns/op 0.98
intersect array and set length 128 574.19 ns/op 580.14 ns/op 0.99
bitArray.getTrueBitIndexes() bitLen 128 1.2310 us/op 1.2520 us/op 0.98
bitArray.getTrueBitIndexes() bitLen 248 1.9630 us/op 2.0040 us/op 0.98
bitArray.getTrueBitIndexes() bitLen 512 3.5590 us/op 3.9490 us/op 0.90
Buffer.concat 32 items 877.00 ns/op 817.00 ns/op 1.07
Uint8Array.set 32 items 1.7490 us/op 1.9330 us/op 0.90
Set add up to 64 items then delete first 1.6856 us/op 1.7798 us/op 0.95
OrderedSet add up to 64 items then delete first 2.5569 us/op 2.5549 us/op 1.00
Set add up to 64 items then delete last 1.9270 us/op 1.9264 us/op 1.00
OrderedSet add up to 64 items then delete last 2.7001 us/op 3.0765 us/op 0.88
Set add up to 64 items then delete middle 1.8008 us/op 1.9451 us/op 0.93
OrderedSet add up to 64 items then delete middle 3.8838 us/op 4.3103 us/op 0.90
Set add up to 128 items then delete first 3.5605 us/op 3.7512 us/op 0.95
OrderedSet add up to 128 items then delete first 5.6591 us/op 5.6037 us/op 1.01
Set add up to 128 items then delete last 3.5380 us/op 3.7592 us/op 0.94
OrderedSet add up to 128 items then delete last 5.3137 us/op 6.0823 us/op 0.87
Set add up to 128 items then delete middle 3.5566 us/op 3.7995 us/op 0.94
OrderedSet add up to 128 items then delete middle 10.141 us/op 10.689 us/op 0.95
Set add up to 256 items then delete first 6.9602 us/op 7.4795 us/op 0.93
OrderedSet add up to 256 items then delete first 11.262 us/op 11.173 us/op 1.01
Set add up to 256 items then delete last 7.0022 us/op 7.8491 us/op 0.89
OrderedSet add up to 256 items then delete last 10.600 us/op 12.354 us/op 0.86
Set add up to 256 items then delete middle 6.8145 us/op 8.0013 us/op 0.85
OrderedSet add up to 256 items then delete middle 30.080 us/op 31.978 us/op 0.94
transfer serialized Status (84 B) 1.4940 us/op 1.6070 us/op 0.93
copy serialized Status (84 B) 1.2760 us/op 1.4460 us/op 0.88
transfer serialized SignedVoluntaryExit (112 B) 1.4270 us/op 1.9330 us/op 0.74
copy serialized SignedVoluntaryExit (112 B) 1.3160 us/op 1.6390 us/op 0.80
transfer serialized ProposerSlashing (416 B) 1.9220 us/op 2.4340 us/op 0.79
copy serialized ProposerSlashing (416 B) 2.2990 us/op 2.2130 us/op 1.04
transfer serialized Attestation (485 B) 2.0040 us/op 2.0740 us/op 0.97
copy serialized Attestation (485 B) 2.3890 us/op 2.0310 us/op 1.18
transfer serialized AttesterSlashing (33232 B) 1.8830 us/op 1.8090 us/op 1.04
copy serialized AttesterSlashing (33232 B) 3.6420 us/op 5.5290 us/op 0.66
transfer serialized Small SignedBeaconBlock (128000 B) 1.9800 us/op 2.3810 us/op 0.83
copy serialized Small SignedBeaconBlock (128000 B) 7.5340 us/op 17.429 us/op 0.43
transfer serialized Avg SignedBeaconBlock (200000 B) 1.8660 us/op 2.2830 us/op 0.82
copy serialized Avg SignedBeaconBlock (200000 B) 10.712 us/op 21.680 us/op 0.49
transfer serialized BlobsSidecar (524380 B) 2.3010 us/op 2.7960 us/op 0.82
copy serialized BlobsSidecar (524380 B) 143.30 us/op 94.017 us/op 1.52
transfer serialized Big SignedBeaconBlock (1000000 B) 2.6300 us/op 3.5010 us/op 0.75
copy serialized Big SignedBeaconBlock (1000000 B) 132.54 us/op 215.54 us/op 0.61
pass gossip attestations to forkchoice per slot 2.6428 ms/op 2.7215 ms/op 0.97
forkChoice updateHead vc 100000 bc 64 eq 0 485.95 us/op 498.56 us/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 0 2.8277 ms/op 2.6641 ms/op 1.06
forkChoice updateHead vc 1000000 bc 64 eq 0 4.4514 ms/op 4.4182 ms/op 1.01
forkChoice updateHead vc 600000 bc 320 eq 0 2.6336 ms/op 2.6986 ms/op 0.98
forkChoice updateHead vc 600000 bc 1200 eq 0 2.7457 ms/op 2.7587 ms/op 1.00
forkChoice updateHead vc 600000 bc 7200 eq 0 3.3853 ms/op 3.4259 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 1000 10.016 ms/op 10.129 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 10000 9.7361 ms/op 9.8776 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 300000 12.182 ms/op 12.285 ms/op 0.99
computeDeltas 500000 validators 300 proto nodes 2.9955 ms/op 3.1907 ms/op 0.94
computeDeltas 500000 validators 1200 proto nodes 2.9919 ms/op 3.0704 ms/op 0.97
computeDeltas 500000 validators 7200 proto nodes 2.9556 ms/op 3.0831 ms/op 0.96
computeDeltas 750000 validators 300 proto nodes 4.6357 ms/op 5.2361 ms/op 0.89
computeDeltas 750000 validators 1200 proto nodes 4.5502 ms/op 4.4139 ms/op 1.03
computeDeltas 750000 validators 7200 proto nodes 4.7551 ms/op 4.5308 ms/op 1.05
computeDeltas 1400000 validators 300 proto nodes 8.8846 ms/op 8.4076 ms/op 1.06
computeDeltas 1400000 validators 1200 proto nodes 9.4651 ms/op 8.3718 ms/op 1.13
computeDeltas 1400000 validators 7200 proto nodes 9.1897 ms/op 8.5058 ms/op 1.08
computeDeltas 2100000 validators 300 proto nodes 13.508 ms/op 12.492 ms/op 1.08
computeDeltas 2100000 validators 1200 proto nodes 12.904 ms/op 12.669 ms/op 1.02
computeDeltas 2100000 validators 7200 proto nodes 13.017 ms/op 12.849 ms/op 1.01
computeProposerBoostScoreFromBalances 500000 validators 2.8304 ms/op 2.7331 ms/op 1.04
computeProposerBoostScoreFromBalances 750000 validators 2.8167 ms/op 2.7240 ms/op 1.03
computeProposerBoostScoreFromBalances 1400000 validators 2.7724 ms/op 2.7249 ms/op 1.02
computeProposerBoostScoreFromBalances 2100000 validators 2.8232 ms/op 2.7780 ms/op 1.02
altair processAttestation - 250000 vs - 7PWei normalcase 1.6859 ms/op 2.0245 ms/op 0.83
altair processAttestation - 250000 vs - 7PWei worstcase 2.3818 ms/op 4.6021 ms/op 0.52
altair processAttestation - setStatus - 1/6 committees join 111.83 us/op 146.42 us/op 0.76
altair processAttestation - setStatus - 1/3 committees join 218.21 us/op 254.24 us/op 0.86
altair processAttestation - setStatus - 1/2 committees join 307.72 us/op 285.11 us/op 1.08
altair processAttestation - setStatus - 2/3 committees join 426.88 us/op 353.10 us/op 1.21
altair processAttestation - setStatus - 4/5 committees join 532.40 us/op 498.47 us/op 1.07
altair processAttestation - setStatus - 100% committees join 639.30 us/op 587.87 us/op 1.09
altair processBlock - 250000 vs - 7PWei normalcase 5.8911 ms/op 7.4797 ms/op 0.79
altair processBlock - 250000 vs - 7PWei normalcase hashState 25.738 ms/op 30.936 ms/op 0.83
altair processBlock - 250000 vs - 7PWei worstcase 32.501 ms/op 38.346 ms/op 0.85
altair processBlock - 250000 vs - 7PWei worstcase hashState 78.131 ms/op 106.22 ms/op 0.74
phase0 processBlock - 250000 vs - 7PWei normalcase 2.2639 ms/op 2.8492 ms/op 0.79
phase0 processBlock - 250000 vs - 7PWei worstcase 26.921 ms/op 30.404 ms/op 0.89
altair processEth1Data - 250000 vs - 7PWei normalcase 302.47 us/op 528.23 us/op 0.57
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.4930 us/op 17.663 us/op 0.54
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 73.221 us/op 63.197 us/op 1.16
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 15.512 us/op 28.843 us/op 0.54
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 9.7650 us/op 16.938 us/op 0.58
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 144.58 us/op 136.80 us/op 1.06
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.4368 ms/op 1.2261 ms/op 1.17
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.4675 ms/op 1.6229 ms/op 0.90
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.4453 ms/op 1.7146 ms/op 0.84
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.7329 ms/op 4.5458 ms/op 0.60
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.4163 ms/op 2.5553 ms/op 0.55
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.6000 ms/op 7.8059 ms/op 0.46
Tree 40 250000 create 230.34 ms/op 396.89 ms/op 0.58
Tree 40 250000 get(125000) 113.47 ns/op 136.52 ns/op 0.83
Tree 40 250000 set(125000) 662.21 ns/op 1.7306 us/op 0.38
Tree 40 250000 toArray() 17.773 ms/op 21.623 ms/op 0.82
Tree 40 250000 iterate all - toArray() + loop 17.715 ms/op 21.315 ms/op 0.83
Tree 40 250000 iterate all - get(i) 47.127 ms/op 63.025 ms/op 0.75
MutableVector 250000 create 7.4708 ms/op 7.0154 ms/op 1.06
MutableVector 250000 get(125000) 5.5000 ns/op 6.0600 ns/op 0.91
MutableVector 250000 set(125000) 186.29 ns/op 197.51 ns/op 0.94
MutableVector 250000 toArray() 2.2116 ms/op 2.4733 ms/op 0.89
MutableVector 250000 iterate all - toArray() + loop 2.3492 ms/op 2.8153 ms/op 0.83
MutableVector 250000 iterate all - get(i) 1.3241 ms/op 1.3921 ms/op 0.95
Array 250000 create 2.1998 ms/op 2.6213 ms/op 0.84
Array 250000 clone - spread 937.55 us/op 1.1307 ms/op 0.83
Array 250000 get(125000) 0.55800 ns/op 0.61100 ns/op 0.91
Array 250000 set(125000) 0.62400 ns/op 0.69200 ns/op 0.90
Array 250000 iterate all - loop 76.336 us/op 83.537 us/op 0.91
effectiveBalanceIncrements clone Uint8Array 300000 11.997 us/op 13.024 us/op 0.92
effectiveBalanceIncrements clone MutableVector 300000 347.00 ns/op 371.00 ns/op 0.94
effectiveBalanceIncrements rw all Uint8Array 300000 168.45 us/op 174.49 us/op 0.97
effectiveBalanceIncrements rw all MutableVector 300000 63.524 ms/op 68.933 ms/op 0.92
phase0 afterProcessEpoch - 250000 vs - 7PWei 79.235 ms/op 84.636 ms/op 0.94
phase0 beforeProcessEpoch - 250000 vs - 7PWei 25.006 ms/op 33.180 ms/op 0.75
altair processEpoch - mainnet_e81889 381.36 ms/op 441.64 ms/op 0.86
mainnet_e81889 - altair beforeProcessEpoch 52.938 ms/op 63.976 ms/op 0.83
mainnet_e81889 - altair processJustificationAndFinalization 13.973 us/op 21.485 us/op 0.65
mainnet_e81889 - altair processInactivityUpdates 7.1931 ms/op 5.7925 ms/op 1.24
mainnet_e81889 - altair processRewardsAndPenalties 59.503 ms/op 44.878 ms/op 1.33
mainnet_e81889 - altair processRegistryUpdates 2.2900 us/op 4.4970 us/op 0.51
mainnet_e81889 - altair processSlashings 547.00 ns/op 1.0130 us/op 0.54
mainnet_e81889 - altair processEth1DataReset 530.00 ns/op 1.0410 us/op 0.51
mainnet_e81889 - altair processEffectiveBalanceUpdates 876.22 us/op 1.4204 ms/op 0.62
mainnet_e81889 - altair processSlashingsReset 2.7140 us/op 5.9660 us/op 0.45
mainnet_e81889 - altair processRandaoMixesReset 4.3110 us/op 9.0780 us/op 0.47
mainnet_e81889 - altair processHistoricalRootsUpdate 958.00 ns/op 1.8780 us/op 0.51
mainnet_e81889 - altair processParticipationFlagUpdates 1.8100 us/op 4.2480 us/op 0.43
mainnet_e81889 - altair processSyncCommitteeUpdates 585.00 ns/op 1.3870 us/op 0.42
mainnet_e81889 - altair afterProcessEpoch 83.077 ms/op 89.061 ms/op 0.93
capella processEpoch - mainnet_e217614 1.1265 s/op 1.6140 s/op 0.70
mainnet_e217614 - capella beforeProcessEpoch 227.56 ms/op 260.02 ms/op 0.88
mainnet_e217614 - capella processJustificationAndFinalization 14.291 us/op 21.300 us/op 0.67
mainnet_e217614 - capella processInactivityUpdates 17.458 ms/op 18.957 ms/op 0.92
mainnet_e217614 - capella processRewardsAndPenalties 231.31 ms/op 280.89 ms/op 0.82
mainnet_e217614 - capella processRegistryUpdates 17.205 us/op 29.201 us/op 0.59
mainnet_e217614 - capella processSlashings 595.00 ns/op 1.2210 us/op 0.49
mainnet_e217614 - capella processEth1DataReset 596.00 ns/op 1.5260 us/op 0.39
mainnet_e217614 - capella processEffectiveBalanceUpdates 3.0371 ms/op 3.2881 ms/op 0.92
mainnet_e217614 - capella processSlashingsReset 3.9860 us/op 5.4330 us/op 0.73
mainnet_e217614 - capella processRandaoMixesReset 4.1900 us/op 8.8300 us/op 0.47
mainnet_e217614 - capella processHistoricalRootsUpdate 993.00 ns/op 1.5450 us/op 0.64
mainnet_e217614 - capella processParticipationFlagUpdates 2.9570 us/op 3.3980 us/op 0.87
mainnet_e217614 - capella afterProcessEpoch 203.07 ms/op 226.82 ms/op 0.90
phase0 processEpoch - mainnet_e58758 395.43 ms/op 430.35 ms/op 0.92
mainnet_e58758 - phase0 beforeProcessEpoch 118.12 ms/op 127.51 ms/op 0.93
mainnet_e58758 - phase0 processJustificationAndFinalization 12.772 us/op 23.475 us/op 0.54
mainnet_e58758 - phase0 processRewardsAndPenalties 50.560 ms/op 48.035 ms/op 1.05
mainnet_e58758 - phase0 processRegistryUpdates 10.627 us/op 14.467 us/op 0.73
mainnet_e58758 - phase0 processSlashings 621.00 ns/op 1.4010 us/op 0.44
mainnet_e58758 - phase0 processEth1DataReset 704.00 ns/op 1.2910 us/op 0.55
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.5654 ms/op 963.95 us/op 1.62
mainnet_e58758 - phase0 processSlashingsReset 2.5720 us/op 5.0630 us/op 0.51
mainnet_e58758 - phase0 processRandaoMixesReset 3.6740 us/op 8.9350 us/op 0.41
mainnet_e58758 - phase0 processHistoricalRootsUpdate 622.00 ns/op 1.3450 us/op 0.46
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.4510 us/op 8.9100 us/op 0.50
mainnet_e58758 - phase0 afterProcessEpoch 76.235 ms/op 77.285 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0125 ms/op 1.4524 ms/op 0.70
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.3050 ms/op 1.8203 ms/op 0.72
altair processInactivityUpdates - 250000 normalcase 15.095 ms/op 14.859 ms/op 1.02
altair processInactivityUpdates - 250000 worstcase 13.445 ms/op 20.653 ms/op 0.65
phase0 processRegistryUpdates - 250000 normalcase 9.5030 us/op 12.514 us/op 0.76
phase0 processRegistryUpdates - 250000 badcase_full_deposits 391.76 us/op 388.22 us/op 1.01
phase0 processRegistryUpdates - 250000 worstcase 0.5 113.42 ms/op 117.95 ms/op 0.96
altair processRewardsAndPenalties - 250000 normalcase 57.477 ms/op 51.045 ms/op 1.13
altair processRewardsAndPenalties - 250000 worstcase 52.701 ms/op 47.491 ms/op 1.11
phase0 getAttestationDeltas - 250000 normalcase 5.7176 ms/op 6.2889 ms/op 0.91
phase0 getAttestationDeltas - 250000 worstcase 5.8798 ms/op 6.2639 ms/op 0.94
phase0 processSlashings - 250000 worstcase 1.6286 ms/op 2.2702 ms/op 0.72
altair processSyncCommitteeUpdates - 250000 101.62 ms/op 125.85 ms/op 0.81
BeaconState.hashTreeRoot - No change 326.00 ns/op 410.00 ns/op 0.80
BeaconState.hashTreeRoot - 1 full validator 106.97 us/op 139.38 us/op 0.77
BeaconState.hashTreeRoot - 32 full validator 891.54 us/op 1.3351 ms/op 0.67
BeaconState.hashTreeRoot - 512 full validator 9.0705 ms/op 10.993 ms/op 0.83
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 106.06 us/op 117.08 us/op 0.91
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.4829 ms/op 1.5529 ms/op 0.95
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 17.569 ms/op 20.773 ms/op 0.85
BeaconState.hashTreeRoot - 1 balances 84.357 us/op 101.19 us/op 0.83
BeaconState.hashTreeRoot - 32 balances 826.62 us/op 864.13 us/op 0.96
BeaconState.hashTreeRoot - 512 balances 8.2795 ms/op 9.2113 ms/op 0.90
BeaconState.hashTreeRoot - 250000 balances 166.04 ms/op 228.66 ms/op 0.73
aggregationBits - 2048 els - zipIndexesInBitList 10.714 us/op 29.284 us/op 0.37
regular array get 100000 times 31.450 us/op 31.538 us/op 1.00
wrappedArray get 100000 times 31.751 us/op 31.528 us/op 1.01
arrayWithProxy get 100000 times 10.756 ms/op 10.551 ms/op 1.02
ssz.Root.equals 300.00 ns/op 322.00 ns/op 0.93
byteArrayEquals 275.00 ns/op 312.00 ns/op 0.88
shuffle list - 16384 els 4.7515 ms/op 4.8865 ms/op 0.97
shuffle list - 250000 els 70.428 ms/op 71.251 ms/op 0.99
processSlot - 1 slots 13.881 us/op 19.931 us/op 0.70
processSlot - 32 slots 3.5140 ms/op 3.2278 ms/op 1.09
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 45.120 ms/op 41.925 ms/op 1.08
getCommitteeAssignments - req 1 vs - 250000 vc 2.2210 ms/op 2.3110 ms/op 0.96
getCommitteeAssignments - req 100 vs - 250000 vc 3.4128 ms/op 3.5003 ms/op 0.98
getCommitteeAssignments - req 1000 vs - 250000 vc 3.7129 ms/op 3.7662 ms/op 0.99
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.1000 ns/op 5.3600 ns/op 0.95
state getBlockRootAtSlot - 250000 vs - 7PWei 498.75 ns/op 526.25 ns/op 0.95
computeProposers - vc 250000 6.8836 ms/op 6.4316 ms/op 1.07
computeEpochShuffling - vc 250000 71.376 ms/op 73.971 ms/op 0.96
getNextSyncCommittee - vc 250000 106.96 ms/op 113.11 ms/op 0.95
computeSigningRoot for AttestationData 19.877 us/op 28.513 us/op 0.70
hash AttestationData serialized data then Buffer.toString(base64) 1.3181 us/op 1.3386 us/op 0.98
toHexString serialized data 810.91 ns/op 826.48 ns/op 0.98
Buffer.toString(base64) 164.92 ns/op 160.77 ns/op 1.03

by benchmarkbot/action

@matthewkeil matthewkeil marked this pull request as ready for review September 14, 2023 22:19
@matthewkeil matthewkeil requested a review from a team as a code owner September 14, 2023 22:19
Copy link
Contributor

@g11tech g11tech left a comment

Choose a reason for hiding this comment

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

lgtm, makes sense since hashes would be params[0]

@wemeetagain wemeetagain merged commit e17fe6b into unstable Sep 22, 2023
14 of 15 checks passed
@wemeetagain wemeetagain deleted the mkeil/fix-get-payload-params branch September 22, 2023 19:09
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.12.0 🎉

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