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: positive token rebase limiter fuzz tests #88

Merged
merged 6 commits into from
May 20, 2024

Conversation

TheDZhon
Copy link
Contributor

@TheDZhon TheDZhon commented Apr 26, 2024

Fuzz tests for the PositiveTokenRebaseLimiter library:


⚠️ Note that during the fuzzing design and trials a precision loss weakness has been detected.

@TheDZhon TheDZhon changed the base branch from master to develop April 26, 2024 21:18
Copy link

github-actions bot commented Apr 26, 2024

badge

Code 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                   485     485  0.00%    208-1450
contracts/0.4.24/oracle/LegacyOracle.sol                          72      72  0.00%    114-399
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.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                        104       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                                303       4  98.68%   311, 578, 1160-1161
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                      171     171  0.00%    153-881
contracts/0.8.9/oracle/BaseOracle.sol                             89       1  98.88%   397
contracts/0.8.9/oracle/HashConsensus.sol                         263     263  0.00%    249-1094
contracts/0.8.9/oracle/ValidatorsExitBusOracle.sol                91      91  0.00%    96-461
contracts/0.8.9/proxy/OssifiableProxy.sol                         17      16  5.88%    29-87
contracts/0.8.9/sanity_checks/OracleReportSanityChecker.sol      171       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%
TOTAL                                                           2851    1105  61.24%

Diff against master

Filename                                       Stmts    Miss  Cover
-------------------------------------------  -------  ------  --------
contracts/0.8.4/WithdrawalsManagerProxy.sol        0     -61  +100.00%
TOTAL                                              0     -61  +2.14%

Results for commit: 21f3cd7

Minimum allowed coverage is 0%

♻️ This comment has been updated with latest results

@TheDZhon TheDZhon changed the title Feat: positive token rebase limiter fuzz tests [WIP] Feat: positive token rebase limiter fuzz tests May 4, 2024
@TheDZhon TheDZhon marked this pull request as ready for review May 4, 2024 15:08
Copy link
Member

@tamtamchik tamtamchik left a comment

Choose a reason for hiding this comment

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

Cool! 😎
Thanks for uncovering some nice features!

test/0.8.9/positiveTokenRebaseLimiter.t.sol Show resolved Hide resolved
test/0.8.9/positiveTokenRebaseLimiter.t.sol Outdated Show resolved Hide resolved
@tamtamchik tamtamchik added tests Pull requests that add or update tests. solidity Pull requests that update Solidity code. labels May 9, 2024
@mymphe mymphe merged commit fb0de92 into develop May 20, 2024
7 checks passed
@mymphe mymphe deleted the feat/libs-PositiveTokenRebaseLimiter branch May 20, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solidity Pull requests that update Solidity code. tests Pull requests that add or update tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants