Skip to content

ltc: concrete core::coin::ICoinNode (CoinNode) for P2 WorkView seam [PR-A/3]#79

Merged
frstrtr merged 4 commits into
masterfrom
ltc-doge/p2-clusterA-ltc-coinnode
Jun 11, 2026
Merged

ltc: concrete core::coin::ICoinNode (CoinNode) for P2 WorkView seam [PR-A/3]#79
frstrtr merged 4 commits into
masterfrom
ltc-doge/p2-clusterA-ltc-coinnode

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 10, 2026

Copy link
Copy Markdown
Owner

PR-A/3 — ltc concrete core::coin::ICoinNode (CoinNode)

Additive ltc concrete implementation of the core::coin::ICoinNode P2 WorkView seam
(seam foundation b8db2c9 + btc concrete 4c4b08b already on master via #69).

Scope — per-coin isolation, no src/core churn:

  • src/impl/ltc/coin/coin_node.hpp, coin_node.cpp — new ltc CoinNode
  • src/impl/ltc/coin/CMakeLists.txt — wire it
  • src/c2pool/c2pool_refactored.cpp — retype ltc wiring to the seam

Chain: A [this] then B [#78] then C [web_server retype, authored next, binds the A merge SHA].

Note: this PR is intentionally additive and does NOT touch web_server, so btc-smoke
[Coin matrix / Linux x86_64] stays RED on its own — that is expected. A is the pure
prerequisite that PR-C binds to in order to actually clear btc-smoke. PR-A should be
green standalone.

frstrtr and others added 4 commits June 10, 2026 23:24
Cluster A of the web_server core-seam fold (base 4c4b08b, btc-embedded
P2 WorkView seam). Additive LTC reference impl of core::coin::ICoinNode:

  - NEW src/impl/ltc/coin/coin_node.{hpp,cpp}: concrete CoinNode collapsing
    the embedded-vs-rpc getwork decision and the full WorkData (incl. m_txs)
    retention coin-side; exposes only the agnostic WorkView + 2-arg
    submit_block_hex across the seam. MWEB arity bridged with mweb="" (the
    sole pre-seam caller already passed ""); standing flag noted in-source.
  - src/c2pool/c2pool_refactored.cpp: retype the integrated rpc/embedded and
    solo wiring sites from set_coin_rpc/set_embedded_node(concrete ltc types)
    to set_coin_node(ICoinNode*); own the CoinNode before web_server so it
    outlives it.
  - src/impl/ltc/coin/CMakeLists.txt: add coin_node sources.

Pushed for btc-heap-opt to fetch and fold with Cluster B (btc OBJECT lib +
btc mirror) into one signed head. Does not link standalone (btc side still
red until B). Linux x86_64 four-coin ctest to be re-run first-hand at the
combined nm-clean head before the seam-gate flip.
…es.hpp

PR-A inserted #include <impl/ltc/coin/coin_node.hpp> before node.hpp in
c2pool_refactored.cpp. coin_node.hpp transitively pulls btclibs/serialize.h,
which #undefs READWRITE and redefines it to the (s, ser_action, ...) form.
With the include placed first, the MESSAGE_FIELDS macros in messages.hpp
(reached via node.hpp) expand against that wrong READWRITE, yielding
"use of undeclared identifier s / ser_action" under AppleClang/arm64.

Move the include to after node.hpp/messages.hpp so the preprocessor state at
the messages.hpp expansion point is identical to the pre-PR-A build (green on
all platforms). coin_node.hpp and the following config.hpp use no serialize
macros, so nothing downstream is affected. Behaviour-preserving; additive.
btclibs/serialize.h re-#defines READWRITE to the legacy (s, ser_action)
contract and was winning by include order over core/pack.hpp (formatter,
stream), breaking every C2POOL_SERIALIZE_METHODS body in this header
(use of undeclared identifier s / ser_action on macOS arm64, Linux,
Analyze). Re-assert the core contract so the header is include-order
independent; mirrors btc/coin/p2p_messages.hpp. No message semantics
change.
c2pool_refactored.cpp wired the new web_server.set_coin_node(CoinNode*)
seam, but that API only lands with the PR-C web_server ICoinNode retype.
On master it does not exist, so the Linux x86_64 aggregate failed to
compile A standalone (missing-member), independent of the macOS READWRITE
fix. Revert this file to master (restore set_coin_rpc/set_embedded_node).

The macOS arm64 fix (base_p2p_messages.hpp READWRITE re-assert) and the
additive ltc::coin::CoinNode type stay in A; CoinNode depends only on the
core seam foundation (node_iface.hpp + work_view.hpp) already on master,
so it compiles standalone. Wiring CoinNode into web_server moves to PR-C.
@frstrtr frstrtr merged commit 103594e into master Jun 11, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant