-
Notifications
You must be signed in to change notification settings - Fork 679
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
Fix typo in nakamoto tenures table #4812
Fix typo in nakamoto tenures table #4812
Conversation
Hey @kantai, @obycode, do we need to add an extra if statement for the drop, something like Also, how could I test this? I ran thread 'tests::should_succeed_mining_valid_txs' panicked at testnet/stacks-node/src/node.rs:339:10:
FATAL: failed to initiate mempool: Other("Failed to open chainstate: ClarityError(Interpreter(Interpreter(MarfFailure(\"unable to open database file: /tmp/stacks-node-tests/integrations-neon/68456e5053d7c4e4-1716316920/mocknet/chainstate/vm/clarity/marf.sqlite\"))))") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @ASuciuX
Yes, this schema update needs to be controlled via the schema versioning.
You should:
- Rename
NAKAMOTO_TENURES_SCHEMA
toNAKAMOTO_TENURES_SCHEMA_1
- Create a new
NAKAMOTO_TENURES_SCHEMA_2
which includes theDROP TABLE
and the newCREATE TABLE
. - Create a NAKAMOTO_CHAINSTATE_SCHEMA_2 variable in
stackslib/src/chainstate/nakamoto/mod.rs
which includes theNAKAMOTO_TENURES_SCHEMA_2
- Update
CHAINSTATE_VERSION
to5
instackslib/src/chainstate/stacks/db/mod.rs
- Add a new
"4"
case to the match inapply_schema_migrations
instackslib/src/chainstate/stacks/db/mod.rs
, which appliesNAKAMOTO_CHAINSTATE_SCHEMA_2
.
Thank you very much @kantai! How could I test what I added so far?
I also looked over other tables and I spotted here that on one table (different table than the one this issue is pointing to), some fields are declared as Update: with strict it can still be INT or INTEGER doc link. They should be the same so what is the approach on creating a column with |
According to the docs, the first sqlite_version that supports
I would remove from this issue the After removing the |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4812 +/- ##
===========================================
- Coverage 83.49% 76.89% -6.61%
===========================================
Files 481 481
Lines 344880 344924 +44
Branches 323 323
===========================================
- Hits 287953 265218 -22735
- Misses 56919 79698 +22779
Partials 8 8
... and 203 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
version is "3.33.0"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
969f4a2
This should have been included in #4812 but was overlooked. The fix solves the issue with the various Nakamoto integration tests.
This should have been included in #4812 but was overlooked. The fix solves the issue with the various Nakamoto integration tests.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Applicable issues
nakamoto_tenures
table #4786