[btc-hardening][kyoto] migrate to upstream bip157 v0.5.0#488
Open
0xsiddharthks wants to merge 3 commits intomainfrom
Open
[btc-hardening][kyoto] migrate to upstream bip157 v0.5.0#4880xsiddharthks wants to merge 3 commits intomainfrom
0xsiddharthks wants to merge 3 commits intomainfrom
Conversation
Replace the 0xsiddharthks/kyoto fork (siddharth/upgrades, rev f2ba601c)
with crates.io bip157 = "0.5.0". All four features the fork carried
landed upstream:
- get_header(height) -> PR #563
- height_of_hash(hash) -> PR #564 (canonical-only semantics)
- whitelist_only() -> PR #565 folded into #567
- hostname trusted peers -> PR #566 (redesigned in review)
Adapt to upstream's API changes:
- DnsPeer removed. Use TrustedPeer::from_hostname(host, port) and the
Builder::add_peer{,s} APIs over TrustedPeer instead of the old
add_dns_peer{,s}.
- Note v0.5.0 consumes hostname peers on use (popped from the
whitelist when first tried, never reinstated). Re-resolution
requires rebuilding the kyoto node, which our connectivity
supervisor already does on consecutive failures.
- broadcast_tx renamed to submit_package(impl Into<Package>). We
pass a Transaction directly via the From<Transaction> for Package
impl, so the call site is a one-line rename with the same return
type (Wtxid).
Requester::height_of_hash now returns None for non-canonical hashes
(canonical-only via #564). The hashi call site already treats Ok(None)
as "block not on canonical chain" so this tightens correctness for
free with no behavior change. Soften the surrounding warn from
"possibly malicious" to acknowledge sync lag and recent reorgs as the
more common explanations.
We also inherit BIP-130 sendheaders, the new/tried peer fallback fix,
the late-CF-header ban fix, plus rescan_from(height), chain_tip(),
peer_info(), and Package::new_one_parent_one_child for future use.
- Promote kyoto/bip157 to [workspace.dependencies] for consistency - Trim doc comments back toward pre-PR style - Tighten the warn! when bitcoind reports a hash kyoto hasn't seen yet
* [kyoto] tighten supervisor restart threshold to 15 failures
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.
Replace our kyoto dependency from my fork of the 2140-dev/kyoto repo with the latest official release.