refactor(nano): simplify index records#1460
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## raul-oliveira/fee-token-verification #1460 +/- ##
========================================================================
+ Coverage 86.02% 86.04% +0.01%
========================================================================
Files 435 437 +2
Lines 33918 34015 +97
Branches 5297 5317 +20
========================================================================
+ Hits 29179 29269 +90
+ Misses 3693 3692 -1
- Partials 1046 1054 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
glevco
commented
Oct 14, 2025
5b7b536 to
5a52530
Compare
msbrogli
previously approved these changes
Oct 14, 2025
jansegre
previously approved these changes
Oct 14, 2025
raul-oliveira
previously approved these changes
Oct 14, 2025
ecacbad to
c92032e
Compare
9dcdd3b to
e9acc21
Compare
fbc7ceb to
72e231a
Compare
e9acc21 to
f36b075
Compare
72e231a to
dca477b
Compare
f36b075 to
3d06cf1
Compare
The base branch was changed.
3d06cf1 to
81f19e7
Compare
jansegre
approved these changes
Oct 15, 2025
msbrogli
approved these changes
Oct 15, 2025
81f19e7 to
a39327b
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.
Motivation
This PR addresses a few shortcomings of the current index update records model used in the nano Runner to update indexes after a nano is executed. The use cases evolved and the model became outdated. It addresses these:
MELTtype, but it's not a melt.In a subsequent PR, the syscall token balance rules which are used for token fees will also be simplified.
Acceptance Criteria
runner/types.pyfile to their own file,runner/index_records.py.runner/types.pyfile torunner/call_info.py, because now it only contains call info-related types.IndexUpdateRecordType-> becomesIndexRecordType, and its options are updated to better reflect the intentions.UpdateAuthoritiesRecordType-> is removed and included inIndexRecordTypefor simplification.SyscallCreateContractRecord-> becomesCreateContractRecordUpdateAuthoritiesRecorddoesn't change.SyscallUpdateTokenRecord-> is now broken into two types,CreateTokenRecordandUpdateTokenBalanceRecord. It was a single type encompassing two different intentions.Syscallis removed from type names because now we also have actions that affect indexes. Removing it is more generic.__post_init__validations are improved.Checklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged