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: rebased electra branch - DONOTMERGE just for testing/CI #6899

Closed
wants to merge 51 commits into from

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Jun 20, 2024

Motivation

Description

Closes #issue_number

Steps to test or reproduce

g11tech and others added 30 commits June 17, 2024 21:21
add types stub and epoch config

fix types
* Add immutable in the dependencies

* Initial change to pubkeyCache

* Added todos

* Moved unfinalized cache to epochCache

* Move populating finalized cache to afterProcessEpoch

* Specify unfinalized cache during state cloning

* Move from unfinalized to finalized cache in afterProcessEpoch

* Confused myself

* Clean up

* Change logic

* Fix cloning issue

* Clean up redundant code

* Add CarryoverData in epochCtx.createFromState

* Fix typo

* Update usage of pubkeyCache

* Update pubkeyCache usage

* Fix lint

* Fix lint

* Add 6110 to ChainConfig

* Add 6110 to BeaconPreset

* Define 6110 fork and container

* Add V6110 api to execution engine

* Update test

* Add depositReceiptsRoot to process_execution_payload

* State transitioning to EIP6110

* State transitioning to EIP6110

* Light client change in EIP-6110

* Update tests

* produceBlock

* Refactor processDeposit to match the spec

* Implement processDepositReceipt

* Implement 6110 fork guard for pubkeyCache

* Handle changes in eth1 deposit

* Update eth1 deposit test

* Fix typo

* Lint

* Remove embarassing comments

* Address comments

* Modify applyDeposit signature

* Update packages/state-transition/src/cache/epochCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Update packages/state-transition/src/cache/epochCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Update packages/state-transition/src/cache/pubkeyCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Remove old code

* Rename fields in epochCache and immutableData

* Remove CarryoverData

* Move isAfter6110 from var to method

* Fix cyclic import

* Fix operations spec runner

* Fix for spec test

* Fix spec test

* state.depositReceiptsStartIndex to BigInt

* getDeposit requires cached state

* default depositReceiptsStartIndex value in genesis

* Fix pubkeyCache bug

* newUnfinalizedPubkeyIndexMap in createCachedBeaconState

* Lint

* Pass epochCache instead of pubkey2IndexFn in apis

* Address comments

* Add unit test on pubkey cache cloning

* Add unfinalizedPubkeyCacheSize to metrics

* Add unfinalizedPubkeyCacheSize to metrics

* Clean up code

* Add besu to el-interop

* Add 6110 genesis file

* Template for sim test

* Add unit test for getEth1DepositCount

* Update sim test

* Update besudocker

* Finish beacon api calls in sim test

* Update epochCache.createFromState()

* Fix bug unfinalized validators are not finalized

* Add sim test to run a few blocks

* Lint

* Merge branch 'unstable' into 611

* Add more check to sim test

* Update besu docker image instruction

* Update sim test with correct tx

* Address comment + cleanup

* Clean up code

* Properly handle promise rejection

* Lint

* Update packages/beacon-node/src/execution/engine/types.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Update comments

* Accept type undefined in ExecutionPayloadBodyRpc

* Update comment and semantic

* Remove if statement when adding finalized validator

* Comment on repeated insert on finalized cache

* rename createFromState

* Add comment on getPubkey()

* Stash change to reduce diffs

* Stash change to reduce diffs

* Lint

* addFinalizedPubkey on finalized checkpoint

* Update comment

* Use OrderedMap for unfinalized cache

* Pull out logic of deleting pubkeys for batch op

* Add updateUnfinalizedPubkeys in regen

* Update updateUnfinalizedPubkeys logic

* Add comment

* Add metrics for state context caches

* Address comment

* Address comment

* Deprecate eth1Data polling when condition is reached

* Fix conflicts

* Fix sim test

* Lint

* Fix type

* Fix test

* Fix test

* Lint

* Update packages/light-client/src/spec/utils.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Fix spec test

* Address comments

* Improve cache logic on checkpoint finalized

* Update sim test according to new cache logic

* Update comment

* Lint

* Finalized pubkey cache only update once per checkpoint

* Add perf test for updateUnfinalizedPubkeys

* Add perf test for updateUnfinalizedPubkeys

* Tweak params for perf test

* Freeze besu docker image version for 6110

* Add benchmark result

* Use Map instead of OrderedMap. Update benchmark

* Minor optimization

* Minor optimization

* Add memory test for immutable.js

* Update test

* Reduce code duplication

* Lint

* Remove try/catch in updateUnfinalizedPubkeys

* Introduce EpochCache metric

* Add historicalValidatorLengths

* Polish code

* Migrate state-transition unit tests to vitest

* Fix calculation of pivot index

* `historicalValidatorLengths` only activate post 6110

* Update sim test

* Lint

* Update packages/state-transition/src/cache/epochCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Improve readability on historicalValidatorLengths

* Update types

* Fix calculation

* Add eth1data poll todo

* Add epochCache.getValidatorCountAtEpoch

* Add todo

* Add getStateIterator for state cache

* Partial commit

* Update perf test

* updateUnfinalizedPubkeys directly modify states from regen

* Update sim test. Lint

* Add todo

* some improvements and a fix for effectiveBalanceIncrements fork safeness

* rename eip6110 to elctra

* fix electra-interop.test.ts

---------

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>
Co-authored-by: gajinder <develop@g11tech.io>

lint and tsc

small cleanup

fix rebase issue
* feat: implement execution layer exits eip 7002

* lint and tsc fix

* apply feedback

* improve comment
* Update spec-test version

* Skip electra
* Add types

* Update unit test

* lint

* Address comments

* Address comments

* Lint

* Update packages/beacon-node/src/util/sszBytes.ts

Co-authored-by: tuyennhv <tuyen@chainsafe.io>

* Add isElectraAttestation

* Update unit test

* Update unit test

* chore: add comments for sszBytes.ts

---------

Co-authored-by: tuyennhv <tuyen@chainsafe.io>
Co-authored-by: Tuyen Nguyen <vutuyen2636@gmail.com>
* chore: fix the rebase build

* fix test
* feat: upgrade 7002 exits to withdrawal request

* fix types

* fix types and references

* further fix the types references and get build passing

