Commit Graph

1726 Commits

Author SHA1 Message Date
Matt Hess
b4c482b6ef mx25519 linking - Added to STATIC_LIBS, Windows format strings, macOS sprintf, remove unused variable for mac and bsd compiler happiness, ADDRESS_LENGTH fix 2025-12-17 04:06:55 +00:00
Matt Hess
27dfd4788b fixing C/C++ CI errors 2025-12-17 03:28:41 +00:00
Matt Hess
79e34fdfbb fixed version handshake and display 2025-12-17 02:29:17 +00:00
Matt Hess
8c6961ca71 Fixed race condition with mainchain prefetch on startup, Version-gated checkpoint exchange for backward compatibility, Version bump to v4.13 with protocol 1.5, Added CAP exchange protocol (CHECKPOINT_REQUEST/CHECKPOINT_RESPONSE) 2025-12-17 01:54:52 +00:00
Matt Hess
11b545e91b Add CAP exchange protocol, Deadlock fix, Sync stuck fix with retry mechanism 2025-12-17 00:29:41 +00:00
Matt Hess
940f1cabe8 Revert "Remove compact/pruned blob code - it displeases the carrot"
This reverts commit d5a8bbcc4a.
2025-12-11 02:26:30 +00:00
Matt Hess
d5a8bbcc4a Remove compact/pruned blob code - it displeases the carrot 2025-12-10 15:56:49 +00:00
Matt Hess
4a2bec3f29 Add sync mode to prevent mining during sidechain load
- Added m_readyToMine flag to SideChain
- Display LOADING SIDECHAIN banner at startup
- Delay stratum server and mining until sidechain sync completes
- Display MINING IS NOW ENABLED when ready
- Prevents premature mining that caused peer bans and chain splits

P2PServer starts immediately for sync, but stratum port doesn't
open until sidechain is fully loaded and after pruning completes
2025-12-09 18:52:32 +00:00
Matt Hess
36d03d19fe Fix crash when stratum miners submit with stale templates
Added bounds check in get_hashing_blob_nolock() to handle empty
m_transactionHashes when old/stale template slots are accessed.
Returns 0 and logs at level 3 instead of vector out-of-bounds crash.

Primarily affects external stratum miners that may
hold onto old job IDs across template updates
2025-12-09 03:10:14 +00:00
Matt Hess
3316751f5e Adjusted more logging levels 2025-12-09 00:10:05 +00:00
Matt Hess
0a7d287c40 Moved verbose DEBUG and diagnostic logging from level 0 to level 6 to reduce console spam during normal operation 2025-12-08 23:56:25 +00:00
Matt Hess
1d319325e5 Fix merkle tree calculation for mempool transactions
- Fixed m_transactionHashes to preserve mempool txs across template updates
- Changed merkle calculation to use merkle_hash() with all transactions
- Removed hardcoded 2-transaction merkle assumption for HF10+
- Synchronized m_poolBlockTemplate->m_transactions with m_transactionHashes
- Commented out premature m_transactionHashes.clear()
- Updated monerod references to salviumd
- Enhanced difficulty debug logging (lo/hi components)
2025-12-08 23:03:32 +00:00
Matt Hess
728d6c2cbf Fix Carrot v1 protocol TX handling for peer synchronization
Root cause: Merkle verification failures (error 659) and peer bans occurred
because protocol TX was not consistently present in m_transactions[1].

Parser fix (pool_block_parser.inl):
- Skip dummy transactions[0] entry when populating m_transactions
- Add protocol TX computation after parsing for Carrot v1 blocks

Block template fix (block_template.cpp):
- Insert protocol TX at position [1] during block creation in update()
- Insert protocol TX during select_mempool_transactions()

get_pow_hash fix (pool_block.cpp):
- Ensure protocol TX is populated before serialize_mainchain_data()

The protocol TX must be at m_transactions[1] before ANY serialization
occurs, otherwise sender and receiver compute different merkle roots.

Tested: Multiple restart cycles with two nodes, no bans, chains stay synced.
2025-12-07 23:57:46 +00:00
Matt Hess
00fb078004 Implement genesis reconciliation protocol for sidechain stability
Problem: P2Pool nodes starting at different times or experiencing network
issues would create independent genesis blocks, resulting in incompatible
chains. Nodes would ban each other for invalid blocks that were actually
valid on a different chain. Cache resume after restart frequently failed
due to genesis mismatch between nodes.

Solution:  Oldest compatible genesis wins protocol that coordinates
genesis selection across peers before mining begins.

New P2P message GENESIS_INFO exchanges:
- Genesis block hash
- Genesis timestamp
- Genesis mainchain height
- Protocol version

Startup behavior:
- Wait up to 90 seconds for peer genesis info (with progress logging)
- Adopt oldest genesis from compatible peers
- Only create own genesis if no peers respond

Late joiner reconciliation:
- Running nodes that receive older genesis from new peer will purge
  their sidechain and re-sync to the older chain
- Cache files deleted on purge to prevent reload of stale blocks

Protocol versioning:
- PROTOCOL_VERSION constant at top of side_chain.h
- Increment only on consensus-breaking changes
- Version mismatch logs warning, prevents genesis adoption

