Bailment Database

From Open Transactions
(Redirected from Bailment database)
Jump to navigation Jump to search

Purpose and Requirements

Voting pools must be able to maintain accurate accounting between the OT balances issued and the actual amount of blockchain currency under their control. For this reason, every deposit address should be associated with a specific account to receive the initial credit for incoming blockchain transactions. This association must be maintained as a permanent record, because it's not possible to ensure users do not reuse deposit addresses.

Every notary and every auditor in the voting pool maintains a full bailment database for the entire pool. Auditors need a full database to ensure that notaries credit the correct nyms for incoming deposits. Notaries need a full database because users will verify bailment instructions by querying notaries other than the ones which provided them with the instructions.

The bailment database must be currency-agnostic because auditors and notaries do not contain any blockchain currency-specific knowledge.

Format

The database contains the following fields:

server id
The identifier for the notary managing the account associated with this bailment
transaction number
The transaction number associated with the bailment request.
nym id
The nym who owns the account associated with this bailment
account id
The account to be credited for the bailment. All incoming blockchain deposits to the address defined in this record will be credited to this account.
address identifier
The blockchain deposit address, specified in a currency-agnostic manner
output script
The currency-specific representation of the address identifier. The auditor and notary will never parse the data in this field, but they can perform comparisons on it.

The (server id, transaction number) fields must be unique across all entries in the database and together they form the canonical identifier for distinguishing between, and tracking the lifecycle of, bailments.