Open
Conversation
…ading-on-reorgs blockchain: fix inconsistent utxocache and database on reorg
…entries-on-mapslice-impossible blockchain: fix a bug where a duplicate entry is possible in the mapslice
…bscription-callback-errors blockchain: always relock chainLock for subscription callbacks
This commit adds detailed errors for all possible errors returned from `sendrawtransaction` or `testmempoolaccept`, enabling upstream callers to have refined control over the actions to be taken.
This commit changes the `RejectReason` resulted from calling btcd's `testmempoolaccept` to be un-matched, leaving it to the caller to decide when and where to match it.
rpcclient: add detailed error types
…ature-validation Add check for maximum signature length in ecdsa.ParseDERSignature
build: bump version to v0.24.2-beta.rc1
This commit adds a method to MsgTx called TxID. This method returns the transaction ID (txid) of the subject transaction.
wire: add method TxID to MsgTx
chore: remove trailing continue
Convert `witnessToHex` into a method `ToHexStrings` on `TxWitness`
defaultMaxFeeRate was set to 1e8 / 10(sat/kb) as a parameter. But BTC/kvB is the expected value, so the units was wrong. This commit updates defaultMaxFeeRate to BTC/kvB and sets it to 0.1, which is the default value of Bitcoin Core. This commit also updates the comment to reflect the change. Because maxFeeRate sanity check has been added in bitcoin core v27.0 or later, sendrawtransaction cannot be executed without this change.
Added type alias BTC/kvB to explicitly indicate that it represents the fee in BTC for a transaction size of 1 kB. Because bitcoind uses its own fee rate type (BTC/kvB instead of sat/kWU we use in lnd), define the type in btcjson package, as it's the only place where we actually use BTC/kvB.
Signed-off-by: xiaoxiangxianzi <zhaoyizheng@outlook.com>
This commit adds a new type called `SerializedKey`. A serialized type is useful when using public keys as map keys. This is because functionally identical public keys can have different internal representations. These differences would cause the map to treat them as different keys.
btcclient+btcjson: defaultMaxFeeRate to BTC/kvB
Helper function for the added IsAncestor in the follow up commit. Returns true if all the fields (except for parent and ancestor) are equal.
IsAncestor() provides functionality for testing if a block node is an ancestor of anther block node.
chore: fix typos
Add new serialized pubkey type
blockchain: Add IsAncestor method to blockNode
Signed-off-by: goodfirm <fanyishang@yeah.net>
Fixes #2404. If different versions of bitcoind return different error strings, we need a way to match those as well.
rpcclient: add bitcoind version dependent error matching
feat: fix ci / makefile
Dockerfile: update go base image
Co-authored-by: Oliver Gugger <gugger@gmail.com>
Makefile+workflows: fallback to `GOPATH/bin` on non-existent `GOBIN`
build: bump version to v0.25.0-beta.rc1
This commit adds a new function to musig2.Session, which allows the caller to add an external aggregated nonce to the session.
musig2: add WithExternalCombinedNonce option to Sign
Ensure that the dial phase of rpcclient's HTTP posts respects the http.Client's Timeout. It was instead falling back to the OS settings.
build: bump version to v0.25
…dialcontext rpcclient: ensure http dial respects timeout
fix spelling error
build: bump version of Go container for release builds
This issue was discovered through differential fuzzing between btcd and Bitcoin Core. Add detection and filtering of IPv6 ORCHIDv2 addresses as defined by RFC7343 (2001:20::/28). These addresses are overlay routable cryptographic hash identifiers and should not be treated as routable peer addresses, consistent with Bitcoin Core's behavior. Changes: - Add rfc7343Net variable for the 2001:20::/28 address block - Add IsRFC7343() function to detect ORCHIDv2 addresses - Update IsRoutable() to exclude RFC7343 addresses - Add comprehensive test coverage for RFC7343 detection - Fix incorrect error message in TestIPTypes (IsRFC1918 -> IsRFC6145)
This issue was discovered through differential fuzzing between btcd and Bitcoin Core. IPv4-mapped IPv6 addresses (::ffff:0:0/96, RFC 4291) sent with networkID 0x02 (IPv6) in addrv2 messages are now properly rejected. Per BIP155, these addresses should use networkID 0x01 (IPv4) instead. This aligns btcd's behavior with Bitcoin Core's addrv2 handling. Changes: - Add ipv4MappedPrefix constant for the ::ffff:0:0/96 prefix - Add isIPv4Mapped() helper function to detect these addresses - Update readNetAddressV2() to skip IPv4-mapped addresses with IPv6 networkID - Add comprehensive test coverage for IPv4-mapped address detection
Add a bounds check against the remaining slab capacity so oversized witness items return a decode error. Add a regression test for witness items that overflow the decode slab.
To align with Bitcoin Core, reduce the maximum message payload size from 32MB to 4MB.
Add a recoverFromPanic method that catches panics in peer goroutines, logs the error with a stack trace, and disconnects the offending peer instead of crashing the entire node. This provides defense-in-depth against future unknown panics in message parsing or handling. Protect two goroutine boundaries: - The negotiation goroutine in start(), which handles pre-handshake message decoding via BtcDecode. - The inHandler goroutine, which processes all post-handshake messages. Refactor inHandler cleanup from manual end-of-function calls to defer-based cleanup, ensuring close(p.inQuit) always runs even on panic, which prevents stallHandler from hanging.
Fix addrv2 address validation
html/template automatically HTML-escapes special characters to prevent XSS, which can silently corrupt arbitrary script data. Since the output is binary script bytes and not HTML, this escaping provides no benefit and might breaks correctness.
txscript: switch template engine from html/template to text/template
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.
No description provided.