763aeb648f45177e1cd3ee0b75ca27b040799f1d
Mining: blocks now include mempool txs, select spendable txs by fee, and pay coinbase as base reward + fees in main.c. - Consensus: block validation now enforces coinbase accounting and rejects invalid coinbase placement, including coinbase on amount2, in block.c and transaction.c. - Chain state: rollback now rebuilds currentSupply/currentReward, and block addition preflights spendability before mutating balances in chain.c. - Orphans/reorgs: orphan retry is safer, rollback-triggered sync reattaches orphans immediately, and transient orphan failures no longer drop blocks in orphan_pool.c and main.c. - Networking/mempool: node lifecycle now initializes the mempool, broadcasts can exclude one peer, and mempool snapshotting supports mining selection in net_node.c and txmempool.c. - Ledger simulation: added non-mutating spendable-transaction selection for block assembly in balance_sheet.c.
Skalacoin
Privacy coin made in C. One day hopefully with a purpose beyond "educational" :)
Some notes for me right now:
cmake:
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-fsanitize=address -fno-omit-frame-pointer" -DCMAKE_CXX_FLAGS="-fsanitize=address -fno-omit-frame-pointer" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address"
Build with clang/clang++ (I don't want to deal with the gcc/MSVC shenangans right now)
Use:
./bin/skalacoin_node <-mine>
Main Hashing Algorithm: SHA256d (double SHA256) for now. Proof-of-Work Algorithm: Autolykos2
Languages
C
95.8%
CMake
3.3%
C++
0.9%