Skip to content

Zone SDK Tutorial#211

Draft
kashepavadan wants to merge 7 commits into
mainfrom
dk/zone-sdk-tutorial
Draft

Zone SDK Tutorial#211
kashepavadan wants to merge 7 commits into
mainfrom
dk/zone-sdk-tutorial

Conversation

@kashepavadan

Copy link
Copy Markdown
Contributor

Tutorial for using the Zone SDK to build a simple custom Zone, with the sql password manager Zone in the logos-blockchain sql-zone branch as the example to follow.

@cheny0 cheny0 added this to the Testnet v0.2 milestone Apr 1, 2026
Comment thread docs/blockchain/zone-sdk-tutorial.md Outdated
## Introduction
Applications built on Logos are not implemented on the Logos Blockchain directly. Instead, they live in Layer 2 execution environments known as *Sovereign Zones*, henceforth *Zones* for short (*Native Zones* are planned for future versions of Logos). A Zone could host a versatile rollup with thousands of applications, such as the [Logos Execution Zone](../apps/wallet/journeys/quickstart-for-the-logos-execution-zone-wallet.md). It could also be a simple, standalone Zone keeping track of the state of just one application, or anything in between.

The **Zone SDK** is a ready-to-use toolbox of code that handles basic interactions with a Logos Zone. Develops can use the SDK to simplify the process of building their own Zones and Zone apps.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The **Zone SDK** is a ready-to-use toolbox of code that handles basic interactions with a Logos Zone. Develops can use the SDK to simplify the process of building their own Zones and Zone apps.
The **Zone SDK** is a ready-to-use toolbox of code that handles basic interactions with a Logos Zone. Developers can use the SDK to simplify the process of building their own Zones and Zone apps.

Comment thread docs/blockchain/zone-sdk-tutorial.md Outdated
@@ -0,0 +1,544 @@
# Creating a Logos Zone with the Zone SDK
## Introduction
Applications built on Logos are not implemented on the Logos Blockchain directly. Instead, they live in Layer 2 execution environments known as *Sovereign Zones*, henceforth *Zones* for short (*Native Zones* are planned for future versions of Logos). A Zone could host a versatile rollup with thousands of applications, such as the [Logos Execution Zone](../apps/wallet/journeys/quickstart-for-the-logos-execution-zone-wallet.md). It could also be a simple, standalone Zone keeping track of the state of just one application, or anything in between.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we've hit the reader in the head here with way too many variations of zones and jargon.

Can we try something like:

Suggested change
Applications built on Logos are not implemented on the Logos Blockchain directly. Instead, they live in Layer 2 execution environments known as *Sovereign Zones*, henceforth *Zones* for short (*Native Zones* are planned for future versions of Logos). A Zone could host a versatile rollup with thousands of applications, such as the [Logos Execution Zone](../apps/wallet/journeys/quickstart-for-the-logos-execution-zone-wallet.md). It could also be a simple, standalone Zone keeping track of the state of just one application, or anything in between.
Zones are how you build applications on Logos Blockchain. Zones are lightweight app chains that use Logos Blockchain for settlement and ordering. ...

We can introduce the distinction between Native Zone and Sovereign Zones later, no need to hit them with everything in the first sentence

Comment thread docs/blockchain/zone-sdk-tutorial.md Outdated

### Who Interacts with a Zone?

Every Zone is maintained by a **sequencer**, an execution node publishes updates to the Logos Blockchain. A Zone can also have multiple sequencers taking turns or competing to submit updates.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we say something like:

Suggested change
Every Zone is maintained by a **sequencer**, an execution node publishes updates to the Logos Blockchain. A Zone can also have multiple sequencers taking turns or competing to submit updates.
Every Zone is operated by one or more **sequencer**'s. These sequencers collect transactions from users, batches them and publishes them in the form of an inscription to a Channel on Logos Blockchain.

Comment thread docs/blockchain/zone-sdk-tutorial.md Outdated
The first step to creating a Logos Zone is defining the Zone state - what application(s) it will host, how the state is updated, and in what form updates are posted on-chain.

#### Example
In this tutorial, we'll be adapting an existing Rust [password manager](https://github.com/H2CO3/steelsafe) application to the Logos Zone context. The goal is for the user to be able to update their passwords on one device, with other devices syncing their state to match the main device. This design is useful for users who want to avoid relying on managed hosting for their password manager, and cannot self-host it on their own server.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In this tutorial, we'll be adapting an existing Rust [password manager](https://github.com/H2CO3/steelsafe) application to the Logos Zone context. The goal is for the user to be able to update their passwords on one device, with other devices syncing their state to match the main device. This design is useful for users who want to avoid relying on managed hosting for their password manager, and cannot self-host it on their own server.
In this tutorial, we'll be adapting an existing Rust [password manager](https://github.com/H2CO3/steelsafe) application to the Logos Zone context. The goal is for the user to be able to update their passwords on one device, with other devices syncing their state to match the main device. This design is useful for users who want to avoid relying on managed hosting for their password manager, and don't want to be burdened by self-hosting on their own server.

Comment thread docs/blockchain/zone-sdk-tutorial.md Outdated
### More Zone Possibilities
This tutorial illustrated the basic functionality of the Zone SDK to build a simple appchain Zone. However, this is far from the only possibility for custom Zones on Logos. You could use the SDK to build traditional ZK or optimistic rollups, customised high transaction throughput appchains, or even applications with functionality compartmentalised across several Zones.

Despite their autonomy and customisability, Logos Zones support several key interoperability features. Bridging Layer 1 (Bedrock) tokens into Zones, on-chain message passing between Zones, as well as complex cross-Zone transaction coordination are all supported by the Logos Blockchain. See [**The Secret to Sovereign Zone Interoperability on Logos**](https://press.logos.co/article/sovereign-zone-interoperability) for more details.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will be calling the Bedrock "Logos Blockchain", Shouldn't be referring to bedrock publicly

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this change in the specs as well?

@weboko weboko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dogfooded on Ubuntu 24.04.4 LTS x86_64 with Rust 1.94.1. Cloned logos-sql-zone, switched to the tutorial branch, and followed the tutorial by adding all the code examples to the skeleton files.

Two issues blocked a successful build — see inline comments. After fixing them, cargo build succeeded with no errors.

The tutorial logic and code examples are otherwise correct once these gaps are addressed.

### Define Your Zone Environment
The first step to creating a Logos Zone is defining the Zone state - what application(s) it will host, how the state is updated, and in what form updates are posted on-chain.

#### Example

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing step: git submodule init. The logos-sql-zone repo uses logos-blockchain as a git submodule. After running git clone and git checkout tutorial, the logos-blockchain/ directory is empty, so cargo build fails immediately with:

error: failed to load manifest for dependency `logos-blockchain-core`
Caused by: No such file or directory

A submodule init step is required after the clone:

Suggested change
#### Example
```bash
git clone https://github.com/logos-blockchain/logos-sql-zone.git
cd logos-sql-zone
git submodule update --init --recursive

handle_event(event, &handle, &mut state, &checkpoint_path).await;
}
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: ZoneIndexer missing generic type parameter. The tutorial shows:

pub struct Indexer {
    zone_indexer: ZoneIndexer,
    db_path: String,
}

But ZoneIndexer<Node> requires a generic argument. This fails to compile:

error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied

Suggested fix:

Suggested change
}
pub struct Indexer {
zone_indexer: ZoneIndexer<NodeHttpClient>,
db_path: String,
}

NodeHttpClient is already imported via use logos_blockchain_zone_sdk::adapter::NodeHttpClient; in the tutorial’s imports.

@kashepavadan kashepavadan marked this pull request as draft June 19, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants