Home / Input Output / cardano-db-sync
Nov 22, 3-4 PM (0)
Nov 22, 4-5 PM (0)
Nov 22, 5-6 PM (0)
Nov 22, 6-7 PM (0)
Nov 22, 7-8 PM (0)
Nov 22, 8-9 PM (5)
Nov 22, 9-10 PM (1)
Nov 22, 10-11 PM (6)
Nov 22, 11-12 AM (3)
Nov 23, 12-1 AM (3)
Nov 23, 1-2 AM (3)
Nov 23, 2-3 AM (0)
Nov 23, 3-4 AM (0)
Nov 23, 4-5 AM (0)
Nov 23, 5-6 AM (0)
Nov 23, 6-7 AM (0)
Nov 23, 7-8 AM (1)
Nov 23, 8-9 AM (0)
Nov 23, 9-10 AM (0)
Nov 23, 10-11 AM (0)
Nov 23, 11-12 PM (0)
Nov 23, 12-1 PM (0)
Nov 23, 1-2 PM (0)
Nov 23, 2-3 PM (0)
Nov 23, 3-4 PM (0)
Nov 23, 4-5 PM (0)
Nov 23, 5-6 PM (0)
Nov 23, 6-7 PM (0)
Nov 23, 7-8 PM (0)
Nov 23, 8-9 PM (1)
Nov 23, 9-10 PM (0)
Nov 23, 10-11 PM (0)
Nov 23, 11-12 AM (0)
Nov 24, 12-1 AM (0)
Nov 24, 1-2 AM (0)
Nov 24, 2-3 AM (0)
Nov 24, 3-4 AM (0)
Nov 24, 4-5 AM (0)
Nov 24, 5-6 AM (0)
Nov 24, 6-7 AM (0)
Nov 24, 7-8 AM (0)
Nov 24, 8-9 AM (0)
Nov 24, 9-10 AM (0)
Nov 24, 10-11 AM (0)
Nov 24, 11-12 PM (0)
Nov 24, 12-1 PM (0)
Nov 24, 1-2 PM (0)
Nov 24, 2-3 PM (0)
Nov 24, 3-4 PM (0)
Nov 24, 4-5 PM (0)
Nov 24, 5-6 PM (0)
Nov 24, 6-7 PM (0)
Nov 24, 7-8 PM (0)
Nov 24, 8-9 PM (0)
Nov 24, 9-10 PM (0)
Nov 24, 10-11 PM (0)
Nov 24, 11-12 AM (0)
Nov 25, 12-1 AM (0)
Nov 25, 1-2 AM (0)
Nov 25, 2-3 AM (0)
Nov 25, 3-4 AM (0)
Nov 25, 4-5 AM (0)
Nov 25, 5-6 AM (1)
Nov 25, 6-7 AM (1)
Nov 25, 7-8 AM (1)
Nov 25, 8-9 AM (0)
Nov 25, 9-10 AM (0)
Nov 25, 10-11 AM (0)
Nov 25, 11-12 PM (0)
Nov 25, 12-1 PM (0)
Nov 25, 1-2 PM (0)
Nov 25, 2-3 PM (0)
Nov 25, 3-4 PM (0)
Nov 25, 4-5 PM (0)
Nov 25, 5-6 PM (0)
Nov 25, 6-7 PM (0)
Nov 25, 7-8 PM (0)
Nov 25, 8-9 PM (0)
Nov 25, 9-10 PM (0)
Nov 25, 10-11 PM (0)
Nov 25, 11-12 AM (0)
Nov 26, 12-1 AM (0)
Nov 26, 1-2 AM (0)
Nov 26, 2-3 AM (4)
Nov 26, 3-4 AM (0)
Nov 26, 4-5 AM (0)
Nov 26, 5-6 AM (0)
Nov 26, 6-7 AM (0)
Nov 26, 7-8 AM (0)
Nov 26, 8-9 AM (0)
Nov 26, 9-10 AM (0)
Nov 26, 10-11 AM (0)
Nov 26, 11-12 PM (0)
Nov 26, 12-1 PM (0)
Nov 26, 1-2 PM (0)
Nov 26, 2-3 PM (0)
Nov 26, 3-4 PM (0)
Nov 26, 4-5 PM (0)
Nov 26, 5-6 PM (0)
Nov 26, 6-7 PM (0)
Nov 26, 7-8 PM (0)
Nov 26, 8-9 PM (0)
Nov 26, 9-10 PM (0)
Nov 26, 10-11 PM (0)
Nov 26, 11-12 AM (0)
Nov 27, 12-1 AM (0)
Nov 27, 1-2 AM (0)
Nov 27, 2-3 AM (0)
Nov 27, 3-4 AM (0)
Nov 27, 4-5 AM (0)
Nov 27, 5-6 AM (0)
Nov 27, 6-7 AM (0)
Nov 27, 7-8 AM (0)
Nov 27, 8-9 AM (0)
Nov 27, 9-10 AM (0)
Nov 27, 10-11 AM (0)
Nov 27, 11-12 PM (0)
Nov 27, 12-1 PM (0)
Nov 27, 1-2 PM (0)
Nov 27, 2-3 PM (0)
Nov 27, 3-4 PM (0)
Nov 27, 4-5 PM (0)
Nov 27, 5-6 PM (0)
Nov 27, 6-7 PM (0)
Nov 27, 7-8 PM (0)
Nov 27, 8-9 PM (0)
Nov 27, 9-10 PM (0)
Nov 27, 10-11 PM (0)
Nov 27, 11-12 AM (0)
Nov 28, 12-1 AM (0)
Nov 28, 1-2 AM (0)
Nov 28, 2-3 AM (0)
Nov 28, 3-4 AM (0)
Nov 28, 4-5 AM (0)
Nov 28, 5-6 AM (0)
Nov 28, 6-7 AM (0)
Nov 28, 7-8 AM (0)
Nov 28, 8-9 AM (0)
Nov 28, 9-10 AM (0)
Nov 28, 10-11 AM (0)
Nov 28, 11-12 PM (0)
Nov 28, 12-1 PM (0)
Nov 28, 1-2 PM (0)
Nov 28, 2-3 PM (0)
Nov 28, 3-4 PM (0)
Nov 28, 4-5 PM (0)
Nov 28, 5-6 PM (0)
Nov 28, 6-7 PM (0)
Nov 28, 7-8 PM (0)
Nov 28, 8-9 PM (0)
Nov 28, 9-10 PM (0)
Nov 28, 10-11 PM (0)
Nov 28, 11-12 AM (0)
Nov 29, 12-1 AM (0)
Nov 29, 1-2 AM (0)
Nov 29, 2-3 AM (0)
Nov 29, 3-4 AM (0)
Nov 29, 4-5 AM (0)
Nov 29, 5-6 AM (0)
Nov 29, 6-7 AM (0)
Nov 29, 7-8 AM (0)
Nov 29, 8-9 AM (0)
Nov 29, 9-10 AM (0)
Nov 29, 10-11 AM (0)
Nov 29, 11-12 PM (0)
Nov 29, 12-1 PM (0)
Nov 29, 1-2 PM (0)
Nov 29, 2-3 PM (0)
Nov 29, 3-4 PM (0)
30 commits this week Nov 22, 2020 - Nov 29, 2020
db-sync: Fix a race condition maintaining ledger state
When blocks and rollback notifications arrive via the chainsync protocol,
they are put in a queue and then a separate thread reads from the queue and
operates on the DB. When ledger-state management was added, code to apply a
block to a ledger state was added at the read end of the queue, but the
rollback handling was incorrectly added at the write end of the queue.

The solution to the problem is trivial, move the ledger state rollback
handling from the write end of the queue to the read end.

Closes: https://github.com/input-output-hk/cardano-db-sync/issue/398
db-sync: Add hash checking when maintaining ledger state
Maintenance of ledger state uses code in the consensus packages as a library.

* There are two versions of a function to apply a block to a ledger state; a
  slow one that does full checking and fast one that does fewer checks.
* Since db-sync is getting blocks that have already been validated by the node,
  it seemed sensible to use the fast version.
* I had been told that the checks in the fast version included checking that the
  block's previous hash matches the value of the head hash in the ledger state,
  but this hash check was not being done.

The previous lack of hash checking means the problem was not detected until the
start of the next epoch.
db-sync: Fix a race condition maintaining ledger state
When blocks and rollback notifications arrive via the chainsync protocol,
they are put in a queue and then a separate thread reads from the queue and
operates on the DB. When ledger-state management was added, code to apply a
block to a ledger state was added at the read end of the queue, but the
rollback handling was incorrectly added at the write end of the queue.

The solution to the problem is trivial, move the ledger state rollback
handling from the write end of the queue to the read end.

Closes: https://github.com/input-output-hk/cardano-db-sync/issue/398
db-sync: Add hash checking when maintaining ledger state
Maintenance of ledger state uses code in the consensus packages as a library.

* There are two versions of a function to apply a block to a ledger state; a
  slow one that does full checking and fast one that does fewer checks.
* Since db-sync is getting blocks that have already been validated by the node,
  it seemed sensible to use the fast version.
* I had been told that the checks in the fast version included checking that the
  block's previous hash matches the value of the head hash in the ledger state,
  but this hash check was not being done.

The previous lack of hash checking means the problem was not detected until the
start of the next epoch.
db-sync: Fix a race condition maintaining ledger state
When blocks and rollback notifications arrive via the chainsync protocol,
they are put in a queue and then a separate thread reads from the queue and
operates on the DB. When ledger-state management was added, code to apply a
block to a ledger state was added at the read end of the queue, but the
rollback handling was incorrectly added at the write end of the queue.

The solution to the problem is trivial, move the ledger state rollback
handling from the write end of the queue to the read end.

Closes: https://github.com/input-output-hk/cardano-db-sync/issue/398