Skip to content

Commit 27a2768

Browse files
committed
#2227 duplicates d577b7c which is why I was trying to get this merged in earlier after the January uploads. I tried reaching out to Carsten on Discord but never heard anything back, since I suspected they may duplciate the work. The primatives here change the file route so it's necessary to merge in
2 parents 16e1e75 + 3f8bf81 commit 27a2768

File tree

9 files changed

+593
-486
lines changed

9 files changed

+593
-486
lines changed

config/theme/navbar.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ const build: NavbarItem = {
7979
label: 'Tutorial: Dapp Frontend',
8080
activeBasePath: 'docs/build/apps/dapp-frontend',
8181
},
82+
{
83+
to: '/docs/build/apps/zk',
84+
label: 'ZK Proofs on Stellar',
85+
activeBasePath: 'docs/build/apps/zk',
86+
},
8287
{
8388
type: 'html',
8489
value: '<hr><a href="/docs/build/guides" class="subtitle"><small>How-To Guides</small>',

docs/build/apps/zk.mdx

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: ZK Proofs on Stellar
3+
sidebar_position: 75
4+
---
5+
6+
X-Ray (Protocol 25) introduced native host functions for zero-knowledge-friendly primitives (BN254 and Poseidon/Poseidon2), marking an important milestone in a long-term strategy to equip developers with the execution-environment infrastructure needed to build compliance-forward, privacy-preserving applications using zero-knowledge cryptography. These primitives are foundational building blocks and do not, on their own, provide end-to-end private payments without additional higher-level protocol or application logic.
7+
8+
For more details on X-Ray, see this [blog post](https://stellar.org/blog/developers/announcing-stellar-x-ray-protocol-25).
9+
10+
## BN254
11+
12+
BN254 is a pairing-friendly elliptic curve defined over a 254-bit prime field, commonly used in zero-knowledge proof systems because it supports efficient bilinear pairings. These pairings enable succinct proof constructions where complex statements can be verified quickly on-chain or in constrained environments. BN254 is especially popular in blockchain ecosystems because its arithmetic and pairing operations are relatively efficient to implement and well supported by existing libraries and tooling.
13+
14+
While BN254 host functions provide the cryptographic operations needed for proof verification, developers must still generate proofs using higher-level systems (such as circuits written in Noir or Risc0 methods) and deploy verifier smart contracts on Stellar to implement complete zero-knowledge workflows.
15+
16+
### BN254 host functions
17+
18+
- `g1_add` — adds two elliptic-curve points in the G1 group, producing a new point. This is commonly used to combine proof or verification values.
19+
- `g1_mul` — multiplies a G1 elliptic-curve point by an integer, returning a new point. This operation is a core building block in many proof verification calculations.
20+
- `pairing_check` — verifies a pairing equation over lists of G1 and G2 points. This is typically the final step when checking the validity of a BN254 pairing-based proof.
21+
22+
### Resources
23+
24+
- [P25 Preview examples](https://github.com/jayz22/soroban-examples/tree/p25-preview/p25-preview)
25+
- [Soroban SDK BN254 documentation - types and functions](https://docs.rs/soroban-sdk/latest/soroban_sdk/_migrating/v25_bn254/index.html)
26+
- [CAP-74 proposal](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0074.md)
27+
- [Noir Ultrahonk Soroban Verifier Contract](https://github.com/indextree/ultrahonk_soroban_contract)
28+
- [Noir documentation (circuits)](https://noir-lang.org/docs/)
29+
- [Risc0 documentation (circuits)](https://dev.risczero.com/)
30+
31+
## Poseidon
32+
33+
Poseidon is a cryptographic hash function specifically designed for zero-knowledge proof systems, where efficiency inside arithmetic circuits is critical. Unlike traditional hashes such as SHA-256, Poseidon is optimized to minimize the number of constraints required in zero-knowledge circuits by operating natively over finite fields used by zk-SNARKs. This makes it significantly faster and cheaper to prove and verify statements involving hashing, which is why Poseidon is widely used for commitments, Merkle trees, and nullifiers in zero-knowledge applications.
34+
35+
Poseidon host functions support hashing within ZK-friendly environments, but developers must still incorporate them into higher-level proof systems and pair them with Stellar verifier contracts to build end-to-end zero-knowledge application flows.
36+
37+
### Poseidon host functions
38+
39+
- `poseidon` - computes the Poseidon hash of the input field elements
40+
- `poseidon2` - computes the Poseidon hash of the input field elements
41+
42+
### Resources
43+
44+
- [P25 Preview examples](https://github.com/jayz22/soroban-examples/tree/p25-preview/p25-preview)
45+
- [Soroban SDK Poseidon documentation](https://docs.rs/soroban-sdk/latest/soroban_sdk/_migrating/v25_poseidon/index.html)
46+
- [CAP-75 proposal](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0075.md)
47+
48+
:::note
49+
50+
Poseidon is currently being branched out as a separate Rust SDK for use in smart contracts.
51+
52+
:::

docs/build/smart-contracts/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ For a comprehensive introduction to Stellar smart contracts, view the [Smart Con
1717

1818
Write your first smart contract on Stellar using the [Getting Started Guide](./getting-started/setup.mdx).
1919

20-
## Rust on Stellar
20+
## Developing Smart Contracts
2121

2222
Stellar smart contracts have several characteristics (such as resource limits, security considerations, and more) that force contracts to use only a narrow subset of the full Rust language and must use specialized libraries for most tasks.
2323

docs/networks/README.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ Futurenet resets are on a less regular cadence than Testnet resets and don't hav
6161

6262
Testnet resets typically happen once per quarter at 17:00 UTC and are announced at least two weeks in advance on the [Stellar Dashboard](http://dashboard.stellar.org/) and through several developer community channels.
6363

64-
Here are the scheduled 2025 dates:
64+
Here are the scheduled 2026 dates:
6565

66-
- March 19, 2025
67-
- June 18, 2025
68-
- August 14, 2025
69-
- December 17, 2025
66+
- March 18, 2026
67+
- June 17, 2026
68+
- September 16, 2026
69+
- December 16, 2026
7070

7171
If you run a Testnet or Futurenet Horizon instance, you need to re-join and re-sync to the network after a reset. Check out how to do that here: [Testnet Reset](https://github.com/stellar/packages/blob/master/docs/testnet-reset.md).
7272

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: Online IDE
3+
description: An online IDE for Stellar smart contract development.
4+
sidebar_label: Online IDE
5+
sidebar_position: 72
6+
---
7+
8+
# Online IDE
9+
10+
### [Soropg](https://soropg.com/)
11+
12+
Soropg is an online IDE specifically designed for Stellar smart contract development. It provides a browser-based environment where developers can write, compile, and test Stellar smart contracts without needing to set up a local development environment.

docs/tools/openzeppelin-relayer.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ Launchtube, which served as an experimental service for fee sponsorship and cont
99

1010
OpenZeppelin Relayer, also known as [Stellar Channels Service](https://docs.openzeppelin.com/relayer/1.3.x/guides/stellar-channels-guide), is a managed infrastructure for submitting Stellar Soroban transactions with automatic parallel processing and fee management. The service handles all the complexity of transaction submission, allowing you to focus on building your application.
1111

12+
## OpenZeppelin Relayer Status
13+
14+
To see live status of the OpenZeppelin relayer, please visit this [Status] page: https://status.channels.openzeppelin.com/.
15+
1216
## Smart contract invocation
1317

1418
Let’s create a simple application that submits a transaction, invoking a smart contract function, using Relayer. The application calls the Increment smart contract and returns the current counter value.

meetings/2026-01-29.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ This protocol meeting covers CAP-80, which extends Stellar’s BN254 host suppor
1818

1919
### Key Points
2020

21-
CAP-80: adds BN254 G1 multi-scalar multiplication (MSM), BN254 modular arithmetic host functions, and on-curve checks to improve ZK performance Rationale: reduces expensive guest-side math and avoids repeated point conversion overhead from many add/mul calls Expected impact: major performance gains for contracts using BN254-heavy proving workflows CAP-73 follow-up: enables creating new G-accounts when transferring XLM from Soroban (still requires covering the base reserve) CAP-73 trustlines: proposes an explicit trust(...) function to create missing trustlines when authorized, rather than doing it implicitly during transfers Resources: CAP-80 spec/discussion and CAP-73 spec/discussion links for deeper review
21+
- CAP-80: adds BN254 G1 multi-scalar multiplication (MSM), BN254 modular arithmetic host functions, and on-curve checks to improve ZK performance
22+
- Rationale: reduces expensive guest-side math and avoids repeated point conversion overhead from many add/mul calls
23+
- Expected impact: major performance gains for contracts using BN254-heavy proving workflows
24+
- CAP-73 follow-up: enables creating new G-accounts when transferring XLM from Soroban (still requires covering the base reserve)
25+
- CAP-73 trustlines: proposes an explicit trust(...) function to create missing trustlines when authorized, rather than doing it implicitly during transfers
2226

2327
### Resources
2428

0 commit comments

Comments
 (0)