fix(chainsync): preserve event channels during auto-reconnect#611
Merged
fix(chainsync): preserve event channels during auto-reconnect#611
Conversation
Only create eventChan/errorChan when nil, preventing channel orphaning when Start() is called during auto-reconnect without a preceding Stop(). Add WithReconnectCallback option for consumer reconnection awareness. Closes #610 Signed-off-by: wcatz <waynecataldo@gmail.com>
wolf31o2
approved these changes
Feb 9, 2026
wcatz
added a commit
to wcatz/goduckbot
that referenced
this pull request
Feb 9, 2026
Updates blinklabs-io/adder to commit 460d03e which preserves event channels during auto-reconnect, preventing silent block delivery stalls. Fixes: blinklabs-io/adder#611 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
wcatz
added a commit
to wcatz/goduckbot
that referenced
this pull request
Feb 9, 2026
* fix(deps): update adder to fix silent reconnect channel orphaning Updates blinklabs-io/adder to commit 460d03e which preserves event channels during auto-reconnect, preventing silent block delivery stalls. Fixes: blinklabs-io/adder#611 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(config): make NtC query timeout configurable Add leaderlog.ntcQueryTimeout config option (Go duration string). Defaults to 10m if not set. Configurable via helm values. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(nonce): use XOR for nonce evolution and epoch transitions per Cardano spec The Cardano Nonce semigroup defines: Nonce a <> Nonce b = Nonce (xor a b) The code was incorrectly using BLAKE2b-256(a || b) instead of XOR for: 1. Per-block nonce evolution (evolveNonce) 2. Epoch nonce transition (TICKN rule) Additionally, the epoch transition was using the previous epoch nonce as the second operand instead of η_ph (prev block hash nonce from TICKN state). Correct formula per cardano-ledger TICKN rule: η(new) = η_c ⊕ η_ph where η_c = candidate nonce, η_ph = last block hash of prior epoch boundary. Changes: - evolveNonce: BLAKE2b-256(a||b) → XOR(a,b) - Epoch transition: hash(etaC||eta0) → XOR(etaC, prevHashNonce) - StreamBlockNonces now returns block_hash for η_ph tracking - Updated both SQLite and PostgreSQL store implementations - Updated all tests to verify XOR behavior Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: fix nonce evolution description (XOR not BLAKE2b), 60% stability window - README: nonce evolution uses XOR per Cardano Nonce semigroup - README: epoch transition uses TICKN rule (η_c XOR η_ph) - CLAUDE.md: fix stability window references from 70% to 60% - CLAUDE.md: update nonce evolution description to XOR - Update adder dependency version reference Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
wcatz
added a commit
to wcatz/goduckbot
that referenced
this pull request
Feb 18, 2026
* fix(deps): update adder to fix silent reconnect channel orphaning Updates blinklabs-io/adder to commit 460d03e which preserves event channels during auto-reconnect, preventing silent block delivery stalls. Fixes: blinklabs-io/adder#611 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(config): make NtC query timeout configurable Add leaderlog.ntcQueryTimeout config option (Go duration string). Defaults to 10m if not set. Configurable via helm values. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(nonce): use XOR for nonce evolution and epoch transitions per Cardano spec The Cardano Nonce semigroup defines: Nonce a <> Nonce b = Nonce (xor a b) The code was incorrectly using BLAKE2b-256(a || b) instead of XOR for: 1. Per-block nonce evolution (evolveNonce) 2. Epoch nonce transition (TICKN rule) Additionally, the epoch transition was using the previous epoch nonce as the second operand instead of η_ph (prev block hash nonce from TICKN state). Correct formula per cardano-ledger TICKN rule: η(new) = η_c ⊕ η_ph where η_c = candidate nonce, η_ph = last block hash of prior epoch boundary. Changes: - evolveNonce: BLAKE2b-256(a||b) → XOR(a,b) - Epoch transition: hash(etaC||eta0) → XOR(etaC, prevHashNonce) - StreamBlockNonces now returns block_hash for η_ph tracking - Updated both SQLite and PostgreSQL store implementations - Updated all tests to verify XOR behavior Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: fix nonce evolution description (XOR not BLAKE2b), 60% stability window - README: nonce evolution uses XOR per Cardano Nonce semigroup - README: epoch transition uses TICKN rule (η_c XOR η_ph) - CLAUDE.md: fix stability window references from 70% to 60% - CLAUDE.md: update nonce evolution description to XOR - Update adder dependency version reference Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.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.
Only create eventChan/errorChan when nil, preventing channel orphaning when Start() is called during auto-reconnect without a preceding Stop(). Add WithReconnectCallback option for consumer reconnection awareness.
Closes #610
Summary by cubic
Preserves event and error channels during auto-reconnect to prevent orphaned pipelines, and adds a reconnect callback hook for consumer visibility.
Bug Fixes
New Features
Written for commit dd5a8a1. Summary will update on new commits.