Requesting a Digest

Amazon QLDB uses an immutable transactional log, known as a journal, for data storage. The journal tracks every change to your data and maintains a complete and verifiable history of changes over time.

Sourcing data from the journal, QLDB uses a cryptographic hash function (SHA-256) with a Merkle tree–based model to generate a secure output file of your ledger’s full hash chain. This output file is known as a digest and acts as a fingerprint of your data’s entire change history as of a point in time. It enables you to look back and validate the integrity of your data revisions relative to that fingerprint.

In the navigation pane of the console, go to the “Ledgers” page. Select the “vehicle-registration” ledger by clicking the radio button next to its name. Click the Get digest button.

Get Digest

The Get digest dialog box displays the following digest details:

  • Digest—The SHA-256 hash value of the digest that you requested.
  • Digest tip address—the latest block location in the journal covered by the digest that you requested. An address has the following two fields:
  • strandId—the unique ID of the journal strand that contains the block.
  • sequenceNo—the index number that specifies the block location within the strand.
  • Ledger—the ledger name for which you requested a digest.
  • Date—the timestamp when you requested the digest

Click Save in the Get digest dialog box.

Get Digest

The saved digest file is stored in Amazon Ion format (.ion.txt extension) and contains all the digest information listed in the preceding dialog box. The following is an example:

Digest

You will used the saved digest as a fingerprint to verify a document revision against.

The document revision that you verify later must be covered by the digest that you saved. That is, the sequence number of the document’s address must be less than or equal to the sequence number of the Digest tip address.