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: ssz porting from csm #990

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft

Conversation

mkurayan
Copy link
Contributor

Porting SSZ Library from CSM to Core Repository

Both Triggerable Withdrawals and Vaults require SSZ for Merkle proof verification.
This merge request aims to streamline development efforts by extracting and centralizing the shared SSZ-related code, which was originally ported from CSM.

@mkurayan mkurayan requested a review from Jeday March 19, 2025 12:22
Copy link

github-actions bot commented Mar 19, 2025

badge

Hardhat Unit Tests Coverage Summary

Filename                                                       Stmts    Miss  Cover    Missing
-----------------------------------------------------------  -------  ------  -------  ---------
contracts/0.4.24/Lido.sol                                        212       0  100.00%
contracts/0.4.24/StETH.sol                                        72       0  100.00%
contracts/0.4.24/StETHPermit.sol                                  15       0  100.00%
contracts/0.4.24/lib/Packed64x4.sol                                5       0  100.00%
contracts/0.4.24/lib/SigningKeys.sol                              36       0  100.00%
contracts/0.4.24/lib/StakeLimitUtils.sol                          37       0  100.00%
contracts/0.4.24/nos/NodeOperatorsRegistry.sol                   512       0  100.00%
contracts/0.4.24/oracle/LegacyOracle.sol                          72       0  100.00%
contracts/0.4.24/utils/Pausable.sol                                9       0  100.00%
contracts/0.4.24/utils/Versioned.sol                               5       0  100.00%
contracts/0.6.12/WstETH.sol                                       17       0  100.00%
contracts/0.8.25/lib/BeaconTypes.sol                               0       0  100.00%
contracts/0.8.25/lib/GIndex.sol                                   33      33  0.00%    21-111
contracts/0.8.25/lib/SSZ.sol                                      15      15  0.00%    20-265
contracts/0.8.4/WithdrawalsManagerProxy.sol                       61       0  100.00%
contracts/0.8.9/BeaconChainDepositor.sol                          21       2  90.48%   48, 51
contracts/0.8.9/Burner.sol                                        71       0  100.00%
contracts/0.8.9/DepositSecurityModule.sol                        128       0  100.00%
contracts/0.8.9/EIP712StETH.sol                                   16       0  100.00%
contracts/0.8.9/LidoExecutionLayerRewardsVault.sol                16       0  100.00%
contracts/0.8.9/LidoLocator.sol                                   18       0  100.00%
contracts/0.8.9/OracleDaemonConfig.sol                            28       0  100.00%
contracts/0.8.9/StakingRouter.sol                                316       0  100.00%
contracts/0.8.9/WithdrawalQueue.sol                               88       0  100.00%
contracts/0.8.9/WithdrawalQueueBase.sol                          146       0  100.00%
contracts/0.8.9/WithdrawalQueueERC721.sol                         89       0  100.00%
contracts/0.8.9/WithdrawalVault.sol                               21       0  100.00%
contracts/0.8.9/lib/Math.sol                                       4       0  100.00%
contracts/0.8.9/lib/PositiveTokenRebaseLimiter.sol                22       0  100.00%
contracts/0.8.9/lib/UnstructuredRefStorage.sol                     2       0  100.00%
contracts/0.8.9/oracle/AccountingOracle.sol                      190       2  98.95%   189-190
contracts/0.8.9/oracle/BaseOracle.sol                             89       1  98.88%   397
contracts/0.8.9/oracle/HashConsensus.sol                         263       1  99.62%   1005
contracts/0.8.9/oracle/ValidatorsExitBusOracle.sol                91       2  97.80%   138, 315
contracts/0.8.9/proxy/OssifiableProxy.sol                         17       0  100.00%
contracts/0.8.9/sanity_checks/OracleReportSanityChecker.sol      232       0  100.00%
contracts/0.8.9/utils/DummyEmptyContract.sol                       0       0  100.00%
contracts/0.8.9/utils/PausableUntil.sol                           31       0  100.00%
contracts/0.8.9/utils/Versioned.sol                               11       0  100.00%
contracts/0.8.9/utils/access/AccessControl.sol                    23       0  100.00%
contracts/0.8.9/utils/access/AccessControlEnumerable.sol           9       0  100.00%
contracts/testnets/sepolia/SepoliaDepositAdapter.sol              21      21  0.00%    49-100
TOTAL                                                           3064      77  97.49%

Diff against master

Filename                                Stmts    Miss  Cover
------------------------------------  -------  ------  --------
contracts/0.8.25/lib/BeaconTypes.sol        0       0  +100.00%
contracts/0.8.25/lib/GIndex.sol           +33     +33  +100.00%
contracts/0.8.25/lib/SSZ.sol              +15     +15  +100.00%
TOTAL                                     +48     +48  -1.55%

Results for commit: 8894a76

Minimum allowed coverage is 95%

♻️ This comment has been updated with latest results

@tamtamchik tamtamchik added solidity issues/tasks related to smart contract code valset Updates from the ValSet Tech team next upgrade Things to pickup for the next protocol upgrade labels Mar 19, 2025
Copy link
Contributor

Choose a reason for hiding this comment

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

In context of this repo, I think it's better to name this SSZTypes (or similar) to outline this file will contain types relevant to ssz.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point that Types is to abstract name, I think to rename it to BeaconTypes.
So the name convey that the file holds fundamental data structures relevant to the Beacon Chain.

@mkurayan mkurayan force-pushed the feat/ssz-porting-from-csm branch 2 times, most recently from 3e69c5d to 615c3b4 Compare March 21, 2025 10:29
@mkurayan mkurayan force-pushed the feat/ssz-porting-from-csm branch from 615c3b4 to 8894a76 Compare March 21, 2025 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next upgrade Things to pickup for the next protocol upgrade solidity issues/tasks related to smart contract code valset Updates from the ValSet Tech team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants