test(nano): Add a test for reentrancy attack#1324
Merged
Conversation
|
| Branch | test/reentrancy-attack |
| Testbed | ubuntu-22.04 |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result minutes (m) (Result Δ%) | Lower Boundary minutes (m) (Limit %) | Upper Boundary minutes (m) (Limit %) |
|---|---|---|---|---|
| sync-v2 (up to 20000 blocks) | 📈 view plot 🚷 view threshold | 1.78 m(+8.60%)Baseline: 1.64 m | 1.48 m (82.88%) | 1.80 m (98.72%) |
a62196d to
b5ad9ba
Compare
jansegre
previously approved these changes
Jul 22, 2025
glevco
previously approved these changes
Jul 23, 2025
8abef61 to
bca8ac4
Compare
glevco
approved these changes
Jul 23, 2025
bca8ac4 to
0faf646
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1324 +/- ##
==========================================
+ Coverage 85.60% 85.65% +0.05%
==========================================
Files 424 424
Lines 31994 31994
Branches 4971 4971
==========================================
+ Hits 27390 27406 +16
+ Misses 3603 3595 -8
+ Partials 1001 993 -8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This was referenced Aug 5, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Blueprint developers must exercise caution when invoking external contracts, as this can introduce reentrancy vulnerabilities.
This PR includes an example blueprint that demonstrates a common reentrancy flaw: calling an external contract before updating the internal state. This mistake can allow an attacker to exploit the contract and repeatedly withdraw funds before the balance is properly updated.
Acceptance criteria