Skip to content

Commit 2f7814c

Browse files
committed
docs: refresh project overview and env template
1 parent 94f79fe commit 2f7814c

2 files changed

Lines changed: 70 additions & 12 deletions

File tree

.env.example

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ CHALLENGE_TTL_SECONDS=300
1010
HEARTBEAT_TTL_SECONDS=30
1111
MAX_MESSAGE_SIZE_BYTES=65536
1212
MAX_MESSAGE_TTL_SECONDS=604800
13+
DEFAULT_MESSAGE_TTL_SECONDS=3600
14+
READ_MESSAGE_TTL_SECONDS=86400
15+
REPLIED_MESSAGE_TTL_SECONDS=604800
1316
MAX_MESSAGES_PER_SYNC=200
1417
MAX_CONVERSATION_ID_LENGTH=128
1518
MAX_MESSAGE_ID_LENGTH=128
@@ -18,9 +21,34 @@ MESSAGE_RATE_LIMIT_WINDOW_SECONDS=60
1821
AUTH_RATE_LIMIT_COUNT=12
1922
AUTH_RATE_LIMIT_WINDOW_SECONDS=60
2023
MAX_CLIENT_CLOCK_SKEW_MS=300000
24+
EXPO_ACCESS_TOKEN=
2125
REPLAY_GUARD_ENABLED=true
2226
SOLANA_KEYPAIR_PATH=/Users/your-user/.config/solana/id.json
2327
SOLANA_KEYPAIR_JSON=
2428
MESSAGE_ROOT_BOOTSTRAP_LEAVES_HEX=01
29+
REGISTRY_ROOT_BOOTSTRAP_LEAVES_HEX=
2530
SUNSPOT_GO_DIR=/Users/your-user/DEV/osc/enmarch/vendor/sunspot-sdk/sunspot/go
2631
GO_BINARY_PATH=/usr/local/go/bin/go
32+
REGISTRY_SYNC_INTERVAL_MS=30000
33+
34+
# Optional MagicBlock Private Ephemeral Rollup path.
35+
# Leave disabled to submit root updates directly to Solana.
36+
MAGICBLOCK_ENABLED=false
37+
MAGICBLOCK_RPC_URL=
38+
MAGICBLOCK_VALIDATOR_ADDRESS=
39+
MAGICBLOCK_MESSAGE_MAGIC_CONTEXT_ADDRESS=MagicContext1111111111111111111111111111111
40+
MAGICBLOCK_REGISTRY_MAGIC_CONTEXT_ADDRESS=MagicContext1111111111111111111111111111111
41+
MAGICBLOCK_MESSAGE_ROOT_DELEGATION_BUFFER_ADDRESS=
42+
MAGICBLOCK_MESSAGE_ROOT_DELEGATION_RECORD_ADDRESS=
43+
MAGICBLOCK_MESSAGE_ROOT_DELEGATION_METADATA_ADDRESS=
44+
MAGICBLOCK_MESSAGE_PERMISSION_DELEGATION_BUFFER_ADDRESS=
45+
MAGICBLOCK_MESSAGE_PERMISSION_DELEGATION_RECORD_ADDRESS=
46+
MAGICBLOCK_MESSAGE_PERMISSION_DELEGATION_METADATA_ADDRESS=
47+
MAGICBLOCK_REGISTRY_ROOT_DELEGATION_BUFFER_ADDRESS=
48+
MAGICBLOCK_REGISTRY_ROOT_DELEGATION_RECORD_ADDRESS=
49+
MAGICBLOCK_REGISTRY_ROOT_DELEGATION_METADATA_ADDRESS=
50+
MAGICBLOCK_REGISTRY_PERMISSION_DELEGATION_BUFFER_ADDRESS=
51+
MAGICBLOCK_REGISTRY_PERMISSION_DELEGATION_RECORD_ADDRESS=
52+
MAGICBLOCK_REGISTRY_PERMISSION_DELEGATION_METADATA_ADDRESS=
53+
MAGICBLOCK_COMMIT_THRESHOLD=10
54+
MAGICBLOCK_COMMIT_INTERVAL_MS=60000

README.md

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
11
# Enmarch
22

33
Private messaging with local encryption, on-chain X-Wing identity, and
4-
zk-verified message-root updates.
4+
ZK-verified registry-root and message-root updates.
55

66
## What Is Live Today
77

8-
- Wallet-authenticated chat clients
8+
- Wallet-authenticated web and Android chat clients
99
- Invite-based encrypted conversations
1010
- X-Wing public key registration on Solana
1111
- Redis-backed realtime relay and message sync
12-
- Backend-generated proofs for message-root updates
13-
- Solana Explorer-visible message-root transactions
12+
- Backend-generated proofs for registry-root and message-root updates
13+
- Configurable MagicBlock Private Ephemeral Rollup (PER) submission path with
14+
direct Solana fallback
15+
- Solana-settled root updates
1416

1517
## Current Architecture
1618

1719
### Client
1820

1921
- Solana wallet auth
20-
- local messaging identity
22+
- local X25519 and X-Wing messaging identity
2123
- invite creation and import
2224
- local encryption and decryption
2325
- on-chain X-Wing registry integration
26+
- React + Vite web client
27+
- Android Expo client with Mobile Wallet Adapter
2428

2529
### Backend
2630

@@ -30,21 +34,30 @@ zk-verified message-root updates.
3034
- offline sync
3135
- commitment tracking
3236
- native proof generation
33-
- automatic `update_message_root` submission
37+
- automatic registry-root and message-root submission
38+
- configurable PER delegation, commit, and undelegation flow
39+
- direct Solana submission fallback
3440

3541
### Solana
3642

3743
- main Enmarch program
3844
- verifier program
39-
- root state PDAs
45+
- registry-root and message-root state PDAs
4046
- append-only X-Wing registry PDA
47+
- PER permission and delegation instructions
48+
49+
### ZK
50+
51+
- Noir circuit for valid Merkle-tree append transitions
52+
- native proof generation through Sunspot
53+
- verifier-gated root updates
4154

4255
## What Is Not Fully Productized Yet
4356

4457
- durable conversation and message metadata database
4558
- backend-owned inbox and history model
46-
- registry-root live submission path
47-
- long-term replacement for bootstrap Merkle leaves in env
59+
- long-term replacement for message-root and registry-root bootstrap leaves in
60+
env
4861
- production-ready X-Wing registry account design
4962

5063
## Repo Layout
@@ -53,11 +66,14 @@ zk-verified message-root updates.
5366
.
5467
├── backend/ # Bun relay, sync API, on-chain submit path
5568
├── frontend/ # React + Vite messaging app
69+
├── mobile/ # Android Expo client with MWA wallet auth
5670
├── packages/
5771
│ ├── circuit/ # Noir circuit + proving artifacts
72+
│ ├── core/ # Shared messaging protocol helpers
5873
│ ├── encryption/ # X-Wing + symmetric encryption helpers
5974
│ ├── merkle-tree/ # Poseidon tree and witness helpers
60-
│ └── onchain-client/ # TS Solana client helpers
75+
│ ├── onchain-client/ # Generated and low-level on-chain helpers
76+
│ └── solana-client/ # App-facing Solana client helpers
6177
├── program/
6278
│ └── enmarch_program/ # Pinocchio Solana program
6379
└── setup.sh # local dev bootstrap script
@@ -126,11 +142,22 @@ At the repo root:
126142
- `SOLANA_RPC_URL`
127143
- `SOLANA_KEYPAIR_PATH`
128144
- `MESSAGE_ROOT_BOOTSTRAP_LEAVES_HEX`
145+
- `REGISTRY_ROOT_BOOTSTRAP_LEAVES_HEX`
129146
- `SUNSPOT_GO_DIR`
130147
- `REDIS_HOST`
131148
- `REDIS_PORT`
132149
- `JWT_SECRET`
133150

151+
Optional MagicBlock PER path:
152+
153+
- `MAGICBLOCK_ENABLED`
154+
- `MAGICBLOCK_RPC_URL`
155+
- `MAGICBLOCK_VALIDATOR_ADDRESS`
156+
- `MAGICBLOCK_MESSAGE_*`
157+
- `MAGICBLOCK_REGISTRY_*`
158+
- `MAGICBLOCK_COMMIT_THRESHOLD`
159+
- `MAGICBLOCK_COMMIT_INTERVAL_MS`
160+
134161
In `frontend/.env.local` if needed:
135162

136163
- `VITE_API_BASE_URL`
@@ -150,8 +177,11 @@ In `mobile/.env` if needed:
150177

151178
- Message payloads are still ephemeral and Redis-backed
152179
- Conversation metadata is still partly client-side
153-
- `MESSAGE_ROOT_BOOTSTRAP_LEAVES_HEX` currently bridges pre-existing on-chain
154-
tree history until the backend owns durable tree state
180+
- `MESSAGE_ROOT_BOOTSTRAP_LEAVES_HEX` and `REGISTRY_ROOT_BOOTSTRAP_LEAVES_HEX`
181+
currently bridge pre-existing on-chain tree history until the backend owns
182+
durable tree state
183+
- Root updates use MagicBlock PER when enabled and fully configured. The
184+
backend falls back to direct Solana submission otherwise.
155185

156186
## Validation
157187

0 commit comments

Comments
 (0)