High level summary
After spending the last months on improving DBSync and releasing 13.1.0.0
the DBSync team focused
the last weeks on integrating upstream changes and tech debt. This includes integrating CHaP, the
new leger core and ghc-9.2.4
The DBSync team continued testing release 13.1.0.0
. The QA team has reported that no issues have
been found. The DBSync team also worked on cherry-picks back to master and on fixing bugs.
The DB Sync team prepared a release 13.1.0.0-rc2
which includes many improvements for db-sync,
it makes rollbacks and syncing much faster, simplifies the schema, fixes bugs and introduces
migrations. This release finalises the objectives that were set for db-sync for the previous
3 months period and part of the syncing speed objective set for the next period
Changelog
Branch release/13.1.0.x includes all the improvements related to the release. The release is passing through the testing phase and a number of bugs and issues have been fixed, like #1312 #1311. Also many new unit tests have been added.
Part of the release branch is cherry-picked back into master, in a way that it respects the new release and development process, so that it takes into account migrations release process
The DB Sync team has also tagged release 13.0.6
which better supports preview and preprod for
docker.
The DBSync team is preparing a release which introduces schema simplifications, removes indexes, unique and foreign keys. It also provides a way to fix older values and migrates without the need to resync from genesis.
Indexes, Unique and Foreign keys are removed in order to speedup syncing #1295 The same pr also introduces a different way to rollback, which doesn't rely on foreign keys and indexes.
The DBSync team ran a big number of benchmarks and investigated ways to speedup syncing. A conservative number of these will be included in the next release and the rest can be found in performance view.
The next release will be 13.1.0, it will enable a migration without the need to resync. It will also introduce a procedure that fixes bytes values of Datum and RedeemerData in existing databases #1294
The release has been mostly cherry-picked from master #1294 and its scope can be seen release view
We fixed a long overdue issue in db-sync which caused long delays on restarts 1266. This has been one of db-sync main objectives for this period. Restarts are now very fast, because db-sync deletes almost nothing from the db, it just replays the ledger rules until it reaches the tip of the db. The fix also improves reconnection speed, in cases where the node restarts or the connection is temporarily lost. It also speeds up even more in cases where due to a deployment mess up a very old snapshot or no snapshot at all is used.
We added stateful property based testing, using quickcheck-state-machine
1269. These tests use empty or
almost empty blocks to test the new behaviour of restarts and rollbacks.
These tests generate arbitrarily a list of symbolic commands from these:
RollForward Int
RollBack BlockNo
StopDBSync
StartDBSync
RestartNode
AssertBlockNo BlockNo
The commands are translated into real commands. For example RollForward Int
will forge a new block
that fits on the current chain. These real commands are executed against db-sync using the mock
chain-sync server. The symbolic commands are executed against a vesy simplistic Model of db-sync
which looks like this:
Model
{ serverTip :: BlockNo
, dbSyncTip :: BlockNo
, dbSynsIsOn :: Bool
, dbSynsHasSynced :: Bool
}
Finally a number of postconditions are checked, related to the eventual block number of db-sync.
We handled a number of tech debt in 1275 This improves the code format of db-sync, deletes many queries that were never used and groups the others. This tech debt resolution not only improves the experience of working in db-sync, but can facilitate some of our other objectives, as it makes it very explicit which queries are used during syncing and which indexes are necessary.
We worked on fixing an issue related to fetching pool metadata 1276. The issue which is described in 1270