-
Notifications
You must be signed in to change notification settings - Fork 28
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
refactor(metadata): move metadata attributes to static metadata [part 2/12] #1014
Merged
Conversation
This file contains 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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1014 +/- ##
==========================================
- Coverage 84.90% 84.54% -0.37%
==========================================
Files 316 317 +1
Lines 24079 24149 +70
Branches 3645 3665 +20
==========================================
- Hits 20445 20417 -28
- Misses 2918 3018 +100
+ Partials 716 714 -2 ☔ View full report in Codecov by Sentry. |
1 task
ce2cc12
to
c7a3ff8
Compare
942358a
to
3912750
Compare
glevco
commented
May 2, 2024
1372d65
to
9e960f7
Compare
This was referenced May 3, 2024
Merged
c7a3ff8
to
079afcc
Compare
a43cb95
to
bd946c3
Compare
079afcc
to
17e34da
Compare
2aa27b2
to
f805f3c
Compare
17e34da
to
3d51375
Compare
f805f3c
to
4b95949
Compare
3d51375
to
def1db9
Compare
4b95949
to
cc05543
Compare
jansegre
previously approved these changes
Aug 16, 2024
7e7fdc8
to
31f9b03
Compare
31f9b03
to
a4e34f1
Compare
a4e34f1
to
8d4f344
Compare
jansegre
previously approved these changes
Aug 20, 2024
msbrogli
previously approved these changes
Aug 20, 2024
8d4f344
to
98e21ad
Compare
msbrogli
approved these changes
Aug 20, 2024
jansegre
approved these changes
Aug 20, 2024
534b280
to
fcbcac1
Compare
fcbcac1
to
701b787
Compare
2 tasks
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 continues and completes the implementation for a working version of the static metadata refactor started in the previous PR, #1013. Read its description for more detailed information.
It moves the
height
,min_height
, andfeature_activation_bit_counts
metadata attributes to the new static structure. Thefeature_states
attribute will be migrated in the next PR.As a consequence, it introduces several benefits for metadata handling, including:
height=0
for transactions.voided_by
andvalidation
).Acceptance Criteria
height
,min_height
, andfeature_activation_bit_counts
attributes from metadata, moving them to static metadata.to_json()
method, for backwards compatibility with APIs and etc.BaseTransaction
and its subclasses to the static metadata dataclasses, and remove some that are not necessary anymore.create()
andcreate_from_storage()
methods for static metadata dataclasses.migrate_static_metadata
Migration to move existing metadata attributes to the new static metadata structure.TransactionStorage
and its subclasses:save_transaction()
and retrieve/set it inget_transaction()
andget_all_transactions()
._validate_block_height_metadata()
.iter_all_raw_metadata()
method used in the migration.Breaking Changes
height
and afeature_activation_bit_counts
field for all vertices. For transactions, they were always falsy values (0
,None
, or[]
). Now, they were removed from transactions and are only present for blocks.Checklist
master
, confirm this code is production-ready and can be included in future releases as soon as it gets merged