본문으로 건너뛰기

증명 체인

도메인은 배치 단위로 등록됩니다. 각 배치는 약 10분을 기다립니다. 각 배치는 증명 하나를 만들어 냅니다. 이 증명들은 제네시스부터 이어지는 상태 전이의 사슬을 이룹니다:

genesis_root (empty tree -- known constant)
| +-- "richard.zcash" registered at block 100,
| +-- "john.zcash" registered at block 110,
| ... (could be more registration/update commands)
| ! Proof 1 is generated
| old_root = genesis_root --> new_root_1
| +-- "richard.zcash" put his name on marketplace at block 200,
| +-- "sam.zcash" registered at block 250,
| ... (could be more registration/update commands)
| ! Proof 2 is generated
| old_root = new_root_1 --> new_root_2 (= current root)

각 증명의 old_root는 직전 증명의 new_root와 같아야 합니다. 그리고 첫 증명의 old_root는 알려진 제네시스 루트(빈 희소 머클 트리)와 같아야 합니다.

체인 검증​

검증기는 다섯 단계로 등록 이력 전체를 확인합니다:

  1. SP1 검증 키를 얻습니다 — 게스트 프로그램 바이너리에서 결정론적으로 도출됩니다. 규칙 변경이 이 키를 바꾸므로, 변경 전에 앵커링된 증명은 그때 유효하던 키로 검증합니다
  2. BNB Smart Chain에서 증명을 모읍니다 — 앵커 컨트랙트로 가는 모든 commitBatch 트랜잭션은 calldata에 자신의 증명과 공개 값을 담고 있으며, 컨트랙트의 RootUpdated 이벤트가 그 트랜잭션으로 이어집니다. 인덱서 API는 증명을 제공하지 않습니다
  3. 그 검증 키로 각 SP1 증명을 검증합니다
  4. 체인을 확인합니다 — genesis == P1.old_root, P1.new_root == P2.old_root, ..., PN.new_root == current_root
  5. 온체인 표본 확인 — 커밋된 아무 txid나 ZCash 노드에서 찾아 메모, 금액, 블록이 일치하는지 확인합니다

모든 확인을 통과하면 등록 이력 전체가 올바른 것입니다 — 인덱서를 신뢰할 필요가 없습니다.

증명 파이프라인​

레지스트라는 같은 타이머로 두 개의 프로세서를 차례로 실행합니다:

ZCash Blockchain
|
Block processor (scans each block, pre-checks commands, waits for 20 confirmations)
|
Batch (open for about 10 minutes, then re-checked against the name state)
|
Batch processor (SP1 proof of the batch's state transition)
|
Anchor contract (verifies the proof on BNB Smart Chain; the new root is a checkpoint)
|
Indexers sync to the checkpoint (replay ZCash and must reach the same root)
|
API Server (GET /v1.0/resolve/{name})

두 프로세서는 번갈아 동작합니다. 배치가 증명되고 앵커링되는 동안 새 블록은 스캔을 기다리고, 그 작업이 끝나는 대로 처리됩니다. 결제가 누락되는 일은 없으며, 몇 분 늦게 보일 뿐입니다.