fix(nano): fix calls to get_balance on other contracts#1452
Merged
Conversation
2 tasks
jansegre
previously approved these changes
Oct 8, 2025
|
| Branch | fix/nano/another-balance |
| Testbed | ubuntu-22.04 |
🚨 1 Alert
| Benchmark | Measure Units | View | Benchmark Result (Result Δ%) | Upper Boundary (Limit %) |
|---|---|---|---|---|
| sync-v2 (up to 20000 blocks) | Latency minutes (m) | 📈 plot 🚷 threshold 🚨 alert (🔔) | 2.11 m(+22.30%)Baseline: 1.72 m | 2.07 m (101.92%) |
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 🚨 view alert (🔔) | 2.11 m(+22.30%)Baseline: 1.72 m | 1.55 m (73.59%) | 2.07 m (101.92%) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1452 +/- ##
==========================================
- Coverage 86.03% 85.91% -0.13%
==========================================
Files 434 434
Lines 33739 33740 +1
Branches 5291 5291
==========================================
- Hits 29029 28987 -42
- Misses 3673 3700 +27
- Partials 1037 1053 +16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
raul-oliveira
previously approved these changes
Oct 8, 2025
a8f2e85 to
fa44853
Compare
1 task
79f329e to
b207594
Compare
edaa0ee to
49bba69
Compare
49bba69 to
990c958
Compare
msbrogli
approved these changes
Oct 9, 2025
jansegre
approved these changes
Oct 9, 2025
990c958 to
ccde97f
Compare
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.
Depends on #1406
Motivation
There's a bug when trying to get the balance of another contract when that contact is not part of the call chain. Since its changes tracker is not created, the
Runner._get_balancewill raise aKeyError. This PR fixes this and adds the missing tests.Acceptance Criteria
Runner._get_balanceso it can get the balance of other contracts. Getting the balance of another contract before the current call is not supported.Runner.get_current_changes_trackerso it doesn't take any arguments. It was always called with the current contract id.Checklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged