Commit Graph

1717 Commits

Author SHA1 Message Date
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
SChernykh ba20d3c9db Updated TOR documentation 2025-10-31 11:59:42 +01:00
SChernykh 9830987cf2 Build scripts: updated versions 2025-10-31 08:21:35 +01:00
SChernykh c23d0e5024 Updated BoringSSL to v0.20251002.0 2025-10-30 11:50:28 +01:00
SChernykh d8662ad41e Updated build scripts 2025-10-25 17:32:12 +02:00
SChernykh e7e623fbdd More wallet tests 2025-10-23 19:03:24 +02:00
SChernykh 27fbf2fc93 Added more wallet tests 2025-10-23 16:40:23 +02:00
SChernykh 25a5361777 Wallet: added checks for FCMP++ compatibility 2025-10-23 12:58:45 +02:00
SChernykh 0451aebb8a Fixed typos 2025-10-21 22:00:49 +02:00
SChernykh 5dc0cc4861 Added --no-clearnet-p2p parameter, added TOR documentation 2025-10-21 18:38:51 +02:00