I wrote a Bitcoin-style blockchain in Python. It's unaudited, and here is where I'd like your review
I'm a solo developer in Kabul, and for the past while I've been building NEBULA (NBL): an experimental, Bitcoin-style proof-of-work blockchain written in Python. This post is not a pitch. It is an honest description of what exists, what doesn't, and where I'd like experienced eyes. Status: pre-launch, experimental, NOT independently audited. Please don't put money you can't afford to lose into…
I am a lone developer based in Kabul, currently constructing NEBULA (NBL), a Bitcoin-style proof-of-work blockchain composed in Python. This announcement serves not as a promotion, but rather an honest account of the current state of the project and the areas where I require knowledgeable assessment. The project is in its pre-launch phase, has not undergone independent auditing, and is therefore not recommended for investment. The following details describe the technical features and limitations of the blockchain:
The blockchain employs SHA-256d proof of work, with the option for a C-based acceleration of the hashing process. It utilizes UTXO accounting, P2PKH/P2SH/P2SH scripts, and BIP39/BIP32/BIP44 HD wallets. The supply of the cryptocurrency is capped at 21 million units, with a fixed schedule for issuance. The network utilizes a LWMA (Linear Weighted Moving Average) difficulty adjustment algorithm, which adjusts every 10 minutes over a 60-block window.
However, the blockchain is not yet fully developed. There is no public testnet or seed node available. My multi-node tests, conducted on a single machine, have demonstrated that consensus, the peer-to-peer layer, and chain reorganization are operational, but they do not sufficiently validate the ability of nodes across different networks to discover one another over the internet.
The main codebase spans approximately 95,000 lines, with a significant portion dedicated to optional features that have not yet been audited. The consensus core, however, is smaller and has been thoroughly documented in a guide (REVIEW.md), highlighting the specific functions that require review. The genesis block includes a premine of 1,035,000 NBL, accounting for approximately 4.9% of the total mining supply, and can be verified using a provided test script within the repository.
I solicited feedback on the LWMA difficulty function through a review on Code Review Stack Exchange. The reviewer offered several readability improvements, such as simplifying conditional statements, using underscores in lengthy hexadecimal literals, and optimizing comment placement. These changes were implemented, and subsequent tests confirmed that the genesis hash remained unchanged. Areas that would benefit most from a review include:
1. The LWMA difficulty code, which encompasses clamping, rounding, and timestamp edge cases.
2. The genesis block handling and premine management.
3. The signature validation process, particularly focusing on low-S and DER parsing.
4. The reorganization policy (reorg policy).
If you identify any vulnerabilities that could potentially be exploited to compromise a running network, please report them privately through GitHub's Security tab (Report a vulnerability) rather than creating a public issue. To begin testing, clone the repository from the following link: https://github.com/rahmatullahvibenet-sketch/nebula-blockchain.
Detailed instructions for initial setup and testing can be found in the 30-minute review guide (REVIEW.md) contained within the repository. I welcome constructive criticism, as it is far more valuable to me to receive feedback stating "this is incorrect and here's why" than mere acknowledgment through a star rating. Thank you for your time and consideration.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.