Commit Graph

256 Commits

Author SHA1 Message Date
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 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 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 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 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 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 62c654f77c Port P2Pool to Salvium 2025-11-12 15:20:13 +00:00
SChernykh 5dc0cc4861 Added --no-clearnet-p2p parameter, added TOR documentation 2025-10-21 18:38:51 +02:00
SChernykh 801c131172 P2P: save/load onion peers, added onion seed nodes 2025-10-20 19:07:29 +02:00
SChernykh cb9fc89b22 Added --onion-address command line option to support incoming TOR connections 2025-10-20 13:06:45 +02:00
SChernykh baf13781e4 P2P: use a separate peer id for .onion peers 2025-10-18 20:04:16 +02:00
SChernykh 4e690feefb Support .onion domains for addpeers command and --addpeers option (requires SOCKS5 proxy) 2025-10-18 15:47:06 +02:00
SChernykh e2f0ec7c69 De-duplicate tx hashes and pub keys to save memory (off by default) (#382)
P2Pool-main: 8.2 MB saved
P2Pool-mini: 66 MB saved
P2Pool-nano: 25.2 MB saved

The feature is available only when building from source and is intended for use on low-memory systems (for example, a VPS server with < 1 GB RAM).

It only makes sense to use with `--no-cache --no-randomx` in the command line because cache and RandomX hasher take much more memory.
2025-10-18 12:21:16 +02:00
SChernykh 7cb6a0dcc3 Added missing cleanup code 2025-09-29 12:34:04 +02:00
SChernykh e9c14ef3d0 Don't send the same Monero block broadcast to peers who sent it already 2025-09-28 15:33:58 +02:00
SChernykh 0184a3139c CI: revised clang-tidy list of checks 2025-09-25 18:46:22 +02:00
sech1 8c1c5fd8e1 P2PServer: check PoW in background to not stall the P2P loop 2025-09-14 12:55:23 +02:00
sech1 bbfdeeaff5 Log submit_block RPC performance 2025-09-14 00:25:15 +02:00
sech1 5c907d39aa Fix: submit broadcasted Monero blocks one at a time 2025-09-07 19:39:10 +02:00
sech1 b7c4613d40 Fixed handling of multiple blocks from ZMQ 2025-09-06 14:25:57 +02:00
sech1 830c78a032 Fixed build errors, refined Monero block broadcast logic 2025-09-03 14:35:53 +02:00
sech1 50634e5e79 Feature: broadcast all new Monero blocks through p2pool network for faster propagation 2025-09-03 10:07:39 +02:00
SChernykh 964f4c8065 Updated copyright 2025-07-14 20:30:33 +02:00
SChernykh 484d34040e Fixed cppcheck errors 2025-06-25 12:07:23 +02:00
SChernykh 06463e3e68 p2pool v4.8.1 2025-06-25 08:03:43 +02:00
SChernykh 52d3454b0f CI: added pruned and compact block blobs test 2025-06-24 23:13:58 +02:00
SChernykh e0c1d9377c P2Pool-nano support 2025-05-28 15:04:11 +02:00
SChernykh 3154b61fc6 P2PServer: show protocol version in peer list 2025-05-16 09:40:14 +02:00
SChernykh 70298cd065 Merge mining donation support 2025-05-13 17:18:29 +02:00
SChernykh 9ce9516c99 Added RPC-SSL support for Monero node connections 2025-01-27 22:32:28 +01:00
SChernykh 00b6dabc78 API: added ZMQ last active to local/p2p 2024-12-29 16:19:18 +01:00
SChernykh e95cc65c43 Fixed cppcheck errors 2024-12-24 10:26:47 +01:00
SChernykh 921611ff4d Added --data-dir command line option 2024-12-04 15:39:19 +01:00
SChernykh cf325e0e76 Updated rapidjson 2024-12-02 17:44:08 +01:00
SChernykh d7cd9d24fc Fixed cppcheck errors 2024-11-30 12:28:31 +01:00
SChernykh 02006e1b50 Stratum: disconnect miners when not connected to P2Pool network 2024-10-18 21:23:51 +02:00
SChernykh 510a271434 Added an error code to some error messages 2024-10-14 12:23:12 +02:00
SChernykh 1053e22a52 Removed hardfork code 2024-10-13 14:17:37 +02:00
SChernykh 24f2ed2f81 Fixed Coverity errors 2024-06-23 23:51:47 +02:00
SChernykh 8fc5e5013c Fix: update peer height on block notify 2024-06-09 21:21:52 +02:00
SChernykh 9a9f6379cd Tweaked software version display
GoObserver will have the same version format
2024-06-03 11:10:38 +02:00
SChernykh 70e889ebdb Fixed software version display 2024-05-29 10:47:03 +02:00
SChernykh 59b693d2f3 P2Pool version: add patch number 2024-05-28 22:41:37 +02:00
SChernykh 899a908409 Added hardfork code 2024-05-14 22:48:59 +02:00