* update the process ops fn but needs to be extended by maxeb
* feat: implement EIP-6110 (#6042)

* Add immutable in the dependencies

* Initial change to pubkeyCache

* Added todos

* Moved unfinalized cache to epochCache

* Move populating finalized cache to afterProcessEpoch

* Specify unfinalized cache during state cloning

* Move from unfinalized to finalized cache in afterProcessEpoch

* Confused myself

* Clean up

* Change logic

* Fix cloning issue

* Clean up redundant code

* Add CarryoverData in epochCtx.createFromState

* Fix typo

* Update usage of pubkeyCache

* Update pubkeyCache usage

* Fix lint

* Fix lint

* Add 6110 to ChainConfig

* Add 6110 to BeaconPreset

* Define 6110 fork and container

* Add V6110 api to execution engine

* Update test

* Add depositReceiptsRoot to process_execution_payload

* State transitioning to EIP6110

* State transitioning to EIP6110

* Light client change in EIP-6110

* Update tests

* produceBlock

* Refactor processDeposit to match the spec

* Implement processDepositReceipt

* Implement 6110 fork guard for pubkeyCache

* Handle changes in eth1 deposit

* Update eth1 deposit test

* Fix typo

* Lint

* Remove embarassing comments

* Address comments

* Modify applyDeposit signature

* Update packages/state-transition/src/cache/epochCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Update packages/state-transition/src/cache/epochCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Update packages/state-transition/src/cache/pubkeyCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Remove old code

* Rename fields in epochCache and immutableData

* Remove CarryoverData

* Move isAfter6110 from var to method

* Fix cyclic import

* Fix operations spec runner

* Fix for spec test

* Fix spec test

* state.depositReceiptsStartIndex to BigInt

* getDeposit requires cached state

* default depositReceiptsStartIndex value in genesis

* Fix pubkeyCache bug

* newUnfinalizedPubkeyIndexMap in createCachedBeaconState

* Lint

* Pass epochCache instead of pubkey2IndexFn in apis

* Address comments

* Add unit test on pubkey cache cloning

* Add unfinalizedPubkeyCacheSize to metrics

* Add unfinalizedPubkeyCacheSize to metrics

* Clean up code

* Add besu to el-interop

* Add 6110 genesis file

* Template for sim test

* Add unit test for getEth1DepositCount

* Update sim test

* Update besudocker

* Finish beacon api calls in sim test

* Update epochCache.createFromState()

* Fix bug unfinalized validators are not finalized

* Add sim test to run a few blocks

* Lint

* Merge branch 'unstable' into 611

* Add more check to sim test

* Update besu docker image instruction

* Update sim test with correct tx

* Address comment + cleanup

* Clean up code

* Properly handle promise rejection

* Lint

* Update packages/beacon-node/src/execution/engine/types.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Update comments

* Accept type undefined in ExecutionPayloadBodyRpc

* Update comment and semantic

* Remove if statement when adding finalized validator

* Comment on repeated insert on finalized cache

* rename createFromState

* Add comment on getPubkey()

* Stash change to reduce diffs

* Stash change to reduce diffs

* Lint

* addFinalizedPubkey on finalized checkpoint

* Update comment

* Use OrderedMap for unfinalized cache

* Pull out logic of deleting pubkeys for batch op

* Add updateUnfinalizedPubkeys in regen

* Update updateUnfinalizedPubkeys logic

* Add comment

* Add metrics for state context caches

* Address comment

* Address comment

* Deprecate eth1Data polling when condition is reached

* Fix conflicts

* Fix sim test

* Lint

* Fix type

* Fix test

* Fix test

* Lint

* Update packages/light-client/src/spec/utils.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Fix spec test

* Address comments

* Improve cache logic on checkpoint finalized

* Update sim test according to new cache logic

* Update comment

* Lint

* Finalized pubkey cache only update once per checkpoint

* Add perf test for updateUnfinalizedPubkeys

* Add perf test for updateUnfinalizedPubkeys

* Tweak params for perf test

* Freeze besu docker image version for 6110

* Add benchmark result

* Use Map instead of OrderedMap. Update benchmark

* Minor optimization

* Minor optimization

* Add memory test for immutable.js

* Update test

* Reduce code duplication

* Lint

* Remove try/catch in updateUnfinalizedPubkeys

* Introduce EpochCache metric

* Add historicalValidatorLengths

* Polish code

* Migrate state-transition unit tests to vitest

* Fix calculation of pivot index

* `historicalValidatorLengths` only activate post 6110

* Update sim test

* Lint

* Update packages/state-transition/src/cache/epochCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Improve readability on historicalValidatorLengths

* Update types

* Fix calculation

* Add eth1data poll todo

* Add epochCache.getValidatorCountAtEpoch

* Add todo

* Add getStateIterator for state cache

* Partial commit

* Update perf test

* updateUnfinalizedPubkeys directly modify states from regen

* Update sim test. Lint

* Add todo

* some improvements and a fix for effectiveBalanceIncrements fork safeness

* rename eip6110 to elctra

* fix electra-interop.test.ts

---------

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>
Co-authored-by: gajinder <develop@g11tech.io>

lint and tsc

small cleanup

fix rebase issue

* feat: implement EIP-6110 (#6042)

* Add immutable in the dependencies

* Initial change to pubkeyCache

* Added todos

* Moved unfinalized cache to epochCache

* Move populating finalized cache to afterProcessEpoch

* Specify unfinalized cache during state cloning

* Move from unfinalized to finalized cache in afterProcessEpoch

* Confused myself

* Clean up

* Change logic

* Fix cloning issue

* Clean up redundant code

* Add CarryoverData in epochCtx.createFromState

* Fix typo

* Update usage of pubkeyCache

* Update pubkeyCache usage

* Fix lint

* Fix lint

* Add 6110 to ChainConfig

* Add 6110 to BeaconPreset

* Define 6110 fork and container

* Add V6110 api to execution engine

* Update test

* Add depositReceiptsRoot to process_execution_payload

* State transitioning to EIP6110

* State transitioning to EIP6110

* Light client change in EIP-6110

* Update tests

* produceBlock

* Refactor processDeposit to match the spec

* Implement processDepositReceipt

* Implement 6110 fork guard for pubkeyCache

* Handle changes in eth1 deposit

* Update eth1 deposit test

* Fix typo

* Lint

* Remove embarassing comments

* Address comments

* Modify applyDeposit signature

* Update packages/state-transition/src/cache/epochCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Update packages/state-transition/src/cache/epochCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Update packages/state-transition/src/cache/pubkeyCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Remove old code

* Rename fields in epochCache and immutableData

* Remove CarryoverData

* Move isAfter6110 from var to method

* Fix cyclic import

* Fix operations spec runner

* Fix for spec test

* Fix spec test

* state.depositReceiptsStartIndex to BigInt

* getDeposit requires cached state

* default depositReceiptsStartIndex value in genesis

* Fix pubkeyCache bug

* newUnfinalizedPubkeyIndexMap in createCachedBeaconState

* Lint

* Pass epochCache instead of pubkey2IndexFn in apis

* Address comments

* Add unit test on pubkey cache cloning

* Add unfinalizedPubkeyCacheSize to metrics

* Add unfinalizedPubkeyCacheSize to metrics

* Clean up code

* Add besu to el-interop

* Add 6110 genesis file

* Template for sim test

* Add unit test for getEth1DepositCount

* Update sim test

* Update besudocker

* Finish beacon api calls in sim test

* Update epochCache.createFromState()

* Fix bug unfinalized validators are not finalized

* Add sim test to run a few blocks

* Lint

* Merge branch 'unstable' into 611

* Add more check to sim test

* Update besu docker image instruction

* Update sim test with correct tx

* Address comment + cleanup

* Clean up code

* Properly handle promise rejection

* Lint

* Update packages/beacon-node/src/execution/engine/types.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Update comments

* Accept type undefined in ExecutionPayloadBodyRpc

* Update comment and semantic

* Remove if statement when adding finalized validator

* Comment on repeated insert on finalized cache

* rename createFromState

* Add comment on getPubkey()

* Stash change to reduce diffs

* Stash change to reduce diffs

* Lint

* addFinalizedPubkey on finalized checkpoint

* Update comment

* Use OrderedMap for unfinalized cache

* Pull out logic of deleting pubkeys for batch op

* Add updateUnfinalizedPubkeys in regen

* Update updateUnfinalizedPubkeys logic

* Add comment

* Add metrics for state context caches

* Address comment

* Address comment

* Deprecate eth1Data polling when condition is reached

* Fix conflicts

* Fix sim test

* Lint

* Fix type

* Fix test

* Fix test

* Lint

* Update packages/light-client/src/spec/utils.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Fix spec test

* Address comments

* Improve cache logic on checkpoint finalized

* Update sim test according to new cache logic

* Update comment

* Lint

* Finalized pubkey cache only update once per checkpoint

* Add perf test for updateUnfinalizedPubkeys

* Add perf test for updateUnfinalizedPubkeys

* Tweak params for perf test

* Freeze besu docker image version for 6110

* Add benchmark result

* Use Map instead of OrderedMap. Update benchmark

* Minor optimization

* Minor optimization

* Add memory test for immutable.js

* Update test

* Reduce code duplication

* Lint

* Remove try/catch in updateUnfinalizedPubkeys

* Introduce EpochCache metric

* Add historicalValidatorLengths

* Polish code

* Migrate state-transition unit tests to vitest

* Fix calculation of pivot index

* `historicalValidatorLengths` only activate post 6110

* Update sim test

* Lint

* Update packages/state-transition/src/cache/epochCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Improve readability on historicalValidatorLengths

* Update types

* Fix calculation

* Add eth1data poll todo

* Add epochCache.getValidatorCountAtEpoch

* Add todo

* Add getStateIterator for state cache

* Partial commit

* Update perf test

* updateUnfinalizedPubkeys directly modify states from regen

* Update sim test. Lint

* Add todo

* some improvements and a fix for effectiveBalanceIncrements fork safeness

* rename eip6110 to elctra

* fix electra-interop.test.ts

---------

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>
Co-authored-by: gajinder <develop@g11tech.io>

lint and tsc

small cleanup

* Add presets

* Update config

* Add necessary containers

* Update presets

* Update config

* Add todo comments

* Update constants and params

* Impl new process withdrawal

* Add withdrawaRequests to payload

* Add processConsolidation

* Add process withdraw request

* Update deposit and withdrawal flow

* epoch processing

* Implement churn limits

* Lint

* lint

* Update state-transition utils

* processExecutionLayerWithdrawRequest

* processConsolidation

* queueExcessActiveBalance

* isValidDepositSignature

* Add jsdoc and timer for new processEpoch functions

* Lint

* Update maxEB

* update voluntary exit

* Fix config

* Update initiateValidatorExit

* Remove churn limit in processRegistryUpdates

* Fix conflict

* Add MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD

* Reflect latest spec changes

* rebase fixes, fixes, improvements and cleanup

lint

* Upgrade ssz version

* Use sliceFrom()

* cleanup as per specs feedback

subarry

* simplify

* fix withdrawals

* remove slice

* fix the slashing quotient determination in slashvalidator

---------

Co-authored-by: harkamal <gajinder@g11.in>
* Process attestations in block

* Fix check-types

* Address comments
* initial commit

* lint

* Add getAttestingIndices and update getIndexedAttestation

* Update gossip validation

* Update attestation gossip validation

* aggregateAndProof validation

* clean up

* Validator

* Misc

* Fix the build erros

* feat: get attestations for electra block (#6732)

* feat: getAttestationsForBlock() for electra

* chore: fix lint

* fix: MAX_ATTESTATIONS_PER_GROUP_ELECTRA and address PR comments

* chore: unit test aggregateConsolidation

* Fix rebase mistake

* Address my own comment :)

---------

Co-authored-by: Navie Chan <naviechan@gmail.com>

* Fix check-types

* Address comments

---------

Co-authored-by: Nazar Hussain <nazarhussain@gmail.com>
Co-authored-by: tuyennhv <tuyen@chainsafe.io>
* feat: attestationPool to group by slot by data root by committee index for electra

* fix: gossip validation and assert.notNull() util

* fix: remove light-client stats.html

* fix: lint and check-types
* Rename receipt to request

* Remove stats.html
* initial commit

* Update gossip validation

* Update attestation gossip validation

* aggregateAndProof validation

* Extend spec runner to be more flexible

* Add missing state attributes for electra

* Fix ss data types for electra spec

* Make the spec runner more flexible

* Fix the bug in process attestation

* Update the sepc test version

* clean up

* Misc

* Fix the build erros

* feat: get attestations for electra block (#6732)

* feat: getAttestationsForBlock() for electra

* chore: fix lint

* fix: MAX_ATTESTATIONS_PER_GROUP_ELECTRA and address PR comments

* chore: unit test aggregateConsolidation

* Fix rebase mistake

* Address my own comment :)

---------

Co-authored-by: Navie Chan <naviechan@gmail.com>

* Fix check-types

* Address comments

* Fix the build erros

* Extend spec runner to be more flexible

* Add missing state attributes for electra

* Fix ss data types for electra spec

* Make the spec runner more flexible

* Fix the bug in process attestation

* Update the sepc test version

* Fix rebase issue

* Update committee index count check

---------

Co-authored-by: NC <adrninistrator1@protonmail.com>
Co-authored-by: Navie Chan <naviechan@gmail.com>
Co-authored-by: tuyennhv <tuyen@chainsafe.io>
fix: get signature for SignedAggregateAndProof based on fork
* Fix attester slashing specs for electra

* Remove unused import

* Add code comment

* Update the expression

* Update the fork check
* chore: fix types and lint

* fx

* type and lint fix
* process pending deposit from eth1

* Fix the genesis params

* fix

* Fix

* clean up

---------

Co-authored-by: Nazar Hussain <nazarhussain@gmail.com>
* chore: update EffectiveBalanceIncrements type

* chore: remove now irrelevant tests
* fix: electra fork transition

* fix: merge issue

* chore: remove unwanted change
nflaig and others added 20 commits June 19, 2024 16:52
Use mutable validator object
* fix: remove epochCache.balances and invalid MAX_EFFECTIVE_BALANCE check

* fix: update rewardsAndPenalties balance updates

* docs: add comment to check epochTransitionCache
Fix publishing att with non-zero comm index
* fix attestation duty validation

* Update packages/validator/src/services/validatorStore.ts

Co-authored-by: twoeths <tuyen@chainsafe.io>

* Update packages/validator/src/services/validatorStore.ts

---------

Co-authored-by: twoeths <tuyen@chainsafe.io>
Co-authored-by: Cayman <caymannava@gmail.com>
* fix: align BeaconBlockBody and BlindedBeaconBlockBody

* Remove type hacks in test

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>
* test: improve ssz tests consistency

* chore: address comments
* fix: get seen AttData key from SignedAggregateAndProof electra

* chore: revert the naming change to COMMITTEE_BITS_SIZE and add comment

* fix: add toBase64() util
* test: only skip ssz_static tests associated to missing type

* More detailed error message if type is not defined
* Add ByHash and ByRange V2

* Fix build issue

* Fix CI error
Copy link
Contributor

github-actions bot commented Jun 20, 2024

⚠️ 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: b475aa2 Previous: a074310 Ratio
altair processEpoch - mainnet_e81889 3.7088 s/op 486.24 ms/op 7.63
phase0 processEpoch - mainnet_e58758 2.9116 s/op 364.30 ms/op 7.99
phase0 processEffectiveBalanceUpdates - 250000 normalcase 6.6725 ms/op 1.6162 ms/op 4.13
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 6.7468 ms/op 1.7113 ms/op 3.94
Full benchmark results
Benchmark suite Current: b475aa2 Previous: a074310 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 538.23 us/op 589.22 us/op 0.91
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 60.082 us/op 47.232 us/op 1.27
BLS verify - blst-native 1.2252 ms/op 1.2389 ms/op 0.99
BLS verifyMultipleSignatures 3 - blst-native 2.6999 ms/op 2.6289 ms/op 1.03
BLS verifyMultipleSignatures 8 - blst-native 5.8360 ms/op 5.7669 ms/op 1.01
BLS verifyMultipleSignatures 32 - blst-native 21.237 ms/op 21.141 ms/op 1.00
BLS verifyMultipleSignatures 64 - blst-native 42.030 ms/op 41.400 ms/op 1.02
BLS verifyMultipleSignatures 128 - blst-native 83.269 ms/op 81.882 ms/op 1.02
BLS deserializing 10000 signatures 870.66 ms/op 855.78 ms/op 1.02
BLS deserializing 100000 signatures 8.9095 s/op 8.7036 s/op 1.02
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.2874 ms/op 1.2574 ms/op 1.02
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.4552 ms/op 1.4273 ms/op 1.02
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.3188 ms/op 2.3094 ms/op 1.00
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.3634 ms/op 3.3223 ms/op 1.01
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.3654 ms/op 5.9519 ms/op 1.07
BLS aggregatePubkeys 32 - blst-native 26.278 us/op 25.754 us/op 1.02
BLS aggregatePubkeys 128 - blst-native 99.258 us/op 99.036 us/op 1.00
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 62.742 ms/op 74.034 ms/op 0.85
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 48.404 ms/op 53.920 ms/op 0.90
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 32.920 ms/op 34.492 ms/op 0.95
getSlashingsAndExits - default max 81.295 us/op 114.98 us/op 0.71
getSlashingsAndExits - 2k 288.66 us/op 301.17 us/op 0.96
proposeBlockBody type=full, size=empty 7.3492 ms/op 5.8613 ms/op 1.25
isKnown best case - 1 super set check 310.00 ns/op 314.00 ns/op 0.99
isKnown normal case - 2 super set checks 282.00 ns/op 304.00 ns/op 0.93
isKnown worse case - 16 super set checks 294.00 ns/op 377.00 ns/op 0.78
InMemoryCheckpointStateCache - add get delete 4.4440 us/op 5.7720 us/op 0.77
updateUnfinalizedPubkeys - updating 10 pubkeys 584.08 us/op
updateUnfinalizedPubkeys - updating 100 pubkeys 3.4618 ms/op
updateUnfinalizedPubkeys - updating 1000 pubkeys 62.565 ms/op
validate api signedAggregateAndProof - struct 2.6144 ms/op 2.7226 ms/op 0.96
validate gossip signedAggregateAndProof - struct 2.6329 ms/op 2.7285 ms/op 0.96
validate gossip attestation - vc 640000 1.2790 ms/op 1.3274 ms/op 0.96
batch validate gossip attestation - vc 640000 - chunk 32 154.08 us/op 168.06 us/op 0.92
batch validate gossip attestation - vc 640000 - chunk 64 138.62 us/op 150.37 us/op 0.92
batch validate gossip attestation - vc 640000 - chunk 128 126.51 us/op 132.23 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 256 123.51 us/op 125.27 us/op 0.99
pickEth1Vote - no votes 1.0921 ms/op 1.1546 ms/op 0.95
pickEth1Vote - max votes 9.7490 ms/op 7.9537 ms/op 1.23
pickEth1Vote - Eth1Data hashTreeRoot value x2048 16.041 ms/op 13.693 ms/op 1.17
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 20.911 ms/op 20.276 ms/op 1.03
pickEth1Vote - Eth1Data fastSerialize value x2048 538.33 us/op 540.24 us/op 1.00
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.0351 ms/op 4.4510 ms/op 0.91
bytes32 toHexString 488.00 ns/op 550.00 ns/op 0.89
bytes32 Buffer.toString(hex) 254.00 ns/op 255.00 ns/op 1.00
bytes32 Buffer.toString(hex) from Uint8Array 426.00 ns/op 452.00 ns/op 0.94
bytes32 Buffer.toString(hex) + 0x 253.00 ns/op 264.00 ns/op 0.96
Object access 1 prop 0.17200 ns/op 0.16400 ns/op 1.05
Map access 1 prop 0.13000 ns/op 0.14200 ns/op 0.92
Object get x1000 6.2990 ns/op 6.1060 ns/op 1.03
Map get x1000 6.7370 ns/op 6.6080 ns/op 1.02
Object set x1000 36.101 ns/op 37.603 ns/op 0.96
Map set x1000 24.982 ns/op 24.381 ns/op 1.02
Return object 10000 times 0.29570 ns/op 0.30720 ns/op 0.96
Throw Error 10000 times 3.3889 us/op 3.4637 us/op 0.98
fastMsgIdFn sha256 / 200 bytes 2.3000 us/op 2.3260 us/op 0.99
fastMsgIdFn h32 xxhash / 200 bytes 241.00 ns/op 283.00 ns/op 0.85
fastMsgIdFn h64 xxhash / 200 bytes 261.00 ns/op 282.00 ns/op 0.93
fastMsgIdFn sha256 / 1000 bytes 7.3280 us/op 7.5760 us/op 0.97
fastMsgIdFn h32 xxhash / 1000 bytes 392.00 ns/op 403.00 ns/op 0.97
fastMsgIdFn h64 xxhash / 1000 bytes 339.00 ns/op 352.00 ns/op 0.96
fastMsgIdFn sha256 / 10000 bytes 64.351 us/op 65.894 us/op 0.98
fastMsgIdFn h32 xxhash / 10000 bytes 1.8920 us/op 1.9350 us/op 0.98
fastMsgIdFn h64 xxhash / 10000 bytes 1.2310 us/op 1.2270 us/op 1.00
send data - 1000 256B messages 13.206 ms/op 13.657 ms/op 0.97
send data - 1000 512B messages 20.889 ms/op 18.089 ms/op 1.15
send data - 1000 1024B messages 26.364 ms/op 28.198 ms/op 0.93
send data - 1000 1200B messages 27.503 ms/op 27.643 ms/op 0.99
send data - 1000 2048B messages 30.305 ms/op 35.109 ms/op 0.86
send data - 1000 4096B messages 28.958 ms/op 31.959 ms/op 0.91
send data - 1000 16384B messages 76.574 ms/op 71.528 ms/op 1.07
send data - 1000 65536B messages 222.21 ms/op 226.91 ms/op 0.98
enrSubnets - fastDeserialize 64 bits 1.2400 us/op 1.2250 us/op 1.01
enrSubnets - ssz BitVector 64 bits 397.00 ns/op 451.00 ns/op 0.88
enrSubnets - fastDeserialize 4 bits 173.00 ns/op 207.00 ns/op 0.84
enrSubnets - ssz BitVector 4 bits 380.00 ns/op 454.00 ns/op 0.84
prioritizePeers score -10:0 att 32-0.1 sync 2-0 206.72 us/op 223.38 us/op 0.93
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 158.49 us/op 173.27 us/op 0.91
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 269.74 us/op 334.53 us/op 0.81
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 414.64 us/op 456.54 us/op 0.91
prioritizePeers score 0:0 att 64-1 sync 4-1 790.57 us/op 872.79 us/op 0.91
array of 16000 items push then shift 1.6712 us/op 1.7302 us/op 0.97
LinkedList of 16000 items push then shift 7.9430 ns/op 8.6850 ns/op 0.91
array of 16000 items push then pop 142.55 ns/op 153.16 ns/op 0.93
LinkedList of 16000 items push then pop 7.6160 ns/op 8.6700 ns/op 0.88
array of 24000 items push then shift 2.4664 us/op 2.5663 us/op 0.96
LinkedList of 24000 items push then shift 7.7470 ns/op 9.7200 ns/op 0.80
array of 24000 items push then pop 176.49 ns/op 225.64 ns/op 0.78
LinkedList of 24000 items push then pop 7.6540 ns/op 8.8850 ns/op 0.86
intersect bitArray bitLen 8 6.6220 ns/op 6.8860 ns/op 0.96
intersect array and set length 8 49.770 ns/op 62.473 ns/op 0.80
intersect bitArray bitLen 128 29.368 ns/op 31.418 ns/op 0.93
intersect array and set length 128 730.36 ns/op 917.96 ns/op 0.80
bitArray.getTrueBitIndexes() bitLen 128 2.1830 us/op 2.2740 us/op 0.96
bitArray.getTrueBitIndexes() bitLen 248 3.0560 us/op 5.5330 us/op 0.55
bitArray.getTrueBitIndexes() bitLen 512 7.5530 us/op 10.228 us/op 0.74
Buffer.concat 32 items 948.00 ns/op 1.2380 us/op 0.77
Uint8Array.set 32 items 1.9230 us/op 1.9430 us/op 0.99
Buffer.copy 1.9730 us/op 2.2520 us/op 0.88
Uint8Array.set - with subarray 2.5140 us/op 3.5530 us/op 0.71
Uint8Array.set - without subarray 1.5820 us/op 1.5470 us/op 1.02
Set add up to 64 items then delete first 2.4072 us/op 2.4775 us/op 0.97
OrderedSet add up to 64 items then delete first 3.5397 us/op 3.9066 us/op 0.91
Set add up to 64 items then delete last 2.5923 us/op 2.7191 us/op 0.95
OrderedSet add up to 64 items then delete last 4.1534 us/op 4.2472 us/op 0.98
Set add up to 64 items then delete middle 2.6065 us/op 2.8040 us/op 0.93
OrderedSet add up to 64 items then delete middle 5.4270 us/op 6.0030 us/op 0.90
Set add up to 128 items then delete first 5.2616 us/op 6.0190 us/op 0.87
OrderedSet add up to 128 items then delete first 8.1267 us/op 8.8277 us/op 0.92
Set add up to 128 items then delete last 5.4750 us/op 5.6919 us/op 0.96
OrderedSet add up to 128 items then delete last 7.8301 us/op 9.3151 us/op 0.84
Set add up to 128 items then delete middle 5.1848 us/op 5.9425 us/op 0.87
OrderedSet add up to 128 items then delete middle 14.701 us/op 14.943 us/op 0.98
Set add up to 256 items then delete first 11.645 us/op 12.143 us/op 0.96
OrderedSet add up to 256 items then delete first 17.562 us/op 17.158 us/op 1.02
Set add up to 256 items then delete last 9.8108 us/op 11.215 us/op 0.87
OrderedSet add up to 256 items then delete last 14.848 us/op 18.721 us/op 0.79
Set add up to 256 items then delete middle 9.8096 us/op 12.761 us/op 0.77
OrderedSet add up to 256 items then delete middle 41.939 us/op 45.739 us/op 0.92
transfer serialized Status (84 B) 1.3460 us/op 1.4350 us/op 0.94
copy serialized Status (84 B) 1.1460 us/op 1.3760 us/op 0.83
transfer serialized SignedVoluntaryExit (112 B) 1.4540 us/op 1.5530 us/op 0.94
copy serialized SignedVoluntaryExit (112 B) 1.2150 us/op 1.3000 us/op 0.93
transfer serialized ProposerSlashing (416 B) 1.6190 us/op 2.4240 us/op 0.67
copy serialized ProposerSlashing (416 B) 2.7680 us/op 2.7750 us/op 1.00
transfer serialized Attestation (485 B) 2.7040 us/op 2.3110 us/op 1.17
copy serialized Attestation (485 B) 2.7940 us/op 2.4480 us/op 1.14
transfer serialized AttesterSlashing (33232 B) 1.9930 us/op 2.7060 us/op 0.74
copy serialized AttesterSlashing (33232 B) 5.3830 us/op 7.6950 us/op 0.70
transfer serialized Small SignedBeaconBlock (128000 B) 3.0010 us/op 3.6300 us/op 0.83
copy serialized Small SignedBeaconBlock (128000 B) 18.357 us/op 19.134 us/op 0.96
transfer serialized Avg SignedBeaconBlock (200000 B) 3.7010 us/op 4.0220 us/op 0.92
copy serialized Avg SignedBeaconBlock (200000 B) 29.806 us/op 27.263 us/op 1.09
transfer serialized BlobsSidecar (524380 B) 3.9670 us/op 4.0490 us/op 0.98
copy serialized BlobsSidecar (524380 B) 94.206 us/op 201.86 us/op 0.47
transfer serialized Big SignedBeaconBlock (1000000 B) 3.1290 us/op 4.8430 us/op 0.65
copy serialized Big SignedBeaconBlock (1000000 B) 161.73 us/op 334.77 us/op 0.48
pass gossip attestations to forkchoice per slot 3.0518 ms/op 3.1887 ms/op 0.96
forkChoice updateHead vc 100000 bc 64 eq 0 493.60 us/op 497.81 us/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 0 3.0684 ms/op 3.3220 ms/op 0.92
forkChoice updateHead vc 1000000 bc 64 eq 0 5.4207 ms/op 6.1512 ms/op 0.88
forkChoice updateHead vc 600000 bc 320 eq 0 3.4668 ms/op 3.4111 ms/op 1.02
forkChoice updateHead vc 600000 bc 1200 eq 0 3.3015 ms/op 3.4729 ms/op 0.95
forkChoice updateHead vc 600000 bc 7200 eq 0 3.9464 ms/op 4.0973 ms/op 0.96
forkChoice updateHead vc 600000 bc 64 eq 1000 12.169 ms/op 11.075 ms/op 1.10
forkChoice updateHead vc 600000 bc 64 eq 10000 10.847 ms/op 10.818 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 300000 16.637 ms/op 17.599 ms/op 0.95
computeDeltas 500000 validators 300 proto nodes 3.7612 ms/op 3.6205 ms/op 1.04
computeDeltas 500000 validators 1200 proto nodes 3.7839 ms/op 3.5368 ms/op 1.07
computeDeltas 500000 validators 7200 proto nodes 3.9057 ms/op 3.8985 ms/op 1.00
computeDeltas 750000 validators 300 proto nodes 5.7472 ms/op 5.8248 ms/op 0.99
computeDeltas 750000 validators 1200 proto nodes 5.7981 ms/op 5.5268 ms/op 1.05
computeDeltas 750000 validators 7200 proto nodes 6.4166 ms/op 5.7775 ms/op 1.11
computeDeltas 1400000 validators 300 proto nodes 11.604 ms/op 11.034 ms/op 1.05
computeDeltas 1400000 validators 1200 proto nodes 11.214 ms/op 10.857 ms/op 1.03
computeDeltas 1400000 validators 7200 proto nodes 11.529 ms/op 11.853 ms/op 0.97
computeDeltas 2100000 validators 300 proto nodes 17.130 ms/op 19.693 ms/op 0.87
computeDeltas 2100000 validators 1200 proto nodes 16.631 ms/op 18.638 ms/op 0.89
computeDeltas 2100000 validators 7200 proto nodes 16.697 ms/op 17.959 ms/op 0.93
altair processAttestation - 250000 vs - 7PWei normalcase 2.5521 ms/op 1.7495 ms/op 1.46
altair processAttestation - 250000 vs - 7PWei worstcase 4.3427 ms/op 2.7126 ms/op 1.60
altair processAttestation - setStatus - 1/6 committees join 119.25 us/op 96.274 us/op 1.24
altair processAttestation - setStatus - 1/3 committees join 195.64 us/op 192.57 us/op 1.02
altair processAttestation - setStatus - 1/2 committees join 275.56 us/op 263.80 us/op 1.04
altair processAttestation - setStatus - 2/3 committees join 375.51 us/op 347.63 us/op 1.08
altair processAttestation - setStatus - 4/5 committees join 525.42 us/op 493.49 us/op 1.06
altair processAttestation - setStatus - 100% committees join 663.80 us/op 631.68 us/op 1.05
altair processBlock - 250000 vs - 7PWei normalcase 9.1486 ms/op 4.3966 ms/op 2.08
altair processBlock - 250000 vs - 7PWei normalcase hashState 37.629 ms/op 26.324 ms/op 1.43
altair processBlock - 250000 vs - 7PWei worstcase 35.916 ms/op 44.350 ms/op 0.81
altair processBlock - 250000 vs - 7PWei worstcase hashState 84.793 ms/op 84.029 ms/op 1.01
phase0 processBlock - 250000 vs - 7PWei normalcase 1.8780 ms/op 2.2116 ms/op 0.85
phase0 processBlock - 250000 vs - 7PWei worstcase 27.396 ms/op 31.262 ms/op 0.88
altair processEth1Data - 250000 vs - 7PWei normalcase 323.65 us/op 525.39 us/op 0.62
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 10.401 us/op 6.3910 us/op 1.63
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 62.189 us/op 28.721 us/op 2.17
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 15.183 us/op 9.2440 us/op 1.64
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 9.9730 us/op 6.2420 us/op 1.60
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 185.34 us/op 103.69 us/op 1.79
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.2956 ms/op 732.35 us/op 1.77
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.9237 ms/op 979.14 us/op 1.96
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8202 ms/op 948.89 us/op 1.92
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.7980 ms/op 2.8051 ms/op 1.71
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.8343 ms/op 1.6964 ms/op 1.08
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.1551 ms/op 4.1291 ms/op 1.25
Tree 40 250000 create 233.60 ms/op 280.62 ms/op 0.83
Tree 40 250000 get(125000) 145.31 ns/op 169.12 ns/op 0.86
Tree 40 250000 set(125000) 750.38 ns/op 1.0476 us/op 0.72
Tree 40 250000 toArray() 20.027 ms/op 23.020 ms/op 0.87
Tree 40 250000 iterate all - toArray() + loop 21.564 ms/op 23.348 ms/op 0.92
Tree 40 250000 iterate all - get(i) 62.434 ms/op 65.483 ms/op 0.95
Array 250000 create 3.8329 ms/op 4.3950 ms/op 0.87
Array 250000 clone - spread 1.6559 ms/op 1.6884 ms/op 0.98
Array 250000 get(125000) 0.43500 ns/op 0.46600 ns/op 0.93
Array 250000 set(125000) 0.46400 ns/op 0.48400 ns/op 0.96
Array 250000 iterate all - loop 103.67 us/op 115.53 us/op 0.90
phase0 afterProcessEpoch - 250000 vs - 7PWei 89.232 ms/op 95.182 ms/op 0.94
phase0 beforeProcessEpoch - 250000 vs - 7PWei 48.757 ms/op 54.378 ms/op 0.90
altair processEpoch - mainnet_e81889 3.7088 s/op 486.24 ms/op 7.63
mainnet_e81889 - altair beforeProcessEpoch 75.333 ms/op 82.226 ms/op 0.92
mainnet_e81889 - altair processJustificationAndFinalization 14.675 us/op 22.884 us/op 0.64
mainnet_e81889 - altair processInactivityUpdates 8.5867 ms/op 9.3720 ms/op 0.92
mainnet_e81889 - altair processRewardsAndPenalties 38.255 ms/op 53.686 ms/op 0.71
mainnet_e81889 - altair processRegistryUpdates 2.2150 us/op 2.3380 us/op 0.95
mainnet_e81889 - altair processSlashings 429.00 ns/op 833.00 ns/op 0.52
mainnet_e81889 - altair processEth1DataReset 443.00 ns/op 2.1110 us/op 0.21
mainnet_e81889 - altair processEffectiveBalanceUpdates 183.31 ms/op 1.4649 ms/op 125.14
mainnet_e81889 - altair processSlashingsReset 3.6400 us/op 8.4450 us/op 0.43
mainnet_e81889 - altair processRandaoMixesReset 3.7250 us/op 7.4500 us/op 0.50
mainnet_e81889 - altair processHistoricalRootsUpdate 376.00 ns/op 1.3340 us/op 0.28
mainnet_e81889 - altair processParticipationFlagUpdates 2.2800 us/op 5.1440 us/op 0.44
mainnet_e81889 - altair processSyncCommitteeUpdates 571.00 ns/op 1.0510 us/op 0.54
mainnet_e81889 - altair afterProcessEpoch 97.910 ms/op 104.07 ms/op 0.94
capella processEpoch - mainnet_e217614 2.2935 s/op 1.3481 s/op 1.70
mainnet_e217614 - capella beforeProcessEpoch 306.27 ms/op 259.78 ms/op 1.18
mainnet_e217614 - capella processJustificationAndFinalization 21.354 us/op 14.220 us/op 1.50
mainnet_e217614 - capella processInactivityUpdates 23.671 ms/op 19.373 ms/op 1.22
mainnet_e217614 - capella processRewardsAndPenalties 252.54 ms/op 243.83 ms/op 1.04
mainnet_e217614 - capella processRegistryUpdates 16.098 us/op 16.829 us/op 0.96
mainnet_e217614 - capella processSlashings 870.00 ns/op 619.00 ns/op 1.41
mainnet_e217614 - capella processEth1DataReset 612.00 ns/op 499.00 ns/op 1.23
mainnet_e217614 - capella processEffectiveBalanceUpdates 100.86 ms/op 16.821 ms/op 6.00
mainnet_e217614 - capella processSlashingsReset 3.3810 us/op 4.2820 us/op 0.79
mainnet_e217614 - capella processRandaoMixesReset 7.0890 us/op 5.3230 us/op 1.33
mainnet_e217614 - capella processHistoricalRootsUpdate 948.00 ns/op 631.00 ns/op 1.50
mainnet_e217614 - capella processParticipationFlagUpdates 3.2180 us/op 3.7940 us/op 0.85
mainnet_e217614 - capella afterProcessEpoch 282.43 ms/op 269.93 ms/op 1.05
phase0 processEpoch - mainnet_e58758 2.9116 s/op 364.30 ms/op 7.99
mainnet_e58758 - phase0 beforeProcessEpoch 107.47 ms/op 112.64 ms/op 0.95
mainnet_e58758 - phase0 processJustificationAndFinalization 18.706 us/op 14.684 us/op 1.27
mainnet_e58758 - phase0 processRewardsAndPenalties 38.597 ms/op 33.470 ms/op 1.15
mainnet_e58758 - phase0 processRegistryUpdates 9.3650 us/op 8.0200 us/op 1.17
mainnet_e58758 - phase0 processSlashings 461.00 ns/op 315.00 ns/op 1.46
mainnet_e58758 - phase0 processEth1DataReset 438.00 ns/op 318.00 ns/op 1.38
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 147.42 ms/op 942.79 us/op 156.37
mainnet_e58758 - phase0 processSlashingsReset 4.5530 us/op 2.5940 us/op 1.76
mainnet_e58758 - phase0 processRandaoMixesReset 4.8710 us/op 4.3190 us/op 1.13
mainnet_e58758 - phase0 processHistoricalRootsUpdate 500.00 ns/op 335.00 ns/op 1.49
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.6220 us/op 2.6920 us/op 1.35
mainnet_e58758 - phase0 afterProcessEpoch 79.152 ms/op 75.882 ms/op 1.04
phase0 processEffectiveBalanceUpdates - 250000 normalcase 6.6725 ms/op 1.6162 ms/op 4.13
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 6.7468 ms/op 1.7113 ms/op 3.94
altair processInactivityUpdates - 250000 normalcase 19.885 ms/op 16.602 ms/op 1.20
altair processInactivityUpdates - 250000 worstcase 18.170 ms/op 17.357 ms/op 1.05
phase0 processRegistryUpdates - 250000 normalcase 8.8760 us/op 6.1270 us/op 1.45
phase0 processRegistryUpdates - 250000 badcase_full_deposits 310.88 us/op 271.80 us/op 1.14
phase0 processRegistryUpdates - 250000 worstcase 0.5 109.32 ms/op 105.90 ms/op 1.03
altair processRewardsAndPenalties - 250000 normalcase 40.625 ms/op 38.265 ms/op 1.06
altair processRewardsAndPenalties - 250000 worstcase 41.726 ms/op 39.378 ms/op 1.06
phase0 getAttestationDeltas - 250000 normalcase 8.0454 ms/op 6.8834 ms/op 1.17
phase0 getAttestationDeltas - 250000 worstcase 11.012 ms/op 6.9654 ms/op 1.58
phase0 processSlashings - 250000 worstcase 113.17 us/op 76.459 us/op 1.48
altair processSyncCommitteeUpdates - 250000 137.11 ms/op 123.47 ms/op 1.11
BeaconState.hashTreeRoot - No change 315.00 ns/op 267.00 ns/op 1.18
BeaconState.hashTreeRoot - 1 full validator 112.75 us/op 119.20 us/op 0.95
BeaconState.hashTreeRoot - 32 full validator 1.1154 ms/op 1.4037 ms/op 0.79
BeaconState.hashTreeRoot - 512 full validator 12.679 ms/op 12.314 ms/op 1.03
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 137.87 us/op 131.69 us/op 1.05
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.2986 ms/op 1.4903 ms/op 1.54
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 30.266 ms/op 18.060 ms/op 1.68
BeaconState.hashTreeRoot - 1 balances 122.83 us/op 134.04 us/op 0.92
BeaconState.hashTreeRoot - 32 balances 1.0974 ms/op 1.1982 ms/op 0.92
BeaconState.hashTreeRoot - 512 balances 10.373 ms/op 9.3384 ms/op 1.11
BeaconState.hashTreeRoot - 250000 balances 186.34 ms/op 188.87 ms/op 0.99
aggregationBits - 2048 els - zipIndexesInBitList 38.215 us/op 22.785 us/op 1.68
byteArrayEquals 32 56.093 ns/op 52.520 ns/op 1.07
Buffer.compare 32 18.520 ns/op 19.335 ns/op 0.96
byteArrayEquals 1024 1.6702 us/op 1.5523 us/op 1.08
Buffer.compare 1024 27.142 ns/op 27.766 ns/op 0.98
byteArrayEquals 16384 26.141 us/op 25.529 us/op 1.02
Buffer.compare 16384 205.51 ns/op 203.40 ns/op 1.01
byteArrayEquals 123687377 197.18 ms/op 194.06 ms/op 1.02
Buffer.compare 123687377 8.3472 ms/op 7.7150 ms/op 1.08
byteArrayEquals 32 - diff last byte 55.157 ns/op 55.121 ns/op 1.00
Buffer.compare 32 - diff last byte 18.182 ns/op 21.524 ns/op 0.84
byteArrayEquals 1024 - diff last byte 1.6569 us/op 1.6770 us/op 0.99
Buffer.compare 1024 - diff last byte 26.261 ns/op 27.807 ns/op 0.94
byteArrayEquals 16384 - diff last byte 26.147 us/op 26.094 us/op 1.00
Buffer.compare 16384 - diff last byte 201.50 ns/op 184.02 ns/op 1.09
byteArrayEquals 123687377 - diff last byte 200.45 ms/op 206.84 ms/op 0.97
Buffer.compare 123687377 - diff last byte 10.078 ms/op 9.5123 ms/op 1.06
byteArrayEquals 32 - random bytes 5.4900 ns/op 5.6810 ns/op 0.97
Buffer.compare 32 - random bytes 19.867 ns/op 21.536 ns/op 0.92
byteArrayEquals 1024 - random bytes 5.5880 ns/op 5.5500 ns/op 1.01
Buffer.compare 1024 - random bytes 18.202 ns/op 21.325 ns/op 0.85
byteArrayEquals 16384 - random bytes 5.4760 ns/op 5.8740 ns/op 0.93
Buffer.compare 16384 - random bytes 18.372 ns/op 21.994 ns/op 0.84
byteArrayEquals 123687377 - random bytes 6.9800 ns/op 7.1600 ns/op 0.97
Buffer.compare 123687377 - random bytes 20.370 ns/op 23.160 ns/op 0.88
regular array get 100000 times 35.602 us/op 35.399 us/op 1.01
wrappedArray get 100000 times 34.867 us/op 35.250 us/op 0.99
arrayWithProxy get 100000 times 13.064 ms/op 13.371 ms/op 0.98
ssz.Root.equals 48.151 ns/op 50.970 ns/op 0.94
byteArrayEquals 47.507 ns/op 47.849 ns/op 0.99
Buffer.compare 11.024 ns/op 11.634 ns/op 0.95
shuffle list - 16384 els 6.7398 ms/op 7.2256 ms/op 0.93
shuffle list - 250000 els 96.853 ms/op 104.03 ms/op 0.93
processSlot - 1 slots 15.794 us/op 17.447 us/op 0.91
processSlot - 32 slots 3.0707 ms/op 3.4566 ms/op 0.89
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 35.347 ms/op 39.620 ms/op 0.89
getCommitteeAssignments - req 1 vs - 250000 vc 2.1317 ms/op 2.2412 ms/op 0.95
getCommitteeAssignments - req 100 vs - 250000 vc 4.1289 ms/op 4.2886 ms/op 0.96
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4343 ms/op 4.7817 ms/op 0.93
findModifiedValidators - 10000 modified validators 285.31 ms/op 263.90 ms/op 1.08
findModifiedValidators - 1000 modified validators 216.84 ms/op 236.29 ms/op 0.92
findModifiedValidators - 100 modified validators 240.05 ms/op 214.39 ms/op 1.12
findModifiedValidators - 10 modified validators 227.70 ms/op 231.23 ms/op 0.98
findModifiedValidators - 1 modified validators 179.69 ms/op 267.01 ms/op 0.67
findModifiedValidators - no difference 173.48 ms/op 172.53 ms/op 1.01
compare ViewDUs 3.0434 s/op 3.3511 s/op 0.91
compare each validator Uint8Array 1.2671 s/op 1.4358 s/op 0.88
compare ViewDU to Uint8Array 1.1141 s/op 991.93 ms/op 1.12
migrate state 1000000 validators, 24 modified, 0 new 621.33 ms/op 594.23 ms/op 1.05
migrate state 1000000 validators, 1700 modified, 1000 new 787.39 ms/op 897.44 ms/op 0.88
migrate state 1000000 validators, 3400 modified, 2000 new 1.0075 s/op 1.0051 s/op 1.00
migrate state 1500000 validators, 24 modified, 0 new 564.85 ms/op 596.51 ms/op 0.95
migrate state 1500000 validators, 1700 modified, 1000 new 1.1796 s/op 788.75 ms/op 1.50
migrate state 1500000 validators, 3400 modified, 2000 new 1.6234 s/op 1.0166 s/op 1.60
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.9600 ns/op 4.3400 ns/op 1.60
state getBlockRootAtSlot - 250000 vs - 7PWei 927.68 ns/op 650.12 ns/op 1.43
computeProposers - vc 250000 16.134 ms/op 7.2082 ms/op 2.24
computeEpochShuffling - vc 250000 136.05 ms/op 91.972 ms/op 1.48
getNextSyncCommittee - vc 250000 191.59 ms/op 120.38 ms/op 1.59
computeSigningRoot for AttestationData 32.044 us/op 20.337 us/op 1.58
hash AttestationData serialized data then Buffer.toString(base64) 2.0613 us/op 1.5398 us/op 1.34
toHexString serialized data 1.9941 us/op 1.0230 us/op 1.95
Buffer.toString(base64) 268.21 ns/op 206.33 ns/op 1.30

by benchmarkbot/action

Copy link
Member

@nflaig nflaig left a comment

Choose a reason for hiding this comment

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

We can keep the APIs as is for now, it will work for devnet1 can do a follow up do implement v2 apis as modifying existing apis like this is not gonna work

packages/api/src/beacon/routes/beacon/pool.ts Show resolved Hide resolved
packages/api/src/beacon/routes/validator.ts Outdated Show resolved Hide resolved
packages/api/src/beacon/routes/events.ts Show resolved Hide resolved
import {expect, describe, it, vi, beforeAll} from "vitest";
import {sleep} from "@lodestar/utils";
import {Lightclient, LightclientEvent, utils, transport} from "../../dist/lightclient.min.mjs";
import {Lightclient, LightclientEvent, utils, transport} from "../../src/index.js";
Copy link
Member

@nflaig nflaig Jun 20, 2024

Choose a reason for hiding this comment

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

I don't think this is correct as we are no longer testing the web bundle. The problem with this is as soon as you run yarn check-types locally, this file will fail yarn lint (this is why it does not fail in CI because we run type checks and lint separately there).

I opened an issue for this a while ago #6726, we need to look into properly fixing this and not fail lint locallly.

cc @nazarhussain

Copy link
Contributor Author

Choose a reason for hiding this comment

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

well i just carried the rebase change, someone who has more insight (you or nazar) can tackle it

Copy link
Member

Choose a reason for hiding this comment

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

this should be fixed on unstable branch anyways, pretty annoying during development if you have yarn lint fail all the time

chore: fix bls and blst versioning

fix: add ForkName.electra to ForkBlobsInfo

some api header lookup fixes

more api fixes

make the api data safe

Co-authored-by: matthewkeil <me@matthewkeil.com>
@g11tech
Copy link
Contributor Author

g11tech commented Jun 21, 2024

closing branch as force pushed on electra-fork

@g11tech g11tech closed this Jun 21, 2024
@g11tech g11tech deleted the electra-forkjun19 branch June 21, 2024 16:07
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.

8 participants