Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHAINS-4196 - Fetch upstream 6 24 24 #6

Merged
merged 126 commits into from
Jun 25, 2024
Merged

Commits on Jan 3, 2024

  1. blockchain: set the lastflushtime when setting the lastflushhash

    On startup when the headers-first mode is off, when receiving the first
    block, the periodic flush will trigger.  The lastflushtime wasn't set
    which resulted in the flush being triggered on the first block on
    restart.
    kcalvinalvin committed Jan 3, 2024
    Configuration menu
    Copy the full SHA
    e307ad1 View commit details
    Browse the repository at this point in the history
  2. Fix some typos (btcsuite#2085)

    * Dockerfile: fix typo
    
    * blockchain: fix typos
    
    * sample-btcd.conf: fix typos
    
    * server: fix typos
    
    * txscript: fix typos
    Thabokani authored Jan 3, 2024
    Configuration menu
    Copy the full SHA
    a4df044 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2024

  1. docs: fix typo

    vuittont60 committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    7fdd92c View commit details
    Browse the repository at this point in the history
  2. database: fix typo

    vuittont60 committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    048a7ef View commit details
    Browse the repository at this point in the history
  3. btcutil: fix typo

    vuittont60 committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    7df4651 View commit details
    Browse the repository at this point in the history
  4. btcec: fix typo

    vuittont60 committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    6ed54f3 View commit details
    Browse the repository at this point in the history
  5. Merge pull request btcsuite#2098 from vuittont60/master

    Fix some typos
    guggero authored Jan 9, 2024
    Configuration menu
    Copy the full SHA
    91cdf0d View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2024

  1. Configuration menu
    Copy the full SHA
    44abf0a View commit details
    Browse the repository at this point in the history
  2. mempool: add new method checkMempoolAcceptance

    This commit breaks the `maybeAcceptTransaction` into two parts - the
    first is reading the mempool to validate the transaction, and the
    relevant logic has been moved into the new method
    `checkMempoolAcceptance`. The second part is writing to the mempool, and
    is kept in the method `maybeAcceptTransaction`.
    yyforyongyu committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    2ad8026 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ca4261f View commit details
    Browse the repository at this point in the history
  4. multi: add more bitcoind versions to the BackendVersion

    This commit adds bitcoind version 22.0 and 25.0 to our `BackendVersion`
    set to handle the `testmempoolaccept` RPC calls. A unit test is added to
    make sure the parser works as expected.
    yyforyongyu committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    889cdb4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c7e4028 View commit details
    Browse the repository at this point in the history
  6. mempool+rpcserver: add interface TxMempool

    This commit adds a new interface `TxMempool` which defines how other
    subsystems interact with `TxPool`.
    yyforyongyu committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    4842b23 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6c9f7fe View commit details
    Browse the repository at this point in the history
  8. multi: map btcd mempool acceptance errors to bitcoind's `testmempoo…

    …laccept`
    
    This commit creates a `RejectReasonMap` to map the errors returned from
    `btcd` to bitcoind's `testmempoolaccept` so the `RejectReason` is
    unified at the RPC level. To make sure the map keys are unique, the
    error strings are modified in `btcd`.
    yyforyongyu committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    ef54c49 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    c104e72 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    8817ebd View commit details
    Browse the repository at this point in the history
  11. gomod: run go mod tidy for all modules

    Also add the `make tidy-module` copied from `lnd`.
    yyforyongyu committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    fbe65bf View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2024

  1. Merge pull request btcsuite#2053 from yyforyongyu/testmempoolaccept

    support `testmempoolaccept` for both `bitcoind` and `btcd`
    Roasbeef authored Jan 16, 2024
    Configuration menu
    Copy the full SHA
    17fdc52 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2024

  1. rpcclient: make sure batch requests are GCed

    This commit makes sure the batch requests are always GCed before sending
    back the responses for them. In particular,
    - `removeRequest` didn't remove the item from `batchList`, which is now
      fixed.
    - `Send` didn't remove the request from `requestMap`, which is now fixed
      by using `removeRequest`.
    yyforyongyu committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    e8a5a55 View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2024

  1. Configuration menu
    Copy the full SHA
    9cda0f7 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2024

  1. netsync: don't update mempool/fee estimator unless we're synced up

    Noticed during ibd that there's a slight overhead for
    handleBlockchainNotification on mempool/fee estimator updates. Since
    there's no reason to be looking at this while we're not caught up,
    return early and avoid the calls.
    kcalvinalvin committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    c17cf80 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2024

  1. Merge pull request btcsuite#2105 from yyforyongyu/fix-batch-mem-leak

    rpcclient: make sure batch requests are GCed
    Roasbeef authored Jan 23, 2024
    Configuration menu
    Copy the full SHA
    62e6af0 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2024

  1. Configuration menu
    Copy the full SHA
    2a55ff4 View commit details
    Browse the repository at this point in the history
  2. Merge pull request btcsuite#2107 from Halimao/refactor/make-help

    refactor: add `make help` to display the usage for project Makefile
    Roasbeef authored Jan 24, 2024
    Configuration menu
    Copy the full SHA
    8e53942 View commit details
    Browse the repository at this point in the history
  3. Merge pull request btcsuite#2089 from kcalvinalvin/2024-01-03-add-las…

    …t-flush-time-on-initconsistentstate
    
    blockchain: set the lastflushtime when setting the lastflushhash
    Roasbeef authored Jan 24, 2024
    Configuration menu
    Copy the full SHA
    13152b3 View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2024

  1. Configuration menu
    Copy the full SHA
    c4b1448 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2024

  1. Configuration menu
    Copy the full SHA
    069a0ec View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2024

  1. blockchain: return error in db.View instead of t.Fatal

    Calling t.Fatal inside db.View makes the test hang on failures.  Return
    the error and call t.Fatal outside of db.View avoids this.
    kcalvinalvin committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    8836219 View commit details
    Browse the repository at this point in the history
  2. blockchain: add case for pruning stale blocks

    Pruning stale blocks will make the block validation fail for the block
    that the prune was triggered on as BlockHeightByHash will not return the
    height for blocks that are not in the main chain.
    
    We add a test case to ensure that the test fails in the above case.
    kcalvinalvin committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    a0c9e3b View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2024

  1. blockchain_test, fullblocktests: add test to check for utxo

    existance/non-existance
    
    New test instance BlockDisconnectExpectUTXO tests that a utxo
    exists/doesn't exist after a specific block has been disconnected.
    kcalvinalvin committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    5a91ea2 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2024

  1. Merge pull request btcsuite#2119 from nikicat/nb/include-unsafe

    Added 'include_unsafe' option to FundRawTransaction
    Roasbeef authored Feb 22, 2024
    Configuration menu
    Copy the full SHA
    d55c55a View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2024

  1. Merge pull request btcsuite#2108 from kcalvinalvin/2024-01-22-dont-up…

    …date-mempool
    
    netsync: don't update mempool/fee estimator unless we're synced up
    Roasbeef authored Feb 27, 2024
    Configuration menu
    Copy the full SHA
    5b6d265 View commit details
    Browse the repository at this point in the history
  2. Merge pull request btcsuite#2112 from devlzcode/expose-newfutureerror

    feat: Expose newFutureError for developer friendliness
    Roasbeef authored Feb 27, 2024
    Configuration menu
    Copy the full SHA
    9ea2eea View commit details
    Browse the repository at this point in the history
  3. blockchain: always relock chainLock for subscription callbacks

    For various b.sendNotifcation() callbacks, if a runtime panic happens,
    we don't get any useful debugging information since the error that
    happens first is the "unlock of unlocked mutex" error.
    
    This is because we temporarily unlock the chainLock for callbacks and
    then relock them.  However, since the relocking code is executed after
    the completion of the callback, if an error happens during that
    callback, we never relock the chainLock.
    
    Switching to an anonymous function and having the unlock code as a
    defer will ensure that the lock always relocks.
    kcalvinalvin committed Feb 27, 2024
    Configuration menu
    Copy the full SHA
    3d1150a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    dd31767 View commit details
    Browse the repository at this point in the history
  5. rpcserver+mempool: implement gettxspendingprevout for btcd

    This commit adds the RPC method `gettxspendingprevout` for btcd.
    yyforyongyu committed Feb 27, 2024
    Configuration menu
    Copy the full SHA
    72bbdd5 View commit details
    Browse the repository at this point in the history
  6. rpcclient: track bitcoind version 24.0.0

    We need this for `gettxspendingprevout`.
    yyforyongyu committed Feb 27, 2024
    Configuration menu
    Copy the full SHA
    5f71df1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a033b0d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0d52a89 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9e6070a View commit details
    Browse the repository at this point in the history
  10. multi: turn BackendVersion into an interface

    This commit adds a new interface, `BackendVersion`, to support checking
    versions for multiple both btcd and bitcoind. Once neutrino version is
    also pinned here, it should also be checked.
    yyforyongyu committed Feb 27, 2024
    Configuration menu
    Copy the full SHA
    4cf49bd View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    34721f0 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2024

  1. Configuration menu
    Copy the full SHA
    0d4ed16 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2024

  1. Merge pull request btcsuite#2125 from yyforyongyu/add-gettxspendingpr…

    …evout
    
    Add `gettxspendingprevout` for `btcd` and fix version check
    Roasbeef authored Mar 1, 2024
    Configuration menu
    Copy the full SHA
    1a2b599 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2024

  1. addrmgr: fix intermittent addrmanager_internal_test bug

    Sometimes the tests in the addrmanager_internal_test will fail with:
    "addrmanager_internal_test.go: expected to find 5 addresses, found 4"
    
    This is because the generated address with randAddr() may not always
    generate an address that's routable. If the address is not routable,
    that address will not be added to the manager when calling AddAddress().
    
    This bug is fixed by creating a new function routableRandAddr() that
    always creates a routable random address.
    kcalvinalvin committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    f9da338 View commit details
    Browse the repository at this point in the history
  2. blockchain: don't rely on BlockHeightByHash for prune height

    calculations
    
    Since BlockHeightByHash only returns the heights for blocks that are in
    the main chain, when a block that is stale gets pruned, this will cause
    an error in the block height lookup and cause an error in block
    processing.
    
    Look up the node directly from the index and if the node isn't found,
    just skip that node. For utxoCache.lastFlushHash, if that isn't found,
    just force a flush.
    kcalvinalvin committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    f2caa8f View commit details
    Browse the repository at this point in the history
  3. blockchain: change reorg utxo cache behavior

    The assumption in the previous code was incorrect in that we were
    assuming that the chainLock is held throughout the entire chain reorg.
    This is not the case since the chainLock is let go of during the
    callback to the subscribers.
    
    Because of this, we need to ensure that the utxo set is consistent on
    each block disconnect. To achieve this, additional flushes are added
    during block disconnects.
    
    Also the utxocache is no longer avoided during block connects and when
    we're checking for the validity of the block connects and disconnects as
    we can just use the cache instead of trying to avoid it.
    kcalvinalvin committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    a254998 View commit details
    Browse the repository at this point in the history
  4. blockchain: get rid of database as an argument in fetchInputUtxos

    Allowing the caller to fetch from either the database or the cache
    resulted in inconsistencies if the cache were ever to be dirty.
    Removing this option eliminates this problem.
    kcalvinalvin committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    78b158d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    99846b0 View commit details
    Browse the repository at this point in the history
  6. Merge pull request btcsuite#2131 from kcalvinalvin/2024-03-05-fix-int…

    …ermittent-addrmgr-bug
    
    addrmgr: fix intermittent addrmanager_internal_test bug
    Roasbeef authored Mar 5, 2024
    Configuration menu
    Copy the full SHA
    a4f4470 View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2024

  1. blockchain: add another mapslice duplicate entry case

    Duplicate entries are currently possible in the following scenario:
    
    1: Add entries to the mapslice.
    2: 1st map is full. Move onto the 2nd map.
    3: Delete any entry in the first map.
    4: Attempt to add an entry in the 2nd map.
    
    When attempting (4), the entry should just be overwritten but a
    duplicate gets added.
    kcalvinalvin committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    8d1aa01 View commit details
    Browse the repository at this point in the history
  2. blockchain: check all the maps first before adding an entry

    When attempting to insert an entry to the mapslice, we check all the
    underlying maps to ensure that the entry doesn't exist.
    kcalvinalvin committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    059a668 View commit details
    Browse the repository at this point in the history
  3. blockchain: remove utxoview from the argument in connectBlock

    Since no code is now depending on accepting new blocks without the
    cache, we get rid of the option to do so.
    kcalvinalvin committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    078815b View commit details
    Browse the repository at this point in the history
  4. Add check for maximum signature length in ecdsa.ParseDERSignature

    * Updated the `ecdsa.ParseDERSignature` to include the MaxSigLen constant, which defines the maximum length of a DER encoded signature.
    * The MaxSigLen constant is set to 72 bytes, as per the explanation in the comment.
    * A new test case has been added to test the functionality with a long signature.
    * The test case checks if signatures longer than the specified maximum length are properly handled.
    * The test ensures that signatures exceeding the maximum length are correctly identified as invalid.
    SulaimanAminuBarkindo committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    9d2184e View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2024

  1. Merge pull request btcsuite#2122 from kcalvinalvin/2024-02-15-dont-re…

    …ly-on-height-fetching
    
    blockchain: don't rely on BlockHeightByHash for prune height calculations
    Roasbeef authored Mar 9, 2024
    Configuration menu
    Copy the full SHA
    447c95c View commit details
    Browse the repository at this point in the history
  2. multi: fix ioutil deprecated function

    update i/o functions to use os / io package functions instead
    theedtron authored Mar 9, 2024
    Configuration menu
    Copy the full SHA
    b66f5b8 View commit details
    Browse the repository at this point in the history
  3. Merge pull request btcsuite#2123 from kcalvinalvin/2024-02-15-no-utxo…

    …cache-loading-on-reorgs
    
    blockchain: fix inconsistent utxocache and database on reorg
    Roasbeef authored Mar 9, 2024
    Configuration menu
    Copy the full SHA
    e63bf03 View commit details
    Browse the repository at this point in the history
  4. Merge pull request btcsuite#2134 from kcalvinalvin/2024-03-07-make-du…

    …plicate-entries-on-mapslice-impossible
    
    blockchain: fix a bug where a duplicate entry is possible in the mapslice
    Roasbeef authored Mar 9, 2024
    Configuration menu
    Copy the full SHA
    8ed234b View commit details
    Browse the repository at this point in the history
  5. Merge pull request btcsuite#2128 from kcalvinalvin/2024-02-27-no-pani…

    …c-for-subscription-callback-errors
    
    blockchain: always relock chainLock for subscription callbacks
    Roasbeef authored Mar 9, 2024
    Configuration menu
    Copy the full SHA
    f0ec9fb View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    aee2705 View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2024

  1. rpcclient: define specific errors for chain backends

    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.
    yyforyongyu committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    36683e0 View commit details
    Browse the repository at this point in the history
  2. rpcserver: return the plain reject reason from btcd

    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.
    yyforyongyu committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    8abf969 View commit details
    Browse the repository at this point in the history
  3. Merge pull request btcsuite#2138 from yyforyongyu/error-matching

    rpcclient: add detailed error types
    guggero authored Mar 18, 2024
    Configuration menu
    Copy the full SHA
    2fc99e0 View commit details
    Browse the repository at this point in the history
  4. Merge pull request btcsuite#2135 from SulaimanAminuBarkindo/improved-…

    …der-signature-validation
    
    Add check for maximum signature length in ecdsa.ParseDERSignature
    Roasbeef authored Mar 18, 2024
    Configuration menu
    Copy the full SHA
    a90d3d9 View commit details
    Browse the repository at this point in the history
  5. Merge pull request btcsuite#2136 from Roasbeef/btcd-24-0-2-rc1

    build: bump version to v0.24.2-beta.rc1
    Roasbeef authored Mar 18, 2024
    Configuration menu
    Copy the full SHA
    8b2f43e View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2024

  1. wire: add method TxID to MsgTx

    This commit adds a method to MsgTx called TxID. This method returns the
    transaction ID (txid) of the subject transaction.
    ffranr committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    2a225e9 View commit details
    Browse the repository at this point in the history
  2. Merge pull request btcsuite#2055 from ffranr/add-msgtx-txid

    wire: add method TxID to MsgTx
    guggero authored Mar 25, 2024
    Configuration menu
    Copy the full SHA
    e39d2eb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    75fe7e4 View commit details
    Browse the repository at this point in the history
  4. fix typos (btcsuite#2100)

    mattn authored Mar 25, 2024
    Configuration menu
    Copy the full SHA
    3cb9f60 View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2024

  1. Configuration menu
    Copy the full SHA
    6ae24a0 View commit details
    Browse the repository at this point in the history
  2. Merge pull request btcsuite#2091 from zhiqiangxu/rm_trailing_continue

    chore: remove trailing continue
    guggero authored Mar 26, 2024
    Configuration menu
    Copy the full SHA
    429d00f View commit details
    Browse the repository at this point in the history
  3. Merge pull request btcsuite#1991 from ffranr/add-json-support

    Convert `witnessToHex` into a method `ToHexStrings` on `TxWitness`
    guggero authored Mar 26, 2024
    Configuration menu
    Copy the full SHA
    a03259b View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2024

  1. btcclient+btcjson: feeRate to BTC/kvB

    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.
    YusukeShimizu committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    bbb6967 View commit details
    Browse the repository at this point in the history
  2. btcclient+btcjson: add type alias for BTC/kvB

    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.
    YusukeShimizu committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    80b27f5 View commit details
    Browse the repository at this point in the history
  3. chore: fix some comments (btcsuite#2146)

    Signed-off-by: xiaoxiangxianzi <zhaoyizheng@outlook.com>
    xiaoxiangxianzi authored Mar 27, 2024
    Configuration menu
    Copy the full SHA
    95330bc View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2024

  1. chore: fix typos

    xiaoxianBoy committed Mar 29, 2024
    Configuration menu
    Copy the full SHA
    9851d96 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2024

  1. Configuration menu
    Copy the full SHA
    31647e4 View commit details
    Browse the repository at this point in the history
  2. btcec: add new type SerializedKey

    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.
    ffranr committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    665eeb5 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2024

  1. Merge pull request btcsuite#2142 from YusukeShimizu/feeRate-BTCkvB

    btcclient+btcjson: defaultMaxFeeRate to BTC/kvB
    Roasbeef authored Apr 3, 2024
    Configuration menu
    Copy the full SHA
    ae55336 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2024

  1. blockchain: add Equals method to blockNode

    Helper function for the added IsAncestor in the follow up commit.
    Returns true if all the fields (except for parent and ancestor) are
    equal.
    kcalvinalvin committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    c9c8795 View commit details
    Browse the repository at this point in the history
  2. blockchain: Add IsAncestor method to blockNode

    IsAncestor() provides functionality for testing if a block node is
    an ancestor of anther block node.
    kcalvinalvin committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    bc6396d View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2024

  1. Merge pull request btcsuite#2150 from xiaoxianBoy/fix-typos

    chore: fix typos
    Roasbeef authored Apr 10, 2024
    Configuration menu
    Copy the full SHA
    92b24d2 View commit details
    Browse the repository at this point in the history
  2. Merge pull request btcsuite#2156 from ffranr/add-pubkey-serialized-type

    Add new serialized pubkey type
    Roasbeef authored Apr 10, 2024
    Configuration menu
    Copy the full SHA
    e4b32e0 View commit details
    Browse the repository at this point in the history
  3. Merge pull request btcsuite#2153 from kcalvinalvin/2024-04-02-add-is-…

    …ancestor
    
    blockchain: Add IsAncestor method to blockNode
    Roasbeef authored Apr 10, 2024
    Configuration menu
    Copy the full SHA
    5d50f7c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2f4ff84 View commit details
    Browse the repository at this point in the history
  5. chore: fix function names in comment (btcsuite#2163)

    Signed-off-by: goodfirm <fanyishang@yeah.net>
    goodfirm authored Apr 10, 2024
    Configuration menu
    Copy the full SHA
    9f93dc1 View commit details
    Browse the repository at this point in the history
  6. Update developer_resources.md (btcsuite#2158)

    fix btcutil link error
    youngxhui authored Apr 10, 2024
    Configuration menu
    Copy the full SHA
    64c9011 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    569155b View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2024

  1. blockchain, workmath: refactor functions to workmath package

    Some of the functions in difficulty.go are not dependent on any external
    functions and they are needed to introduce testing code for the
    invalidateblock and reconsiderblock methods that are to be added on in
    later commits. Having the workmath package let's us reuse the code and
    avoid dependency cycles.
    
    The existing functions that were exported already (HashToBig,
    CompactToBig, BigToCompact, CalcWork) are still kept in difficulty.go
    to avoid breaking external code that depends on those exported
    functions.
    kcalvinalvin committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    597b68c View commit details
    Browse the repository at this point in the history
  2. fullblocktests, testhelper: refactor out spendableOut

    spendableOut and the functions related to it are is moved to package
    testhelper and are exported.  This is done to make the code reusable
    without introducing an import cycle when the testing code for
    invalidateblock and reconsiderblock are added in follow up commits.
    kcalvinalvin committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    337d7f6 View commit details
    Browse the repository at this point in the history
  3. fullblocktests, testhelper: move solveBlock to testhelper

    solveBlock is moved to testhelper and is exported.  This is done so that
    the code can be reused without introducing import cycles.  The testing
    code to be added in alter commits for invalidateblock and reconsider
    block will use SolveBlock.
    kcalvinalvin committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    d4644df View commit details
    Browse the repository at this point in the history
  4. fullblocktests, testhelper: move opTrueScript and lowFee to testhelper

    The variables are moved to testhelper so that they can be reused in the
    blockchain package without introducing an import cycle.  The testing
    code for invalidateblock and reconsiderblock that will be added in later
    commits will be using these variables.
    kcalvinalvin committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    62790ac View commit details
    Browse the repository at this point in the history
  5. fullblocktests, testhelper: move uniqueOpReturnScript to testhelper

    uniqueOpReturnScript is moved to testhelper and is exported so that the
    code and be reused in package blockchain without introducing import
    cycles.  The test code for invalidateblock and reconsiderblock that are
    gonna be added in later commits uses the functions.
    kcalvinalvin committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    9093243 View commit details
    Browse the repository at this point in the history
  6. fullblocktests, testhelper: move standardCoinbaseScript to testhelper

    standardCoinbaseScript is moved to testhelper and is exported.  This
    allows test code in package blockchain to reuse the code without
    introducing an import cycle.  This code is used in the testing code
    for invalidateblock and reconsiderblock that's added in the later
    commits.
    kcalvinalvin committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    59c7d10 View commit details
    Browse the repository at this point in the history
  7. fullblocktests, testhelper: move createCoinbaseTx to testhelper

    createCoinbaseTx's code is refactored out and placed in testhelper
    package and is exported so that callers in package blockchain can reuse
    the code without introducing import cycles.  The test code for
    invalidateblock and reconsiderblock that'll be added in later commits
    make use of this code.
    kcalvinalvin committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    8ab27b9 View commit details
    Browse the repository at this point in the history
  8. fullblocktests, testhelper: move createSpendTx to testhelper

    createSpendTx is moved to testhelper so that the function can be used
    for callers in package blockchain without introducing import cycles.
    The test code for invalidateblock and reconsiderblock that are going to
    be added in later commits make use of this code.
    kcalvinalvin committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    5df1437 View commit details
    Browse the repository at this point in the history
  9. blockchain: add block generating functions in test code

    The block generating functions here allow for a test to create mock
    blocks.  This is useful for testing invalidateblock and reconsiderblock
    methods on blockchain that will be added in later commits.
    kcalvinalvin committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    ea39fe0 View commit details
    Browse the repository at this point in the history
  10. release: add darwin-arm64 to target binaries (btcsuite#2173)

    All currently released Apple computers have arm architecture and it's
    good to release something native for these computers.
    kcalvinalvin authored Apr 22, 2024
    Configuration menu
    Copy the full SHA
    f93f850 View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2024

  1. chaincfg: update dnsseeds (btcsuite#2174)

    * chaincfg: remove unresponsive dnsseed on testnet
    
    testnet-seed.bitcoin.schildbach.de is unresponsive and doesn't return
    any ips.  Bitcoin Core has already removed it and we don't also be
    getting rid of it as well.
    
    * chaincfg: add dnsseeds from Sjors Provoost
    
    His seeds work well and we don't have any for signet and it's good to
    replace the lost dns seed on testnet.
    
    * chaincfg: remove bad dnsseed (seed.bitcoinstats.com)
    
    seed.bitcoinstats.com doesn't respect filter requests even though it's
    advertised as it does. Plus it often returns nodes that are unreachable.
    In my testing over the past week, it's been the most unreliable dns seed
    and since we have plenty of mainnet seeds, it's better to do away with
    this.
    
    I documented my findings for this in a Bitcoin Core issue:
    bitcoin/bitcoin#29911
    
    * chaincfg: add dnsseed from wiz
    
    It's the same infrastructure that mempool . space runs on and has been
    reliable.  The same seed is also included in Bitcoin Core as well.
    kcalvinalvin authored Apr 23, 2024
    Configuration menu
    Copy the full SHA
    f1bded4 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2024

  1. chore: fix some typos in comments (btcsuite#2164)

    Signed-off-by: oftenoccur <ezc5@sina.com>
    oftenoccur authored Apr 26, 2024
    Configuration menu
    Copy the full SHA
    126b0ec View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2024

  1. chore: fix some function names (btcsuite#2180)

    Signed-off-by: MarkDaveny <peicuiping@aliyun.com>
    MarkDaveny authored Apr 29, 2024
    Configuration menu
    Copy the full SHA
    6b197d3 View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2024

  1. blockchain: Add InvalidateBlock() method to BlockChain

    InvalidateBlock() invalidates a given block and marks all its
    descendents as invalid as well. The active chain tip changes if the
    invalidated block is part of the best chain.
    kcalvinalvin committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    635ae68 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2024

  1. Configuration menu
    Copy the full SHA
    689ac6b View commit details
    Browse the repository at this point in the history
  2. main: add logging if the node is pruned

    For debug purposes down the road, log that the node is pruned if it's
    set to pruned.
    kcalvinalvin committed May 1, 2024
    Configuration menu
    Copy the full SHA
    d65999e View commit details
    Browse the repository at this point in the history

Commits on May 13, 2024

  1. btcutil/bech32: Added DecodeNoLimitWithVersion

    This exposes publicly the ability to decode arbitrary-length bech32
    strings and return the bech32 version that was used in the encoding. It
    provides the underlying functionality for both DecodeNoLimit and
    DecodeGeneric.
    MarcoEzekiel committed May 13, 2024
    Configuration menu
    Copy the full SHA
    2492b01 View commit details
    Browse the repository at this point in the history

Commits on May 21, 2024

  1. Configuration menu
    Copy the full SHA
    04469e6 View commit details
    Browse the repository at this point in the history
  2. mempool: make txn's below 65 non-witness bytes non-standard

    This is to mitigate CVE-2017-12842. Along the way, also error when
    deserializing transactions that have the witness marker flag set
    but have no witnesses. This matches Bitcoin Core's behaviour initially
    introduced here bitcoin/bitcoin#14039. Allowing
    such transactions is benign, but this makes sure that our parsing code
    matches Core's exactly.
    ProofOfKeags committed May 21, 2024
    Configuration menu
    Copy the full SHA
    da2f3b1 View commit details
    Browse the repository at this point in the history
  3. Merge pull request btcsuite#2178 from ProofOfKeags/standardness-cleanup

    Update standardness rules congruent to Bitcoin Core
    Roasbeef authored May 21, 2024
    Configuration menu
    Copy the full SHA
    c4ed92f View commit details
    Browse the repository at this point in the history

Commits on May 22, 2024

  1. Merge pull request btcsuite#2182 from kcalvinalvin/2024-05-01-fix-logs

    blockchain, main: add and fix logs
    Roasbeef authored May 22, 2024
    Configuration menu
    Copy the full SHA
    b039ee6 View commit details
    Browse the repository at this point in the history
  2. Merge pull request btcsuite#2155 from kcalvinalvin/2024-04-02-invalid…

    …ate-block
    
    blockchain, fullblocktests, workmath, testhelper: add InvalidateBlock() method to BlockChain
    Roasbeef authored May 22, 2024
    Configuration menu
    Copy the full SHA
    c467725 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2024

  1. Merge pull request btcsuite#2186 from MarcoEzekiel/DecodeNoLimitVersi…

    …oned
    
    Added DecodeNoLimitGeneric to bech32.go
    guggero authored May 24, 2024
    Configuration menu
    Copy the full SHA
    d2d286f View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2024

  1. Configuration menu
    Copy the full SHA
    cccaa5f View commit details
    Browse the repository at this point in the history
  2. Merge pull request btcsuite#2062 from lilasxie/refactor/parsefloat

    refactor: set strconv.ParseFloat bitsize to 64
    guggero authored Jun 3, 2024
    Configuration menu
    Copy the full SHA
    de41825 View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2024

  1. blockchain: Refactor reorganizeChain to exclude verification

    reorganizeChain() used to handle the following:
    1: That the blocknodes being disconnected/connected indeed to connect
       properly without errors.
    2: Perform the actual disconnect/connect of the blocknodes.
    
    The functionality of 1, the validation that the disconnects/connects can
    happen without errors are now refactored out into
    verifyReorganizationValidity.
    
    This is an effort made so that ReconsiderBlock() can call
    verifyReorganizationValidity and set the block status of the
    reconsidered chain and return nil even when an error returns as it's ok
    to get an error when reconsidering an invalid branch.
    kcalvinalvin authored and Crypt-iQ committed Jun 7, 2024
    Configuration menu
    Copy the full SHA
    eabc9bf View commit details
    Browse the repository at this point in the history
  2. blockchain: Add ReconsiderBlock to BlockChain

    ReconsiderBlock reconsiders the validity of the block for the passed
    in blockhash. The behavior of the function mimics that of Bitcoin Core.
    
    The invalid status of the block nodes are reset and if the chaintip that
    is being reconsidered has more cumulative work, then we'll validate the
    blocks and reorganize to it. If the cumulative work is lesser than the
    current active chain tip, then nothing else will be done.
    kcalvinalvin authored and Crypt-iQ committed Jun 7, 2024
    Configuration menu
    Copy the full SHA
    52a8a2a View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2024

  1. fix: typo (btcsuite#2184)

    yosuzzy authored Jun 19, 2024
    Configuration menu
    Copy the full SHA
    588b2e5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    976cbeb View commit details
    Browse the repository at this point in the history
  3. Fix struct names (btcsuite#2169)

    Signed-off-by: coderwander <770732124@qq.com>
    coderwander authored Jun 19, 2024
    Configuration menu
    Copy the full SHA
    11bd614 View commit details
    Browse the repository at this point in the history
  4. Merge pull request btcsuite#2196 from Crypt-iQ/2181_eugene

    blockchain: Add ReconsiderBlock()
    Roasbeef authored Jun 19, 2024
    Configuration menu
    Copy the full SHA
    cd5e5ba View commit details
    Browse the repository at this point in the history
  5. rpcclient, integration: Add invalidateblock and reconsiderblock

    invalidateblock and reconsiderblock are added to the rpcclient package
    and an integration test is added to test the added functions.
    kcalvinalvin authored and Crypt-iQ committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    1cb4d3a View commit details
    Browse the repository at this point in the history
  6. main: Add invalidateblock and reconsiderblock rpc commands

    The rpc calls and the rpchelp is added for the invalidateblock
    and reconsiderblock methods on BlockChain.
    kcalvinalvin authored and Crypt-iQ committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    0aa80ea View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2024

  1. Merge pull request btcsuite#2197 from Crypt-iQ/2183_eugene

    main, rpcclient, integration: add rpccalls for invalidate and reconsiderblock
    Roasbeef authored Jun 20, 2024
    Configuration menu
    Copy the full SHA
    93e7291 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cc4b27c View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2024

  1. Merge pull request btcsuite#2201 from Roasbeef/v-0-24-2

    build: bump version to v0.24.2-beta
    guggero authored Jun 21, 2024
    Configuration menu
    Copy the full SHA
    f6db48a View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2024

  1. merge master 6-24-24

    gitteri committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    36bc15a View commit details
    Browse the repository at this point in the history