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

chore: dynamic year on the chainsafe cli notice #5476

Merged
merged 1 commit into from May 14, 2023

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented May 10, 2023

Motivation

As discussed in #5466 we don't really know why the year is even there but it "looks correct" so let's keep it and make sure it always up to date.

Description

Makes year on the chainsafe cli notice dynamic.

@nflaig nflaig requested a review from a team as a code owner May 10, 2023 13:56
@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: dba6234 Previous: ae3fda6 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 899.75 us/op 910.44 us/op 0.99
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 49.113 us/op 58.273 us/op 0.84
BLS verify - blst-native 1.2471 ms/op 1.4803 ms/op 0.84
BLS verifyMultipleSignatures 3 - blst-native 2.5242 ms/op 2.9992 ms/op 0.84
BLS verifyMultipleSignatures 8 - blst-native 5.4150 ms/op 6.3097 ms/op 0.86
BLS verifyMultipleSignatures 32 - blst-native 19.631 ms/op 23.132 ms/op 0.85
BLS aggregatePubkeys 32 - blst-native 26.051 us/op 31.519 us/op 0.83
BLS aggregatePubkeys 128 - blst-native 105.58 us/op 123.56 us/op 0.85
getAttestationsForBlock 60.731 ms/op 71.060 ms/op 0.85
isKnown best case - 1 super set check 268.00 ns/op 308.00 ns/op 0.87
isKnown normal case - 2 super set checks 264.00 ns/op 309.00 ns/op 0.85
isKnown worse case - 16 super set checks 268.00 ns/op 311.00 ns/op 0.86
CheckpointStateCache - add get delete 5.7770 us/op 6.5720 us/op 0.88
validate gossip signedAggregateAndProof - struct 2.8088 ms/op 3.4604 ms/op 0.81
validate gossip attestation - struct 1.3297 ms/op 1.6546 ms/op 0.80
pickEth1Vote - no votes 1.3564 ms/op 1.6203 ms/op 0.84
pickEth1Vote - max votes 11.936 ms/op 12.016 ms/op 0.99
pickEth1Vote - Eth1Data hashTreeRoot value x2048 9.6839 ms/op 11.135 ms/op 0.87
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 16.240 ms/op 17.261 ms/op 0.94
pickEth1Vote - Eth1Data fastSerialize value x2048 769.55 us/op 897.02 us/op 0.86
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.3227 ms/op 6.0434 ms/op 1.05
bytes32 toHexString 700.00 ns/op 750.00 ns/op 0.93
bytes32 Buffer.toString(hex) 427.00 ns/op 499.00 ns/op 0.86
bytes32 Buffer.toString(hex) from Uint8Array 644.00 ns/op 733.00 ns/op 0.88
bytes32 Buffer.toString(hex) + 0x 426.00 ns/op 476.00 ns/op 0.89
Object access 1 prop 0.21800 ns/op 0.23400 ns/op 0.93
Map access 1 prop 0.18200 ns/op 0.19200 ns/op 0.95
Object get x1000 7.2280 ns/op 9.6600 ns/op 0.75
Map get x1000 0.65800 ns/op 0.67100 ns/op 0.98
Object set x1000 74.746 ns/op 73.455 ns/op 1.02
Map set x1000 57.813 ns/op 62.081 ns/op 0.93
Return object 10000 times 0.25370 ns/op 0.30140 ns/op 0.84
Throw Error 10000 times 4.4138 us/op 5.3549 us/op 0.82
fastMsgIdFn sha256 / 200 bytes 3.6230 us/op 4.4110 us/op 0.82
fastMsgIdFn h32 xxhash / 200 bytes 331.00 ns/op 375.00 ns/op 0.88
fastMsgIdFn h64 xxhash / 200 bytes 494.00 ns/op 556.00 ns/op 0.89
fastMsgIdFn sha256 / 1000 bytes 11.993 us/op 14.985 us/op 0.80
fastMsgIdFn h32 xxhash / 1000 bytes 448.00 ns/op 533.00 ns/op 0.84
fastMsgIdFn h64 xxhash / 1000 bytes 551.00 ns/op 669.00 ns/op 0.82
fastMsgIdFn sha256 / 10000 bytes 105.83 us/op 129.84 us/op 0.82
fastMsgIdFn h32 xxhash / 10000 bytes 2.0110 us/op 2.4620 us/op 0.82
fastMsgIdFn h64 xxhash / 10000 bytes 1.4570 us/op 1.7640 us/op 0.83
enrSubnets - fastDeserialize 64 bits 1.4390 us/op 1.9640 us/op 0.73
enrSubnets - ssz BitVector 64 bits 541.00 ns/op 703.00 ns/op 0.77
enrSubnets - fastDeserialize 4 bits 188.00 ns/op 231.00 ns/op 0.81
enrSubnets - ssz BitVector 4 bits 556.00 ns/op 709.00 ns/op 0.78
prioritizePeers score -10:0 att 32-0.1 sync 2-0 113.40 us/op 149.13 us/op 0.76
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 149.11 us/op 182.65 us/op 0.82
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 196.82 us/op 218.53 us/op 0.90
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 356.70 us/op 427.55 us/op 0.83
prioritizePeers score 0:0 att 64-1 sync 4-1 429.25 us/op 516.55 us/op 0.83
array of 16000 items push then shift 1.6803 us/op 2.0831 us/op 0.81
LinkedList of 16000 items push then shift 9.1320 ns/op 11.580 ns/op 0.79
array of 16000 items push then pop 113.98 ns/op 118.86 ns/op 0.96
LinkedList of 16000 items push then pop 8.8410 ns/op 10.749 ns/op 0.82
array of 24000 items push then shift 2.3528 us/op 2.9338 us/op 0.80
LinkedList of 24000 items push then shift 9.0880 ns/op 11.503 ns/op 0.79
array of 24000 items push then pop 81.524 ns/op 101.47 ns/op 0.80
LinkedList of 24000 items push then pop 8.6950 ns/op 11.227 ns/op 0.77
intersect bitArray bitLen 8 13.574 ns/op 17.914 ns/op 0.76
intersect array and set length 8 82.750 ns/op 116.16 ns/op 0.71
intersect bitArray bitLen 128 44.119 ns/op 57.645 ns/op 0.77
intersect array and set length 128 1.1136 us/op 1.5749 us/op 0.71
Buffer.concat 32 items 2.9420 us/op 3.8010 us/op 0.77
Uint8Array.set 32 items 2.5920 us/op 3.3260 us/op 0.78
pass gossip attestations to forkchoice per slot 3.0335 ms/op 4.5011 ms/op 0.67
computeDeltas 2.9841 ms/op 3.7422 ms/op 0.80
computeProposerBoostScoreFromBalances 1.8091 ms/op 2.1442 ms/op 0.84
altair processAttestation - 250000 vs - 7PWei normalcase 2.6064 ms/op 3.6835 ms/op 0.71
altair processAttestation - 250000 vs - 7PWei worstcase 3.6379 ms/op 5.5239 ms/op 0.66
altair processAttestation - setStatus - 1/6 committees join 144.68 us/op 196.15 us/op 0.74
altair processAttestation - setStatus - 1/3 committees join 286.15 us/op 385.14 us/op 0.74
altair processAttestation - setStatus - 1/2 committees join 390.50 us/op 473.83 us/op 0.82
altair processAttestation - setStatus - 2/3 committees join 464.99 us/op 564.30 us/op 0.82
altair processAttestation - setStatus - 4/5 committees join 655.72 us/op 854.93 us/op 0.77
altair processAttestation - setStatus - 100% committees join 827.96 us/op 970.31 us/op 0.85
altair processBlock - 250000 vs - 7PWei normalcase 19.245 ms/op 20.059 ms/op 0.96
altair processBlock - 250000 vs - 7PWei normalcase hashState 26.807 ms/op 36.580 ms/op 0.73
altair processBlock - 250000 vs - 7PWei worstcase 51.909 ms/op 71.446 ms/op 0.73
altair processBlock - 250000 vs - 7PWei worstcase hashState 72.346 ms/op 88.829 ms/op 0.81
phase0 processBlock - 250000 vs - 7PWei normalcase 2.0075 ms/op 2.9190 ms/op 0.69
phase0 processBlock - 250000 vs - 7PWei worstcase 30.445 ms/op 42.589 ms/op 0.71
altair processEth1Data - 250000 vs - 7PWei normalcase 490.52 us/op 772.37 us/op 0.64
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 7.9940 us/op 7.3370 us/op 1.09
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 26.475 us/op 22.358 us/op 1.18
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 9.6790 us/op 9.7650 us/op 0.99
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 7.2140 us/op 6.6850 us/op 1.08
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 109.01 us/op 80.427 us/op 1.36
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 622.19 us/op 905.23 us/op 0.69
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 16384 897.27 us/op 1.0430 ms/op 0.86
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 16384 869.75 us/op 1.0142 ms/op 0.86
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 16384 2.3263 ms/op 3.6817 ms/op 0.63
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 16384 1.4687 ms/op 2.5152 ms/op 0.58
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 16384 3.8756 ms/op 7.4058 ms/op 0.52
Tree 40 250000 create 292.32 ms/op 412.32 ms/op 0.71
Tree 40 250000 get(125000) 186.96 ns/op 237.88 ns/op 0.79
Tree 40 250000 set(125000) 897.99 ns/op 1.1489 us/op 0.78
Tree 40 250000 toArray() 16.810 ms/op 24.104 ms/op 0.70
Tree 40 250000 iterate all - toArray() + loop 16.725 ms/op 22.976 ms/op 0.73
Tree 40 250000 iterate all - get(i) 66.044 ms/op 87.166 ms/op 0.76
MutableVector 250000 create 10.575 ms/op 13.291 ms/op 0.80
MutableVector 250000 get(125000) 6.4050 ns/op 8.1820 ns/op 0.78
MutableVector 250000 set(125000) 264.72 ns/op 338.98 ns/op 0.78
MutableVector 250000 toArray() 3.1255 ms/op 3.7486 ms/op 0.83
MutableVector 250000 iterate all - toArray() + loop 3.6439 ms/op 4.0314 ms/op 0.90
MutableVector 250000 iterate all - get(i) 1.5359 ms/op 1.9208 ms/op 0.80
Array 250000 create 2.6127 ms/op 3.3140 ms/op 0.79
Array 250000 clone - spread 1.1124 ms/op 1.5466 ms/op 0.72
Array 250000 get(125000) 0.55600 ns/op 0.75100 ns/op 0.74
Array 250000 set(125000) 0.63000 ns/op 0.83700 ns/op 0.75
Array 250000 iterate all - loop 90.740 us/op 106.33 us/op 0.85
effectiveBalanceIncrements clone Uint8Array 300000 26.328 us/op 40.202 us/op 0.65
effectiveBalanceIncrements clone MutableVector 300000 343.00 ns/op 493.00 ns/op 0.70
effectiveBalanceIncrements rw all Uint8Array 300000 170.13 us/op 207.00 us/op 0.82
effectiveBalanceIncrements rw all MutableVector 300000 80.086 ms/op 106.54 ms/op 0.75
phase0 afterProcessEpoch - 250000 vs - 7PWei 114.68 ms/op 148.13 ms/op 0.77
phase0 beforeProcessEpoch - 250000 vs - 7PWei 40.602 ms/op 37.778 ms/op 1.07
altair processEpoch - mainnet_e81889 321.72 ms/op 356.42 ms/op 0.90
mainnet_e81889 - altair beforeProcessEpoch 65.209 ms/op 52.739 ms/op 1.24
mainnet_e81889 - altair processJustificationAndFinalization 20.808 us/op 19.084 us/op 1.09
mainnet_e81889 - altair processInactivityUpdates 6.1772 ms/op 5.8403 ms/op 1.06
mainnet_e81889 - altair processRewardsAndPenalties 65.635 ms/op 74.165 ms/op 0.88
mainnet_e81889 - altair processRegistryUpdates 2.8230 us/op 3.1090 us/op 0.91
mainnet_e81889 - altair processSlashings 581.00 ns/op 601.00 ns/op 0.97
mainnet_e81889 - altair processEth1DataReset 576.00 ns/op 1.0790 us/op 0.53
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2415 ms/op 1.4364 ms/op 0.86
mainnet_e81889 - altair processSlashingsReset 4.7840 us/op 5.3520 us/op 0.89
mainnet_e81889 - altair processRandaoMixesReset 4.5850 us/op 4.8920 us/op 0.94
mainnet_e81889 - altair processHistoricalRootsUpdate 618.00 ns/op 597.00 ns/op 1.04
mainnet_e81889 - altair processParticipationFlagUpdates 2.2450 us/op 3.6690 us/op 0.61
mainnet_e81889 - altair processSyncCommitteeUpdates 782.00 ns/op 1.2470 us/op 0.63
mainnet_e81889 - altair afterProcessEpoch 125.34 ms/op 155.59 ms/op 0.81
phase0 processEpoch - mainnet_e58758 356.84 ms/op 402.49 ms/op 0.89
mainnet_e58758 - phase0 beforeProcessEpoch 135.95 ms/op 140.00 ms/op 0.97
mainnet_e58758 - phase0 processJustificationAndFinalization 16.844 us/op 20.551 us/op 0.82
mainnet_e58758 - phase0 processRewardsAndPenalties 62.019 ms/op 65.685 ms/op 0.94
mainnet_e58758 - phase0 processRegistryUpdates 7.6500 us/op 8.6620 us/op 0.88
mainnet_e58758 - phase0 processSlashings 542.00 ns/op 607.00 ns/op 0.89
mainnet_e58758 - phase0 processEth1DataReset 564.00 ns/op 495.00 ns/op 1.14
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 939.29 us/op 1.1372 ms/op 0.83
mainnet_e58758 - phase0 processSlashingsReset 3.3700 us/op 3.4910 us/op 0.97
mainnet_e58758 - phase0 processRandaoMixesReset 4.2480 us/op 4.5710 us/op 0.93
mainnet_e58758 - phase0 processHistoricalRootsUpdate 657.00 ns/op 686.00 ns/op 0.96
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.9340 us/op 5.4770 us/op 0.72
mainnet_e58758 - phase0 afterProcessEpoch 96.982 ms/op 114.45 ms/op 0.85
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2410 ms/op 1.2664 ms/op 0.98
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4481 ms/op 1.5241 ms/op 0.95
altair processInactivityUpdates - 250000 normalcase 24.629 ms/op 25.637 ms/op 0.96
altair processInactivityUpdates - 250000 worstcase 25.673 ms/op 27.194 ms/op 0.94
phase0 processRegistryUpdates - 250000 normalcase 6.5380 us/op 6.7310 us/op 0.97
phase0 processRegistryUpdates - 250000 badcase_full_deposits 232.83 us/op 258.42 us/op 0.90
phase0 processRegistryUpdates - 250000 worstcase 0.5 125.63 ms/op 133.41 ms/op 0.94
altair processRewardsAndPenalties - 250000 normalcase 63.592 ms/op 71.124 ms/op 0.89
altair processRewardsAndPenalties - 250000 worstcase 66.834 ms/op 75.591 ms/op 0.88
phase0 getAttestationDeltas - 250000 normalcase 6.3849 ms/op 6.7709 ms/op 0.94
phase0 getAttestationDeltas - 250000 worstcase 6.3646 ms/op 6.7128 ms/op 0.95
phase0 processSlashings - 250000 worstcase 3.4741 ms/op 3.4498 ms/op 1.01
altair processSyncCommitteeUpdates - 250000 174.49 ms/op 186.02 ms/op 0.94
BeaconState.hashTreeRoot - No change 336.00 ns/op 366.00 ns/op 0.92
BeaconState.hashTreeRoot - 1 full validator 51.418 us/op 58.014 us/op 0.89
BeaconState.hashTreeRoot - 32 full validator 537.12 us/op 522.71 us/op 1.03
BeaconState.hashTreeRoot - 512 full validator 5.0677 ms/op 5.8558 ms/op 0.87
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 65.053 us/op 61.891 us/op 1.05
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 889.15 us/op 915.60 us/op 0.97
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 12.050 ms/op 11.741 ms/op 1.03
BeaconState.hashTreeRoot - 1 balances 48.436 us/op 49.530 us/op 0.98
BeaconState.hashTreeRoot - 32 balances 459.98 us/op 468.68 us/op 0.98
BeaconState.hashTreeRoot - 512 balances 4.2539 ms/op 4.6765 ms/op 0.91
BeaconState.hashTreeRoot - 250000 balances 76.583 ms/op 78.941 ms/op 0.97
aggregationBits - 2048 els - zipIndexesInBitList 14.608 us/op 15.962 us/op 0.92
regular array get 100000 times 41.467 us/op 34.167 us/op 1.21
wrappedArray get 100000 times 31.452 us/op 34.316 us/op 0.92
arrayWithProxy get 100000 times 16.781 ms/op 17.295 ms/op 0.97
ssz.Root.equals 542.00 ns/op 556.00 ns/op 0.97
byteArrayEquals 534.00 ns/op 547.00 ns/op 0.98
shuffle list - 16384 els 6.8827 ms/op 7.1112 ms/op 0.97
shuffle list - 250000 els 99.881 ms/op 103.81 ms/op 0.96
processSlot - 1 slots 8.2930 us/op 8.9840 us/op 0.92
processSlot - 32 slots 1.3024 ms/op 1.3854 ms/op 0.94
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.088 ms/op 40.480 ms/op 0.92
getCommitteeAssignments - req 1 vs - 250000 vc 2.8687 ms/op 3.1384 ms/op 0.91
getCommitteeAssignments - req 100 vs - 250000 vc 4.0685 ms/op 4.3899 ms/op 0.93
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4359 ms/op 4.7509 ms/op 0.93
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.6600 ns/op 4.7100 ns/op 0.99
state getBlockRootAtSlot - 250000 vs - 7PWei 1.0367 us/op 944.34 ns/op 1.10
computeProposers - vc 250000 10.544 ms/op 11.047 ms/op 0.95
computeEpochShuffling - vc 250000 101.25 ms/op 105.33 ms/op 0.96
getNextSyncCommittee - vc 250000 180.93 ms/op 185.03 ms/op 0.98
computeSigningRoot for AttestationData 13.843 us/op 14.270 us/op 0.97
hash AttestationData serialized data then Buffer.toString(base64) 2.4103 us/op 2.5381 us/op 0.95
toHexString serialized data 1.0576 us/op 1.1313 us/op 0.93
Buffer.toString(base64) 312.27 ns/op 336.20 ns/op 0.93

by benchmarkbot/action

@dapplion
Copy link
Contributor

dapplion commented May 12, 2023

Q: Is it really necessary to print the year?
ChatGTP: --

While it has been a common practice to include the year in copyright notices, it's not universally required, especially in many jurisdictions, including the United States. This tradition started because under the old U.S. copyright law (before 1978), the copyright would only last for 28 years from the date of publication, but could be renewed for another 28 years if the copyright was properly noticed, and the renewal registered. This is why you often saw, and still see, copyright notices with a year in them.

However, under the Berne Convention for the Protection of Literary and Artistic Works, which the U.S. joined in 1989, copyright is automatic and does not require registration or a copyright notice. Many other countries are also signatories to this convention.

So, in many cases, including the year in a copyright notice is not strictly necessary. However, it's still a common practice because it can provide certain benefits:

  1. If you are not in a Berne Convention country, or are dealing with someone who is not, the notice may be required or beneficial.
  2. It makes it clear to everyone when the work was produced, which can be useful information.
  3. It may help in a legal dispute where the date of creation is relevant.

In the case of software projects, it's also common to include the range of years during which the project has been updated. This can help indicate the lifespan and active maintenance period of the project. However, it's worth noting that every jurisdiction may have slightly different rules about what is required or beneficial in a copyright notice.

It's always a good idea to consult with a legal expert if you're unsure about the specific requirements or benefits for your situation.


I would vote to remove the year

@nflaig
Copy link
Member Author

nflaig commented May 12, 2023

it's also common to include the range of years during which the project has been updated. This can help indicate the lifespan and active maintenance period of the project

I kinda like this part but can also just remove it, no strong opinion either way as long as it does not display outdated information

@wemeetagain
Copy link
Member

I like it too, no real reason but for the vibe. Feels like it gives a sense of the progression of the project, gives confidence in the project

@nflaig nflaig merged commit c42adb2 into unstable May 14, 2023
11 checks passed
@nflaig nflaig deleted the nflaig/dynamic-cli-year branch May 14, 2023 11:22
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.9.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.

None yet

3 participants