diff options
Diffstat (limited to 'design-documents/028-deposit-policies.rst')
-rw-r--r-- | design-documents/028-deposit-policies.rst | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/design-documents/028-deposit-policies.rst b/design-documents/028-deposit-policies.rst index 6d1a9589..bf6c5ec5 100644 --- a/design-documents/028-deposit-policies.rst +++ b/design-documents/028-deposit-policies.rst @@ -87,7 +87,7 @@ TODO: Description label=<<B>policy_details</B>> margin=20 policy_details [ - label="<id>id\l|<hash>hash_code (unique)\l|deadline\l|commitment (amount)\l|accumulated_total (amount)\l|fee (amount)\l|transferable (amount)\l|fulfillment_state\l|<fid>fulfillment_id (null)\l" + label="<id>id\l|<hash>policy_hash_code (unique)\l|deadline\l|commitment (amount)\l|accumulated_total (amount)\l|fee (amount)\l|transferable (amount)\l|fulfillment_state\l|<fid>fulfillment_id (null)\l" ] } @@ -107,7 +107,7 @@ TODO: Description The field ``policy_hash_codes`` in table ``policy_fulfillments`` is a binary blob that consists of the concatenation of the sorted -``policy_details.hash_code`` entries from all policies that are fulfilled by +``policy_details.policy_hash_code`` entries from all policies that are fulfilled by this proof. @@ -152,16 +152,20 @@ The following invariants need to be fulfilled and be checked by the auditor: ``policy_details.accumulated_total``. - The sum of amounts in ``policy_details.fee`` and - ``policy_details.transferable`` must be less or equal to the amount in + ``policy_details.transferable`` MUST be less or equal to the amount in ``policy_details.accumulated_total``. +- The amount in ``policy_details.accumulated_total`` MUST be equal to the total + sum of contributions of the individual coins of the deposits that reference + this policy. + - Each hash code encoded in ``policy_fulfillments.policy_hash_codes`` MUST refer to an existing ``policy_details.hash_code`` AND its ``.fulfillment_id`` MUST point to the same ``policy_fulfillments.id``. - Conversely: If a ``policy_details.fulfillment_id`` points to an entry in - ``policy_fulfillment``, the ``policy_details.hash_code`` MUST be present in - that entry's ``.policy_hash_codes``. + ``policy_fulfillment``, the ``policy_details.policy_hash_code`` MUST be + present in that entry's ``.policy_hash_codes``. |