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

Simplify gitData and version guessing #3992

Merged
merged 1 commit into from
May 10, 2022
Merged

Conversation

dapplion
Copy link
Contributor

@dapplion dapplion commented May 9, 2022

Background

When publishing content to NPM the "git data" i.e. the exact commit at which the build was done is not possible to be known. So a .git-data.json file is created to persist this useful data:

  • For NPM release (stable): Only the version is persisted. Once must then track the version's tag in Github to resolve that version to a specific commit. While this is okay, git-data.json gives a gurantee of the exact commit at build time.

  • For NPM release (nightly): canary commits include the commit, so this feature is not really necessary. However, it's more cumbersome to have conditional logic on stable / nightly.

  • For build from source: .git folder is available in the context of the built code, so it can extract branch and commit directly without the need for .git-data.json.

  • For build from source dockerized: This feature is required to know the branch and commit, since git data is not persisted past the build. However, .dockerignore prevents .git folder from being copied into the container's context, so .git-data.json can't be generated.

Before

The "version string" (what is displayed in logs and metrics) was manually crafted on each run from new git-data, persisted git-data and local package.json file. The priority order was:

  • new git-data
  • persisted git-data
  • local package.json file

After

The priority order is changed such that the semver version is ALWAYS derived from the local package.json file and never from any git data. This will solve the incorrect tagging of versions.

Also, the number of commits is never tracked, so for nightly only the commit will be shown.

Don't print double slash in version string

Dont add git-data.json to NPM releases

Write git-data.json only in from source docker build

Remove numCommits

Test git-data.json generation from within the test

Move comment

Revert "Dont add git-data.json to NPM releases"

This reverts commit 5fe2d38.

Simplify gitData and version guessing

Run cmd
@dapplion dapplion requested a review from a team as a code owner May 9, 2022 17:51
@codecov
Copy link

codecov bot commented May 9, 2022

Codecov Report

Merging #3992 (f453983) into master (28e2c74) will decrease coverage by 3.97%.
The diff coverage is n/a.

❗ Current head f453983 differs from pull request most recent head d542713. Consider uploading reports for the commit d542713 to get more accurate results

@@            Coverage Diff             @@
##           master    #3992      +/-   ##
==========================================
- Coverage   36.78%   32.80%   -3.98%     
==========================================
  Files         325      280      -45     
  Lines        9224     8531     -693     
  Branches     1498     1439      -59     
==========================================
- Hits         3393     2799     -594     
+ Misses       5640     5567      -73     
+ Partials      191      165      -26     

