Skip to content

Commit

Permalink
Merge branch 'main' into tuto4-deploy-github
Browse files Browse the repository at this point in the history
  • Loading branch information
barriebyron authored Aug 3, 2023
2 parents 9f5e8b1 + 7c2781b commit d5ac666
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions docs/zkapps/how-zkapps-work.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ When the prover function runs in a web browser, the smart contract outputs a pro

The integrity of these account updates is ensured by passing a hash of the account updates as a public input to the smart contract. The account updates must be present and unmodified for the verification function to pass successfully when it runs on Mina. In this way, the Mina network can confirm the integrity of both the proof and the associated account updates that describe how to update the zkApp account state.

### ZkApp state
### zkApp state

- On-chain state describes state that lives on the Mina blockchain.

Expand All @@ -151,13 +151,7 @@ If you anticipate your state to be larger, or if the state accumulates per user

### Off-chain state

:::info

Off-chain state is not yet supported.

:::

For larger data, you might want to consider storing the root of a [Merkle tree](/zkapps/snarkyjs/merkle-tree) or a similar data structure within your zkApp's on-chain storage that references additional off-chain state stored elsewhere, such as [IPFS](https://ipfs.io/) and others.
For larger data, you might want to consider storing the root of a [Merkle tree](/zkapps/snarkyjs/merkle-tree) or a similar data structure within your zkApp's on-chain storage that references self-hosted off-chain state stored elsewhere. Mina doesn't offer an out-of-the-box solution for off-chain storage.

When the zkApp runs in a user's web browser, it can insert state to an external storage, such as IPFS. When the transaction is sent to the Mina network, if it accepts this zkApp transaction then proof and state are known to be valid valid so the updates are allowed, then the zkApp transaction can update the root of the Merkle tree that is stored on chain.

Expand Down
2 changes: 1 addition & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ module.exports = {
'zkapps/snarkyjs/basic-concepts',
'zkapps/snarkyjs/smart-contracts',
'zkapps/snarkyjs/interact-with-mina',
'zkapps/snarkyjs/fetch-events-and-actions',
'zkapps/snarkyjs/events',
'zkapps/snarkyjs/actions-and-reducer',
'zkapps/snarkyjs/fetch-events-and-actions',
'zkapps/snarkyjs/on-chain-values',
'zkapps/snarkyjs/recursion',
'zkapps/snarkyjs/custom-tokens',
Expand Down

0 comments on commit d5ac666

Please sign in to comment.