# Scanの履歴

> SVのScanがBulk Data APIで出すupdateの履歴とeventとACSのsnapshotを、bulkのオブジェクト、頁送り、backfill、保有の合計に分けて、5つの図解で追います。

- URL: https://cardene.dev/diagrams/canton-scan-history-reading
- 公開日: 2026-11-23
- 更新日: 2026-11-23
- トピック: Blockchain
- タグ: Canton
- 親の図解: [Canton Networkの全体像](https://cardene.dev/diagrams/canton-network.md): トランザクションの中身を関わるpartyにだけ見せるCanton Networkについて、部品ごとの役割と、1つのトランザクションが部品の間をどう流れるかを段ごとに追います。
- 子の図解: [履歴をbulkのオブジェクトで取る](https://cardene.dev/diagrams/canton-scan-bulk-data.md): SVのScan Appが出すBulk Data APIのupdateの履歴とACSのsnapshotの2つの流れと、履歴をオブジェクトでまとめて取る3つのエンドポイントを、2つの図で追います。解析で気を付ける点は本文で書きます。
- 子の図解: [updateの履歴を頁ごとに読む](https://cardene.dev/diagrams/canton-scan-update-history.md): Scanのupdateの履歴を、v0とv1とv2のエンドポイントで頁ごとにどの順で読み、応答の欄とトランザクションの木をどう辿って状態に反映するかを、2つの図で追います。
- 子の図解: [updateの履歴を揃えて引く](https://cardene.dev/diagrams/canton-scan-update-backfill.md): 過去のupdateを版ごとのエンドポイントで1件ずつ引く呼び方と、backfillingが終わったかを確かめて、時刻より前のupdateとimportのupdateを引く呼び方を、2つの図で追います。
- 子の図解: [eventとverdictを読む](https://cardene.dev/diagrams/canton-scan-events.md): Scanのeventが持つupdateとMediatorのverdictとtrafficの要約とアプリの活動の記録を、3つのエンドポイントと頁の送り方、独立した呼び出しに分けて、2つの図で追います。
- 子の図解: [ある時点の台帳と残高を引く](https://cardene.dev/diagrams/canton-scan-acs-holdings.md): Scanで、あるrecord timeの時点のACSとAmuletの保有を、snapshotの時刻を選んで頁ごとに引く呼び方と、所有者ごとの保有の合計の欄を、2つの図で追います。

前の章「Scanが返すネットワークの状態」では、Scan APIから、ネットワークの構成と今の状態を引く呼び方を見ました。
この章では、Scan APIが出す台帳の履歴を読む呼び方を追います。
履歴は、updateの履歴と、updateやMediatorのverdictを含むeventの履歴と、ある時点のACSのsnapshotです。

Scan Appの仕組みは、頁「SVノードの部品を知る」が説明しています。
この章は、APIから見た呼び方と流れを書きます。

まず、Bulk Data APIが何を出すかと、updateの履歴をオブジェクトでまとめて取る3つのエンドポイントと、解析する側が気を付ける点を見ます。

https://cardene.dev/diagrams/canton-scan-bulk-data

次に、`/v0/updates`と`/v1/updates`と`/v2/updates`で、updateの履歴を頁ごとにどの順で読み、トランザクションの木をどう辿るかを追います。

https://cardene.dev/diagrams/canton-scan-update-history

続いて、過去のupdateをupdate IDやハッシュで1件ずつ引く呼び方と、backfillingで履歴を揃える呼び方を見ます。

https://cardene.dev/diagrams/canton-scan-update-backfill

その次に、Scanのeventが、updateとMediatorのverdictとtrafficの要約とアプリの活動の記録のどれを持ち、どう頁を送って返すかを追います。

https://cardene.dev/diagrams/canton-scan-events

最後に、snapshotの時刻を選んで、ACSとAmuletの保有のコントラクトを頁を送って引く呼び方と、所有者ごとの保有の合計の欄を見ます。

https://cardene.dev/diagrams/canton-scan-acs-holdings

updateとACSとsnapshotの意味は、頁「履歴をbulkのオブジェクトで取る」が説明します。

下の図は、この章の5つの頁が扱う物を、Participant NodeからScan Appへ、Scan Appから履歴を読むアプリへの順に置き、Scan Appの中はupdateの履歴とeventとACSのsnapshotの順に置きます。
Scan Appからアプリへは、updateの履歴と定期的に取るACSのsnapshotを、別々の線で置きます。
Scan Appの中の区分は、引く対象で分けた案内用の区分で、Scan Appの部品の分け方ではありません。

虫眼鏡の印が付いた部品を押すと、その部品の中へ入ります。
外側へ戻る時は、右上の「戻る」か、上に並んだ名前を押します。
部品の中へ入ると、名前の並びの下にその部品を説明する頁の題が出て、押すとその頁を開きます。
上に並んだ全体の木からも、階を選べます。

```dragon
architecture Scan Appの履歴を外から内へ
group Top as Scanの履歴 [icon: net]
  box PN as Participant Node [note: 新しいupdateの元, color: slate, icon: server]
  box SA as Scan App [note: SVのノードの部品, color: blue, icon: server, link: /diagrams/canton-scan-bulk-data]
  box App as アプリ [note: 履歴を読む, color: rose, icon: app]
end
group SAIn as Scan Appの中 [color: blue, icon: server]
  box UH as updateの履歴 [note: オブジェクトか、エンドポイントで読む, link: /diagrams/canton-scan-bulk-data]
  box EA as eventとACSのsnapshot [note: 案内用の区分, link: /diagrams/canton-scan-events]
end
group UHIn as updateの履歴の中 [color: blue]
  box Bulk as bulkのオブジェクト [note: オブジェクトでまとめて取る, link: /diagrams/canton-scan-bulk-data]
  box PG as updateの引き方 [note: 案内用の区分, link: /diagrams/canton-scan-update-history]
end
group PGIn as updateの引き方の中 [color: blue]
  box Page as updateの頁送り [note: updateの履歴を頁で送る, link: /diagrams/canton-scan-update-history]
  box Bf as 1件の取得と揃い [note: IDやハッシュで1件を引き、backfillingの状態を確認する, link: /diagrams/canton-scan-update-backfill]
end
group EAIn as eventとACSのsnapshotの中 [color: blue]
  box Ev as eventとverdict [note: updateやverdictを含む, link: /diagrams/canton-scan-events]
  box Acs as ある時点の台帳と残高 [note: snapshotの時刻を選んで引く, link: /diagrams/canton-scan-acs-holdings]
end

step Scanの履歴を外から内へ
  say Scan Appは、自分のSVのノードのParticipant Nodeから新しいupdateを取り込みます。アプリには、updateの履歴と、定期的に取るACSのsnapshotを、Bulk Data APIで出します。
  PN -> SA: 新しいupdate
  SA -> App: updateの履歴
  SA -> App: 定期のsnapshot
  source CantonのScan Bulk Data API [url: https://docs.canton.network/sdks-tools/api-reference/splice-scan-bulk-data-api]
  source CantonのScan APIのPOST /v0/history/bulk/checksums [url: https://docs.canton.network/reference/splice-scan-api/post-v0historybulkchecksums]
  source CantonのScan APIのPOST /v0/history/bulk/updates [url: https://docs.canton.network/reference/splice-scan-api/post-v0historybulkupdates]
  source CantonのScan Streaming APIのGET /v0/history/bulk/download/:object_key [url: https://docs.canton.network/reference/splice-scan-streaming-api/get-v0historybulkdownload:object_key]

step Scan Appの中
  say Scan Appが出す履歴は、引く対象で、updateの履歴と、eventとACSのsnapshotに分けて追います。この区分は、Scan Appの部品の分け方ではありません。eventは、updateやMediatorのverdictを含みます。
  act EA: eventとsnapshotを出す
  source CantonのScan Bulk Data API [url: https://docs.canton.network/sdks-tools/api-reference/splice-scan-bulk-data-api]
  source CantonのScan APIのPOST /v0/history/bulk/checksums [url: https://docs.canton.network/reference/splice-scan-api/post-v0historybulkchecksums]
  source CantonのScan APIのPOST /v0/history/bulk/updates [url: https://docs.canton.network/reference/splice-scan-api/post-v0historybulkupdates]
  source CantonのScan Streaming APIのGET /v0/history/bulk/download/:object_key [url: https://docs.canton.network/reference/splice-scan-streaming-api/get-v0historybulkdownload:object_key]
  source CantonのScan APIのGET /v0/events/:update_id [url: https://docs.canton.network/reference/splice-scan-api/get-v0events:update_id]
  source CantonのScan APIのGET /v0/events/latest-record-time [url: https://docs.canton.network/reference/splice-scan-api/get-v0eventslatest-record-time]
  source CantonのScan APIのPOST /v0/events [url: https://docs.canton.network/reference/splice-scan-api/post-v0events]

step updateの履歴の中
  say updateの履歴は、オブジェクトでまとめて取る方法と、エンドポイントで読む方法があります。エンドポイントの区分は、頁送りと、1件の取得と履歴の揃いの確認を分ける案内用です。
  act PG: エンドポイントで読む
  source CantonのScan Bulk Data API [url: https://docs.canton.network/sdks-tools/api-reference/splice-scan-bulk-data-api]
  source CantonのScan APIのPOST /v0/history/bulk/checksums [url: https://docs.canton.network/reference/splice-scan-api/post-v0historybulkchecksums]
  source CantonのScan APIのPOST /v0/history/bulk/updates [url: https://docs.canton.network/reference/splice-scan-api/post-v0historybulkupdates]
  source CantonのScan Streaming APIのGET /v0/history/bulk/download/:object_key [url: https://docs.canton.network/reference/splice-scan-streaming-api/get-v0historybulkdownload:object_key]
  source CantonのScan APIのPOST /v0/updates [url: https://docs.canton.network/reference/splice-scan-api/post-v0updates]
  source CantonのScan APIのPOST /v1/updates [url: https://docs.canton.network/reference/splice-scan-api/post-v1updates]
  source CantonのScan APIのPOST /v2/updates [url: https://docs.canton.network/reference/splice-scan-api/post-v2updates]
  source CantonのScan APIのPOST /v0/state/acs [url: https://docs.canton.network/reference/splice-scan-api/post-v0stateacs]
  source CantonのScan APIのPOST /v2/state/acs [url: https://docs.canton.network/reference/splice-scan-api/post-v2stateacs]

step 頁と版の引き方の中
  say updateの頁送りでは、updateの履歴を頁ごとに読みます。1件の取得と履歴の揃いでは、アプリがupdate IDやハッシュで1件を引き、backfillingの状態を確認します。SVの参加前の履歴は、Scan Appが他のSVから取り込んで揃えます。
  act Bf: 1件を引き、揃いを確認する
  source CantonのScan Bulk Data API [url: https://docs.canton.network/sdks-tools/api-reference/splice-scan-bulk-data-api]
  source CantonのScan APIのPOST /v0/updates [url: https://docs.canton.network/reference/splice-scan-api/post-v0updates]
  source CantonのScan APIのPOST /v1/updates [url: https://docs.canton.network/reference/splice-scan-api/post-v1updates]
  source CantonのScan APIのPOST /v2/updates [url: https://docs.canton.network/reference/splice-scan-api/post-v2updates]
  source CantonのScan APIのPOST /v0/state/acs [url: https://docs.canton.network/reference/splice-scan-api/post-v0stateacs]
  source CantonのScan APIのPOST /v2/state/acs [url: https://docs.canton.network/reference/splice-scan-api/post-v2stateacs]
  source CantonのScan APIのGET /v0/backfilling/status [url: https://docs.canton.network/reference/splice-scan-api/get-v0backfillingstatus]
  source CantonのScan APIのGET /v0/state/acs/snapshot-timestamp [url: https://docs.canton.network/reference/splice-scan-api/get-v0stateacssnapshot-timestamp]
  source CantonのScan APIのGET /v0/state/acs/snapshot-timestamp-after [url: https://docs.canton.network/reference/splice-scan-api/get-v0stateacssnapshot-timestamp-after]
  source CantonのScan APIのGET /v0/updates/:update_id [url: https://docs.canton.network/reference/splice-scan-api/get-v0updates:update_id]
  source CantonのScan APIのGET /v1/updates/:update_id [url: https://docs.canton.network/reference/splice-scan-api/get-v1updates:update_id]
  source CantonのScan APIのGET /v2/updates/:update_id [url: https://docs.canton.network/reference/splice-scan-api/get-v2updates:update_id]
  source CantonのScan APIのGET /v2/updates/hash/:hash [url: https://docs.canton.network/reference/splice-scan-api/get-v2updateshash:hash]
  source CantonのScan APIのPOST /v0/backfilling/import-updates [url: https://docs.canton.network/reference/splice-scan-api/post-v0backfillingimport-updates]
  source CantonのScan APIのPOST /v0/backfilling/migration-info [url: https://docs.canton.network/reference/splice-scan-api/post-v0backfillingmigration-info]
  source CantonのScan APIのPOST /v0/backfilling/updates-before [url: https://docs.canton.network/reference/splice-scan-api/post-v0backfillingupdates-before]
  source CantonのScan APIのPOST /v0/transactions [url: https://docs.canton.network/reference/splice-scan-api/post-v0transactions]

step eventとACSのsnapshotの中
  say Scan Appは、eventを頁で返します。eventには、updateかMediatorのverdictの少なくとも一方が入ります。ある時点の台帳と残高では、snapshotの時刻を選んで、ACSと、Amuletの保有と、所有者ごとの保有の合計を引きます。時刻が一致するsnapshotか、指定した時刻以前の最新のsnapshotが対象になります。
  act Acs: snapshotの時刻を選ぶ
  source CantonのScan Bulk Data API [url: https://docs.canton.network/sdks-tools/api-reference/splice-scan-bulk-data-api]
  source CantonのScan APIのGET /v0/events/:update_id [url: https://docs.canton.network/reference/splice-scan-api/get-v0events:update_id]
  source CantonのScan APIのGET /v0/events/latest-record-time [url: https://docs.canton.network/reference/splice-scan-api/get-v0eventslatest-record-time]
  source CantonのScan APIのPOST /v0/events [url: https://docs.canton.network/reference/splice-scan-api/post-v0events]
  source CantonのScan APIのGET /v0/state/acs/snapshot-timestamp [url: https://docs.canton.network/reference/splice-scan-api/get-v0stateacssnapshot-timestamp]
  source CantonのScan APIのGET /v0/state/acs/snapshot-timestamp-after [url: https://docs.canton.network/reference/splice-scan-api/get-v0stateacssnapshot-timestamp-after]
  source CantonのScan APIのPOST /v0/holdings/state [url: https://docs.canton.network/reference/splice-scan-api/post-v0holdingsstate]
  source CantonのScan APIのPOST /v1/holdings/state [url: https://docs.canton.network/reference/splice-scan-api/post-v1holdingsstate]
  source CantonのScan APIのPOST /v2/holdings/state [url: https://docs.canton.network/reference/splice-scan-api/post-v2holdingsstate]
  source CantonのScan APIのPOST /v0/holdings/summary [url: https://docs.canton.network/reference/splice-scan-api/post-v0holdingssummary]
  source CantonのScan APIのPOST /v1/holdings/summary [url: https://docs.canton.network/reference/splice-scan-api/post-v1holdingssummary]
  source CantonのScan APIのPOST /v0/state/acs [url: https://docs.canton.network/reference/splice-scan-api/post-v0stateacs]
  source CantonのScan APIのPOST /v1/state/acs [url: https://docs.canton.network/reference/splice-scan-api/post-v1stateacs]
  source CantonのScan APIのPOST /v2/state/acs [url: https://docs.canton.network/reference/splice-scan-api/post-v2stateacs]
  source CantonのScan APIのPOST /v0/state/acs/force [url: https://docs.canton.network/reference/splice-scan-api/post-v0stateacsforce]
  source CantonのScan Proxy APIのPOST /v0/scan-proxy/holdings/summary [url: https://docs.canton.network/reference/splice-scan-proxy-api/post-v0scan-proxyholdingssummary]
  source CantonのScan Proxy APIのPOST /v1/scan-proxy/holdings/summary [url: https://docs.canton.network/reference/splice-scan-proxy-api/post-v1scan-proxyholdingssummary]
```

一番外の階では、Scan AppがSVのノードのParticipant Nodeから新しいupdateを取り込みます。
Scan Appは、updateの履歴と、定期的に取るACSのsnapshotを、Bulk Data APIでアプリへ出します。
2つの流れを出す仕組みは、頁「履歴をbulkのオブジェクトで取る」が追います。

Scan Appの中は、引く対象で、updateの履歴と、eventとACSのsnapshotに分けます。
この区分は案内用で、Scan Appの部品の分け方ではありません。
eventは、updateやMediatorのverdictを含みます。

updateの履歴の中は、オブジェクトでまとめて取る方法と、エンドポイントで読む方法です。
エンドポイントの区分は案内用で、updateの頁送りと、1件の取得と履歴の揃いの確認を分けます。
updateの頁送りは頁「updateの履歴を頁ごとに読む」が、1件の取得と履歴の揃いは頁「updateの履歴を揃えて引く」が追います。

eventとACSのsnapshotの中は、eventとverdictを頁「eventとverdictを読む」が、ある時点の台帳と残高を頁「ある時点の台帳と残高を引く」が追います。
ACSは、snapshotの時刻が一致する物か、指定した時刻以前の最新の物が対象です。

この図では、アプリからScan Appへ頼む呼び出しを線に引かず、Scan Appが履歴とsnapshotを出す線だけを置きます。

## 出典

https://docs.canton.network/sdks-tools/api-reference/splice-scan-bulk-data-api

https://docs.canton.network/reference/splice-scan-api/post-v0historybulkchecksums

https://docs.canton.network/reference/splice-scan-api/post-v0historybulkupdates

https://docs.canton.network/reference/splice-scan-streaming-api/get-v0historybulkdownload:object_key

https://docs.canton.network/reference/splice-scan-api/get-v0events:update_id

https://docs.canton.network/reference/splice-scan-api/get-v0eventslatest-record-time

https://docs.canton.network/reference/splice-scan-api/post-v0events

https://docs.canton.network/reference/splice-scan-api/post-v0updates

https://docs.canton.network/reference/splice-scan-api/post-v1updates

https://docs.canton.network/reference/splice-scan-api/post-v2updates

https://docs.canton.network/reference/splice-scan-api/post-v0stateacs

https://docs.canton.network/reference/splice-scan-api/post-v1stateacs

https://docs.canton.network/reference/splice-scan-api/post-v2stateacs

https://docs.canton.network/reference/splice-scan-api/post-v0stateacsforce

https://docs.canton.network/reference/splice-scan-api/get-v0backfillingstatus

https://docs.canton.network/reference/splice-scan-api/get-v0stateacssnapshot-timestamp

https://docs.canton.network/reference/splice-scan-api/get-v0stateacssnapshot-timestamp-after

https://docs.canton.network/reference/splice-scan-api/get-v0updates:update_id

https://docs.canton.network/reference/splice-scan-api/get-v1updates:update_id

https://docs.canton.network/reference/splice-scan-api/get-v2updates:update_id

https://docs.canton.network/reference/splice-scan-api/get-v2updateshash:hash

https://docs.canton.network/reference/splice-scan-api/post-v0backfillingimport-updates

https://docs.canton.network/reference/splice-scan-api/post-v0backfillingmigration-info

https://docs.canton.network/reference/splice-scan-api/post-v0backfillingupdates-before

https://docs.canton.network/reference/splice-scan-api/post-v0transactions

https://docs.canton.network/reference/splice-scan-api/post-v0holdingsstate

https://docs.canton.network/reference/splice-scan-api/post-v1holdingsstate

https://docs.canton.network/reference/splice-scan-api/post-v2holdingsstate

https://docs.canton.network/reference/splice-scan-api/post-v0holdingssummary

https://docs.canton.network/reference/splice-scan-api/post-v1holdingssummary

https://docs.canton.network/reference/splice-scan-proxy-api/post-v0scan-proxyholdingssummary

https://docs.canton.network/reference/splice-scan-proxy-api/post-v1scan-proxyholdingssummary