@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2022

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: f453983 Previous: 28e2c74 Ratio
BeaconState.hashTreeRoot - No change 539.00 ns/op 618.00 ns/op 0.87
BeaconState.hashTreeRoot - 1 full validator 78.146 us/op 77.091 us/op 1.01
BeaconState.hashTreeRoot - 32 full validator 773.08 us/op 747.81 us/op 1.03
BeaconState.hashTreeRoot - 512 full validator 7.7936 ms/op 7.0775 ms/op 1.10
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 97.198 us/op 89.437 us/op 1.09
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.3154 ms/op 1.2111 ms/op 1.09
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 18.217 ms/op 15.488 ms/op 1.18
BeaconState.hashTreeRoot - 1 balances 71.997 us/op 66.994 us/op 1.07
BeaconState.hashTreeRoot - 32 balances 650.15 us/op 595.54 us/op 1.09
BeaconState.hashTreeRoot - 512 balances 6.3173 ms/op 5.7309 ms/op 1.10
BeaconState.hashTreeRoot - 250000 balances 128.80 ms/op 129.12 ms/op 1.00
processSlot - 1 slots 16.025 us/op 13.826 us/op 1.16
processSlot - 32 slots 2.3186 ms/op 2.1166 ms/op 1.10
getCommitteeAssignments - req 1 vs - 250000 vc 6.0548 ms/op 5.3675 ms/op 1.13
getCommitteeAssignments - req 100 vs - 250000 vc 8.3504 ms/op 8.5348 ms/op 0.98
getCommitteeAssignments - req 1000 vs - 250000 vc 9.3112 ms/op 8.7314 ms/op 1.07
computeProposers - vc 250000 21.990 ms/op 20.435 ms/op 1.08
computeEpochShuffling - vc 250000 177.99 ms/op 160.23 ms/op 1.11
getNextSyncCommittee - vc 250000 364.85 ms/op 362.99 ms/op 1.01
altair processAttestation - 250000 vs - 7PWei normalcase 5.4734 ms/op 4.1119 ms/op 1.33
altair processAttestation - 250000 vs - 7PWei worstcase 7.5311 ms/op 6.9603 ms/op 1.08
altair processAttestation - setStatus - 1/6 committees join 242.59 us/op 234.70 us/op 1.03
altair processAttestation - setStatus - 1/3 committees join 467.67 us/op 420.08 us/op 1.11
altair processAttestation - setStatus - 1/2 committees join 636.43 us/op 598.13 us/op 1.06
altair processAttestation - setStatus - 2/3 committees join 867.71 us/op 745.76 us/op 1.16
altair processAttestation - setStatus - 4/5 committees join 1.1675 ms/op 1.0192 ms/op 1.15
altair processAttestation - setStatus - 100% committees join 1.4658 ms/op 1.3001 ms/op 1.13
altair processBlock - 250000 vs - 7PWei normalcase 28.890 ms/op 29.127 ms/op 0.99
altair processBlock - 250000 vs - 7PWei normalcase hashState 42.288 ms/op 40.236 ms/op 1.05
altair processBlock - 250000 vs - 7PWei worstcase 93.413 ms/op 85.988 ms/op 1.09
altair processBlock - 250000 vs - 7PWei worstcase hashState 127.00 ms/op 125.60 ms/op 1.01
altair processEth1Data - 250000 vs - 7PWei normalcase 1.0940 ms/op 910.02 us/op 1.20
altair processEpoch - mainnet_e81889 672.28 ms/op 641.09 ms/op 1.05
mainnet_e81889 - altair beforeProcessEpoch 178.45 ms/op 102.26 ms/op 1.75
mainnet_e81889 - altair processJustificationAndFinalization 79.754 us/op 75.155 us/op 1.06
mainnet_e81889 - altair processInactivityUpdates 13.696 ms/op 11.556 ms/op 1.19
mainnet_e81889 - altair processRewardsAndPenalties 103.58 ms/op 174.37 ms/op 0.59
mainnet_e81889 - altair processRegistryUpdates 18.559 us/op 16.199 us/op 1.15
mainnet_e81889 - altair processSlashings 6.6730 us/op 6.7050 us/op 1.00
mainnet_e81889 - altair processEth1DataReset 6.1250 us/op 6.7850 us/op 0.90
mainnet_e81889 - altair processEffectiveBalanceUpdates 8.7795 ms/op 7.6563 ms/op 1.15
mainnet_e81889 - altair processSlashingsReset 23.125 us/op 24.184 us/op 0.96
mainnet_e81889 - altair processRandaoMixesReset 28.518 us/op 27.767 us/op 1.03
mainnet_e81889 - altair processHistoricalRootsUpdate 9.2530 us/op 8.8520 us/op 1.05
mainnet_e81889 - altair processParticipationFlagUpdates 15.518 us/op 18.656 us/op 0.83
mainnet_e81889 - altair processSyncCommitteeUpdates 5.7660 us/op 5.7330 us/op 1.01
mainnet_e81889 - altair afterProcessEpoch 212.16 ms/op 186.73 ms/op 1.14
altair processInactivityUpdates - 250000 normalcase 47.083 ms/op 38.997 ms/op 1.21
altair processInactivityUpdates - 250000 worstcase 42.191 ms/op 34.654 ms/op 1.22
altair processRewardsAndPenalties - 250000 normalcase 103.80 ms/op 135.04 ms/op 0.77
altair processRewardsAndPenalties - 250000 worstcase 114.18 ms/op 118.11 ms/op 0.97
altair processSyncCommitteeUpdates - 250000 376.68 ms/op 365.79 ms/op 1.03
Tree 40 250000 create 1.0642 s/op 776.69 ms/op 1.37
Tree 40 250000 get(125000) 369.02 ns/op 323.73 ns/op 1.14
Tree 40 250000 set(125000) 3.5553 us/op 2.6953 us/op 1.32
Tree 40 250000 toArray() 38.174 ms/op 35.203 ms/op 1.08
Tree 40 250000 iterate all - toArray() + loop 38.330 ms/op 34.999 ms/op 1.10
Tree 40 250000 iterate all - get(i) 142.90 ms/op 133.05 ms/op 1.07
MutableVector 250000 create 21.730 ms/op 16.712 ms/op 1.30
MutableVector 250000 get(125000) 15.017 ns/op 14.619 ns/op 1.03
MutableVector 250000 set(125000) 894.16 ns/op 697.07 ns/op 1.28
MutableVector 250000 toArray() 6.9958 ms/op 6.2133 ms/op 1.13
MutableVector 250000 iterate all - toArray() + loop 7.0640 ms/op 6.7380 ms/op 1.05
MutableVector 250000 iterate all - get(i) 3.5796 ms/op 3.5017 ms/op 1.02
Array 250000 create 6.2476 ms/op 5.6947 ms/op 1.10
Array 250000 clone - spread 2.7672 ms/op 2.7580 ms/op 1.00
Array 250000 get(125000) 1.3380 ns/op 1.2770 ns/op 1.05
Array 250000 set(125000) 1.3880 ns/op 1.2940 ns/op 1.07
Array 250000 iterate all - loop 153.21 us/op 149.70 us/op 1.02
effectiveBalanceIncrements clone Uint8Array 300000 461.27 us/op 162.62 us/op 2.84
effectiveBalanceIncrements clone MutableVector 300000 773.00 ns/op 593.00 ns/op 1.30
effectiveBalanceIncrements rw all Uint8Array 300000 215.10 us/op 196.99 us/op 1.09
effectiveBalanceIncrements rw all MutableVector 300000 240.10 ms/op 181.70 ms/op 1.32
aggregationBits - 2048 els - zipIndexesInBitList 33.900 us/op 25.085 us/op 1.35
regular array get 100000 times 64.719 us/op 59.094 us/op 1.10
wrappedArray get 100000 times 65.464 us/op 61.901 us/op 1.06
arrayWithProxy get 100000 times 44.455 ms/op 69.079 ms/op 0.64
ssz.Root.equals 565.00 ns/op 551.00 ns/op 1.03
byteArrayEquals 565.00 ns/op 461.00 ns/op 1.23
phase0 processBlock - 250000 vs - 7PWei normalcase 4.4739 ms/op 4.0778 ms/op 1.10
phase0 processBlock - 250000 vs - 7PWei worstcase 61.515 ms/op 57.221 ms/op 1.08
phase0 afterProcessEpoch - 250000 vs - 7PWei 197.26 ms/op 198.91 ms/op 0.99
phase0 beforeProcessEpoch - 250000 vs - 7PWei 88.194 ms/op 81.026 ms/op 1.09
phase0 processEpoch - mainnet_e58758 622.33 ms/op 674.68 ms/op 0.92
mainnet_e58758 - phase0 beforeProcessEpoch 279.50 ms/op 285.46 ms/op 0.98
mainnet_e58758 - phase0 processJustificationAndFinalization 71.009 us/op 71.578 us/op 0.99
mainnet_e58758 - phase0 processRewardsAndPenalties 156.13 ms/op 84.808 ms/op 1.84
mainnet_e58758 - phase0 processRegistryUpdates 36.479 us/op 36.932 us/op 0.99
mainnet_e58758 - phase0 processSlashings 7.1330 us/op 7.1440 us/op 1.00
mainnet_e58758 - phase0 processEth1DataReset 6.4440 us/op 6.2330 us/op 1.03
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 8.2628 ms/op 6.3559 ms/op 1.30
mainnet_e58758 - phase0 processSlashingsReset 22.375 us/op 23.571 us/op 0.95
mainnet_e58758 - phase0 processRandaoMixesReset 28.188 us/op 27.756 us/op 1.02
mainnet_e58758 - phase0 processHistoricalRootsUpdate 7.7920 us/op 7.9310 us/op 0.98
mainnet_e58758 - phase0 processParticipationRecordUpdates 25.428 us/op 26.514 us/op 0.96
mainnet_e58758 - phase0 afterProcessEpoch 171.63 ms/op 171.34 ms/op 1.00
phase0 processEffectiveBalanceUpdates - 250000 normalcase 9.0134 ms/op 7.5575 ms/op 1.19
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 8.8162 ms/op 8.1371 ms/op 1.08
phase0 processRegistryUpdates - 250000 normalcase 30.480 us/op 31.937 us/op 0.95
phase0 processRegistryUpdates - 250000 badcase_full_deposits 537.34 us/op 488.04 us/op 1.10
phase0 processRegistryUpdates - 250000 worstcase 0.5 263.78 ms/op 234.76 ms/op 1.12
phase0 getAttestationDeltas - 250000 normalcase 18.965 ms/op 14.290 ms/op 1.33
phase0 getAttestationDeltas - 250000 worstcase 21.198 ms/op 16.846 ms/op 1.26
phase0 processSlashings - 250000 worstcase 7.4809 ms/op 7.0111 ms/op 1.07
shuffle list - 16384 els 12.103 ms/op 11.563 ms/op 1.05
shuffle list - 250000 els 167.63 ms/op 162.95 ms/op 1.03
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 1.1072 ms/op 430.82 us/op 2.57
pass gossip attestations to forkchoice per slot 4.6557 ms/op 4.5069 ms/op 1.03
computeDeltas 4.1149 ms/op 4.0578 ms/op 1.01
computeProposerBoostScoreFromBalances 526.39 us/op 513.68 us/op 1.02
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.5831 ms/op 2.5554 ms/op 1.01
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 96.267 us/op 85.938 us/op 1.12
BLS verify - blst-native 2.4499 ms/op 2.3339 ms/op 1.05
BLS verifyMultipleSignatures 3 - blst-native 4.8490 ms/op 4.7652 ms/op 1.02
BLS verifyMultipleSignatures 8 - blst-native 10.445 ms/op 9.9420 ms/op 1.05
BLS verifyMultipleSignatures 32 - blst-native 38.147 ms/op 36.841 ms/op 1.04
BLS aggregatePubkeys 32 - blst-native 50.921 us/op 47.846 us/op 1.06
BLS aggregatePubkeys 128 - blst-native 201.25 us/op 181.22 us/op 1.11
getAttestationsForBlock 68.727 ms/op 74.870 ms/op 0.92
CheckpointStateCache - add get delete 14.601 us/op 13.638 us/op 1.07
validate gossip signedAggregateAndProof - struct 5.6287 ms/op 5.5014 ms/op 1.02
validate gossip attestation - struct 2.6759 ms/op 2.6494 ms/op 1.01
pickEth1Vote - no votes 2.7994 ms/op 2.6721 ms/op 1.05
pickEth1Vote - max votes 26.208 ms/op 24.411 ms/op 1.07
pickEth1Vote - Eth1Data hashTreeRoot value x2048 16.122 ms/op 15.487 ms/op 1.04
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 27.423 ms/op 23.977 ms/op 1.14
pickEth1Vote - Eth1Data fastSerialize value x2048 2.2404 ms/op 2.4478 ms/op 0.92
pickEth1Vote - Eth1Data fastSerialize tree x2048 17.373 ms/op 15.859 ms/op 1.10
bytes32 toHexString 1.3320 us/op 1.1520 us/op 1.16
bytes32 Buffer.toString(hex) 823.00 ns/op 860.00 ns/op 0.96
bytes32 Buffer.toString(hex) from Uint8Array 1.0690 us/op 1.0900 us/op 0.98
bytes32 Buffer.toString(hex) + 0x 824.00 ns/op 877.00 ns/op 0.94
Object access 1 prop 0.42200 ns/op 0.41900 ns/op 1.01
Map access 1 prop 0.36100 ns/op 0.36200 ns/op 1.00
Object get x1000 17.816 ns/op 17.892 ns/op 1.00
Map get x1000 1.1100 ns/op 1.1480 ns/op 0.97
Object set x1000 121.61 ns/op 114.27 ns/op 1.06
Map set x1000 86.021 ns/op 78.319 ns/op 1.10
Return object 10000 times 0.46780 ns/op 0.45880 ns/op 1.02
Throw Error 10000 times 7.5933 us/op 8.0571 us/op 0.94
enrSubnets - fastDeserialize 64 bits 3.4900 us/op 3.3580 us/op 1.04
enrSubnets - ssz BitVector 64 bits 1.0120 us/op 985.00 ns/op 1.03
enrSubnets - fastDeserialize 4 bits 498.00 ns/op 476.00 ns/op 1.05
enrSubnets - ssz BitVector 4 bits 965.00 ns/op 872.00 ns/op 1.11
prioritizePeers score -10:0 att 32-0.1 sync 2-0 127.74 us/op 129.24 us/op 0.99
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 179.70 us/op 165.56 us/op 1.09
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 298.66 us/op 276.18 us/op 1.08
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 575.24 us/op 627.77 us/op 0.92
prioritizePeers score 0:0 att 64-1 sync 4-1 618.65 us/op 626.90 us/op 0.99
RateTracker 1000000 limit, 1 obj count per request 212.06 ns/op 211.89 ns/op 1.00
RateTracker 1000000 limit, 2 obj count per request 159.66 ns/op 159.05 ns/op 1.00
RateTracker 1000000 limit, 4 obj count per request 134.17 ns/op 125.50 ns/op 1.07
RateTracker 1000000 limit, 8 obj count per request 116.46 ns/op 117.01 ns/op 1.00
RateTracker with prune 4.9480 us/op 4.5260 us/op 1.09
array of 16000 items push then shift 5.7098 us/op 5.7986 us/op 0.98
LinkedList of 16000 items push then shift 20.844 ns/op 20.936 ns/op 1.00
array of 16000 items push then pop 247.74 ns/op 266.12 ns/op 0.93
LinkedList of 16000 items push then pop 19.687 ns/op 18.637 ns/op 1.06
array of 24000 items push then shift 8.5882 us/op 8.5851 us/op 1.00
LinkedList of 24000 items push then shift 21.192 ns/op 19.039 ns/op 1.11
array of 24000 items push then pop 264.41 ns/op 252.00 ns/op 1.05
LinkedList of 24000 items push then pop 20.328 ns/op 18.166 ns/op 1.12

by benchmarkbot/action

@wemeetagain
Copy link
Member

When publishing content to NPM the "git data" i.e. the exact commit at which the build was done is not possible to be known.

I don't think this is true?

$ yarn add @chainsafe/lodestar-cli
...
$ cat node_modules/@chainsafe/lodestar-cli/package.json | grep gitHead
  "gitHead": "822191497bcce6b0f45c8def07d24d6a6045f1c9"

@dapplion
Copy link
Contributor Author

When publishing content to NPM the "git data" i.e. the exact commit at which the build was done is not possible to be known.

I don't think this is true?

$ yarn add @chainsafe/lodestar-cli
...
$ cat node_modules/@chainsafe/lodestar-cli/package.json | grep gitHead
  "gitHead": "822191497bcce6b0f45c8def07d24d6a6045f1c9"

Oh I wasn't aware of this. We could def re-use this and burn the .git-data.json thing. Tho are we actually using it for our packages? I don't see it doing an install from NPM

@dapplion
Copy link
Contributor Author

When publishing content to NPM the "git data" i.e. the exact commit at which the build was done is not possible to be known.

I don't think this is true?

$ yarn add @chainsafe/lodestar-cli
...
$ cat node_modules/@chainsafe/lodestar-cli/package.json | grep gitHead
  "gitHead": "822191497bcce6b0f45c8def07d24d6a6045f1c9"

