Saya is the settlement orchestrator for Katana, it is responsible for fetching the blocks from Katana and prove them. Once the block execution is proven, Saya can settle the block either by verifying it on a settlement layer and update the state of the core contract, or by posting the data to a data availability layer.
Global Architecture
Currently, Saya is not generalized, which means that each running Katana node needs to have its own Saya instance. This will change in the future, and Saya will be able to aggregate multiple Katana nodes blocks into a single instance.
The core steps of Saya are:
- Fetch the blocks from Katana
- For each block,
StarknetOS
trace is generated. StarknetOS
trace is sent to Herodotus proving service to get the proof.- The proof is then sent to the settlement layer for verification and the state of the core contract is updated and/or the compressed state diff is sent to the data availability layer.
Modes of operation
Currently, Saya can operate in two modes:
-
Persistent mode: Saya will fetch the blocks from Katana and will verify the proof and update the state of the core contract on the settlement layer.
-
Sovereign mode: Saya will fetch the blocks from Katana and will post the proof and associated compressed state diff to a data availability layer.
Source code
The source code of Saya is available on GitHub at dojoengine/saya.
Saya is available as a binary for linux
and macOS
(both amd64
and arm64
).
You can also use the docker image ghcr.io/dojoengine/saya
to run Saya without prior installation.
Herodotus
Herodotus is the service that Saya is currently using to generate proofs.
Please refer to the Herodotus guide in this documentation for more information and setup an account before diving into Saya.