spec: rename coin params to coin attrs

This commit is contained in:
zero
2024-01-19 09:29:42 +01:00
committed by lunar-mining
parent e4af7ec436
commit 279fdf6a5f
2 changed files with 11 additions and 11 deletions

View File

@@ -85,7 +85,7 @@ $$ \begin{aligned}
Let $t₀ = \t{CurrentDay} ∈ 𝔽ₚ$ be the current day as defined in [Current Day](model.md#current-day). Let $t₀ = \t{CurrentDay} ∈ 𝔽ₚ$ be the current day as defined in [Current Day](model.md#current-day).
Let $\t{Params}_\t{Coin}$ be defined as in [Coin](../money/model.md#coin). Let $\t{Attrs}_\t{Coin}$ be defined as in [Coin](../money/model.md#coin).
**Valid DAO bulla merkle root**   check that $R_\t{DAO}$ is a previously **Valid DAO bulla merkle root**   check that $R_\t{DAO}$ is a previously
seen merkle root in the DAO contract merkle roots DB. seen merkle root in the DAO contract merkle roots DB.
@@ -134,7 +134,7 @@ previously seen merkle root in the money contract merkle roots DB.
  Let there be a prover auxiliary witness inputs:   Let there be a prover auxiliary witness inputs:
$$ \begin{aligned} $$ \begin{aligned}
x_c &∈ 𝔽ₚ \\ x_c &∈ 𝔽ₚ \\
c &∈ \t{Params}_\t{Coin} \\ c &∈ \t{Attrs}_\t{Coin} \\
bᵥ &∈ 𝔽ᵥ \\ bᵥ &∈ 𝔽ᵥ \\
b_τ &∈ 𝔽ₚ \\ b_τ &∈ 𝔽ₚ \\
(ψᵢ, Πᵢ) &∈ \t{MerklePos} × \t{MerklePath} \\ (ψᵢ, Πᵢ) &∈ \t{MerklePos} × \t{MerklePath} \\
@@ -232,7 +232,7 @@ DAO contract nullifiers DB for this specific proposal.
Let there be prover auxiliary witness inputs: Let there be prover auxiliary witness inputs:
$$ \begin{aligned} $$ \begin{aligned}
x_c &∈ 𝔽ₚ \\ x_c &∈ 𝔽ₚ \\
c &∈ \t{Params}_\t{Coin} \\ c &∈ \t{Attrs}_\t{Coin} \\
bᵥ &∈ 𝔽ᵥ \\ bᵥ &∈ 𝔽ᵥ \\
b_τ &∈ 𝔽ₚ \\ b_τ &∈ 𝔽ₚ \\
(ψᵢ, Πᵢ) &∈ \t{MerklePos} × \t{MerklePath} \\ (ψᵢ, Πᵢ) &∈ \t{MerklePos} × \t{MerklePath} \\

View File

@@ -22,20 +22,20 @@ The coin contains the main parameters that define the `Money::transfer()` operat
contract to store additional parameters in the coin. If the parameter length contract to store additional parameters in the coin. If the parameter length
exceeds the size of $𝔽ₚ$ then a commit can be used here instead. exceeds the size of $𝔽ₚ$ then a commit can be used here instead.
Define the coin params Define the coin attributes
$$ \begin{aligned} $$ \begin{aligned}
\t{Params}_\t{Coin}.\t{PK} &∈ ℙₚ \\ \t{Attrs}_\t{Coin}.\t{PK} &∈ ℙₚ \\
\t{Params}_\t{Coin}.v &∈ ℕ₆₄ \\ \t{Attrs}_\t{Coin}.v &∈ ℕ₆₄ \\
\t{Params}_\t{Coin}.τ &∈ 𝔽ₚ \\ \t{Attrs}_\t{Coin}.τ &∈ 𝔽ₚ \\
\t{Params}_\t{Coin}.ζ &∈ 𝔽ₚ \\ \t{Attrs}_\t{Coin}.ζ &∈ 𝔽ₚ \\
\t{Params}_\t{Coin}.\t{SH} &∈ 𝔽ₚ \\ \t{Attrs}_\t{Coin}.\t{SH} &∈ 𝔽ₚ \\
\t{Params}_\t{Coin}.\t{UD} &∈ 𝔽ₚ \\ \t{Attrs}_\t{Coin}.\t{UD} &∈ 𝔽ₚ \\
\end{aligned} $$ \end{aligned} $$
```rust ```rust
{{#include ../../../../../src/contract/money/src/model.rs:coin-attributes}} {{#include ../../../../../src/contract/money/src/model.rs:coin-attributes}}
``` ```
$$ \t{Coin} : \t{Params}_\t{Coin} → 𝔽ₚ $$ $$ \t{Coin} : \t{Attrs}_\t{Coin} → 𝔽ₚ $$
$$ \t{Coin}(p) = \t{Bulla}(\mathcal{X}(p.\t{PK}), \mathcal{Y}(p.\t{PK}), ₆₄2𝔽ₚ(p.v), p.τ, p.ζ, p.\t{SH}, p.\t{UD}) $$ $$ \t{Coin}(p) = \t{Bulla}(\mathcal{X}(p.\t{PK}), \mathcal{Y}(p.\t{PK}), ₆₄2𝔽ₚ(p.v), p.τ, p.ζ, p.\t{SH}, p.\t{UD}) $$