dash(s8-p2p.4): reduced-form node.cpp reception bodies [stacks on #656] - #657
Merged
Conversation
The Legacy/Actual shares handlers reference obj->m_tx_info.m_new_transaction_hashes, but DashShare exposes m_new_transaction_hashes directly (no m_tx_info wrapper), and they emplace_back(Transaction&) into a vector<MutableTransaction> with no matching constructor. Neither is exercised by the 12-handler KAT target, so the dash OBJECT library did not build at a1444b4 even though the KAT job was green. - protocol_{actual,legacy}.cpp: m_tx_info.m_new_transaction_hashes -> m_new_transaction_hashes - coin/transaction.hpp: add symmetric explicit MutableTransaction(const Transaction&) Object-OK enabler for #656; prerequisite for the s8-p2p.4 reception bodies.
Author the two link-deferred declarations from node.hpp — processing_shares() and handle_get_share() — plus the add_verified_shares() helper, in their reduced dash-native form (integrator-confirmed scope, 2026-07-09): - processing_shares(): phase-1 parallel X11 share_init_verify on m_verify_pool (X11 CPU work stays off the io_context), then hop to io_context and add_verified_shares(). - add_verified_shares(): non-blocking try_to_lock(m_tracker_mutex); on contention defer the batch to m_pending_adds (MAX_PENDING_ADDS cap); else skip-null / skip-dup / m_tracker.add under the held lock. - handle_get_share(): non-blocking shared try_to_lock; empty reply on contention (peer retries elsewhere); walk m_chain->get_chain with stops. DEFERRED to later slices per scope: run_think/think, download, best-share selection, PreparedList topo-sort, fork-index, persist/relay. Not a 1:1 port of ltc/node.cpp — dash node is header-only and lacks those symbols. Object-OK: dash OBJECT library builds (node.cpp.o compiles) on top of the s8-p2p.2 fixup. Link-gated on #656 merge. Conforms vs frstrtr/p2pool-dash 16->36; dashd-RPC fallback unchanged.
frstrtr
added a commit
that referenced
this pull request
Jul 10, 2026
node.cpp reception bodies landed (#656/#657), so dash::Node (NodeBridge<NodeImpl,Legacy,Actual>) is fully linkable. Link the dash OBJECT lib into c2pool-dash and replace the NOTE-only report_peering stub with a real bind: --run now constructs dash::Config + dash::Node and calls core::Server::listen(port), opening an actual sharechain P2P socket (default 8999/testnet 18999, --listen [HOST:]PORT override; --connect suppresses inbound). PREFIX kept as a per-coin isolation primitive from the frstrtr/p2pool-dash oracle constants. Inbound reception (version handshake + #646 min-proto gate) is live via node.cpp. Active outbound dialing of addnode/connect seeds rides the download/outbound slice (dash::NodeImpl has no start_outbound_connections yet); seeds are registered in the addr store. dashd-RPC submitblock fallback untouched. Verified: c2pool-dash --run --testnet --listen 29777 -> ss shows LISTEN 0.0.0.0:29777 held by c2pool-dash; Factory started for port 29777. Co-authored-by: frstrtr <frstrtr@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope (integrator-confirmed 2026-07-09)
Reduced dash-native reception bodies for the two link-deferred node.hpp decls, so the Legacy/Actual dispatch layer (#656) actually reaches the tracker.
Slice B —
53e4acf3processing_shares(): phase-1 parallel X11share_init_verifyonm_verify_pool(X11 CPU off the io_context), then hop to io_context.add_verified_shares(): non-blockingtry_to_lock(m_tracker_mutex); on contention defer tom_pending_adds(MAX_PENDING_ADDS cap); else skip-null / skip-dup /m_tracker.add.handle_get_share(): non-blocking shared try-lock; empty reply on contention (peer retries elsewhere);m_chain->get_chainwalk with stops.Object-OK enabler —
2f4ce61c(belongs to #656):#656 handlers referenced
obj->m_tx_info.m_new_transaction_hashes(DashShare exposes it directly) and emplace_back(Transaction&) into vector with no matching ctor. Neither is exercised by the 12-handler KAT target, so the dash OBJECT library did not build at a1444b4 despite the green KAT job. Fixed here as a prerequisite. Suggest cherry-picking2f4ce61conto #656 before its tap so master never has a broken-object-library window between #656 and this PR.Verify
cmake --build build --target dash→node.cpp.o,protocol_{actual,legacy}.cpp.oall compile;Built target dash(Linux x86_64, clean tree).Gates
No self-merge — for integrator verify (oracle + full CI) then operator tap.