Skip to content

Commit fd92dd2

Browse files
authored
Merge branch 'main' into glossary-keypair-link
2 parents 0ab6f27 + 01655b5 commit fd92dd2

File tree

100 files changed

+1946
-2043
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+1946
-2043
lines changed

.github/workflows/algolia-search.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
wait-for-vercel:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- run: sleep 210s
16+
- run: sleep 300s
1717
shell: bash
1818
algolia-search:
1919
runs-on: ubuntu-latest

algolia-config.json

+9-13
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,17 @@
88
"sitemap_urls": ["https://docs.minaprotocol.com/sitemap.xml"],
99
"sitemap_alternate_links": true,
1010
"js_render": true,
11-
"js_wait": 1,
12-
"stop_urls": ["https://docs.minaprotocol.com/node-developers"],
11+
"js_wait": 3,
1312
"selectors_exclude": ["footer"],
1413
"selectors": {
15-
"lvl0": {
16-
"selector": "",
17-
"defaultValue": "Documentation"
18-
},
19-
"lvl1": "header h1, article h1, main h1, h1, head > title",
20-
"lvl2": "article h2, main h2, h2",
21-
"lvl3": "article h3, main h3, h3",
22-
"lvl4": "article h4, main h4, h4",
23-
"lvl5": "article h5, main h5, h5",
24-
"lvl6": "article h6, main h6, h6",
25-
"text": "article p, article li, main p, main li, p, li"
14+
"lvl0": "",
15+
"lvl1": ".markdown h1",
16+
"lvl2": ".markdown h2",
17+
"lvl3": ".markdown h3",
18+
"lvl4": ".markdown h4",
19+
"lvl5": ".markdown h5",
20+
"lvl6": ".markdown h6",
21+
"text": ".markdown p, .markdown li"
2622
},
2723
"strip_chars": " .,;:#",
2824
"custom_settings": {

docs/glossary.mdx

+8
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,14 @@ Zero knowledge apps (zkApps) are Mina Protocol's smart contracts powered by zero
534534

535535
A command line tool that zkApp developers use to scaffold and deploy smart contracts. Install the [zkApp CLI](https://www.npmjs.com/package/zkapp-cli).
536536

537+
### zkApp account
538+
539+
A smart contract account. Each zkApp account provides 8 fields of 32 bytes each of arbitrary storage. When a Mina address contains a verification key, it acts as a zkApp account.
540+
541+
### zkApp manager account
542+
543+
A specific type of smart contract that manages a particular thing. For example, the zkApp manager account for a token controls all properties of token accounts and determines rules for token minting, burning, and transfer.
544+
537545
### zkBridge
538546

539547
Technology that the Mina network uses to connect to other chains.

docs/mina-protocol/lifecycle-of-a-payment.mdx

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ Any member of the network can create a payment and share it with the Mina networ
3636
### Step 2: To produce a block, Bob's payment gets put in a todo list
3737

3838
A block producer node is chosen on the network for a given time slot. The currently active producer choses in-flight payments based on payment fees and places them in a list to be processed called a transition block. Block producers earn mina for building these blocks. The producer generates a SNARK defining the structure of the transition block as compared to the previous block (but not yet verifying these new payments). The producer transmits this new information for SNARK workers to process.
39-
A block producer node is chosen on the network for a given time slot. The currently active producer choses in-flight payments based on payment fees and places them in a list to be processed, this list is called a transition block. Block producers earn MINA for building these blocks. The producer generates a SNARK that defines the structure of the transition block as compared to the previous block (but not yet verifying these new payments). The producer transmits this new information for SNARK workers to process.
4039

4140
### Step 3: To prove a SNARK transaction, Bob's payment gets SNARK-signed
4241

docs/mina-protocol/scan-state.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ keywords:
1414

1515
The scan state is a data structure that allows decoupling the production of transaction SNARKs from block producers to SNARK workers.
1616

17-
[Block producers](/mina-protocol/block-producers) do not have to produce transaction SNARKs, so the block production time can remain constant regardless of the transaction throughput. The scan state data structure allows the transaction SNARK proof generation to be parallelized and completed by multiple competing [SNARK workers](/node-operators/snark-workers).
17+
[Block producers](/mina-protocol/block-producers) do not have to produce transaction SNARKs, so the block production time can remain constant regardless of the transaction throughput. The scan state data structure allows the transaction SNARK proof generation to be parallelized and completed by multiple competing [SNARK workers](/mina-protocol/snark-workers).
1818

1919
The scan state is comprised of a forest of full [binary trees](https://en.wikipedia.org/wiki/Binary_tree), where each node in the tree is a job to be completed by a SNARK worker. The scan state periodically returns a single proof from the top of a tree that attests to the correctness of all transactions at the base of the tree.
2020

docs/mina-protocol/whats-in-a-block.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ The protocol state proof is a blockchain proof proving that the new protocol sta
111111
When a [block producer](/mina-protocol/block-producers) wins a slot to produce a block, they select transactions and any SNARK work required from the transaction and SNARK pools. They create the proposed next state of the blockchain, which comprises creating a diff of the staged ledger. A diff consists of:
112112

113113
* Transactions included in the block
114-
* A list of SNARK proofs generated by [SNARK workers](/node-operators/snark-workers) for prior transactions added
114+
* A list of SNARK proofs generated by [SNARK workers](/mina-protocol/snark-workers) for prior transactions added
115115
* Pending coinbase
116116

117117
A staged ledger can be regarded as a pending accounts database that has transactions(payments, coinbase, and proof fee payments) applied for which there are no SNARKs available yet. A staged ledger consists of the accounts state (a ledger) and a transaction queue for transactions without SNARK proofs, which is the [scan state](/node-operators/scan-state).

docs/node-developers/codebase-overview.mdx

+3-1
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,11 @@ Now we an use these primitives to reimplement the imperative example above as fo
128128
fun x -> if x mod 2 = 0 then Some x else None
129129
130130
let example x = x >>| add_one >>= bind_even;
131+
```
131132

132133
OCaml has a `ppx` that makes writing monads much easier to follow, using the let syntax.
133134

135+
```
134136
let%bind x = y in
135137
f x
136138
@@ -142,7 +144,7 @@ Essentially, this syntax takes the value from the let statement and places it on
142144

143145
## Async
144146

145-
Under the hood, async uses Monads. However, ivars are the low-level async primitive. `a' Ivar.t` is essentially a mutex that can only be filled once. After the value from a computation returns, it then fills the ivar. The rest of the syntactic sugar takes the ivar and passes them through `Deferred` monads.
147+
Under the hood, async uses Monads. However, ivars are the low-level async primitive. `'a Ivar.t` is essentially a mutex that can only be filled once. After the value from a computation returns, it then fills the ivar. The rest of the syntactic sugar takes the ivar and passes them through `Deferred` monads.
146148

147149
A `yield` function exists, but avoid using it since it has some weird behavior. Instead, operate on the wrapped values that happen in between `Deferred` bindings.
148150

docs/node-operators/generating-a-keypair.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Make sure to set a new and secure password for the following commands. Mina will
108108

109109
```
110110
cd ~
111-
docker run --interactive --tty --rm --volume $(pwd)/keys:/keys minaprotocol/mina-generate-keypair:1.4.0-c980ba8 --privkey-path /keys/my-wallet
111+
docker run --interactive --tty --rm --volume $(pwd)/keys:/keys minaprotocol/mina-generate-keypair:1.3.1-3e3abec --privkey-path /keys/my-wallet
112112
```
113113

114114
1. When prompted, type in the password you intend to use to secure this key. <em>Do NOT forget this password.</em>
@@ -139,7 +139,7 @@ mina-validate-keypair --privkey-path <path-to-the-private-key-file>
139139
On Docker:
140140

141141
```
142-
docker run --interactive --tty --rm --entrypoint=mina-validate-keypair --volume $(pwd)/keys:/keys minaprotocol/mina-generate-keypair:1.4.0-c980ba8 --privkey-path /keys/my-wallet
142+
docker run --interactive --tty --rm --entrypoint=mina-validate-keypair --volume $(pwd)/keys:/keys minaprotocol/mina-generate-keypair:1.3.1-3e3abec --privkey-path /keys/my-wallet
143143
```
144144

145145
## Ledger Hardware Wallet

docs/node-operators/getting-started.mdx

+1-2
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ To verify the mina daemon installation, run:
8181
The expected output is `Commit c980ba87c3417f40a7081225dfe7478c5ee70fd7 on branch master`.
8282

8383
### Windows
84-
85-
Windows is not natively supported. Instead, use the [Docker instructions](./#docker).
84+
Windows is not natively supported. Instead, use the [Docker instructions](getting-started#docker).
8685

8786
If you are interested in receiving a grant to develop Mina for Windows, email [email protected] or reach out in the [Mina Protocol Discord server](https://discord.gg/minaprotocol).
8887

docs/node-operators/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The Mina nodes fulfill different roles within the network, including:
2222

2323
1. [Block producers](/mina-protocol/block-producers) - this is analogous to being a Bitcoin "miner" or a "validator" in other proof-of-stake networks. By staking MINA, you can be selected to produce a block and win the block reward.
2424

25-
2. SNARK coordinators - distribute work to a series of [SNARK workers](/node-operators/snark-workers) in parallel.
25+
2. SNARK coordinators - distribute work to a series of [SNARK workers](mina-protocol/snark-workers) in parallel.
2626

2727
SNARK coordinators generate proofs of transactions by distributing work to a series of SNARK workers. The SNARK coordinators then submit that work to the network and the proofs are sold to block producers. The block producer buys these proofs on the network (a "snarketplace"). For their efforts, the SNARK worker gets rewarded a part of the block reward.
2828

docs/node-operators/staking-and-snarking.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ where:
122122

123123
There is no _amount_ parameter. Your full MINA balance is delegated automatically.
124124

125-
This command looks like a [payment](/node-operators/sending-a-payment) transaction, because a stake delegation is also a transaction, which is why you have to pay a small transaction fee.
125+
This command looks like a [payment](/mina-protocol/sending-a-payment) transaction, because a stake delegation is also a transaction, which is why you have to pay a small transaction fee.
126126

127127
Delegating your stake might be useful if you're interested in:
128128

docs/participate/office-hours.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import Subhead from '@site/src/components/common/Subhead';
1010

1111
## zkApps Developers Office Hours
1212

13-
On most Wednesdays, Mina Foundation and O(1) Labs cohost online office hours to help zkApp developers. The format is a one-hour open Q&A. Everyone is welcome. Come to ask any questionsbeginner to advanced!
13+
On every Tuesday 16.00-17.00 UCT and every Saturday 08.00-09.00 UCT, Mina Foundation and O(1) Labs cohost online office hours to help zkApp developers. You can join to ask your o1js / Mina related questions, share and get feedback on your zkApp ideas, meet new developers, find team members for your ongoing ZK projects, or just to have a chat! Instead of creating an official or formal environment, our goal with the office hours is to make the developer community inside the Mina ecosystem more familiar with each other, and give the developers a chance to chat with Mina Foundation, O(1) Labs members, and other experienced o1js developers. Come to ask any questionsbeginner to advanced!
1414

1515
Register for upcoming [zkApps Developer Office Hours](https://lu.ma/mina).
1616

1717
:::tip
18-
For a quicker response, you can ask questions and search for similar previous questions in the [#zkapps-developers](https://discord.com/channels/484437221055922177/915745847692636181) channel on Mina Protocol Discord.
18+
For a quicker response, you can ask questions and search for similar previous questions in the [#zkapps-developers](https://discord.com/channels/484437221055922177/915745847692636181) channel or [#zkapps-questions](https://discord.com/channels/484437221055922177/1047214314349658172) forum on Mina Protocol Discord.
1919

2020
:::

docs/test-world-2/launching-a-node.mdx

+2-4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ You must configure the node to restart automatically. Follow the instructions in
3131

3232
Please refer to the [Discord testworld-2](https://discord.com/channels/484437221055922177/1103364666517901342) channel for questions or to find any configuration options.
3333

34+
Please note that the flag `--max-connections 200` has been removed for all types of nodes.
35+
3436
:::
3537

3638
## Launching the Nodes
@@ -71,7 +73,6 @@ You must configure the block producer node with the following flags:
7173
--enable-peer-exchange true
7274
--libp2p-keypair <keyfile path> (**libp2p keypair pre-generated by the Node Operator**)
7375
--log-precomputed-blocks true
74-
--max-connections 200
7576
--peer-list-url (**seeds.txt URL will be distributed prior to launch**)
7677
--generate-genesis-proof true
7778
--block-producer-key <keyfile path> (**keys will be distributed prior to launch**)
@@ -112,7 +113,6 @@ You must configure Load Testing nodes with the following flags:
112113
--enable-peer-exchange true
113114
--libp2p-keypair <keyfile path> (**libp2p keypair pre-generated by the Node Operator**)
114115
--log-precomputed-blocks true
115-
--max-connections 200
116116
--peer-list-url (**seeds.txt URL will be distributed prior to launch**)
117117
--generate-genesis-proof true
118118
--node-status-url https://nodestats-itn.minaprotocol.tools/submit/stats
@@ -172,7 +172,6 @@ You must configure the SNARK coordinators with the following flags:
172172
--enable-peer-exchange true
173173
--libp2p-keypair <keyfile path> (**libp2p keypair pre-generated by the Node Operator**)
174174
--log-precomputed-blocks true
175-
--max-connections 200
176175
--peer-list-url (**seeds.txt URL will be distributed prior to launch**)
177176
--node-status-url https://nodestats-itn.minaprotocol.tools/submit/stats
178177
--node-error-url https://nodestats-itn.minaprotocol.tools/submit/stats
@@ -221,7 +220,6 @@ The non-block producing node must be configured with the following flags:
221220
--enable-peer-exchange true
222221
--libp2p-keypair <keyfile path> (**libp2p keypair pre-generated by the Node Operator**)
223222
--log-precomputed-blocks true
224-
--max-connections 200
225223
--peer-list-url (**seeds.txt URL will be distributed prior to launch**)
226224
--generate-genesis-proof true
227225
--node-status-url https://nodestats-itn.minaprotocol.tools/submit/stats

docs/test-world-2/technical-requirements.mdx

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@ Minimum hardware requirements:
2323

2424
| CPU | Memory | Storage | Network |
2525
| ----------------- |------------ |------------------ |--------------------------- |
26-
| 8 core processor | 16 GB RAM | 10 GB free storage | 1 Mbps internet connection |
26+
| 8 core processor | 16 GB RAM | 20 GB free storage | 1 Mbps internet connection |
2727

2828
### Load Testing
2929
Minimum Hardware requirements:
3030

3131
| CPU | Memory | Storage | Network |
3232
| ----------------- |------------ |------------------ |--------------------------- |
33-
| 8 core processor | 16 GB RAM | 10GB free storage | 1 Mbps internet connection |
33+
| 8 core processor | 16 GB RAM | 20 GB free storage | 1 Mbps internet connection |
3434

3535
### SNARK Work
3636
Minimum hardware requirements:
3737

3838
| CPU | Memory | Storage | Network |
3939
| ----------------- |------------ |------------------ |--------------------------- |
40-
| 16/32 thread dedicated instance | 16 GB RAM | 12GB free storage | 1 Mbps internet connection |
40+
| 16/32 thread dedicated instance | 16 GB RAM | 20 GB free storage | 1 Mbps internet connection |
4141

4242
<br />
4343

@@ -54,13 +54,13 @@ Minimum hardware requirements:
5454

5555
| CPU | Memory | Storage | Network |
5656
| ----------------- |------------ |------------------ |--------------------------- |
57-
| 8 core processor | 16 GB RAM | 10GB free storage | 1 Mbps internet connection |
57+
| 8 core processor | 16 GB RAM | 20 GB free storage | 1 Mbps internet connection |
5858

5959
### Archive Node
6060
Minimum hardware requirements:
6161

6262
| CPU | Memory | Storage | Network |
6363
| ----------------- |------------ |------------------ |--------------------------- |
64-
| 8 core processor | 16 GB RAM | 10GB free storage | 1 Mbps internet connection |
64+
| 8 core processor | 16 GB RAM | 25 GB free storage | 1 Mbps internet connection |
6565

6666

docs/zkapps/faq.mdx

+36-12
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,60 @@
11
---
2-
title: o1js and zkApps FAQ
2+
title: zkApps and o1js FAQ
33
sidebar_label: FAQ
4-
description: Answers to common questions about zkApps and o1js, a library that creates zk circuits from user code. Learn about the use of built-in o1js datatypes, functions, and the implications for proof generation.
4+
description: Answers to common questions about zkApps (zero knowledge apps) and o1js, a TypeScript library for writing zk smart contracts.
55
keywords:
6-
- o1js
76
- FAQ
87
- smart contract
98
- zkApps
9+
- o1js
1010
---
1111

12-
## What files do I use to write zkApps?
12+
# zkApps and o1js FAQ
13+
14+
Answers to common questions about zkApps (zero knowledge apps) and o1js, a TypeScript library for writing zk smart contracts.
15+
16+
### How do I stay up to date with zkApps and o1js?
17+
18+
Follow the official O(1) Labs channels:
19+
20+
- Twitter/X [@o1_labs](https://twitter.com/o1_labs)
21+
- O(1) Labs [Blog](https://blog.o1labs.org/), especially the [What's New in o1js](https://blog.o1labs.org/search?q=o1js) monthly updates
22+
23+
### Where can I ask questions and contribute answers?
24+
25+
[Mina Protocol Discord](https://discord.gg/minaprotocol) is the most popular place where Mina enthusiasts and technical contributors gather.
26+
27+
Join us in these zkApps channels:
28+
29+
* [#zkapps-developers](https://discord.com/channels/484437221055922177/915745847692636181) to meet other developers building zkApps with o1js
30+
* [#zkapps-general](https://discord.com/channels/484437221055922177/910549624413102100) to ask general questions about zkApps, how to use a zkApp, and so on
31+
* [#zkapps-questions](https://discord.com/channels/484437221055922177/1047214314349658172) to ask zkApps-related questions and see Q&A history
32+
33+
34+
### What files do I use to write zkApps?
1335

1436
There are many approaches to building a smart contract. For the zkApp tutorials, most examples follow this convention:
1537

1638
- `index.ts`: The entry point of your project that imports all smart contract classes you want access to and exports them to your smart contract.
1739
- `main.ts`: How you interact with the smart contract. For example, the `import` statement brings in objects and methods from `o1js` that you use to interact with your smart contract.
1840
- `<yourcontract>.ts`: Your specific smart contract logic.
1941

20-
## What is ZkProgram?
42+
### Where can I find the o1js API reference documentation?
2143

22-
The API for writing non-Mina related provable code. A ZkProgram is similar to a zkApp smart contract, but isn't tied to an on-chain account.
44+
See the autogenerated [o1js reference](/zkapps/o1js-reference) documentation with doc comments, like the [Provable](/zkapps/o1js-reference/interfaces/Provable) module.
2345

24-
## What is the difference between `getActions` and `fetchActions`?
46+
### What is ZkProgram?
2547

26-
- [getActions](/zkapps/o1js-reference/modules/Mina#getactions) works with the blockchain network
27-
- [fetchActions](/zkapps/o1js-reference/modules/Mina#fetchactions) works with archive nodes
48+
A general-purpose API for creating zk proofs. A ZkProgram is similar to a zkApp smart contract but isn't tied to an on-chain account.
2849

29-
## Where can I find the o1js API reference documentation?
50+
### What is the difference between `getActions` and `fetchActions`?
3051

31-
See the autogenerated [o1js reference](/zkapps/o1js-reference) documentation with doc comments, like the [Provable](/zkapps/o1js-reference/interfaces/Provable) module.
52+
Use the appropriate module to work with the live network or with historical archive nodes:
53+
54+
- [getActions](/zkapps/o1js-reference/modules/Mina#getactions) works with the blockchain network
55+
- [fetchActions](/zkapps/o1js-reference/modules/Mina#fetchactions) works with archive nodes
3256

33-
## Does o1js compile my JavaScript code to an arithmetic circuit?
57+
### Does o1js compile my JavaScript code to an arithmetic circuit?
3458

3559
No, o1js **does NOT compile into anything else**. In contrast to other zk ecosystems, o1js is just a JS library. It creates zk circuits from user code by _executing_ that code. If you have a smart contract with a `@method myMethod()`, for example, o1js simply calls `myMethod();` during proof generation.
3660

0 commit comments

Comments
 (0)