README.md (15118B)
1 # iuna 2 3 iuna is an experimental cryptocurrency network running a live mainnet-candidate chain. 4 5 It combines three ideas: 6 7 - VDF finalization: each block waits on verifiable sequential delay work. 8 - Burn lottery: nodes burn IUNA to enter the lottery for who may finalize the next block. 9 - Proof-of-work issuance: new IUNA is created through open PoW mine actions. 10 11 ## Status 12 13 iuna is still in development. Its mainnet-candidate network is live, but it is not mainnet yet and remains experimental. The live candidate ledger is intended to be preserved if it proves stable enough for promotion, but that outcome is not guaranteed. 14 15 The goal right now is to operate and harden the live candidate with mainnet-like release, security, and recovery procedures while learning how the protocol behaves with real users. 16 17 ## Why Another Crypto? 18 19 Most chains lean heavily on one scarce resource: 20 21 - Proof-of-work chains rely on hashpower. 22 - Proof-of-stake chains rely on existing stake. 23 24 iuna tries a different split. Finalization is lightweight and based on a burn lottery plus VDF timing, while new supply stays open to proof-of-work. Burns do not remove wealth advantage, but they make finalization power temporary and repeatedly paid for instead of a permanent stake position. The intended benefit is better decentralization pressure than pure PoW or pure PoS: finalizing blocks should not require owning specialized mining scale, and burn-based timing power should expire instead of accumulating into lasting control. 25 26 This is still an experiment. The design needs real-world testing before those goals can be treated as proven. 27 28 ## Install 29 30 The simplest way to run iuna is: 31 32 1. Go to [getiuna.org/downloads/](https://getiuna.org/downloads/). 33 2. Download the latest available build. 34 3. Start the app or binary. 35 4. Follow the setup screen. 36 37 The setup flow helps you create or import a wallet, back up your recovery phrase, and connect to the mainnet-candidate network. 38 39 You do not need Rust or Cargo unless you want to work on the code. 40 41 ## Source 42 43 The public source browser is published at [getiuna.org/git/iuna/](https://getiuna.org/git/iuna/). 44 45 Clone the static HTTP repo with: 46 47 ```sh 48 git clone https://getiuna.org/git/iuna.git 49 ``` 50 51 ## Static Site Image 52 53 The Docker image publishes the website, a static git browser, a clonable HTTP repo, and release downloads. 54 55 ```sh 56 docker build -t iuna-static-site:test . 57 docker run --rm -p 8080:80 iuna-static-site:test 58 ``` 59 60 The deployment script builds Linux CLI archives for x86_64 and aarch64, builds the macOS desktop artifact on Apple silicon, and tries to cross-build the Windows NSIS installer in Docker. Prebuilt desktop artifacts can still be added before the image build: 61 62 - downloads/iuna-v0.4.46-macos-aarch64-desktop.app.zip 63 - downloads/iuna-v0.4.46-windows-x86_64-desktop-setup.exe 64 65 On macOS and Windows, closing the desktop window keeps the node running from the menu bar or 66 system tray. Choose Open iuna to reopen the window, or Quit iuna to stop the node. On 67 Windows, a left click on the tray icon also reopens the window directly. 68 69 The desktop app checks for signed updates. When a new release is available, click the version 70 badge and choose Install and restart. The bundled node is stopped before installation; wallet, 71 settings, and chain data are not part of the app bundle and remain in place. 72 73 Release and deploy with: 74 75 ```sh 76 ./deployment.sh 0.4.7 77 ``` 78 79 Updater artifacts are signed with the private key at config/update-signing.key by default. This 80 file is ignored by Git and must be backed up separately; losing it prevents existing installations 81 from accepting future updates. Set IUNA_UPDATE_SIGNING_KEY to use a securely stored copy, and 82 TAURI_SIGNING_PRIVATE_KEY_PASSWORD when that key is password-protected. The matching public key 83 is committed at config/update-signing.key.pub. 84 85 Releases regenerate [CHANGELOG.md](CHANGELOG.md) automatically from the full 86 tagged Git history and commit titles. All new commits must use a Conventional 87 Commit prefix such as feat:, fix(wallet):, or docs:. Enable the repository 88 hooks once after cloning: 89 90 ```sh 91 ./scripts/install-git-hooks.sh 92 ``` 93 94 Use ! for a breaking change, for example `feat(api)!: change the wallet 95 response format`. 96 97 To deploy only the website from the current commit, without changing the 98 project version, creating a release tag, rebuilding release artifacts, or 99 restarting the node: 100 101 ```sh 102 ./deployment.sh --website-only 103 ``` 104 105 The website-only deployment requires a clean worktree and tags the image with 106 the current Git commit, for example iuna-www:git-2f9e36fabc12. Use 107 ./deployment.sh --help to see all supported modes. 108 109 By default, deployment audits all three Rust lockfiles, enforces the dependency 110 source/license policy, runs the regular unit tests, verifies that the fuzz 111 targets compile against their locked dependencies, and runs the extended 112 adversarial, fuzz, post-height-1000 six-node E2E, and release-property suites. 113 Release hosts therefore need cargo-audit, jq, Docker Compose, the nightly Rust toolchain, and 114 exactly cargo-fuzz 0.13.2 in addition to the pinned Rust 1.88 toolchain. Desktop release builds 115 automatically install the Rust-1.88-compatible tauri-cli 2.11.5. Coverage-guided fuzzing 116 runs for 60 seconds per target and 15 seconds for the VDF target by default; override these with 117 IUNA_FUZZ_SECONDS and IUNA_VDF_FUZZ_SECONDS. Corpus discoveries and crash artifacts are retained 118 under release-evidence/fuzz/. To 119 explicitly skip the long-running suites: 120 121 ```sh 122 ./deployment.sh --skip-long-tests 0.4.7 123 ``` 124 125 To start a new chain, deploy with --genesis. This asks for confirmation, 126 deletes and recreates the permanent local-path-db-pvc, and starts the node 127 once with --genesis. The existing chain data is permanently removed: 128 129 ```sh 130 ./deployment.sh --genesis 0.4.7 131 ``` 132 133 Deployment publishes two images to the jhx-app k3s cluster: 134 135 - https://getiuna.org/ routes to the static website image. 136 - https://admin.iuna.jhx.app/ routes to the IP-restricted node management UI. 137 - https://iuna.jhx.app/v1 routes to the public lightweight-wallet API. 138 - iuna.jhx.app:9444 routes to the node P2P listener. 139 140 Useful overrides: 141 142 ```sh 143 IUNA_DEPLOY_HOST=root@jhx.app IUNA_KUBECTL_CONTEXT=jhx-app ./deployment.sh 0.4.7 144 ``` 145 146 ## What You Can Run 147 148 You can use iuna as a wallet, a node, or a public peer. 149 150 - Wallet: send, receive, and inspect activity. 151 - Node: keep a local chain copy and participate in mining/finalization settings. 152 - Public peer: same as a node, but reachable by other nodes through a public P2P address. 153 154 Keep the management UI local or behind a strict access control such as the 155 production IP allowlist. Only the P2P listener and explicitly enabled wallet 156 endpoint should be generally reachable. 157 158 ## Optional: CLI 159 160 Release archives also include a command-line binary. 161 162 On macOS or Linux: 163 164 ```sh 165 chmod +x ./iuna 166 ./iuna 167 ``` 168 169 On Windows PowerShell: 170 171 ```powershell 172 .\iuna.exe 173 ``` 174 175 The binary prints a local management URL. Open it and follow setup. 176 177 On supported Linux releases, check or install a signed CLI update with: 178 179 ```sh 180 iuna --version 181 iuna update --check 182 iuna update 183 ``` 184 185 The updater replaces only the running executable. If it is installed in a system-owned directory, 186 run the command with suitable permissions or move Iuna to a user-writable binary directory. Restart 187 any long-running service after updating. 188 189 ## Optional: Local Docker Testnet 190 191 For local P2P and consensus testing, start a six-node testnet with Docker 192 Compose: 193 194 ```sh 195 docker compose up --build 196 ``` 197 198 For repeatable end-to-end tests around mature protocol heights such as 999, 199 1000, and 1001, use the isolated 5-second harness documented in 200 [e2e/README.md](e2e/README.md). It captures and restores all six chain 201 databases and test identities rather than re-mining from genesis for every run. 202 203 The compose file starts the static website, one bootstrap genesis node, and five 204 joining nodes on an isolated Docker network. Every node automatically mines with 205 one PoW worker and enables burn/finalization. Joining nodes can therefore earn 206 their first spendable IUNA without a bootstrap transfer and begin burning 207 afterward. The website and management UIs are exposed on: 208 209 - website: <http://127.0.0.1:8080/> 210 - bootstrap: <http://127.0.0.1:18661/> 211 - node2: <http://127.0.0.1:18662/> 212 - node3: <http://127.0.0.1:18663/> 213 - node4: <http://127.0.0.1:18664/> 214 - node5: <http://127.0.0.1:18665/> 215 - node6: <http://127.0.0.1:18666/> 216 217 Node3 also exposes Stratum on 127.0.0.1:3333. P2P ports 19444 through 218 19449 are mapped for local inspection, while nodes announce their 219 stable Docker-network addresses to each other. 220 221 The local compose file uses testtesttest as the management UI and wallet 222 password for all six nodes. On first start this configures the management UI password and 223 encrypts the wallet; on restart it unlocks the encrypted wallet so finalization 224 and automatic mining can continue without UI login. Compose also sets 225 IUNA_SETUP_COMPLETE=true, so after unlocking the management UI you land 226 directly in the node instead of the initial setup wizard. Override the shared 227 local-testnet password from your shell or a .env file: 228 229 ```sh 230 IUNA_TESTNET_PASSWORD='change-this-testnet-password' \ 231 docker compose up --build 232 ``` 233 234 Do not use compose-file default passwords for public nodes or valuable wallets. 235 If the volumes were created with the older per-node passwords, change those 236 passwords first or recreate the disposable local-testnet volumes before starting 237 the updated compose stack. 238 239 Bootstrap uses --genesis only while /data/chain.sqlite3 is absent or empty. 240 Once the chain database exists, container restarts launch bootstrap normally and 241 preserve the existing chain. 242 243 Fresh nodes prefill automatic burns at 0.0001 IUNA per block with a 244 0.000001 IUNA per-byte fee. 245 246 For unattended local nodes, startup environment flags can also persist mining 247 settings: 248 249 - IUNA_SETUP_COMPLETE=true|false 250 - IUNA_AUTOMATIC_BURN_ENABLED=true|false 251 - IUNA_POW_MINING_ENABLED=true|false 252 - IUNA_POW_MINING_WORKERS=1..32 253 - IUNA_WALLET_ENDPOINT_ENABLED=true|false 254 - IUNA_WALLET_ENDPOINT_PORT=1..65535 (default 18662) 255 256 The compose bootstrap also selects the isolated iuna-local-testnet-v1 launch 257 profile. Its PoW burn-committee lineages are eligible immediately, so joining 258 nodes can provide independent committee attestations as soon as their first mine 259 actions are confirmed. Six distinct owners allow the testnet to exercise a full 260 five-member rank-1 committee even though the missed rank-0 owner is excluded. 261 The normal launch profile retains the 20-block lineage maturity. 262 Existing compose volumes created with the normal profile must be reset once 263 with docker compose down -v, because consensus launch profiles cannot be 264 changed in place. The five-slot committee is also a consensus reset: volumes 265 created by the earlier three-slot protocol must likewise be recreated. 266 267 The current release writes compact snapshot v7 and accepts snapshot versions v6 268 and v7. Legacy JSON databases and compact versions older than v6 are archived 269 with a .pre-v6 suffix and replaced by a fresh database; wallet and 270 configuration files are retained. The coordinated reset that created the live 271 mainnet-candidate chain is complete. Existing and new operators should join that 272 chain instead of creating another genesis. See the operator playbooks for 273 details and manual archive commands. 274 275 Stop the network while keeping chain data: 276 277 ```sh 278 docker compose down 279 ``` 280 281 Reset the local testnet volumes and create a fresh genesis: 282 283 ```sh 284 docker compose down -v 285 ``` 286 287 ## Optional: Public Wallet Endpoint 288 289 Public nodes can expose an unauthenticated API for lightweight mobile wallets on 290 a listener that is completely separate from the management UI: 291 292 ```sh 293 ./iuna --wallet-endpoint 0.0.0.0:18662 294 ``` 295 296 The same setting can be managed in Settings → Wallet endpoint, or at startup 297 with IUNA_WALLET_ENDPOINT_ENABLED=true and 298 IUNA_WALLET_ENDPOINT_PORT=18662. A settings change takes effect after restart. 299 Keep port 18661 local or access-controlled; forward only the wallet API port. 300 301 The public API provides: 302 303 - GET /v1/status — chain/signing/v2 parameters and current tip; 304 - POST /v1/wallets/snapshot — aggregate balance, address-use state, and spendable 305 outputs across a deterministic wallet address set; 306 - POST /v1/wallets/transactions — merged legacy/v2 history across that address set; 307 - GET /v1/addresses/{address}/balance — confirmed and spendable balance; 308 - GET /v1/addresses/{address}/utxos — spendable inputs for local signing; 309 - GET /v1/addresses/{address}/transactions — paginated pending/confirmed history; 310 - GET /v1/transactions/{signature} — pending or confirmed transaction lookup; 311 - POST /v1/transactions — validate, relay, and gossip a signed legacy transfer/burn; 312 - POST /v1/transactions-v2 — validate, relay, and gossip a canonical signed migration 313 or hybrid transfer envelope. 314 315 Clients keep private keys and seed phrases locally. The public endpoint never 316 creates signatures and does not expose management, local-wallet, mining, peer, 317 configuration, or authentication routes. JSON request bodies are capped just above twice 318 the consensus block budget so a hex-encoded v2 envelope can fit. The production manifest exposes this API as https://iuna.jhx.app/v1 while 319 https://admin.iuna.jhx.app/ remains the separately protected management UI. 320 321 The lightweight browser wallet lives in wallet/ and is served at 322 https://wallet.getiuna.org/. It supports multiple named wallets. Signing 323 wallets keep each seed encrypted in browser localStorage, derive ML-DSA-44 hybrid 324 keys inside a bundled WebAssembly module, recover addresses with the protocol gap limit, 325 and rotate the displayed receive/change address after it is used. Legacy funds remain 326 visible and can be migrated in the app. Watch-only wallets store one public address and 327 cannot follow future private derivations, sign, or send. The app talks only to the public 328 wallet endpoint. Requests to the old /wallet/ path redirect to the dedicated host. 329 330 ## Optional: Stratum Mining 331 332 iuna can expose a Stratum V1 endpoint for SHA-256 ASIC miners such as a Bitaxe: 333 334 ```sh 335 ./iuna --stratum <bind-address>:<port> 336 ``` 337 338 Use the checksummed Bech32m address shown by your iuna wallet as the worker 339 username (iuna1... on mainnet/mainnet-candidate or tiuna1... on local 340 testnet). Hex public keys and addresses for another network are rejected. 341 Accepted shares become PoW mine actions in the node mempool and are gossiped to 342 peers. 343 344 ## Operator Docs 345 346 - [Protocol](docs/protocol.md) 347 - [Quantum-resistance migration](docs/quantum-migration.md) 348 - [Quantum migration audit scope](docs/quantum-audit-scope.md) 349 - [Operator failure playbooks](docs/operator-playbooks.md) 350 351 ## Contributing 352 353 We are open to PRs and help running, testing, and improving the mainnet candidate. 354 355 See [THANKS.md](THANKS.md) for people who have helped test and improve iuna. 356 357 ## License 358 359 iuna is licensed under the Apache License 2.0. See LICENSE.