Skip to content

Merged mining#263

Open
Fi3 wants to merge 3 commits into
dmnd-pool:masterfrom
Fi3:MergedMining
Open

Merged mining#263
Fi3 wants to merge 3 commits into
dmnd-pool:masterfrom
Fi3:MergedMining

Conversation

@Fi3

@Fi3 Fi3 commented May 13, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Queue a zero-value OP_RETURN output from the API and apply it when the next JD
template arrives so the modified coinbase is part of the declared custom job
flow instead of being mutated after declaration.

This keeps the pool-side declaration, token generation, and downstream work on
the same coinbase while reusing the existing API server and gating access with
a shared secret.
@Fi3

Fi3 commented May 13, 2026

Copy link
Copy Markdown
Contributor Author

need #264

@Fi3

Fi3 commented May 13, 2026

Copy link
Copy Markdown
Contributor Author

need automatic testing on JD part before beeing merged. Test must mesure JDS rejection rate under high latency, and hight troughput. DO NOT MERGE WITHOUT TESTING

fi3 added 2 commits May 13, 2026 11:23
… submit exact found blocks

The proxy reuses the existing API server behind a shared secret to accept the
desired RSK OP_RETURN payload and target, and to let the sibling bridge poll
complete found-job data without depending on raw block lookups from bitcoind.

The desired merge-mining payload stays active across templates, but the source
of truth for a found job is the exact payload and target that were actually
applied to that template. Found jobs are exported only when the solved coinbase
still proves that template-scoped RSK data, and they carry the witness-stripped
coinbase, rebuilt Bitcoin header and block hash, block transaction count, and
the RSKIP92 sibling-only merkle proof expected for multi-transaction Rootstock
submissions. Single-transaction jobs still remain on the coinbase-only path.

Job and chain-state tracking are also kept aligned with JD job rotation so
delayed or stale shares are matched to the correct template instead of the
latest refresh, which prevents duplicate or false found jobs and stops stale
custom-job submissions from being turned into invalid Bitcoin block candidates.
… stay bound to the right template

Keep the current clean-job family separate from same-tip template refreshes so a
new non-future job does not make the previous still-valid job look stale before
normal channel validation runs.

Capture coinbase prefix and suffix per template instead of reading them from a
mutable singleton later, so a newer template cannot overwrite the coinbase parts
that belong to an earlier declaration while it is still in flight.

Treat the applied RSK payload as valid only when it is the last RSKBLOCK tag in
the coinbase path. This keeps template injection, found-job validation, and the
bridge contract aligned and avoids exporting proofs built from a payload that is
already shadowed by a later tag.
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