summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2022-10-11 13:48:55 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2022-10-11 13:48:55 +0200
commitb083097892e77f16c0a0e6e632acdf9d21884d61 (patch)
tree7e9ce3c8566648fa17029fbefc4e11a6477e1f02
parent2c749dfc55b707dea5c03534c83da0795e3e97fb (diff)
downloaddocs-b083097892e77f16c0a0e6e632acdf9d21884d61.tar.gz
docs-b083097892e77f16c0a0e6e632acdf9d21884d61.tar.bz2
docs-b083097892e77f16c0a0e6e632acdf9d21884d61.zip
invariant re: accumulated_amount added; typo fixed
-rw-r--r--design-documents/028-deposit-policies.rst14
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``.