DcruBro 763aeb648f add fee-aware mining, coinbase validation, and reorg-safe orphan handling
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.
2026-05-29 13:44:15 +02:00
2026-05-15 16:07:16 +02:00
2026-05-15 19:54:48 +02:00
2026-04-03 17:02:46 +02:00

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

Description
No description provided
Readme LGPL-2.1 769 KiB
Languages
C 95.8%
CMake 3.3%
C++ 0.9%