Skip to content

fix(bitcoin-blake2b): support Knots 29.4.2 maturity and RPC - #207

Merged
NINJAK1DD merged 11 commits into
devfrom
feat/knots-29-4-2-maturity
Oct 5, 2026
Merged

NINJAK1DD merged 11 commits into
devfrom
feat/knots-29-4-2-maturity

Conversation

@NINJAK1DD

@NINJAK1DD NINJAK1DD commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Knots 29.4.2 removes getdifficulty and requires 6481 wallet confirmations for every coinbase, independently of its temporary consensus interval. This change validates the supported BLAKE2b build/chain/maturity contract and reconciles rewards while preserving ledger identities and legacy Bitcoin-family behavior.

  • Reconcile rewards through retained header/wallet evidence, including pruned blocks and persisted orphans. Recheck immutable candidate identity under the database row lock before settlement; prevent duplicate credit and preserve booked PPS liabilities.
  • Quarantine ambiguous PROP/PPLNS history before allocation. Persist the hold across restarts and alert after commit. Package the audited metadata-only closure tool in scripts/ops/; it cannot alter balances, payments or block state.
  • Share single/batch RPC framing and borrow parsed result trees. Require integer error codes, string messages and a present success result; preserve explicit null, valid daemon data, boxed scalars, typed dates and transport classifications. Diagnostics withhold private daemon text.
  • Validate non-Bitcoin error compatibility against pinned official serializers and 18 source-shaped HTTP cases. Document trailing-JSON rejection, synchronized accounting clocks, upgrade/drain/backing audits and DATUM prerequisites.

Compatibility guide and validation evidence, daemon error audit, and audited quarantine closure describe the implementation and operator boundaries.

Validation: production source 8616eb0c passed 899 selected Windows and 3742 full Linux lab tests with zero failures and one Linux benchmark skip. The RPC/collection selection at 48ab5fcb passed 164 Windows and 164 Linux tests with zero failures/skips. The full CI lane for 48ab5fcb passed 3760 tests, zero failed, one benchmark skip; both Ubuntu release lanes passed 3691 tests, zero failed, 44 skips each. Source builds, PostgreSQL 15–18 schemas, archives, containers and macOS/musl reservation checks succeeded. These counts identify the tested heads. Documentation-only head d1955d7986cf6dd7262fa467d038c03fae30b6d0 passed local link/anchor checks for all 40 Markdown files and whitespace checks; its CI is pending.

Retain the immediately-before-merge head/CI/Knots release/proposal recheck and #163 DATUM gateway/node/miner/direct-reward acceptance. References #205, #151 and #163.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-04T16:48:30.547487Z 75dc616 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@NINJAK1DD
NINJAK1DD force-pushed the feat/knots-29-4-2-maturity branch from e5f16ea to b656089 Compare October 4, 2026 16:53
…tibility

Move BLAKE2b reward classification into a dedicated payout handler, leaving
shared Bitcoin/Nexa/AuxPoW classification behavior unchanged. Use retained
block headers so body pruning cannot strand long-locked coinbase rewards.
Match wallet/header identities and depth, preserve owned immature credit,
quarantine unsupported direct rows and bound redacted reconciliation alerts.

Bind each pool's verified chain/maturity schedule for the process lifetime.
Allow reviewed bounded user-agent customization, isolate expected-work RPC
models, align regtest overrides with released Knots source, and refresh the
catalogue pin and upgrade/successor-review guidance.

Cache and re-hash pinned upstream source; retain failed functional-test logs.
Add real pruning/maturity/reorg fixtures, payout/PoS compatibility checks,
production DI coverage and offline cache/failure diagnostics.

Validated in the documented lab: 3604 Linux tests passed with one skipped
benchmark; 623 Windows compatibility/live/ledger tests and 76 diagnostic
tests passed. Both upstream functional tests passed with cold/warm caches.
References #205 and PR #207. DATUM end-to-end acceptance remains in #163.
…ayout stalls

Revisit custodial orphan rows in rotating keyset batches of 64 within 12960
blocks of the observed tip. Require matching active header/wallet evidence
and unchanged candidate identities under the row lock before reopening a row.
Keep unavailable orphans unresolved and exclude confirmed custodial rows so
stale classification cannot allocate the same reward twice or reverse PPS.

Add fixed redacted payout-attestation reasons and bounded alerts for outages,
syncing, contract drift and process-binding changes. Preserve cancellation
semantics, restore wallet-category success logging and withhold received
subversion payloads from startup errors and diagnostics.

Document pre-upgrade payout drain, re-locked prior coinbases/payout change,
post-upgrade wallet/liability reconciliation and safe missing-header repair.
Move unused expected-work response models into source-contract test fixtures
and describe the production behavior accurately.

Verify persisted Pending -> Orphaned -> Pending/Confirmed through real Knots,
PostgreSQL, PayoutManager, repositories and all four payout schemes without
manually resetting status. Cover restart, immutable evidence changes, bounded
rotation, redacted reason episodes, cancellation and stale replay refusal.

Validation: 3635 Linux tests passed, zero failures, one skipped benchmark;
730 Windows live/ledger/compatibility/diagnostic tests passed with no skips.
Five maturity integration tests and 254 focused tests also passed independently.
Documentation, workflow pins, diagnostic sources, offline cache and shell
gates passed. References #205 and PR #207; DATUM acceptance remains in #163.
@NINJAK1DD
NINJAK1DD force-pushed the feat/knots-29-4-2-maturity branch 2 times, most recently from 9d05c71 to b7547a7 Compare October 4, 2026 22:35
@NINJAK1DD
NINJAK1DD force-pushed the feat/knots-29-4-2-maturity branch from b7547a7 to c2f220a Compare October 4, 2026 22:58
@NINJAK1DD
NINJAK1DD merged commit fafbba4 into dev Oct 5, 2026
17 checks passed
@NINJAK1DD
NINJAK1DD deleted the feat/knots-29-4-2-maturity branch October 5, 2026 17:59
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