Repository navigation
Conversation
The translator already hashed each share for validation and then dropped that hash. Keep it on the accept and forward lines, write an optional JSONL trail of what was sent upstream, and ask a configured bitcoind whether a block candidate is in the best chain. Co-authored-by: Cursor <cursoragent@cursor.com>
Operators need the accepted, forwarded, and block-candidate lines, the optional JSONL files, and the fact that chain status talks only to a configured bitcoind. Co-authored-by: Cursor <cursoragent@cursor.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.
What the logs were missing
On
main, a share that meets the miner's target logsReceived mining.submit from SV1 downstream for channel id: …. A share sent upstream logsSubmitSharesExtended: valid share, forwarding it to upstream | channel_id, sequence_number. The translator had already hashed the header to validate the share, then dropped that hash. The log has no worker, noshare_hash, and no mark when the hash meets the networknbits. A later pool ack names a sequence number and cannot be tied back to a hash. Nothing is written to a file, and nothing can ask bitcoind whether a candidate is in the best chain.Summary
share_hashin bitcoind display order. A share that meets the chain-tipnbitsis also aBLOCK_CANDIDATEwarning. That line means the hash metnbitsat validation time.chain_statuson it staysunknown.(upstream_channel_id, sequence_number). In aggregated mode every miner shares one sequence series. In non-aggregated mode the same sequence number on two channels stays two shares. Block candidates also go toblock-candidates.jsonlunless that path is set to"".share_audit_bitcoin_rpc_urlpoints at a Bitcoin Core RPC endpoint on the same network as the pool. Auth is a cookie file, or a user and password together. The checker callsgetblockchaininfoandgetblockheaderonly for block candidates. It waits 120 seconds, then 10, 30, and 60 minutes, and stops at 6 confirmations or 24 hours.in_best_chainmeans the header is in the node's active chain.orphaned_or_stalemeans the node knows the header and it is not in that chain.not_foundmeans this node has not seen the hash. A down or still-loading node is a warning and does not writenot_found. The translator does not submit the block.Test plan
cargo test -p translator_sv2 --libshare_audit_pathand the RPC URL commented outChain-status RPC enabledshare_audit_bitcoin_rpc_urlat a mainnet bitcoind before expecting anychain_statusline