diff --git a/CHANGELOG.md b/CHANGELOG.md index 156dbf032c..0470bab77b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE ### Changed - Add index for StacksBlockId to nakamoto block headers table (improves node performance) - Remove the panic for reporting DB deadlocks (just error and continue waiting) +- Add index to `metadata_table` in Clarity DB on `blockhash` - Add `block_commit_delay_ms` to the config file to control the time to wait after seeing a new burn block, before submitting a block commit, to allow time for the first Nakamoto block of the new tenure to be mined, allowing this miner to avoid the need to RBF the block commit. ## [3.0.0.0.1] @@ -18,7 +19,7 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE - Add index for StacksBlockId to nakamoto block headers table (improves node performance) - Remove the panic for reporting DB deadlocks (just error and continue waiting) - Various test fixes for CI (5353, 5368, 5372, 5371, 5380, 5378, 5387, 5396, 5390, 5394) -- Various log fixes: +- Various log fixes: - don't say proceeding to mine blocks if not a miner - misc. warns downgraded to debugs - 5391: Update default block proposal timeout to 10 minutes diff --git a/clarity/src/vm/database/sqlite.rs b/clarity/src/vm/database/sqlite.rs index 7d2af59eb5..0e0f0e3f6e 100644 --- a/clarity/src/vm/database/sqlite.rs +++ b/clarity/src/vm/database/sqlite.rs @@ -248,6 +248,12 @@ impl SqliteConnection { ) .map_err(|x| InterpreterError::SqliteError(IncomparableError { err: x }))?; + conn.execute( + "CREATE INDEX IF NOT EXISTS md_blockhashes ON metadata_table(blockhash)", + NO_PARAMS, + ) + .map_err(|x| InterpreterError::SqliteError(IncomparableError { err: x }))?; + Self::check_schema(conn)?; Ok(())