Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
cc2f215
Add state type documentation in Juvix Markdown format
jonaprieto Dec 31, 2024
7e292c5
Add documentation for Resource type in Juvix Markdown format
jonaprieto Dec 31, 2024
5577216
Add documentation for Resource Machine type in Juvix Markdown format
jonaprieto Dec 31, 2024
8a117b8
Add documentation for Resource Logic Proof in Juvix Markdown format
jonaprieto Dec 31, 2024
9974c4c
Add documentation for Action type in Juvix Markdown format.
jonaprieto Dec 31, 2024
213308b
Refactor Juvix documentation for cryptographic types
jonaprieto Dec 31, 2024
dbdee2f
Update Juvix documentation: refine equality import in prelude.juvix.md
jonaprieto Dec 31, 2024
2164c13
Remove nullifier documentation and add new nullifier and nullifier ke…
jonaprieto Dec 31, 2024
fd7d8d9
Add documentation for Transaction type and update Action type in Juvi…
jonaprieto Dec 31, 2024
5b5665d
Remove obsolete documentation for Action, Resource Logic Proof, Resou…
jonaprieto Dec 31, 2024
d9d6206
Update nav and, update everything.juvix.md and indexes.
jonaprieto Dec 31, 2024
a46dc3d
Add documentation for Commitment type
jonaprieto Jan 2, 2025
b314441
Enhance Action documentation and add tags for better categorization
jonaprieto Jan 2, 2025
efd9211
Add documentation for Commitment Trees in Juvix
jonaprieto Jan 2, 2025
797272d
Update nullifier and nullifier key documentation with clarifications …
jonaprieto Jan 2, 2025
7ecbf0a
Enhance resource documentation with new type synonyms and properties
jonaprieto Jan 2, 2025
ed4ea45
Add documentation for Tag type in Juvix
jonaprieto Jan 2, 2025
44f71be
Add tags for better categorization in state documentation
jonaprieto Jan 2, 2025
aacadb3
Fix issues detected by pre-commit
Jan 2, 2025
fe60481
Add documentation for `hash` axiom in Juvix
jonaprieto Jan 3, 2025
1f80a21
Enhance Action documentation with detailed explanations of purpose, p…
jonaprieto Jan 3, 2025
66c53a7
Enhance Commitment documentation by adding a detailed purpose section…
jonaprieto Jan 3, 2025
65293ad
Refactor Commitment and Commitment Tree documentation
jonaprieto Jan 3, 2025
05061e1
Add `test.agda` module to test and show an apparently bug or unsuppor…
jonaprieto Jan 3, 2025
f0d0b55
Fix issues detected by pre-commit
Jan 3, 2025
f1e1bc5
Udpdate type names in instance for CommitmentTreeOps
jonaprieto Jan 3, 2025
c0b8647
Fix issues detected by pre-commit
Jan 3, 2025
a848236
Refactor Commitment documentation: Updated the purpose section.
jonaprieto Jan 3, 2025
e362594
Enhance Action documentation: Clarified the definition and purpose of…
jonaprieto Jan 3, 2025
67e0b44
Fix issues detected by pre-commit
Jan 3, 2025
5d08c19
add w.i.p
jonaprieto Jan 8, 2025
3ffcfdd
Fix issues detected by pre-commit
Jan 8, 2025
89843f3
Jan. Last code block. typecheck the file arch/system/../commitmenttre…
jonaprieto Jan 15, 2025
22f2555
fix type checking errors
AHartNtkn Jan 16, 2025
73e5fe6
Merge branch 'jonathan/add-rm-types' of https://github.com/anoma/nspe…
AHartNtkn Jan 16, 2025
ff26a39
Fix "everything"
AHartNtkn Jan 16, 2025
d466d4b
Merge remote-tracking branch 'origin/topic-transaction-function' into…
jonaprieto Jan 17, 2025
08aa3eb
Enhance documentation for resource machine types by adding a specific…
jonaprieto Jan 17, 2025
839017a
Fix issues detected by pre-commit
Jan 17, 2025
a06577e
Update `treeHash` function in commitmenttree.juvix.md to include a TO…
jonaprieto Jan 17, 2025
aece381
Define `Nonce` type and its instances in the resource machine prelude…
jonaprieto Jan 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/arch/node/engines/mempool_worker_behaviour.juvix.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ A mempool worker acts as a transaction coordinator, receiving transaction reques

```juvix
axiom sign : TxFingerprint -> TransactionCandidate -> Signature;
axiom hash : TxFingerprint -> TransactionCandidate -> Hash;
axiom TChash : TxFingerprint -> TransactionCandidate -> Hash;
```

## Action arguments
Expand Down Expand Up @@ -204,7 +204,7 @@ handleTransactionRequest
mailbox := some 0;
msg := Anoma.MsgMempoolWorker (MempoolWorkerMsgTransactionAck
(mkTransactionAck@{
tx_hash := hash fingerprint candidate;
tx_hash := TChash fingerprint candidate;
batch_number := MempoolWorkerLocalState.batch_number local;
batch_start := 0;
worker_id := worker_id;
Expand Down
74 changes: 62 additions & 12 deletions docs/arch/node/types/crypto.juvix.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,24 @@ Public key for public-key cryptography.
type PublicKey :=
| Curve25519PubKey ByteString
;

instance
PublicKeyOrd : Ord PublicKey :=
mkOrd@{
cmp := \{_ _ := Equal};
};
```

??? quote "Auxiliary Juvix code"

```juvix
deriving
instance
PublicKeyEq : Eq PublicKey;
```

```juvix
instance
PublicKeyOrd : Ord PublicKey :=
mkOrd@{
cmp := \{_ _ := Equal};
};
```

### Private key

Private key for public-key cryptography.
Expand All @@ -43,14 +53,22 @@ Private key for public-key cryptography.
type PrivateKey :=
| Curve25519PrivKey ByteString
;

instance
PrivateKeyOrd : Ord PrivateKey :=
mkOrd@{
cmp := \{_ _ := Equal};
};
```

??? quote "Auxiliary Juvix code"

```juvix
deriving
instance
PrivateKeyEq : Eq PrivateKey;

instance
PrivateKeyOrd : Ord PrivateKey :=
mkOrd@{
cmp := \{_ _ := Equal};
};
```

### Secret key

Secret key for secret-key cryptography.
Expand All @@ -61,6 +79,18 @@ type SecretKey :=
;
```

??? quote "Auxiliary Juvix code"

```juvix
deriving
instance
SecretKeyEq : Eq SecretKey;

deriving
instance
SecretKeyOrd : Ord SecretKey;
```

### Signature

Cryptographic signature.
Expand All @@ -80,3 +110,23 @@ type Digest :=
| Blake3Digest ByteString
;
```

### `hash`

```juvix
axiom hash {A} : A -> Digest;
```

??? quote "Auxiliary Juvix code"

```juvix
deriving
instance
DigestEq : Eq Digest;

instance
DigestOrd : Ord Digest :=
mkOrd@{
cmp := \{(Blake3Digest a) (Blake3Digest b) := Equal};
};
```

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

16 changes: 15 additions & 1 deletion docs/arch/system/state/resource_machine/prelude.juvix.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,23 @@ syntax alias Balance := Nat;
#### `Nonce`

The RM specs reference a `Nonce` type which is left undefined.
Let's define it as a some kind of `Nat` for now, as we later need to have a
`Eq` instance for it.

```juvix
axiom Nonce : Type;
type Nonce := mkNonce@{
nonce : Nat;
};
```

```juvix
deriving
instance
eqNonce : Eq Nonce;

deriving
instance
ordNonce : Ord Nonce;
```

#### `RandSeed`
Expand Down
34 changes: 34 additions & 0 deletions docs/arch/system/types.juvix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
icon: material/pillar
search:
exclude: false
boost: 2
---

??? quote "Juvix imports"

```juvix
module arch.system.types;
```

# Basic types in the system

## Specific prelude for the RM

```juvix
import arch.system.state.resource_machine.prelude;
```

## Types in the RM

```juvix
import arch.system.types.nullifier;
import arch.system.types.nullifierkey;
import arch.system.types.nullifier_properties;
import arch.system.types.resource;
import arch.system.types.resource_machine;
import arch.system.types.state;
import arch.system.types.resource_logic_proof;
import arch.system.types.action;
import arch.system.types.transaction;
```
Loading