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

Cherry pick to 0.39: Retire old security model for smart contracts by changing HAPI signature-check block limit to LOW #7055

Conversation

david-bakin-sl
Copy link
Member

Description:

Cherry pick of 666b607 to 0.39

  • Set contracts.maxNumWithHapiSigsSuccess to 0 to disable old security model.
  • Ensure (appropriate) unit tests check both low and high limits.
    • In fact the unit tests don't test this feature at all, just have to be corrected for mockability.
  • "Fix" BDD tests by ... making them pass for the V1 security model
    • ⮕ Does not have new BDD tests for the V2 security model to replace the ones that now really only work for the V1 security model
      • There are some of those created when the V2 security model was created but there needs to be a more comprehensive set
    • ⮕ Does not confirm that negative tests in the same affected suites (or elsewhere for that matter) return failure (that is, the transaction returns failure so the test returns success) for the right reason.
      • I.e., some of them may now be failing due to a V2 security model violation and not because of the reason they're supposed to fail

Related issue(s):

Fixes #6767

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: David Bakin 117694041+david-bakin-sl@users.noreply.github.com

@david-bakin-sl david-bakin-sl requested review from a team as code owners June 12, 2023 18:22
@david-bakin-sl david-bakin-sl self-assigned this Jun 12, 2023
@david-bakin-sl david-bakin-sl added this to the v0.39 milestone Jun 12, 2023
@david-bakin-sl david-bakin-sl linked an issue Jun 12, 2023 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Jun 12, 2023

Node: Unit Test Results

    1 423 files      1 423 suites   25m 45s ⏱️
100 452 tests 100 444 ✔️ 8 💤 0
106 805 runs  106 797 ✔️ 8 💤 0

Results for commit da07d2d.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jun 12, 2023

Node: E2E Test Results

    1 files      1 suites   19m 11s ⏱️
310 tests 310 ✔️ 0 💤 0
328 runs  328 ✔️ 0 💤 0

Results for commit da07d2d.

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (19c1ce0) 67.92% compared to head (19c1ce0) 67.92%.

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

Additional details and impacted files
@@               Coverage Diff               @@
##             release/0.39    #7055   +/-   ##
===============================================
  Coverage           67.92%   67.92%           
  Complexity          23002    23002           
===============================================
  Files                2134     2134           
  Lines              139443   139443           
  Branches             7996     7996           
===============================================
  Hits                94717    94717           
  Misses              43137    43137           
  Partials             1589     1589           

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

@github-actions
Copy link

github-actions bot commented Jun 12, 2023

Node: Integration Test Results

    4 files      4 suites   27m 33s ⏱️
262 tests 262 ✔️ 0 💤 0
264 runs  264 ✔️ 0 💤 0

Results for commit da07d2d.

♻️ This comment has been updated with latest results.

@david-bakin-sl david-bakin-sl changed the title [Automated EA Release] Platform SDK v0.39.0-alpha.2 Cherry pick to 0.39: Retire old security model for smart contracts by changing HAPI signature-check block limit to LOW Jun 12, 2023
… changing HAPI signature-check block limit to LOW

Cherry pick of 666b607

Signed-off-by: David Bakin <117694041+david-bakin-sl@users.noreply.github.com>
@david-bakin-sl david-bakin-sl force-pushed the 06767-for-0.39-retire-old-security-model-for-smart-contracts branch from 4d039f5 to da07d2d Compare June 12, 2023 19:53
@sonarcloud
Copy link

sonarcloud bot commented Jun 12, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

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

No Coverage information No Coverage information
3.2% 3.2% Duplication

@iwsimon iwsimon merged commit 66a7c87 into release/0.39 Jun 13, 2023
16 of 18 checks passed
@iwsimon iwsimon deleted the 06767-for-0.39-retire-old-security-model-for-smart-contracts branch June 13, 2023 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Retire old security model for smart contracts
5 participants