Skip to content
AI NEWS JOURNAL
Hacker News Show HNAI NEWS / JOURNAL

Show HN: A Python PoW ledger with post-quantum, vault and agent-allowance

Article URL: https://github.com/Sajidsaj/mycoin-research Comments URL: https://news.ycombinator.com/item?id=50481675 Points: 1 # Comments: 0

NOT A COIN OFFERING There is no official coin, token, presale, ICO, airdrop, exchange listing or mining pool, and none is planned. This repository is research and educational source code only. If anyone asks you for money in connection with "this coin", it is a scam and has nothing to do with the author. Do not use this software to hold or move real value. Unaudited. No warranty. No support guarantee. Research use only (see LICENSE: PolyForm Noncommercial 1.0.0). What it is A small, readable (single-file, pure Python) proof-of-work ledger used as a testbed for security ideas, with an unusually heavy verification setup (unit tests, differential fuzzing, mutation testing). The ideas it explores: How it was built (please read) The design and implementation were produced with heavy AI assistance , then verified with tests, fuzzing, mutation testing and local multi-node attack simulations. The author is not a professional cryptographer. Treat every claim as something to check, and please review the code. Verification status of the current version: 563 unit/integration tests; differential + stateful fuzzers; mutation testing 74/80 mutants killed (the other 6 are documented as behaviour-equivalent); a local 3-node network was attacked (invalid blocks, forged signatures, floods, double spends, deep-reorg attempts) without breaking consensus. See mutants_v13.json and audit_pipeline.py. What this is NOT (known limitations) Not audited by any independent party. No real network, no hash power. A proof-of-work chain is only as secure as the honest hash power behind it. In my race simulation an attacker with 50% of the hash power wins; ~40-45% already has a real chance against 6 confirmations. Code cannot fix that. Pure Python: slow, not meant for throughput. The vault protects against theft, not against loss of both keys, and only works if the owner checks pending withdrawals within the delay. Post-quantum accounts have a finite number of transactions (2^h) and large signatures. Several of the account ideas (hash-based signatures, vaults) are not new in themselves; the contribution here is a complete, tested implementation and the way they are combined (e.g. nonce = one-time-key index, consensus-enforced agent allowances). Quick start Requires Python 3.10+. pip install -r requirements.txt python mycoin_v13.py selftest # cryptographic known-answer tests python mycoin_v13.py demo # tiny in-memory chain: mine, send, validate Run the tests (Linux/macOS): MYCOIN_MATURITY=2 python test_mycoin_v13.py # ~563 tests MYCOIN_MATURITY=2 python fuzz_mycoin_v13.py # fuzzers (seed offset optional: ... fuzz_mycoin_v13.py 3) python audit_pipeline.py --mutants mutants_v13.json # full gate: lint + matrix + fuzz + mutation (~40 min) Windows PowerShell: $env:MYCOIN_MATURITY=2; python test_mycoin_v13.py Without coincurve the pure-Python signer is refused by default (side-channel risk). For testing only you may set MYCOIN_ALLOW_PURE_PYTHON_SIGNING=1. Try the new account types (local, throw-away data only) export MYCOIN_PASSWORD='use-a-test-password' # for unattended CLI use; testing only python mycoin_v13.py wallet new --file hot.w python mycoin_v13.py wallet new --file rec.w python mycoin_v13.py vault-create --hot-pub $(python mycoin_v13.py wallet pubkey --file hot.w) \ --recovery-pub $(python mycoin_v13.py wallet pubkey --file rec.w) --delay 40 python mycoin_v13.py pq-new --file pq.w --h 4 python mycoin_v13.py --help # all commands: node, send, agent-*, vault-*, msig-*, pq-* Run a local node: python mycoin_v13.py node --mine --host 127.0.0.1 (use MYCOIN_BITS=12 MYCOIN_MATURITY=2 for a fast test network). Is this a cryptocurrency I can buy / mine for profit? No. There is nothing to buy. Is it secure? It is hardened and heavily tested, but unaudited and without real network effects. Do not rely on it. Can I use it commercially or launch a coin with it? No: the licence is noncommercial. Please do not launch tokens based on this code. Can I send feedback / break it? Yes, please. Open an issue or a Discussion. Attack results and counter-examples are the most useful contributions. PolyForm Noncommercial 1.0.0 (source-available, not OSI "open source"): research, study, hobby and educational use are allowed; commercial use is not.

Sources

Read original ↗

Related topics

← Continue to all updates