While this is a good suggestion it's actually complimentary to this PR. The main goal of the PR is to ensure that the version string is derived from the package.json, which is equivalent to @wemeetagain suggestion. In a latter PR we can effectively "merge" .git-data.json into the package.json using gitHead property, but I don't see it as a blocker.

This PR is very important to ensure we don't render confusing or outright wrong versions in the logs.

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!

@dapplion dapplion merged commit 15d8ae2 into master May 10, 2022
@dapplion dapplion deleted the dapplion/fix-git-data branch May 10, 2022 10:07
wemeetagain pushed a commit that referenced this pull request May 17, 2022
Don't print double slash in version string

Dont add git-data.json to NPM releases

Write git-data.json only in from source docker build

Remove numCommits

Test git-data.json generation from within the test

Move comment

Revert "Dont add git-data.json to NPM releases"

This reverts commit 5fe2d38.

Simplify gitData and version guessing

Run cmd
dapplion added a commit that referenced this pull request May 30, 2022
* New metric filtering missed blocks (#3927)

* Log block delay second

* Add elappsedTimeTillBecomeHead metric

* Add 'till become head' metric to dashboard

* chore: correct the metric name to elapsedTimeTillBecomeHead

* Add and use secFromSlot to clock

* Track block source

* Revert "Track block source"

This reverts commit 5fe6220.

* Update bucket values

* Limit how old blocks are tracked in elapsedTimeTillBecomeHead

* Simplify secFromSlot

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

* Fix the terminal validations of the merge block (#3984)

* Fix the terminal validations of the merge block

* activate merge transition block spec tests

* some comments to explain the merge block validations movement

* Extend error messages when voluntary exit errors because of present of lockfile (#3935)

* Extend error and Clean up

* Only showing the message to use --force to override in case of voluntary exit

* Simplify gitData and version guessing (#3992)

Don't print double slash in version string

Dont add git-data.json to NPM releases

Write git-data.json only in from source docker build

Remove numCommits

Test git-data.json generation from within the test

Move comment

Revert "Dont add git-data.json to NPM releases"

This reverts commit 5fe2d38.

Simplify gitData and version guessing

Run cmd

* Activate ex-ante fork-choice spec tests (#4003)

* Prepare custom version on next release (#3990)

* Prepare custom version on next release

* Test in branch

* Don't set version in advance

* Remove --canary flag

* Change and commit version

* Setup git config

* Revert temp changes

* Lightclient e2e: increase validator client (#4006)

* Bump to v0.37.0 nightly builds (#4013)

* Guarantee full spec tests coverage (#4012)

* Ensure all spec tests are run

* Fix general bls tests

* Improve docs of specTestIterator

* Fix fork_choice tests

* Remove Check spec tests step

* Add merge transition/finalization banners (#3963)

* Add merge transition/finalization banners

* fix signatures

* Benchmark initial sync (#3995)

* Basic range sync perf test

* Benchmark initial sync

* Add INFURA_ETH2_CREDENTIALS to benchmark GA

* Download test cache file from alternative source

* Re-org beforeValue and testCase helpers

* Break light-client - state-transition test dependency

* Revert adding downloadTestCacheFile

* Download files from a Github release

* Clarify #3977 with unbounded uint issue (#4018)

* Update mainnet-shadow-5 configs (#4021)

* Bump moment from 2.29.1 to 2.29.2 (#3901)

Bumps [moment](https://github.com/moment/moment) from 2.29.1 to 2.29.2.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](moment/moment@2.29.1...2.29.2)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Implement support for validator next-epoch proposer duties (#3782)

* Implementation to be able to get block proposer an epoch ahead - still need optimization

* revert changes made to waitForSlot

* caching the results of computing future proposers. Also extended test

* using effectiveBalanceIncrements from state instead of recomputing it

* fix lint errors

* revert check not needed in getBeaconProposer

* Update tests to include assertion messages

* Move caching of next proposer duties to BeaconChain class

* Delete the block proposer previously cached when next proposer was requested at current epoch

* moved next epoch proposers from the chain to the state

* Compute next proposer on demand and cache

* Fix lint errors

* update implementation to work with changes from master

* caching epoch seed in context so that getNextEpochBeaconProposer can be independent of state

* Revert "caching epoch seed in context so that getNextEpochBeaconProposer can be independent of state"

This reverts commit 02a722a.

* caching epoch seed in context so that getNextEpochBeaconProposer can be independent of state

* removing the need to delete from nextEpochProposers in call to getBeaconProposer

* no need to recompute currrentProposerSeed again

* Revert "no need to recompute currrentProposerSeed again"

This reverts commit b6b1b8c.

* removed empty file left after fixing merge conflicts

* remove some unnecessary variable from the epoch context.

* add some comments

* Fix lint

* import from the right location

* Review PR

* Merge imports

* Delete get proposers api impl test

* Remove duplicated comment

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

* Extend timeout for gitData unit test (#4026)

* Fix readAndGetGitData (#4025)

* Ensure light client update is in a single period (#4029)

* Handle merge block fetch error (#4016)

* Handle merge block fetch error

* Log errors on fetch errors for terminal pow

* docs: Update nodeJS minimum requirement (#4037)

* Remove child_process call in gitData before step (#4033)

* Oppool aggregates use BitArray only for set logic (#4034)

* Use BitArrays for aggregate merging

* Test intersectUint8Arrays

* Review PR

* Update tests

* Remove un-used code

* Modify gossipsub params following consensus spec v1.1.10 (#4011)

* Modify gossipsub params following consensus spec v1.1.10

* Specify GOSSIPSUB_HEARTBEAT_INTERVAL as a constant

* Throw a more informative error on invalid keystore (#4022)

* Throw a more informative error on invalid keystore

* Make error more descriptive

* Use template string

* Update keys.ts

* Update keys.ts

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

* Ignore gossip AggregateAndProof if aggregate is seen (#4019)

* Ignore gossip AggregateAndProof if aggregate is seen

* Check for non-strict superset of seen attestation data

* Fix validateGossipAggregateAndProof benchmark test

* Fix import

* Ultilize intersectUint8Arrays()

* Implement SeenContributionAndProof.participantsKnown

* Add metrics to seen cache

* Add perf tests

* Change method name to isSuperSetOrEqual()

* Refactor metric names

* Specify lerna exact version for release-nightly workflow (#4049)

* Add ropsten network (#4051)

* Force all packages to be versioned for exact (#4052)

* Update discv5 to v0.7.1 (#4044)

* Add ability to update the fee recipient for execution via beacon and/or validator defaults (#3958)

* Add and use a default fee recipient for a validator process

* transfer the proposer cache to beacon chain

* mock chain fixes

* test and perf fixes

* fee recipient validation change

* track and use free recipient as string instead of ExecutionAddress

* fix unit test

* fix merge test

* use dummy address

* refac and add proposer cache pruning

* tests for beacon proposer cache

* merge interop fee recipient check

* fix the optional

* feeRecipient confirmation and small refac

* add the missing map

* add flag to enable strict fee recipient check

* Small refactor to setup merge for ropsten using baked in configs (#4053)

* Issue advance fcU for builing the EL block (#3965)

rebaseing to the refactored prepare beacon proposer

refac payload id cache as separate class and add pruning

issue payload fcus if synced

rename issueNext.. to maybeIssueNext...

* Simplify release process (#4030)

* Simplify release process

* Remove old postrelease script

* Add lerna version check

* Tweak RELEASE.md

* Add force-publish to lerna version command

* Update the proposer boost percentage to 40% (#4055)

* ESM Support (#3978)

* ESM changes

* Fix root lodestar script

* Fix some linter errors

* trying directly re-exporting under an alias from networks module

* Fix types exports

* Fix more linter errors

* Fix spec test download

* Update bls to 7.1.0

* Fix spec tests

* temp reverting eslint parser option to 10 and disabling the check of .js file extenstion. Should fix lint errors

* temp commented out file-extension-in-import

* Disable readme checks

* Fix check-build

* Fix params e2e tests

* Bump @chainsafe/threads

* Bump bls to v7.1.1

* Add timeouts after node initialization but before sim test run

* Tweak timeouts

* Tweak timeout

* Tweak sim merge timeout

* Tweak sim merge timeout

* Tweak sim merge timeout

* Tweak sim merge timeout

* Add more timeouts

* Add another timeout

* Fix linter errors

* Fix some tests

* Fix some linter errors and spec tests

* Fix benchmarks

* Fix linter errors

* Update each bls dependency

* Tweak timeouts

* Add another timeout

* More timeouts

* Fix bls pool size

* Set root package.json to ESM

* Remove old linter comment

* Revert "Set root package.json to ESM"

This reverts commit 347b0fd.

* Remove stray file (probably old)

* Undo unnecessary diff

* Add comment on __dirname replacement

* Import type @chainsafe/bls/types

* Use lodestar path imports

* Revert multifork to lodestar package

* Format .mocharc.yaml

* Use same @chainsafe/as-sha256 version

* Fix lodash path imports

* Use src instead of lib

* Load db metrics

* Remove experimental-specifier-resolution

* Remove lodestat/chain export

* Add stray missing file extension

* Revert ValidatorDir changes

* Fix stray missing file extensions

* Fix check-types

Co-authored-by: Dadepo Aderemi <dadepo@gmail.com>
Co-authored-by: dapplion <35266934+dapplion@users.noreply.github.com>

* chore(release): v0.37.0-beta.0

* Bump to v0.37.0

Co-authored-by: tuyennhv <vutuyen2636@gmail.com>
Co-authored-by: g11tech <76567250+g11tech@users.noreply.github.com>
Co-authored-by: dadepo <dadepo@gmail.com>
Co-authored-by: Cayman <caymannava@gmail.com>
Co-authored-by: Phil Ngo <58080811+philknows@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: g11tech <gajinder@g11.in>
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.

None yet

3 participants