mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-07 22:04:03 -05:00
spec: rename coin params to coin attrs
This commit is contained in:
@@ -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{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
|
||||
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:
|
||||
$$ \begin{aligned}
|
||||
x_c &∈ 𝔽ₚ \\
|
||||
c &∈ \t{Params}_\t{Coin} \\
|
||||
c &∈ \t{Attrs}_\t{Coin} \\
|
||||
bᵥ &∈ 𝔽ᵥ \\
|
||||
b_τ &∈ 𝔽ₚ \\
|
||||
(ψᵢ, Πᵢ) &∈ \t{MerklePos} × \t{MerklePath} \\
|
||||
@@ -232,7 +232,7 @@ DAO contract nullifiers DB for this specific proposal.
|
||||
Let there be prover auxiliary witness inputs:
|
||||
$$ \begin{aligned}
|
||||
x_c &∈ 𝔽ₚ \\
|
||||
c &∈ \t{Params}_\t{Coin} \\
|
||||
c &∈ \t{Attrs}_\t{Coin} \\
|
||||
bᵥ &∈ 𝔽ᵥ \\
|
||||
b_τ &∈ 𝔽ₚ \\
|
||||
(ψᵢ, Πᵢ) &∈ \t{MerklePos} × \t{MerklePath} \\
|
||||
|
||||
@@ -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
|
||||
exceeds the size of $𝔽ₚ$ then a commit can be used here instead.
|
||||
|
||||
Define the coin params
|
||||
Define the coin attributes
|
||||
$$ \begin{aligned}
|
||||
\t{Params}_\t{Coin}.\t{PK} &∈ ℙₚ \\
|
||||
\t{Params}_\t{Coin}.v &∈ ℕ₆₄ \\
|
||||
\t{Params}_\t{Coin}.τ &∈ 𝔽ₚ \\
|
||||
\t{Params}_\t{Coin}.ζ &∈ 𝔽ₚ \\
|
||||
\t{Params}_\t{Coin}.\t{SH} &∈ 𝔽ₚ \\
|
||||
\t{Params}_\t{Coin}.\t{UD} &∈ 𝔽ₚ \\
|
||||
\t{Attrs}_\t{Coin}.\t{PK} &∈ ℙₚ \\
|
||||
\t{Attrs}_\t{Coin}.v &∈ ℕ₆₄ \\
|
||||
\t{Attrs}_\t{Coin}.τ &∈ 𝔽ₚ \\
|
||||
\t{Attrs}_\t{Coin}.ζ &∈ 𝔽ₚ \\
|
||||
\t{Attrs}_\t{Coin}.\t{SH} &∈ 𝔽ₚ \\
|
||||
\t{Attrs}_\t{Coin}.\t{UD} &∈ 𝔽ₚ \\
|
||||
\end{aligned} $$
|
||||
|
||||
```rust
|
||||
{{#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}) $$
|
||||
|
||||
|
||||
Reference in New Issue
Block a user