# ノードの構成と設定

> Canton Networkにvalidatorのノードを立てる運用者が、ノードの部品とデータの置き場と設定を、章の中の図解で追います。

- URL: https://cardene.dev/diagrams/canton-node-configuration
- 公開日: 2026-11-15
- 更新日: 2026-11-15
- トピック: Blockchain
- タグ: Canton
- 親の図解: [Canton Networkの全体像](https://cardene.dev/diagrams/canton-network.md): トランザクションの中身を関わるpartyにだけ見せるCanton Networkについて、部品ごとの役割と、1つのトランザクションが部品の間をどう流れるかを段ごとに追います。
- 子の図解: [validatorのノードの中身を知る](https://cardene.dev/diagrams/canton-validator-node.md): Canton Networkのvalidatorのノードを、操作が通る部品、データの置き場とpruning、podを起こす順の3つの図で追います。
- 子の図解: [ノードのstorageとTLSを整える](https://cardene.dev/diagrams/canton-node-setup.md): Cantonのノードを自分で立てる時に、storageをどこに置くか、APIをTLSでどう守るか、Synchronizerをどう組んでParticipantをつなぐかを3つの図で追います。
- 子の図解: [起動の設定と実行中の操作を分ける](https://cardene.dev/diagrams/canton-node-admin-config.md): Cantonのノードが起動の時に設定のfileで決める値と、動いたままAdmin APIで変える物を、3つの図で分けます。
- 子の図解: [storageとパラメータを決める](https://cardene.dev/diagrams/canton-storage-params.md): Cantonのノードのstorageを開発と本番でどう選び、PostgreSQLへSSLでどうつなぐかと、protocol versionの下限のようなパラメータをどこに書くかを、3つの図で追います。
- 子の図解: [APIのportとcacheを決める](https://cardene.dev/diagrams/canton-api-config.md): CantonのParticipant Nodeが出すAdmin APIとgRPC Ledger APIとJSON Ledger APIのportとaddressを置き、keep-aliveのpingとstreamのbufferと終わりの無いstreamの受け取り方を、3つの図で追います。
- 子の図解: [APIとprotocolに上限を設ける](https://cardene.dev/diagrams/canton-api-limits.md): CantonのノードがAPIで受け取る要求と、Synchronizerを流れるmessageに設ける上限を、設定の名前と既定の値で並べ、Admin APIのstreamとJSON Ledger APIのtimeoutとprotocol version 37の集まりの上限を、3つの図で追います。
- 子の図解: [大きなACSを速く読み出す](https://cardene.dev/diagrams/canton-achs.md): CantonのParticipantが大きなACSとupdateの履歴を速く読み出す仕組みを、ACHSのsnapshotと2つの距離の設定と、頁に分けた読み出しとstreamの続きで追い、3つの図で確かめます。

前の部では、Cantonの台帳が何を持ち、トランザクションがどの段を通ってcommitされるかを見ました。
この章からは、Canton Networkにvalidatorのノードを立てる運用者の立場で、ノードを形づくる部品と設定を順に追います。
validatorのノードは、CantonのParticipant Nodeに、Canton Coinとwalletと名前の登録を足すSpliceの層を束ねたものです。
そのため、Participantの設定だけを見ても、ノードのどこで何が動くかを読み違えます。

まず、ノードの部品を、操作が通る道とデータの置き場とpodを起こす順の3つで見ます。

https://cardene.dev/diagrams/canton-validator-node

次に、ノードを自分で立てる時に、storageを選び、APIをTLSで守り、Synchronizerを組んでParticipantをつなぐ手順を見ます。

:::details TLS
TLSは、ネットワークの通信を暗号化し、通信の相手が本物かを証明書で確かめるための規格です。
WebサイトのHTTPSの通信も、TLSを使っています。
:::

https://cardene.dev/diagrams/canton-node-setup

立てたノードの値は、起動の時に設定のfileから読む物と、動いたままAdmin APIで変える物に分かれます。
どの値をどちらの道で変えるか、設定のfileに環境変数をどう差し込むか、Admin APIのコマンドをどのserviceが受けるかを見ます。

https://cardene.dev/diagrams/canton-node-admin-config

設定のfileでは、ノードのデータを置くstorageと、ノードの振る舞いを決めるパラメータも決めます。
開発のstorageの中身をどう調べるか、本番のPostgreSQLへSSLでどうつなぐか、どのprotocol versionのSynchronizerにつながるかを見ます。

:::details PostgreSQL
PostgreSQLは、オープンソースで開発されているリレーショナルデータベースです。
データをテーブルに分けて持ち、SQLで読み書きします。
:::

https://cardene.dev/diagrams/canton-storage-params

アプリと運用者がノードを使う入り口は、Admin APIとgRPC Ledger APIとJSON Ledger APIの3つです。
各APIのportをどう置くか、gRPCの接続をkeep-aliveでどう保つか、トランザクションのstreamをmemoryからどう出し、終わりの無いstreamをどう受け取るかを見ます。

:::details gRPC
gRPCは、Googleが開発した、ネットワーク越しに別のプログラムの処理を呼び出すための通信の仕組みです。
:::

:::details JSON
JSONは、データを文字で表すための形式で、Webのプログラムどうしのデータのやり取りに広く使われています。
:::

https://cardene.dev/diagrams/canton-api-config

入り口の各APIと、Synchronizerを流れるmessageは、大きさと数に上限を持ちます。
Admin APIのstreamをmethodごとに何本開けるか、JSON Ledger APIが要求のtimeoutの値をどう確かめるか、protocol version 37がpartyをhostするParticipantの数をどう縛るかを見ます。

https://cardene.dev/diagrams/canton-api-limits

ACSが大きくなると、アプリがそれを読み出すたびにParticipantの手間が増えます。
ACHSのsnapshotから読む時に2つの距離をどう決めるか、途切れた読み出しをstreamの続きと頁でどう続けるかを見ます。

https://cardene.dev/diagrams/canton-achs

下の図は、この章の7つの頁が扱う部品を、validatorのノードの外側から内側へ置きます。
虫眼鏡の印が付いた部品を押すと、その部品の中へ入ります。
外側へ戻る時は、右上の「戻る」か、上に並んだ名前を押します。
部品の中へ入ると、名前の並びの下にその部品を説明する頁の題が出て、押すとその頁を開きます。

```dragon
architecture validatorのノードを外側から内側へ
group Nodes as ノードの構成と設定 [icon: net]
  box App as アプリ [note: Ledger APIでコントラクトを読み書きする, color: blue, icon: app, link: /diagrams/canton-api-config]
  box Ops as 運用者 [note: Admin APIでノードを操る, color: blue, icon: user, link: /diagrams/canton-node-admin-config]
  box Node as validatorのノード [note: ParticipantにSpliceの層を束ねる, color: green, icon: server, link: /diagrams/canton-validator-node]
  box Sync as Synchronizer [note: messageに順番を付けて届ける, color: violet, icon: clock, link: /diagrams/canton-node-setup]
end
group NodeIn as validatorのノードの中 [color: green, icon: server]
  box Vapp as Validator App [note: 画面とParticipantの間のbackend, color: amber, icon: app]
  box Dar as Splice DAR [note: Canton CoinとwalletとANSのpackage, color: amber, icon: card]
  box Part as Participant Node [note: Damlのコントラクトを実行する, color: green, icon: server]
  box Db as PostgreSQL [note: ノードの状態を置く, color: blue, icon: db, link: /diagrams/canton-storage-params]
end
group PartIn as Participant Nodeの中 [color: green, icon: server]
  box Conf as 設定のfile [note: 起動の時に値を読む, link: /diagrams/canton-node-admin-config]
  box Limit as 上限 [note: messageの大きさと呼び出しの数を縛る, link: /diagrams/canton-api-limits]
  box Achs as ACHS [note: ACSのsnapshotを持つ, icon: db, link: /diagrams/canton-achs]
  box Admin as Admin API [note: 運用者が使うgRPCの口, link: /diagrams/canton-node-admin-config]
  box Ledger as Ledger API [note: アプリが使うgRPCとJSONの口, icon: app, link: /diagrams/canton-api-config]
end

step ノードの構成と設定
  say アプリはLedger APIで、運用者はAdmin APIで、validatorのノードを使います。validatorのノードはSynchronizerにつながり、トランザクションをやりとりします。
  App -> Node: Ledger APIで呼ぶ
  Ops -> Node: Admin APIで操る
  Node -> Sync: つなぐ
  source CantonのValidator Node Components [url: https://docs.canton.network/overview/reference/validator-node-components]

step validatorのノードの中
  say Spliceの層は、Validator AppとSplice DARです。Validator AppはParticipant Nodeにコマンドを送り、Splice DARはParticipant Nodeの上でCanton CoinとwalletとANSのコントラクトとして動きます。Participant Nodeは、受けたmessageとトランザクションの履歴とACSをPostgreSQLに置きます。
  Vapp -> Part: コマンドを送る
  Dar -> Part: 上で動く
  Part -> Db: 状態を置く
  source CantonのValidator Node Components [url: https://docs.canton.network/overview/reference/validator-node-components]

step Participant Nodeの中
  say 設定のfileは、Admin APIとLedger APIのportを起動の時に決めます。上限はLedger APIが受け取るmessageの大きさを縛り、Ledger APIは有効なコントラクトをACHSのsnapshotから読みます。
  Conf -> Admin: portを置く
  Conf -> Ledger: portを置く
  Limit -> Ledger: 大きさを縛る
  Ledger -> Achs: snapshotから読む
  source CantonのAPI Configuration [url: https://docs.canton.network/global-synchronizer/reference/api-configuration]
  source Active Contracts Head Snapshot [url: https://docs.canton.network/appdev/deep-dives/achs]
```

一番外の階では、アプリがLedger APIで、運用者がAdmin APIでvalidatorのノードを使い、validatorのノードがSynchronizerにつながります。
validatorのノードの中では、Validator AppがParticipant Nodeにコマンドを送り、Splice DARがParticipant Nodeの上でコントラクトとして動き、Participant Nodeが状態をPostgreSQLに置きます。
Participant Nodeの中では、設定のfileがAdmin APIとLedger APIのportを決め、上限がLedger APIの受け取る大きさを縛り、Ledger APIがACHSのsnapshotから有効なコントラクトを読みます。

## 出典

https://docs.canton.network/overview/reference/validator-node-components

https://docs.canton.network/global-synchronizer/reference/api-configuration

https://docs.canton.network/appdev/deep-dives/achs
