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

Add fuzz tests for hollow account completion #4855

Conversation

stoyan-lime
Copy link
Collaborator

@stoyan-lime stoyan-lime commented Feb 2, 2023

Signed-off-by: Stoyan Stoyanov stoyan.stoyanov@limechain.tech

Description:
Testing of hollow account completion by fuzzing different operations.

The test randomly runs the following operations (with bias defined in properties file):

  • Create a random SECP256K1 keys
  • Create a hollow account from key
  • Operations signed by the accounts created: crypto transfer, token associate, contract create and contract call
  • Deletion of accounts

Note: When creating an account it is saved in both the key and account registry and to differentiate between SECP256K1 keys and account keys, but still easily get one from the other we create hollow account names by adding "#" to the key name that created it.

Related issue(s):

Fixes #4633

@stoyan-lime stoyan-lime self-assigned this Feb 2, 2023
@stoyan-lime stoyan-lime changed the title test: add fuzz tests for hollow account completion Draft: Add fuzz tests for hollow account completion Feb 2, 2023
@mustafauzunn mustafauzunn added Limechain Work planned for the LimeChain team CI:UnitTests labels Feb 3, 2023
@github-actions
Copy link

github-actions bot commented Feb 3, 2023

Unit Test Results

  1 222 files    1 222 suites   34m 1s ⏱️
96 650 tests 96 649 ✔️ 1 💤 0
98 276 runs  98 275 ✔️ 1 💤 0

Results for commit 4e984ae.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Feb 3, 2023

Integration Test Results

106 tests   106 ✔️  10m 21s ⏱️
    2 suites      0 💤
    2 files        0

Results for commit 4e984ae.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Feb 3, 2023

E2E Test Results

    1 files      1 suites   17m 26s ⏱️
308 tests 308 ✔️ 0 💤 0
326 runs  326 ✔️ 0 💤 0

Results for commit 4e984ae.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@stoqnkpL stoqnkpL left a comment

Choose a reason for hiding this comment

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

Some ideas:

  • a very short expiration time
  • throw in some deletions
  • having a small enough inventory of keys so we end-up reusing the keys for the operations
  • in the future (maybe not this PR), having accounts finalized not from the payer signature only (when we update the implementation for this)

Signed-off-by: Stoyan Stoyanov <stoyan.stoyanov@limechain.tech>
Signed-off-by: Stoyan Stoyanov <stoyan.stoyanov@limechain.tech>
Signed-off-by: Stoyan Stoyanov <stoyan.stoyanov@limechain.tech>
Signed-off-by: Stoyan Stoyanov <stoyan.stoyanov@limechain.tech>
Signed-off-by: Stoyan Stoyanov <stoyan.stoyanov@limechain.tech>
Signed-off-by: Stoyan Stoyanov <stoyan.stoyanov@limechain.tech>
@stoyan-lime stoyan-lime force-pushed the 04633-add-fuzzing-tests-for-hollow-account-completion-transactions branch from cbac879 to 43d3e2a Compare February 21, 2023 11:30
Signed-off-by: Stoyan Stoyanov <stoyan.stoyanov@limechain.tech>
Signed-off-by: Stoyan Stoyanov <stoyan.stoyanov@limechain.tech>
Signed-off-by: Stoyan Stoyanov <stoyan.stoyanov@limechain.tech>
Signed-off-by: Stoyan Stoyanov <stoyan.stoyanov@limechain.tech>
@stoyan-lime stoyan-lime marked this pull request as ready for review February 22, 2023 12:53
@stoyan-lime stoyan-lime changed the title Draft: Add fuzz tests for hollow account completion Add fuzz tests for hollow account completion Feb 22, 2023
@github-actions
Copy link

github-actions bot commented Feb 28, 2023

Node: Unit Test Results

  1 339 files    1 339 suites   1h 28m 56s ⏱️
97 421 tests 97 413 ✔️ 8 💤 0
99 052 runs  99 044 ✔️ 8 💤 0

Results for commit a15bfbc.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Feb 28, 2023

Node: Integration Test Results

    3 files      3 suites   14m 58s ⏱️
151 tests 151 ✔️ 0 💤 0
152 runs  152 ✔️ 0 💤 0

Results for commit a15bfbc.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Feb 28, 2023

Node: E2E Test Results

    1 files      1 suites   17m 24s ⏱️
310 tests 310 ✔️ 0 💤 0
328 runs  328 ✔️ 0 💤 0

Results for commit a15bfbc.

♻️ This comment has been updated with latest results.

@stoyan-lime stoyan-lime requested a review from a team as a code owner March 16, 2023 08:58
@codecov
Copy link

codecov bot commented Apr 19, 2023

Codecov Report

Patch coverage has no change and project coverage change: +91.09 🎉

Comparison is base (c94fc28) 0.00% compared to head (f4dff20) 91.09%.

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

Additional details and impacted files
@@              Coverage Diff               @@
##             develop    #4855       +/-   ##
==============================================
+ Coverage           0   91.09%   +91.09%     
- Complexity         0    16898    +16898     
==============================================
  Files              0     1279     +1279     
  Lines              0    48476    +48476     
  Branches           0     4890     +4890     
==============================================
+ Hits               0    44159    +44159     
- Misses             0     3390     +3390     
- Partials           0      927      +927     

see 1279 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
@Nana-EC Nana-EC requested a review from lukelee-sl May 2, 2023 14:39
@Nana-EC Nana-EC added this to the v0.39 milestone May 2, 2023
tinker-michaelj
tinker-michaelj previously approved these changes May 2, 2023
Copy link
Collaborator

@tinker-michaelj tinker-michaelj left a comment

Choose a reason for hiding this comment

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

Two minor comments, overall looks great to me!

Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
@sonarcloud
Copy link

sonarcloud bot commented May 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@MiroslavGatsanoga
Copy link
Collaborator

Two minor comments, overall looks great to me!

Thanks @tinker-michaelj, pushed some updates regarding the comments.

@MiroslavGatsanoga MiroslavGatsanoga self-requested a review May 3, 2023 15:35
Copy link
Collaborator

@tinker-michaelj tinker-michaelj left a comment

Choose a reason for hiding this comment

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

LGTM, nice work!

@MiroslavGatsanoga MiroslavGatsanoga merged commit bd3e30e into develop May 5, 2023
10 of 11 checks passed
@MiroslavGatsanoga MiroslavGatsanoga deleted the 04633-add-fuzzing-tests-for-hollow-account-completion-transactions branch May 5, 2023 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Limechain Work planned for the LimeChain team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add fuzzing tests for hollow account completion transactions
6 participants