> For the complete documentation index, see [llms.txt](https://docs.rome.builders/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rome.builders/ja/canton-zk-evm/run-it-locally.md).

# ローカルで実行する

チェック、GPUなしのリハーサル、そしてGPU上でのローカルOstiaデモを実行します。

提供されたスクリプトはローカルテストネットワークを実行します。Canton は状態をメモリに保持するため、再起動のたびにその状態は破棄され、新しいネットワークが作成されます。GPU デモはブロックを証明します。リハーサルは代替証明を使用し、GPU は不要です。

このページではコミットを説明します `a84e84e439a5cc669c0ae61facf7c8c995d9d564`。完全版を読む [ネットワークガイド](https://github.com/rome-protocol/canton-zk-evm/blob/a84e84e439a5cc669c0ae61facf7c8c995d9d564/network/README.md) および [デモガイド](https://github.com/rome-protocol/canton-zk-evm/blob/a84e84e439a5cc669c0ae61facf7c8c995d9d564/demo/README.md)。以下のコマンドを `canton-zk-evm` リポジトリのルートで実行してください。

## 必要なもの

| 作業            | 要件                                                                                                   |
| ------------- | ---------------------------------------------------------------------------------------------------- |
| リポジトリのチェック    | Docker、 `bash`, `curl`, `jq`, `openssl` および Python 3。Rust のテストでは `rust-toolchain.toml`.              |
| Canton 統合テスト  | Linux x86-64、Java 21、およびネットワークアクセス。                                                                  |
| デモのリハーサル      | Linux x86-64、Docker、Java 21、Rust、および Python 3.12 以降。                                                 |
| Explorer テスト  | Node 22.18 以降。                                                                                       |
| GPU ネットワークとデモ | Linux x86-64、ドライバがインストールされた NVIDIA GPU、Docker、Rust、Python 3.12 以降、 `jq`, `curl`, `openssl` および ZisK。 |

その [リポジトリの README](https://github.com/rome-protocol/canton-zk-evm/blob/a84e84e439a5cc669c0ae61facf7c8c995d9d564/README.md#running-the-tests) テストの前提条件を一覧しています。GPU インストーラーは `sudo` および `apt` を Debian または Ubuntu で使用し、約 100 GB の空きディスク容量が必要です。システムパッケージをインストールし、メモリロックの制限を変更します。ネットワークのツール取得処理は、Java 21 がない場合にインストールします。を参照してください。 [Prover ホスト](/ja/canton-zk-evm/prover-host.md) テスト済みハードウェアについて。必要最小 GPU メモリはまだ確定していません。

## テストを実行する

まずは次のクイックチェックから始めてください: [CONTRIBUTING.md](https://github.com/rome-protocol/canton-zk-evm/blob/a84e84e439a5cc669c0ae61facf7c8c995d9d564/CONTRIBUTING.md#building-and-testing):

```sh
tests/static.sh                  # pin、genesis、ライセンス行が一致する
tests/refuses_missing_flag.sh    # reth の起動は、欠落または誤ったフラグを拒否する
tests/fixtures.sh                # 記録された証明が整合している
gateway/build.sh --check         # チェックインされている gateway コードは Gateway.sol がコンパイルされる先である（Docker）
```

リポジトリの README にもこれらのチェックがあります。GPU は不要です:

```sh
tests/udp_control.sh             # UDP チェックは、UDP リスナーのあるコンテナで失敗する（reth なし）
tests/discovery.sh               # 固定された reth を起動し、ピアがいないことを確認して停止する
tests/network_static.sh          # reth は launch.sh 経由のみ、Canton の設定、記録済みのスモーク結果
tests/network_checks.sh          # コンパイラの固定値チェック、DAR の ID、別の programVK での停止（GPU なし）
tests/canton_network.sh          # 固定された Canton、実際の Daml パッケージ、および 1 回の Advance（Linux x86-64、Java 21、Python 3、GPU なし）
gateway/tests/run.sh             # 実際の reth 上での gateway。ピア探索をオフにして起動（Docker、curl、jq、demo/requirements.txt のパッケージ付き Python 3）
tests/guest-repro.sh             # guest のビルドは 1 つの固定フォルダで実行されるため、ソースフォルダは ELF を変えない（ZisK ツールの代替物。実際の ZisK でも同じチェックは 2026-10-04 に合格済み。guest/README.md を参照）
tests/demo_static.sh             # デモの固定値、改ざんスイッチと genesis の上書き、および記録済みの結果（GPU なし）
tests/demo_explorer_static.sh    # explorer のイメージは固定されており、コンテナに与えられる内容も固定（Docker なし）
(cd explorer && npm ci && npm test)  # explorer のテスト、フェイクを対象（Node 22.18+；CI は PINS 内の EXPLORER_NODE_IMAGE を使用）
(cd guest/rules && cargo test)   # チェーンルールとそのハッシュ（Rust が必要）
```

## GPU なしでリハーサルする

```sh
tests/demo_rehearsal.sh          # 代替証明を使ったデモと explorer（Linux x86-64、Docker、Java 21、Rust、Python 3.12+；GPU なし）
```

これは実際の reth、Canton、Daml パッケージ、トークン標準、builder を実行します。サイドカーはストレージ証明に対して gateway のレッグを検証し、代替物が証明の `検証` 呼び出しに応答します。リハーサルではブロックの証明も、実際のゼロ知識証明の検証もしません。

また、explorer と faucet もチェックします。explorer の Verify チェックは代替証明を拒否しなければなりません。 [demo README](https://github.com/rome-protocol/canton-zk-evm/blob/a84e84e439a5cc669c0ae61facf7c8c995d9d564/demo/README.md#the-rehearsal) リハーサルの範囲を説明しています。

## GPU 上でローカルネットワークを開始する

次を使って ZisK をインストールしてください: `prover/install.sh` ネットワークを開始する前に。reth は必ず提供されたランチャー経由で起動してください； `network/up.sh` はそれを使用します。

```sh
network/up.sh       # ツール、guest ビルド、reth、サイドカー、prover、Canton、チェーン
CZE_SOURCE_COMMIT=$(git rev-parse HEAD) network/smoke.sh    # 空ブロック 1 つ、証明されてコミット済み
network/down.sh
```

`up.sh` guest をビルドし、記録された値と異なる program key、ZisK root、または rules hash を拒否します。ネットワークには 1 つの synchronizer と 3 つの participant があります。operator と confirmer の participant はそれぞれサイドカーを実行します。users という名前の participant がテストの party と reader をホストします。

スモークテストは空ブロックをコミットし、チェーンの先端と reader のブロック記録を確認し、reth がそれを final とマークしたことを確認します。状態とログは `state/`、または `CZE_STATE_DIR` が設定されている場合。

## GPU 上で 5 つのデモケースを実行する

デモには新しいローカルネットワークを使用してください:

```sh
demo/prepare.sh
CZE_GENESIS_FILE=$PWD/state/demo/genesis.json network/up.sh
CZE_SOURCE_COMMIT=$(git rev-parse HEAD) network/smoke.sh      # 必要に応じて: まず空ブロックを 1 つ
CZE_SOURCE_COMMIT=$(git rev-parse HEAD) demo/run.sh
network/down.sh
```

準備スクリプトは、実行用のテスト鍵と資金付き genesis を作成します。デモはセットアップブロック、入金、支払い、出金、割り当て拒否、および改ざんされた証明の拒否を実行します。チェックが失敗するとスクリプトは停止し、結果を書き込みます `demo/results/`.

.git なしのソースエクスポートの場合、 `.git`、設定してください `CZE_SOURCE_COMMIT` をエクスポートに使用したコミットの完全なハッシュに。faucet を含めるには、その資金付き genesis をネットワーク開始前に準備しておく必要があります。 [エクスプローラー](/ja/canton-zk-evm/explorer.md) および完全なデモガイド。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.rome.builders/ja/canton-zk-evm/run-it-locally.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
