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

Remaining solidity native errors #115

Merged
merged 41 commits into from
Aug 10, 2022

Conversation

keirongulrajani
Copy link
Contributor

@keirongulrajani keirongulrajani commented Jul 29, 2022

Scope

  • Solidity native errors for:

    • Circuit breaker
    • Crypto Library
    • CustomEnumerableMapsErrors
    • Ethdkg + accusations + phases
    • Governance
    • Immuteable auth
    • parser libs: Bclaims/merkle proof/Pclaims/r cert/ r claims/ tx in pre image
    • snapshots
    • staking nft
    • validator pool
    • Merkle library
  • Updated immutable auth to auto generate solidity native errors for generated immutable contracts

  • Installed updated hardhat lib for asserting new custom errors in tests

  • updated bindings

Why?

MP-591

Todos

If any, what are the follow-up tasks required other than merging this PR? Have they been arranged?

  • ???

@github-actions github-actions bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code javascript Pull requests that update Javascript code solidity labels Jul 29, 2022
@codecov
Copy link

codecov bot commented Jul 29, 2022

Codecov Report

Merging #115 (1b6ca97) into main (3fbb43f) will increase coverage by 30.32%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             main     #115       +/-   ##
===========================================
+ Coverage   18.17%   48.49%   +30.32%     
===========================================
  Files         247      281       +34     
  Lines       26470    40912    +14442     
  Branches      362        0      -362     
===========================================
+ Hits         4812    19842    +15030     
+ Misses      21459    18768     -2691     
- Partials      199     2302     +2103     
Impacted Files Coverage Δ
layer1/transaction/transaction.go 0.00% <0.00%> (-69.65%) ⬇️
layer1/executor/tasks/dkg/state/generate.go 0.00% <0.00%> (-63.37%) ⬇️
layer1/executor/tasks/dkg/tests/utils/setup.go 0.00% <0.00%> (-61.12%) ⬇️
layer1/tests/setup.go 0.00% <0.00%> (-60.36%) ⬇️
layer1/transaction/backend.go 0.87% <0.00%> (-59.05%) ⬇️
layer1/tests/hardhat.go 0.00% <0.00%> (-51.61%) ⬇️
layer1/transaction/worker_pool.go 0.00% <0.00%> (-44.45%) ⬇️
layer1/executor/tasks/dkg/state/state.go 0.00% <0.00%> (-44.30%) ⬇️
layer1/ethereum/ethereum.go 0.00% <0.00%> (-42.69%) ⬇️
layer1/executor/tasks/dkg/state/validate.go 0.00% <0.00%> (-36.67%) ⬇️
... and 292 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@keirongulrajani keirongulrajani force-pushed the solidity-native-errors branch 2 times, most recently from 163b476 to fd3db78 Compare August 1, 2022 12:55
@vtleonardo
Copy link
Contributor

vtleonardo commented Aug 4, 2022

LGTM. All contracts and unit tests reviewed. Integration tests passed:

  • ETHDKG finished without errors
  • Snapshots happened
  • Fast sync and normal sync worked
  • Deposit worked
  • Custom errors are being displayed on the golang code!

@ghost ghost added the t/feature New feature or request label Aug 8, 2022
Copy link

@nelsonhp nelsonhp left a comment

Choose a reason for hiding this comment

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

Insane amount of logic inversion. Well done - in future we should break this up more.

)
)
);
if (caller_ != ownerOf(tokenID_)) {
Copy link

Choose a reason for hiding this comment

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

Not concern of this PR as it is out of scope but this line MUST be covered. Noting for ticket creation.

if (caller_ != ownerOf(tokenID_)) {
revert StakingNFTErrors.CallerNotTokenOwner(msg.sender);
}
if (lockDuration_ > _MAX_GOVERNANCE_LOCK) {
Copy link

Choose a reason for hiding this comment

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

Not concern of this PR as it is out of scope but this line MUST be covered. Noting for ticket creation.

@nelsonhp nelsonhp requested a review from z-j-lin August 10, 2022 20:29
@keirongulrajani keirongulrajani requested review from a team as code owners August 10, 2022 22:09
@nelsonhp nelsonhp merged commit 775eed8 into alicenet:main Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file go Pull requests that update Go code javascript Pull requests that update Javascript code solidity t/feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants