# Eddycoin mainnet – source code Source code of the software that runs the live Eddycoin mainnet (`eddycoin-mainnet-1`, chain id `EDDY1`, genesis id `f720818b202072d10b8b694d39eba3f17bb8a82d8597a92688057a5016f4746a`). MIT License, see [LICENSE](LICENSE). Experimental, not audited. No value, price or profit is promised. Website: https://eddycoin.pages.dev · source browser: https://eddycoin.pages.dev/source.html ## What is in here | Folder | What it is | Run / build | |---|---|---| | `node/eddycoin_node.py` | Full node (`eddycoin-node/2.0.2`; consensus upgrade from Y checkpoint 880: fine-grained per-lane difficulty for ~30 s checkpoints, only proof-of-work-covered block times count, hardcoded checkpoints, fork choice needs both CPU and GPU work, max reorg depth 100 - see the comment block `2.0.2 CONSENSUS UPGRADE` in the file): validates E/D proof-of-work, difficulty, Y checkpoints, the emission formula and cap, signatures, UTXOs; peer discovery (seed + peer exchange + peer cache); HTTP API for miners, wallets and other nodes. Genesis, emission spec and their signatures are embedded and checked at import time. | `python3 node/eddycoin_node.py --headless` (Python 3.8+, standard library only; default port 8773). Window mode: no `--headless`. | | `pool/eddycoin_pool.py` | Mining pool (PPLNS per lane, `pool-2.0-mainnet`). Runs next to a node and talks to it only through the public HTTP API. | `python3 pool/eddycoin_pool.py --keygen pool_wallet.json pool_wallet.pass` once, then `python3 pool/eddycoin_pool.py --config pool.json` (start from `pool/pool.example.json`; signing payouts needs `python3-cryptography`). | | `explorer/eddycoin_explorer.py` | Read-only explorer API + stats collector used by the website explorer. | `python3 explorer/eddycoin_explorer.py [--config explorer.json]` (defaults: the `CFG` dict at the top of the file) | | `miners/` | CPU miner (E-Chain), GPU miner (D-Chain, OpenCL via `pyopencl`), the shared miner window (`eddycoin_miner_gui.py`), the mainnet switch (`eddycoin_chain.py` + `eddycoin_chain.json`; default node port 8773, optional `"servers"` list for automatic failover to more nodes), first-start defaults, the old-key block list (`eddycoin_old_keys.py`), PyInstaller specs in `miners/build/`, macOS app launcher + build scripts in `miners/mac/`. | `python3 miners/eddycoin_echain_cpu_miner.py` (window) or `… --wallet eddy1…` (console); GPU: `pip install pyopencl` then `python3 miners/eddycoin_dchain_gpu_miner.py` (`--list-devices`). `--help` lists all options. | | `wallet/` | Wallet v3: ECDSA P-256 keys, 24 BIP39 recovery words, SLIP-0010 (nist256p1) derivation, path `m/44'/3339'/0'/0/0`, encrypted wallet file. `SEED_SPEC.md` is the specification, `wallet/tests/` the official test vectors. | `pip install cryptography` then `python3 wallet/eddycoin_wallet.py` (window) or `--cli create FILE` / `--cli info FILE`. Tests: `python3 wallet/tests/test_seed.py`. | | `genesis/` | `genesis.json` (exact canonical bytes), `.sha256`, detached Ed25519 `.sig`, the public `emission-signing.pub`, and `verify_genesis.py`. | `python3 genesis/verify_genesis.py [--online]` | | `emission/` | The signed emission spec Kompromis-120b (`kompromis-120b.json` + `.sha256` + `.sig`), `K120B_SPEC.md`, `EMISSION.md`, `verify_emission.py`, and a test that compares the node's formula with an independent C simulation of every checkpoint. | `python3 emission/verify_emission.py --dir emission` · `cc -O2 -o emission/tests/emission_fullsim emission/tests/emission_fullsim.c && python3 emission/tests/test_emission_vs_c.py` | | `tools/` | `verify_exes.py` + `exe_modules.py` (check the published Windows/Mac downloads against this source), `make_hashed_module.py` and `patch_exe.py` (how the block list was turned into hashes inside the published exes). | see "Verify it yourself" | | `release-tools/` | The generator scripts that produced the release files (emission artifact, genesis, release node, pool/explorer, miner and wallet patches) – counted exact text replacements, build-machine paths replaced by environment variables. See `release-tools/README.md`. | for reading; the private inputs (signing key, plain old-key list) are not published | Only public data is included. There are no private keys, passwords, tokens, wallet files or server configurations in this tree. The emission/genesis signing key, the pool wallet and all server credentials are not part of the source. ## Verify it yourself 1. **Download integrity.** Check the zip against the SHA-256 shown on the website, then the files inside it against `SHA256SUMS`: sha256sum eddycoin-mainnet-source.zip cd eddycoin-mainnet-source && sha256sum -c SHA256SUMS 2. **Genesis.** `python3 genesis/verify_genesis.py --online` checks the pinned key fingerprint, the SHA-256 of `genesis.json`, the Ed25519 signature (pure-Python RFC 8032, no libraries), zero allocations, the 900,000,000 EDDY cap, that `emission.spec_sha256` is the hash of `emission/kompromis-120b.json`, recomputes the genesis checkpoint id exactly like the node does, checks that `node/eddycoin_node.py` embeds the same bytes, and (with `--online`) compares with the copies served by the seed node. 3. **Emission.** `python3 emission/verify_emission.py --dir emission` (or without `--dir` to download from the node) checks the key fingerprint, the hash and the Ed25519 signature of the spec, recomputes the whole integer schedule from the consensus constants and checks it sums to exactly the cap. The same formula is built into the node (`emission_reward`, `emission_cum`); the node refuses any checkpoint whose reward differs. 4. **The live chain.** Download a chain export and let your own copy of the node re-validate all of it: curl -o chain.json https://129-159-188-73.sslip.io/api/export python3 node/eddycoin_node.py --verify-file chain.json Or simply run a node (`--headless`): it downloads the chain from peers and re-checks every block itself. 5. **The published programs.** The Windows downloads are PyInstaller 6 onefile exes built with Python 3.12 from the files in `miners/` and `wallet/` (specs in `*/build/`). PyInstaller builds are not byte-reproducible (timestamps, compression, bootloader), so the exe hashes cannot be recomputed from source. Instead, `tools/verify_exes.py` opens each exe and compares every `eddycoin_*` code object inside it (entry script and modules: bytecode, all constants and strings, names, line numbers, nested functions) with what Python 3.12 compiles from the files here: python3.12 tools/verify_exes.py FOLDER_WITH_THE_4_DOWNLOAD_ZIPS The Mac download contains plain `.py` files; they are compared byte for byte. At publication all 19 checks matched (CPU miner, GPU miner, wallet, Mac miner). What this does not prove: the rest of each exe (bootloader, Python runtime, standard library, `pyopencl`/`cryptography`) is third-party code that was bundled as-is and is not rebuilt here. ## Notes - **Genesis and emission signature.** `genesis.json` is canonical JSON (sorted keys, no whitespace, ASCII, no trailing newline). Its SHA-256 is `980e4a20a507899699d614f5593b16900c6fbba471c2e1eccaddee862c5249bc`. The detached signature in `genesis.json.sig` (hex, 64 bytes) is Ed25519 over those exact bytes with the emission signing key, whose raw 32-byte public key is in `emission-signing.pub` (fingerprint, SHA-256 of the raw key: `b62ce8abf98a9c3d2416bee74766ed4d847afb5f3a9cd999bf4f07c4f3d591a5`). The genesis commits to the network, the chain id, the emission spec hash and that key fingerprint. The genesis checkpoint id is `SHA-256("EDDY1-CHECKPOINT-v1|" + 64×"0" + "|" + state_root + "|" + ev + "|" + ev)` with `ev = "GENESIS|eddycoin-mainnet-1|EDDY1|" + SHA-256(genesis.json)` and the empty state root – see `genesis_checkpoint()` in the node and `verify_genesis.py`. - **Old-key block list.** Keys and addresses of the ended test network are refused on the mainnet. The programs only contain SHA-256 digests of those addresses (`eddycoin_old_keys.py`, `_HashedSet`), not the addresses. The node can additionally read a block-list file (`--denylist`); it is optional and not included here (the node starts without it; it is only required when a pool wallet or checkpoint key is configured). - **Stale wording.** Some docstrings and help texts in the node and miners still describe the earlier test network (for example "test coin only", "eddycoin-demo.pages.dev" or port 8770 in examples). They are kept unchanged so that the files stay identical to what runs and to what is inside the published programs. The effective settings are the code constants (node: `NETWORK`, `DEFAULT_PORT = 8773`, `BOOTSTRAP`) and `eddycoin_chain.json` for the miners and the wallet, which only work on `eddycoin-mainnet-1`. - **Mac miner.** The Mac app contains the same `.py` files as `miners/` (byte-identical), plus `miners/mac/eddycoin_mac_start.py`. - **Client update 2026-10-28.** Miners and wallet: default node port 8773 (was 8770), automatic failover over a node list (pool -> the seed node -> a node on the same computer at `http://127.0.0.1:8773`, plus any `"servers"` in `eddycoin_chain.json`), and the old-key list as SHA-256 hashes only. The network protocol did not change. `release-tools/patch_clients.py` shows every edit. - **Generator scripts** are in `release-tools/` (published 2026-10-28). The published `.py` files are their output and are what runs. **Not included:** server configuration files, the pool wallet, the signing keys and the optional block-list file are private by design.