Nocturne
  • Introduction
    • Introduction
    • Protocol Overview
    • Compliance
  • Protocol Concepts
    • Keys and Stealth Addresses
    • Notes, Commitment Tree, Nullifiers, and JoinSplits
    • Deposits
    • Operations
  • Protocol Details
    • Algebraic Primitives & Notation
    • Keys & Key Derivation
    • Stealth Addresses
    • Signatures
    • Encodings
    • Commitment Tree
      • Subtree Update Circuit
    • JoinSplit Circuit
    • Note Encryption
    • Contracts
      • Deposit Manager
      • Teller
      • Handler
      • ETH Adapters
      • Canonical Address Registry
    • Offchain Actors
      • Deposit Screener
      • Bundler
      • Subtree Updater
  • Users
    • MetaMask Snap
    • FAQ
  • Developers
    • Contract Addresses
    • Trusted Setup
    • Security
    • Guardrails
    • Source Code
Powered by GitBook
On this page
  1. Protocol Details
  2. Offchain Actors

Subtree Updater

PreviousBundlerNextMetaMask Snap

Last updated 1 year ago

The Subtree Updater is an offchain actor that saves the protocol gas by inserting batches of new notes into the through "ZK Subtree Updates". The role is permissionless, so anyone can run a Subtree Updater.

You can read more about the subtree update mechanism , but the TL;DR is that the subtree updater polls the contracts for new merkle tree insertions and keeps a local, up-to-date copy of the commitment tree in-memory. When enough insertions occur, the subtree updater will compute the new root using its local copy of the tree, publish it on-chain, and prove that it's correct using a zero-knowledge proof.

commitment tree
here