stacks-core
stacks-core copied to clipboard
Update SQLITE Version to support `STRICT` tables
According to the docs, the first sqlite_version that supports STRICT is 3.37.0. From the stacks-core, the sqlite_version is 3.33.0 and the tests were failing with this output:
Migrating chainstate schema from version 4 to 5: fix nakamoto tenure typo
thread 'chainstate::nakamoto::tests::test_make_miners_stackerdb_config' panicked at stackslib/src/net/mod.rs:2452:14:
called `Result::unwrap()` on an `Err` value: DBError(SqliteError(SqliteFailure(Error { code: Unknown, extended_code: 1 }, Some("near \"STRICT\": syntax error"))))
The rusqlite version has to be updated so that the sqlite used supports strict tables. The sqlite version can be checked in two ways:
- by running a query as displayed in this PR
- by importing the version from the rusqlite https://docs.rs/rusqlite/latest/rusqlite/fn.version.html
How to check after upgrading the rusqlite version (and sqlite version implicitly) that there are no breaking changes when communicating with other nodes having the old version. Is it enough to run unit + integration tests?
Is it enough to update the version and start migrating the tables to have STRICT?
Answer: After the sqlite version upgrade by running replay blocks with index range subcommand to select a random sample and test it multiple times.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.