Tiebreaker: When timestamps match, lexicographically lower hash wins.
2025-12-05 23:44:53 +00:00
Matt Hess
a5ee896215 Fix Carrot v1 onetime address computation 2025-11-27 05:41:17 +00:00
Matt Hess
ec4f5d914d Removed --donate-time CLI option and donatetime console command, Removed time-based donation tracking, Replace time-based donation with deterministic blockchain-height-based donation, All nodes calculate donation mode identically based on block height, Eliminated need for sidechain file on mainnet - defualts to salvium_main now 2025-11-17 04:10:38 +00:00
Matt Hess
cde94c9ea2 ensure single miner_tx output for Salvium compatibility 2025-11-16 23:45:27 +00:00
Matt Hess
cb374321a4 fix pointer advancement 2025-11-16 21:11:29 +00:00
Matt Hess
735eb6737f fixed communication issue with tx version relay 2025-11-16 21:01:21 +00:00
Matt Hess
595d9560a7 lenient tx ver 2025-11-16 15:37:23 +00:00
Matt Hess
6114ae4af0 lenient tx ver 2025-11-16 15:15:16 +00:00
Matt Hess
35e05d4f56 set default display network names to salvium values 2025-11-16 14:48:09 +00:00
Matt Hess
56fbf8bcb1 set default network names to salvium values 2025-11-16 14:29:22 +00:00
Matt Hess
f22456d916 fixed miner_tx and proto_tx 2025-11-16 14:01:17 +00:00
Matt Hess
21f1422fb2 log text update 2025-11-16 02:53:24 +00:00
Matt Hess
e8c7b703f3 fixing block template submittal for protocol_tx 2025-11-16 02:18:09 +00:00
Matt Hess
b69fd42df8 Updated p2pool to fix submitted block format 2025-11-16 00:46:29 +00:00
Matt Hess
940da2c871 Fix block_template.update test for Salvium 2025-11-14 21:46:32 +00:00
Matt Hess
5bbbac72f1 Update .gitignore, add chain utils, modify cmake for just main atm 2025-11-14 18:53:42 +00:00
Matt Hess
c4d46fbd0b Update pool_block verify test for Salvium
- Add 200-block test data extracted from live cache
2025-11-14 10:41:38 +00:00
Matt Hess
3622b67989 Add multi-platform release workflow 2025-11-13 22:47:38 +00:00
Matt Hess
4998cec0a4 updated donate addr and added missed dev donate end log msg 2025-11-13 21:34:16 +00:00
Matt Hess
081fc03aae Add status display and runtime command for donate-time
- status command now shows current donation time setting
 - donate_time <N> command allows runtime adjustment (1-50 minutes)
 - Changes take effect immediately without resetting cycle timer
2025-11-13 16:56:59 +00:00
Matt Hess
853d4bf2db Dev donation setup based on N minutes per 100
- Designed like xmrig --donate-level but specific to the minute per 100 cycle
2025-11-13 16:13:59 +00:00
Matt Hess
fcdeeb1e48 adapting test to salvium fork 2025-11-13 13:07:09 +00:00
Matt Hess
c51d0ccb53 source snapshot fix for detecting binary 2025-11-13 13:05:42 +00:00
Matt Hess
feb528e7f3 Update CI workflows for Salvium, Use Salvium whiskymine seed nodes, Update ports to 19089/19084, Change branch trigger to main 2025-11-13 13:02:31 +00:00
Matt Hess
8e17597227 fixed display coin name, added default seeds 2025-11-13 07:02:48 +00:00
Matt Hess
63f69dac0d Salvium P2Pool port
- SC1 Carrot v1 address support (decode/encode)
- Salvium transaction version 4
- Carrot v1 output types (TXOUT_TO_CARROT_V1)
- Salvium hardfork schedule
- Emission formula (80% PoW)
- Mainchain block relay compatibility
- Fixed wallet encode for varint prefixes
2025-11-13 06:08:32 +00:00
Matt Hess
8fa225b909 Revert "Add consensus-enforced 0.3% dev fee"
This reverts commit 2a41ad9670.
2025-11-13 04:59:08 +00:00
Matt Hess
6a21f04600 Revert "Fix dev fee implementation for peer synchronization"
This reverts commit 8ff12ad180.
2025-11-13 04:59:00 +00:00
Matt Hess
8ff12ad180 Fix dev fee implementation for peer synchronization
- Add dev fee output in get_outputs_blob() for sidechain validation
- Fix extra nonce size calculation to account for dev fee weight
- Fix size estimation in busy mempool handler to account for dev fee
- Add debug logging for mainchain data serialization
- Fixes peer banning due to sidechain ID mismatch (error 502)
2025-11-12 22:26:47 +00:00
Matt Hess
78cbb8bc9f Update hardfork schedule for Salvium
- Replace Monero hardfork schedule with Salvium's
- v1-v10 transitions at correct block heights
- Fixes peer banning due to version mismatch (error 87)
2025-11-12 19:00:53 +00:00
Matt Hess
2a41ad9670 Add consensus-enforced 0.3% dev fee 2025-11-12 17:34:00 +00:00
Matt Hess
62c654f77c Port P2Pool to Salvium 2025-11-12 15:20:13 +00:00
mxhess
0f5f0e8386 Change some Monero references to Salvium in README
Updated README to reflect the transition from Monero to Salvium, including changes in mining parameters, wallet addresses, and version support.
2025-11-11 21:49:11 -07:00
Matt Hess
063ce6f90c Port P2Pool to Salvium: SC1 address support and Carrot v1 transactions
- Implement SC1 address decode with varint tag parsing
- Add Salvium emission formula (80% PoW, 20% staking)
- Parse Carrot v1 transaction outputs (target.carrot_v1)
- Serialize asset_type, view_tag, encrypted_janus_anchor
- Update display: 8 decimals, SAL ticker
- Skip protocol_tx empty outputs in ZMQ parsing
2025-11-12 04:31:26 +00:00
SChernykh
0a15afb3eb p2pool v4.12 2025-11-05 17:00:49 +01:00
SChernykh
fe85c2ff8e Updated curl to 8.17.0 2025-11-05 08:51:06 +01:00
SChernykh
5187049b7f Build scripts: updated versions 2025-11-04 19:09:35 +01:00