Commit Graph

2963 Commits

Author SHA1 Message Date
pasta
5bf0409eba
Merge #6300: backport: Merge bitcoin#23642, 22794, 23316, 24365, gui#517, 24219, 23253, 24449, 22543
3931608858 Merge bitcoin/bitcoin#22543: test: Use MiniWallet in mempool_limit.py (merge-script)
f147373a32 Merge bitcoin/bitcoin#24449: fuzz: FuzzedFileProvider::write should not return negative value (MarcoFalke)
2a2a2693d0 Merge bitcoin/bitcoin#23253: bitcoin-tx: Reject non-integral and out of range int strings (W. J. van der Laan)
11eeae2ab9 Merge bitcoin/bitcoin#24219: Fix implicit-integer-sign-change in bloom (MarcoFalke)
f16265dd50 Merge bitcoin-core/gui#517: refactor, qt: Use std::chrono for parameters of QTimer methods (Hennadii Stepanov)
b212ca0515 Merge bitcoin/bitcoin#24365: wallet: Don't generate keys for wallets with private keys disabled during upgradewallet (laanwj)
66e77f7879 Merge bitcoin/bitcoin#23316: test: make the node param explicit in init_wallet() (MarcoFalke)
995cae46af Merge bitcoin/bitcoin#22794: test: Verify if wallet is compiled in rpc_invalid_address_message.py test (MarcoFalke)
61a0140362 Merge bitcoin/bitcoin#23642: refactor: Call type-solver earlier in decodescript (MarcoFalke)

Pull request description:

  Bitcoin Backports

ACKs for top commit:
  UdjinM6:
    utACK 3931608858
  PastaPastaPasta:
    utACK 3931608858

Tree-SHA512: 38f384776002e8014b2510aeaf1f4655fea0531011eb326eb2ab546d9e7193ad9e5c4b570d9831f88bb696e06ded04259a21ddb750d7ffedfedebdbb9a951379
2024-12-16 21:01:12 -06:00
Kittywhiskers Van Gogh
16c2e13fb4
test: add functional tests for coinjoinsalt RPC 2024-12-16 08:33:23 +00:00
Kittywhiskers Van Gogh
a1b256b06f
test: extend CoinJoin RPC tests to include more cases, add logging 2024-12-16 08:33:22 +00:00
Kittywhiskers Van Gogh
c6dd3dd567
test: rename test functions to reflect RPC used, simplify them 2024-12-16 08:31:27 +00:00
Kittywhiskers Van Gogh
ff29c62103
test: run CoinJoin RPC tests using blank wallet 2024-12-16 08:31:27 +00:00
pasta
3d5dc160d8
Merge #6462: backport: merge bitcoin#23092, #23005, #24704, #24391, #25338, #25422, #25493, #26826, #26814, #26832, #27418, partial bitcoin#27254 (compat backports)
Some checks failed
Guix Build / build-image (push) Failing after 6m2s
Guix Build / build (aarch64-linux-gnu) (push) Has been skipped
Guix Build / build (arm-linux-gnueabihf) (push) Has been skipped
Guix Build / build (arm64-apple-darwin) (push) Has been skipped
Guix Build / build (powerpc64-linux-gnu) (push) Has been skipped
Guix Build / build (riscv64-linux-gnu) (push) Has been skipped
Guix Build / build (x86_64-apple-darwin) (push) Has been skipped
Guix Build / build (x86_64-linux-gnu) (push) Has been skipped
Guix Build / build (x86_64-w64-mingw32) (push) Has been skipped
Check Merge Fast-Forward Only / check_merge (push) Successful in 1m49s
Label Merge Conflicts / main (push) Failing after 40s
CI / Build Image (push) Failing after 15m29s
CI / Build Dependencies (arm-linux, arm-linux-gnueabihf) (push) Has been cancelled
CI / Build Dependencies (linux64, x86_64-pc-linux-gnu) (push) Has been cancelled
CI / Build (arm-linux, arm-linux, arm-linux-gnueabihf) (push) Has been cancelled
CI / Build (linux64, linux64, x86_64-pc-linux-gnu) (push) Has been cancelled
CI / Build (linux64_cxx20, linux64, x86_64-pc-linux-gnu) (push) Has been cancelled
CI / Build (linux64_fuzz, linux64, x86_64-pc-linux-gnu) (push) Has been cancelled
CI / Build (linux64_nowallet, linux64, x86_64-pc-linux-gnu) (push) Has been cancelled
CI / Build (linux64_sqlite, linux64, x86_64-pc-linux-gnu) (push) Has been cancelled
CI / Build (linux64_tsan, linux64, x86_64-pc-linux-gnu) (push) Has been cancelled
CI / Build (linux64_ubsan, linux64, x86_64-pc-linux-gnu) (push) Has been cancelled
2ab561d281 partial bitcoin#27254: Extract util/fs from util/system (Kittywhiskers Van Gogh)
280988bee3 merge bitcoin#27418: Remove windows workaround in authproxy (Kittywhiskers Van Gogh)
a497df0339 merge bitcoin#26832: move (win) S_* defines into bdb (Kittywhiskers Van Gogh)
db676a7e5f merge bitcoin#26814: remove windows-only compat.h usage in random (Kittywhiskers Van Gogh)
94e6637c33 merge bitcoin#26826: remove windows-only compat.h usage in randomenv (Kittywhiskers Van Gogh)
bbb0cceb7a merge bitcoin#25493: document code in compat.h (Kittywhiskers Van Gogh)
3f143096c8 merge bitcoin#25422: globally define NOMINMAX when building with mingw-w64 (Kittywhiskers Van Gogh)
000495df8e merge bitcoin#25338: Avoid incompatibility with CMake AUTOUIC feature (Kittywhiskers Van Gogh)
714ea55dbe build: migrate stacktrace-related flags to `DEBUG_`{`C`,`CXX`}`FLAGS` (Kittywhiskers Van Gogh)
11323c3851 merge bitcoin#24391: stop overriding user autoconf flags (Kittywhiskers Van Gogh)
548121d366 merge bitcoin#24704: remove strnlen back-compat code (Kittywhiskers Van Gogh)
b65038ec94 merge bitcoin#23005: Delay wallet client construction (Kittywhiskers Van Gogh)
f3b065cd9c merge bitcoin#23092: Remove Windows workaround in authproxy (WinError 10053) (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * This PR originally included [bitcoin#27378](https://github.com/bitcoin/bitcoin/pull/27378) but including it caused multiple tests to fail ([build](https://gitlab.com/dashpay/dash/-/jobs/8577987174#L2224)), even after adjusting `timeout`. It has been omitted instead.

    <details>

    <summary>Test failures:</summary>

    ```
    feature_abortnode.py                               |   Failed  | 201 s
    feature_dip3_v19.py                                |   Failed  | 237 s
    feature_llmq_rotation.py                           |   Failed  | 54 s
    p2p_invalid_messages.py                            |   Failed  | 5 s
    rpc_bind.py --nonloopback                          |   Failed  | 63 s
    wallet_multiwallet.py --descriptors                |   Failed  | 79 s
    wallet_multiwallet.py --legacy-wallet              |   Failed  | 89 s

    ALL                                                |   Failed  | 8540 s (accumulated)
    ```

    </details>

    <details>

    <summary>feature_abortnode.py failure:</summary>

    ```
    dash@107cfae2b2b5:/src/dash$ ./test/functional/feature_abortnode.py
    2024-12-09T18:31:01.776000Z TestFramework (INFO): PRNG seed is: 6843309100291447752
    2024-12-09T18:31:01.776000Z TestFramework (INFO): Initializing test directory /tmp/dash_func_test_fcijb99n
    2024-12-09T18:31:02.802000Z TestFramework (INFO): Waiting for crash
    2024-12-09T18:34:23.026000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
        def is_node_stopped(self):
            """Checks whether the node has stopped.

            Returns True if the node has stopped. False otherwise.
            This method is responsible for freeing resources (self.process)."""
            if not self.running:
                return True
            return_code = self.process.poll()
            if return_code is None:
                return False

            # process has stopped. Assert that it didn't return an error code.
            assert return_code == 0, self._node_msg(
                "Node returned non-zero exit code (%d) when stopping" % return_code)
            self.running = False
            self.process = None
            self.rpc_connected = False
            self.rpc = None
            self.log.debug("Node stopped")
            return True
    '''
    2024-12-09T18:34:23.027000Z TestFramework (ERROR): Assertion failed
    Traceback (most recent call last):
      File "/src/dash/test/functional/test_framework/test_framework.py", line 161, in main
        self.run_test()
      File "/src/dash/./test/functional/feature_abortnode.py", line 44, in run_test
        self.nodes[0].wait_until_stopped(timeout=200)
      File "/src/dash/test/functional/test_framework/test_node.py", line 414, in wait_until_stopped
        wait_until_helper(self.is_node_stopped, timeout=timeout, timeout_factor=self.timeout_factor)
      File "/src/dash/test/functional/test_framework/util.py", line 287, in wait_until_helper
        raise AssertionError("Predicate {} not true after {} seconds".format(predicate_source, timeout))
    AssertionError: Predicate ''''
        def is_node_stopped(self):
            """Checks whether the node has stopped.

            Returns True if the node has stopped. False otherwise.
            This method is responsible for freeing resources (self.process)."""
            if not self.running:
                return True
            return_code = self.process.poll()
            if return_code is None:
                return False

            # process has stopped. Assert that it didn't return an error code.
            assert return_code == 0, self._node_msg(
                "Node returned non-zero exit code (%d) when stopping" % return_code)
            self.running = False
            self.process = None
            self.rpc_connected = False
            self.rpc = None
            self.log.debug("Node stopped")
            return True
    ''' not true after 200.0 seconds
    2024-12-09T18:34:23.530000Z TestFramework (INFO): Stopping nodes
    2024-12-09T18:34:23.530000Z TestFramework (ERROR): Unexpected exception caught during shutdown
    Traceback (most recent call last):
      File "/src/dash/test/functional/test_framework/test_framework.py", line 341, in shutdown
        self.stop_nodes()
      File "/src/dash/test/functional/test_framework/test_framework.py", line 673, in stop_nodes
        node.stop_node(expected_stderr=expected_stderr, wait=wait, wait_until_stopped=False)
      File "/src/dash/test/functional/test_framework/test_node.py", line 368, in stop_node
        self.stop(wait=wait)
      File "/src/dash/test/functional/test_framework/coverage.py", line 49, in __call__
        return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
      File "/src/dash/test/functional/test_framework/authproxy.py", line 124, in __call__
        response, status = self._request('POST', self.__url.path, postdata.encode('utf-8'))
      File "/src/dash/test/functional/test_framework/authproxy.py", line 103, in _request
        return self._get_response()
      File "/src/dash/test/functional/test_framework/authproxy.py", line 162, in _get_response
        raise JSONRPCException(
    test_framework.authproxy.JSONRPCException: non-JSON HTTP response with '503 Service Unavailable' from server (-342)
    2024-12-09T18:34:23.531000Z TestFramework (WARNING): Not cleaning up dir /tmp/dash_func_test_fcijb99n
    2024-12-09T18:34:23.531000Z TestFramework (ERROR): Test failed. Test logging available at /tmp/dash_func_test_fcijb99n/test_framework.log
    2024-12-09T18:34:23.531000Z TestFramework (ERROR):
    2024-12-09T18:34:23.531000Z TestFramework (ERROR): Hint: Call /src/dash/test/functional/combine_logs.py '/tmp/dash_func_test_fcijb99n' to consolidate all logs
    2024-12-09T18:34:23.531000Z TestFramework (ERROR):
    2024-12-09T18:34:23.531000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
    2024-12-09T18:34:23.531000Z TestFramework (ERROR): https://github.com/dashpay/dash/issues
    2024-12-09T18:34:23.531000Z TestFramework (ERROR):
    [node 1] Cleaning up leftover process
    [node 0] Cleaning up leftover process
    ```

    </details>

  * [bitcoin#27254](https://github.com/bitcoin/bitcoin/pull/27254) has been partially backported to include a missing header to allow it to build.

    <details>

    <summary>Compile error:</summary>

    ```
    In file included from ./util/system.h:19,
                   from util/system.cpp:7:
    ./compat/assumptions.h:49:22: error: 'size_t' was not declared in this scope; did you mean 'std::size_t'?
       49 | static_assert(sizeof(size_t) == 4 || sizeof(size_t) == 8, "size_t assumed to be 32-bit or 64-bit");
          |                      ^~~~~~
          |                      std::size_t
    In file included from /usr/include/c++/11/limits:42,
                   from ./compat/assumptions.h:11,
                   from ./util/system.h:19,
                   from util/system.cpp:7:
    /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h:280:33: note: 'std::size_t' declared here
      280 |   typedef __SIZE_TYPE__         size_t;
          |                                 ^~~~~~
    ```

    </details>

  * ~~GitLab job failures as of 2339ae6459cad77d94795c0e92ba3f3fe31c485a, for `linux64-build` ([source](https://gitlab.com/dashpay/dash/-/jobs/8590291130#L4621)), `linux64_cxx20-build` ([source](https://gitlab.com/dashpay/dash/-/jobs/8590291134#L3497)) and `linux64_sqlite-build` ([source](https://gitlab.com/dashpay/dash/-/jobs/8590291137#L3489)) are not related to failures in compilation or unit tests but are to do with reaching the artifact limit.~~ Resolved with [dash#6487](https://github.com/dashpay/dash/pull/6487), thanks Udjin!

  ## Breaking Changes

  None expected.

  ## Checklist

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation **(note: N/A)**
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    utACK 2ab561d281
  PastaPastaPasta:
    utACK 2ab561d281

Tree-SHA512: 6d05305f17fd607ed93b4a2e00de195a96bde1a34bedf04f6dd84892dc71028ae71590fa5063026ec7ff728d6e411af410c363b4a88947ce6e5999d4431bb29b
2024-12-15 12:30:54 -06:00
pasta
032fc21198
Merge #6479: feat: enable coverage linter for functional tests
2e509b96c4 fix: add a workaround for RPC getmerkleblocks, debug, coinjoinsalt, voteraw (Konstantin Akimov)
f0decc8790 feat: add unit test for ClearDiscouraged (Konstantin Akimov)
865b24ea00 feat: hide cleardiscouraged RPC so far as it no intent to use by regular users (Konstantin Akimov)
1f5fa7e7cf feat: enable linter coverage for functional tests (Konstantin Akimov)
59ddac5656 feat: hide deprecated RPC from help and add TODOes to remove them (Konstantin Akimov)
05732aceaf feat: implement functional tests for RPC getblockheaders (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  https://github.com/dashpay/dash-issues/issues/63

  ## What was done?
  Add functional tests for `getblockheaders`
  Hide RPC `cleardiscouraged` (as it is used only for functional tests) and RPC `getpoolinfo` (deprecated long time ago)
  Add a workaround to ignore these RPCs `getmerkleblocks`, `voteraw`, `debug`, `coinjoinsalt` at the moment
  Enables linter for coverage

  ## How Has This Been Tested?
  Run locally with `test/functional/test_runner.py -j20 --previous-releases --coverage --extended`
  Enabled in CI

  ## Breaking Changes
  N/A if hidding `cleardiscouraged` is not a breaking change.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

ACKs for top commit:
  UdjinM6:
    LGTM, utACK 2e509b96c4
  PastaPastaPasta:
    utACK 2e509b96c4

Tree-SHA512: bb31465d9a71ef824533d9310393d89293c87c7407ec3e37697f6d36dc6c010381a6e0408f9598354e610d51ef662485d8a653cc0e198842e2198ac1c30c90f1
2024-12-15 12:12:40 -06:00
Kittywhiskers Van Gogh
280988bee3
merge bitcoin#27418: Remove windows workaround in authproxy 2024-12-15 09:08:55 +00:00
Kittywhiskers Van Gogh
f3b065cd9c
merge bitcoin#23092: Remove Windows workaround in authproxy (WinError 10053) 2024-12-15 09:08:21 +00:00
pasta
e2095bd68a
Merge #6488: backport: merge bitcoin#27452, #29347, #29356, #29353, #29452, #29483, #30545, #31383 (BIP324 backports: part 5)
c6f23a718c merge bitcoin#31383: Add missing node.setmocktime(self.mocktime) to p2p_ibd_stalling.py (Kittywhiskers Van Gogh)
9072a10754 merge bitcoin#30545: fix intermittent failures in feature_proxy.py (Kittywhiskers Van Gogh)
7e2d435e35 merge bitcoin#29483: add --v1transport option, add --v2transport to a CI task (Kittywhiskers Van Gogh)
7e59a965f8 merge bitcoin#29452: document that BIP324 on by default (Kittywhiskers Van Gogh)
0f3b5e081e merge bitcoin#29353: adhere to typical VERSION message protocol flow (Kittywhiskers Van Gogh)
dfdddfd2ff rpc: enable `v2transport` for `masternode connect` when capable (Kittywhiskers Van Gogh)
3c1636174b merge bitcoin#29356: make v2transport arg in addconnection mandatory and few cleanups (Kittywhiskers Van Gogh)
c53cd93aee merge bitcoin#29347: enable v2transport by default (Kittywhiskers Van Gogh)
7dcf561306 merge bitcoin#27452: cover addrv2 anchors by adding TorV3 to CAddress in messages.py (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * When backporting [bitcoin#27452](https://github.com/bitcoin/bitcoin/pull/27452) in `feature_anchors.py`, `P2P_SERVICES` (`NODE_NETWORK | NODE_HEADERS_COMPRESSED`) has been replaced with `NODE_NETWORK` as the former evaluates to a value greater than `256` (specifically `2049`), which causes test failure. The replacement value is acceptable as `NODE_NETWORK` is the desired service flag expected by Dash Core ([source](779e4295ad/src/protocol.cpp (L249-L254))).

    <details>

    <summary>Test failure:</summary>

    ```
    dash@89afd55ae77e:/src/dash$ ./test/functional/feature_anchors.py
    2024-12-14T12:31:22.244000Z TestFramework (INFO): PRNG seed is: 8365703189892653614
    2024-12-14T12:31:22.244000Z TestFramework (INFO): Initializing test directory /tmp/dash_func_test_j0ya02yu
    2024-12-14T12:31:22.776000Z TestFramework (INFO): When node starts, check if anchors.dat doesn't exist
    2024-12-14T12:31:22.776000Z TestFramework (INFO): Add 2 block-relay-only connections to node
    2024-12-14T12:31:24.781000Z TestFramework (INFO): Add 5 inbound connections to node
    2024-12-14T12:31:29.843000Z TestFramework (INFO): Check node connections
    2024-12-14T12:31:30.848000Z TestFramework (INFO): Check the addresses in anchors.dat
    2024-12-14T12:31:30.848000Z TestFramework (INFO): Perturb anchors.dat to test it doesn't throw an error during initialization
    2024-12-14T12:31:31.356000Z TestFramework (INFO): When node starts, check if anchors.dat doesn't exist anymore
    2024-12-14T12:31:31.357000Z TestFramework (INFO): Ensure addrv2 support
    2024-12-14T12:31:32.364000Z TestFramework (INFO): Add 256-bit-address block-relay-only connections to node
    2024-12-14T12:31:33.368000Z TestFramework (INFO): Check for addrv2 addresses in anchors.dat
    2024-12-14T12:31:33.369000Z TestFramework (ERROR): Unexpected exception caught during testing
    Traceback (most recent call last):
      File "/src/dash/test/functional/test_framework/test_framework.py", line 161, in main
        self.run_test()
      File "/src/dash/./test/functional/feature_anchors.py", line 135, in run_test
        new_data[services_index] = P2P_SERVICES
    ValueError: byte must be in range(0, 256)
    2024-12-14T12:31:33.870000Z TestFramework (INFO): Stopping nodes
    2024-12-14T12:31:33.871000Z TestFramework (WARNING): Not cleaning up dir /tmp/dash_func_test_j0ya02yu
    2024-12-14T12:31:33.871000Z TestFramework (ERROR): Test failed. Test logging available at /tmp/dash_func_test_j0ya02yu/test_framework.log
    ```

    </details>

  ## Breaking Changes

  None expected.

  ## Checklist:

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    utACK c6f23a718c
  PastaPastaPasta:
    utACK c6f23a718c81b7c574ba3fecbe52f342eda35a46;

Tree-SHA512: ca134432d000d521827a20c75c03913421fe52a31fda1cbf632e0b207c31728406feb090469d592d8e2fd8d64298faa2752ff703de79f737a62c276c6a231097
2024-12-14 19:41:06 -06:00
pasta
f656c51979
Merge #6481: test: actually use masternode with basic bls pubkey in mnauth test
ec00c372c7 test: fix off-by-one in dynamically_add_masternode (UdjinM6)
6519856344 test: don't add legacy bls mn on start (UdjinM6)
3db20e3ed4 test: actually use masternode with basic bls pubkey in mnauth test (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  `rpc_manuth` is failing in ~50% cases locally because we still use legacy pubkeys (not in 100% cases because sometimes they look like basic ones). In CI it fails too but we retry failed tests a few times so it's less noticeable. Example of "unlucky" tests: https://gitlab.com/dashpay/dash/-/jobs/8613271300#L1867.

  #6467 follow-up

  ## What was done?
  Add another masternode after v19 activaition to actually use basic bls pubkey

  ## How Has This Been Tested?
  run tests

  ## Breaking Changes
  n/a

  ## Checklist:
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  knst:
    utACK ec00c372c7
  PastaPastaPasta:
    utACK ec00c372c7

Tree-SHA512: 850a02ea1bd943762cdb0be706f3703742944c294ee9603b1f9ab95a6b10fb827bc9376e03333177d956b2c13df7384cfe0eb2ffef4d05ff3ec239caa8318d24
2024-12-14 12:11:42 -06:00
Kittywhiskers Van Gogh
c6f23a718c
merge bitcoin#31383: Add missing node.setmocktime(self.mocktime) to p2p_ibd_stalling.py 2024-12-14 12:00:52 +00:00
Kittywhiskers Van Gogh
9072a10754
merge bitcoin#30545: fix intermittent failures in feature_proxy.py 2024-12-14 12:00:51 +00:00
Kittywhiskers Van Gogh
7e2d435e35
merge bitcoin#29483: add --v1transport option, add --v2transport to a CI task 2024-12-14 12:00:51 +00:00
Kittywhiskers Van Gogh
0f3b5e081e
merge bitcoin#29353: adhere to typical VERSION message protocol flow 2024-12-14 12:00:51 +00:00
Kittywhiskers Van Gogh
3c1636174b
merge bitcoin#29356: make v2transport arg in addconnection mandatory and few cleanups 2024-12-14 12:00:51 +00:00
Kittywhiskers Van Gogh
c53cd93aee
merge bitcoin#29347: enable v2transport by default 2024-12-14 12:00:51 +00:00
Kittywhiskers Van Gogh
7dcf561306
merge bitcoin#27452: cover addrv2 anchors by adding TorV3 to CAddress in messages.py 2024-12-14 12:00:50 +00:00
Konstantin Akimov
2e509b96c4
fix: add a workaround for RPC getmerkleblocks, debug, coinjoinsalt, voteraw
We indeed doesn't have functional tests for them yet, but this linter will help to avoid
adding new RPCs without tests
2024-12-13 21:19:11 +07:00
Konstantin Akimov
05732aceaf
feat: implement functional tests for RPC getblockheaders 2024-12-13 21:19:11 +07:00
UdjinM6
ec00c372c7
test: fix off-by-one in dynamically_add_masternode 2024-12-12 13:31:14 +03:00
UdjinM6
6519856344
test: don't add legacy bls mn on start 2024-12-12 13:30:17 +03:00
UdjinM6
3db20e3ed4
test: actually use masternode with basic bls pubkey in mnauth test 2024-12-12 00:28:19 +03:00
pasta
c07073da16
Merge #6445: test: add tests for listunspent with coinType option
f3be9bcb95 test: add tests for `listunspent` with `coinType` option (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  extend tests a bit

  ## What was done?

  ## How Has This Been Tested?

  ## Breaking Changes

  ## Checklist:
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  PastaPastaPasta:
    utACK f3be9bcb95

Tree-SHA512: 3f063011224880fee35edb04ce265dff33a52273c3d45ef1dbcebcecb22c25d8ad7c91b83514f36142716a6fbd0ddd3a8a3f2a9b59ce78ce975bbce69a2a13b5
2024-12-11 15:14:12 -06:00
pasta
1140e4358b
Merge #6466: backport: merge bitcoin#18642, #25102, #25100, #25157, #25101, #25245, #25456, #24697, #24662, #25499 (clock backports)
e905ae0f4b merge bitcoin#25499: Use steady clock for all millis bench logging (Kittywhiskers Van Gogh)
492654db49 merge bitcoin#24662: Use system time instead of adjusted network time (Kittywhiskers Van Gogh)
bc3ec30144 merge bitcoin#24697: refactor address relay time (Kittywhiskers Van Gogh)
730cdf241a test: remove leftovers missed in bitcoin#25514 (dash#6097) (Kittywhiskers Van Gogh)
c7cb26ba05 merge bitcoin#25456: Use steady_clock for getrpcinfo durations (Kittywhiskers Van Gogh)
ea3c727e02 merge bitcoin#25245: Remove no-op TIME_INIT on deser (Kittywhiskers Van Gogh)
2d33cfba41 merge bitcoin#25101: Add mockable clock type (Kittywhiskers Van Gogh)
ccde10b914 merge bitcoin#25157: Fix -rpcwait with -netinfo returning negative time durations (Kittywhiskers Van Gogh)
484447cc86 merge bitcoin#25100: Switch scheduler to steady_clock (Kittywhiskers Van Gogh)
cc7d2b8d0a merge bitcoin#25102: Remove unused GetTimeSeconds (Kittywhiskers Van Gogh)
8f8e73242d net: use `GetTime<T>()` in leftover `GetTimeSeconds()` usage (Kittywhiskers Van Gogh)
b114718240 merge bitcoin#18642: Use std::chrono for the time to rotate destination of addr messages + tests (Kittywhiskers Van Gogh)

Pull request description:

  ## Breaking Changes

  None expected.

  ## Checklist

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation **(note: N/A)**
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  PastaPastaPasta:
    utACK e905ae0f4b
  UdjinM6:
    utACK e905ae0f4b

Tree-SHA512: 022b8fac41315726e622b887ef5f5f5d011c947048d144f6f54c7c596d9e90286b77ec6f91dfc9bdb60ecc21dfa791afe4aba3d97f962eb1e86cd750831275bd
2024-12-10 22:27:43 -06:00
pasta
977048fb09
Merge #6325: feat: start DIP0024 from block 1 - fire up test chains by first block - 7/n
906c2d79ba refactor: add annotation gsl::not_null for ConstructCreditPool (Konstantin Akimov)
f1905ca950 fix: intermittent missing of PoSe ban in feature_llmq_simplepose.py (Konstantin Akimov)
cf84dffc9f fix: bump time for all nodes during mine_quorum in feature_llmq_rotation.py test (Konstantin Akimov)
efd4701d30 fix: intermittent error for feature_llmq_simplepose due to rotating quorums (Konstantin Akimov)
2bafadfc34 feat: put DIP0024 activation to block 1 on RegTest (Konstantin Akimov)
632c4c4bcd feat: re-bury DIP0024 with new height when quorums actually appeared (Konstantin Akimov)
343c74b779 fix: intermittent error in feature_index_prune due to DKG influence (Konstantin Akimov)
de821b9b15 refactor: remove command line argument -bip147height, -dip8params (Konstantin Akimov)
d8ce0a74fa docs: updated comment for DIP0003 activation on RegTest (Konstantin Akimov)
4dafec870c fix: add check that DIP0003 activated before retrieving CbTx for CreditPool (Konstantin Akimov)
26e9813672 fix: assertion in Credit Pool validation during connecting blocks (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  This PR is 7th in the achieving ultimate goal to activate old forks from block 1.
  It helps to run unit and functional tests faster; it helps for platform's dev-environment to start faster.

  ## What was done?
  Prior work: #6187, #6189, #6214, #6225, #6269, #6275

  This PR:
   - simplify DIP0024 activation and activate it from block 1 at RegTest
   - removes command lines arguments: -bip147height, -dip8params
   - fixed intermittent errors in feature_index_prune.py and feature_llmq_simplepose.py
   - fix assertion crash on Regtest if using strange combination of -testactivationheight and -dip3params

  ## How Has This Been Tested?
  Run unit, functional tests.

  ## Breaking Changes
  [regtest only] -dip8params, -bip147height are removed.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

ACKs for top commit:
  UdjinM6:
    utACK 906c2d79ba
  PastaPastaPasta:
    utACK 906c2d79ba

Tree-SHA512: fab8a9bc03bb7f220c19dd952a03f8fec0b6ef1362d7308eb77c90e0ba814a241bb2bf36beccf78bb285ede1b6d85ec52fa19b3729ac9b643b420d13fbb63b47
2024-12-10 09:43:02 -06:00
pasta
b1a184e286
Merge #6463: test: small improvements in feature_governance.py
bbcc0169f1 test: small improvements in feature_governance.py (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  Make debugging test failures a bit easier by adding some more logs and ensuring vote propagation before moving any further.

  ## What was done?

  ## How Has This Been Tested?

  ## Breaking Changes

  ## Checklist:
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  PastaPastaPasta:
    utACK bbcc0169f1
  knst:
    utACK bbcc0169f1

Tree-SHA512: d4f7d7b560b1de849c30db598290af26d807a39b39a7532d2fe3d76c74c0d49ee294e4fac533a19a4a02dbf4f46d56f4b5e0116855a392fbbc992068cb17d38e
2024-12-10 09:08:01 -06:00
pasta
09058e0d71
feat: mnauth always use basic scheme
fixup: drop CChain from mnauth ProcessMessage
feat: let RPC mnauth to generate only BASIC bls messages and fixes for rpc_mnauth.py and p2p_quorum_data.py
refactor: drop unused ConstCBLSPublicKeyVersionWrapper
2024-12-09 14:36:49 -06:00
Konstantin Akimov
f1905ca950
fix: intermittent missing of PoSe ban in feature_llmq_simplepose.py 2024-12-09 13:44:54 +07:00
Konstantin Akimov
cf84dffc9f
fix: bump time for all nodes during mine_quorum in feature_llmq_rotation.py test 2024-12-09 13:44:54 +07:00
Kittywhiskers Van Gogh
b114718240
merge bitcoin#18642: Use std::chrono for the time to rotate destination of addr messages + tests 2024-12-08 15:23:26 +00:00
UdjinM6
bbcc0169f1
test: small improvements in feature_governance.py 2024-12-07 17:14:07 +03:00
merge-script
3931608858
Merge bitcoin/bitcoin#22543: test: Use MiniWallet in mempool_limit.py
08634e82c68ea1be79e1395f4f551082f497023f fix typos in logging messages (ShubhamPalriwala)
d447ded6babebe7c7948e585c9e78bf34dbef226 replace: self.nodes[0] with node (ShubhamPalriwala)
dddca3899c4738e512313a85aeb006310e34e31f test: use MiniWallet in mempool_limit.py (ShubhamPalriwala)

Pull request description:

  This is a PR proposed in #20078

  This PR enables running another non-wallet functional test even when the wallet is disabled thanks to the MiniWallet, i.e. it can be run even when bitcoin-core is compiled with --disable-wallet.

  It also includes changes in wallet.py in the form of a new method, `create_large_transactions()` for the MiniWallet to create large transactions.

  Efforts for this feature started in #20874 but were not continued and that PR was closed hence I picked this up.

  To test this PR locally, compile and build bitcoin-core without the wallet and run:
  ```
  $ test/functional/mempool_limit.py
  ```

ACKs for top commit:
  amitiuttarwar:
    ACK 08634e8, only git changes since last push (and one new line).
  Zero-1729:
    ACK 08634e82c68ea1be79e1395f4f551082f497023f 🧉

Tree-SHA512: 0f744ad26bf7a5a784aac1ed5077b59c95a36d1ff3ad0087ffd10ac8d5979f7362c63c20c2ce2bfa650fda02dfbcd60b1fceee049a2465c8d221cce51c20369f
2024-12-06 17:48:07 +05:30
W. J. van der Laan
2a2a2693d0
Merge bitcoin/bitcoin#23253: bitcoin-tx: Reject non-integral and out of range int strings
fa6f29de516c7af5206b91b59ada466032329250 bitcoin-tx: Reject non-integral and out of range multisig numbers (MarcoFalke)
fafab8ea5e6ed6b87fac57a5cd16a8135236cdd6 bitcoin-tx: Reject non-integral and out of range sequence ids (MarcoFalke)
fa53d3d8266ad0257315d07b71b4f8a711134622 test: Check that bitcoin-tx accepts whitespace around sequence id and multisig numbers (MarcoFalke)

Pull request description:

  Seems odd to silently accept arbitrary strings that don't even represent integral values.

  Fix that.

ACKs for top commit:
  practicalswift:
    cr ACK fa6f29de516c7af5206b91b59ada466032329250
  laanwj:
    Code review ACK fa6f29de516c7af5206b91b59ada466032329250
  Empact:
    Code review ACK fa6f29de51
  promag:
    Code review ACK fa6f29de516c7af5206b91b59ada466032329250.

Tree-SHA512: e31f7f21fe55ac069e755557bdbcae8d5d29e20ff82e441ebdfc65153e3a31a4edd46ad3e6dea5190ecbd1b8ea5a8f94daa5d59a3b7558e46e794e30db0e6c79
2024-12-06 17:48:07 +05:30
Konstantin Akimov
efd4701d30
fix: intermittent error for feature_llmq_simplepose due to rotating quorums 2024-12-05 17:10:32 +07:00
Konstantin Akimov
2bafadfc34
feat: put DIP0024 activation to block 1 on RegTest 2024-12-05 17:10:32 +07:00
Konstantin Akimov
343c74b779
fix: intermittent error in feature_index_prune due to DKG influence 2024-12-05 17:10:32 +07:00
MarcoFalke
11eeae2ab9
Merge bitcoin/bitcoin#24219: Fix implicit-integer-sign-change in bloom
fad84a25956ec081f22aebbda309d168a3dc0004 refactor: Fixup uint64_t-cast style in touched line (MarcoFalke)
fa041878de786f5be74ec74a06ec407c99ca8656 Fix implicit-integer-sign-change in bloom (MarcoFalke)

Pull request description:

  Signed values don't really make sense when using `std::vector::operator[]`.

  Fix that and remove the suppression.

ACKs for top commit:
  PastaPastaPasta:
    utACK fad84a25956ec081f22aebbda309d168a3dc0004
  theStack:
    Code-review ACK fad84a25956ec081f22aebbda309d168a3dc0004

Tree-SHA512: 7139dd9aa098c41e4af1b6e63dd80e71a92b0a98062d1676b01fe550ffa8e21a5f84a578afa7a536d70dad1b8a5017625e3a9e2dda6f864b452ec77b130ddf2a
2024-12-05 08:43:28 +05:30
laanwj
b212ca0515
Merge bitcoin/bitcoin#24365: wallet: Don't generate keys for wallets with private keys disabled during upgradewallet
c7376cc8d728f3a7c40f79bd57e7cef685def723 tests: Test upgrading wallet with privkeys disabled (Andrew Chow)
3d985d4f43b5344f998bcf6db22d02782e647a2a wallet: Don't generate keys when privkeys disabled when upgrading (Andrew Chow)

Pull request description:

  When we're upgrading a wallet, we shouldn't be trying to generate new keys for wallets where private keys are disabled.

  Fixes #23610

ACKs for top commit:
  laanwj:
    Code review ACK c7376cc8d728f3a7c40f79bd57e7cef685def723
  benthecarman:
    tACK c7376cc8d728f3a7c40f79bd57e7cef685def723 this fixed the issue for me

Tree-SHA512: fa07cf37df9196ff98671bb1ce5c9aa0bab46495066b4dab796d7e8e5d5c7adb414ff56adae4fd3e15658a610995bd19a9e1edb00c46144b0df635c5b343f3a6
2024-12-05 08:43:28 +05:30
MarcoFalke
66e77f7879
Merge bitcoin/bitcoin#23316: test: make the node param explicit in init_wallet()
7b3c9e4ee8feb552dc0fc4347db2d06e60894a9f Make explicit the node param in init_wallet() (lsilva01)

Pull request description:

  This PR changes the definition of `def init_wallet(self, i)` to `def init_wallet(self, *, node)` to make the node parameter explicit, as suggested in https://github.com/bitcoin/bitcoin/pull/22794#discussion_r713287448 .

ACKs for top commit:
  stratospher:
    tested ACK 7b3c9e4.

Tree-SHA512: 2ef036f4c2110b2f7dc893dc6eea8faa0a18edd7f8f59b25460a6c544df7238175ddd6a0d766e2bb206326b1c9afc84238c75613a0f01eeda89a8ccb7d86a4f1
2024-12-05 08:43:28 +05:30
MarcoFalke
995cae46af
Merge bitcoin/bitcoin#22794: test: Verify if wallet is compiled in rpc_invalid_address_message.py test
c2fbdca54915e85ffafe1a88858d3c70c2b1afe8 Add BECH32_INVALID_VERSION test (lsilva01)
b142f79ddb91a44f29fcb2afb7f2edf3ca17e168 skip test_getaddressinfo() if wallet is disabled (lsilva01)

Pull request description:

  Most of  `test/functional/rpc_invalid_address_message.py` does not requires wallet.
  But if the project is compiled in disable-wallet mode, the entire test will be skipped.

  This PR changes the test to run the RPC tests first and then checks if the wallet is compiled.

ACKs for top commit:
  stratospher:
    tested ACK c2fbdca

Tree-SHA512: 11fa2fedf4a15aa45e3f12490df8e22290a867d5de594247211499533c32289c68c0b60bd42dbf8305e43dbcc042789e7139317ef5c9f8cf386f2d84c91b9ac2
2024-12-05 08:43:28 +05:30
pasta
1e55310232
Merge #6429: backport: merge bitcoin#24794, #23524, #24902, #24915, #24916, #24929, #23506, #24840, #24982, partial bitcoin#25288 (lint backports: part 2)
2fa480a878 partial bitcoin#25288: Reliably don't start itself (lint-all.py runs all tests twice) (Kittywhiskers Van Gogh)
bda1e03b24 merge bitcoin#24982: Port `lint-all.sh` to `lint-all.py` (Kittywhiskers Van Gogh)
b054a0d894 merge bitcoin#24840: port `lint-shell.sh` to python (Kittywhiskers Van Gogh)
973ca7b46f merge bitcoin#23506: Make more shell scripts verifiable by the `shellcheck` tool (Kittywhiskers Van Gogh)
694c1a4582 merge bitcoin#24929: convert shell locale linter test to Python (Kittywhiskers Van Gogh)
2a7d32a5e6 merge bitcoin#24916: Convert lint-python-utf8-encoding.sh to Python (Kittywhiskers Van Gogh)
0321fa053a merge bitcoin#24915: Convert lint-circular-dependencies.sh to Python (Kittywhiskers Van Gogh)
e3dc4b1e27 merge bitcoin#24902: Convert lint-include-guards.sh to Python (Kittywhiskers Van Gogh)
fc48a134b5 merge bitcoin#23524: Fix typos in endif header comments (Kittywhiskers Van Gogh)
1f8c3b5e95 merge bitcoin#24794: Convert Python linter to Python (Kittywhiskers Van Gogh)
110b6ac3dc partial revert dash#4807: enable more multi-threading and caching in linters (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * Depends on https://github.com/dashpay/dash/pull/6428

  * The introduction in `flake8-cached` for `lint-python.sh` in [dash#4807](https://github.com/dashpay/dash/pull/4807) was reverted as this logic wasn't going to be ported over to the Python replacement as the `flake8-cached` repo has been archived since April 2023 ([source](https://github.com/jnoortheen/flake8-cached)) and we don't use it in CI through GitLab ([build](https://gitlab.com/dashpay/dash/-/jobs/8456994796#L144)) or GitHub Actions ([build](https://github.com/dashpay/dash/actions/runs/11981121905/job/33406844883#step:7:75)).

  * [bitcoin#25288](https://github.com/bitcoin/bitcoin/pull/25288) has been marked as partial as the change of the glob pattern from `{mod_path}/lint-*` to `{mod_path}/lint-*.py` as we still have `lint-cppcheck-dash.sh` around ([source](b88d9910a8/test/lint/lint-cppcheck-dash.sh)) (and the original `cppcheck` linter upstream was removed in [bitcoin#25091](https://github.com/bitcoin/bitcoin/pull/25091)).

    A Python port of that linter would allow for completing [bitcoin#25288](https://github.com/bitcoin/bitcoin/pull/25288).

  ## Breaking Changes

  None expected.

  ## Checklist

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    utACK 2fa480a878
  PastaPastaPasta:
    utACK 2fa480a878

Tree-SHA512: 48ddf11be11232df26051b39dfadac9f363d2f201b9f303cad6ddd54550e2f1881947061155da9d4eaf3f5a87cdd371368dc36b4d70eb81ff4c48a7a93af63ae
2024-12-04 12:30:58 -06:00
Kittywhiskers Van Gogh
2fa480a878
partial bitcoin#25288: Reliably don't start itself (lint-all.py runs all tests twice)
excluded:
- f26a496dfd0a7ce3833a10075027d7d5b0345e32 (change in glob pattern)

We still have shell scripts that end in `.sh`, so we can't
restrict the glob to only cover files that end in `.py`.
2024-12-04 15:55:11 +00:00
Kittywhiskers Van Gogh
bda1e03b24
merge bitcoin#24982: Port lint-all.sh to lint-all.py 2024-12-04 15:55:11 +00:00
Kittywhiskers Van Gogh
b054a0d894
merge bitcoin#24840: port lint-shell.sh to python 2024-12-04 15:55:11 +00:00
Kittywhiskers Van Gogh
973ca7b46f
merge bitcoin#23506: Make more shell scripts verifiable by the shellcheck tool 2024-12-04 15:55:11 +00:00
Kittywhiskers Van Gogh
694c1a4582
merge bitcoin#24929: convert shell locale linter test to Python 2024-12-04 15:55:11 +00:00
Kittywhiskers Van Gogh
2a7d32a5e6
merge bitcoin#24916: Convert lint-python-utf8-encoding.sh to Python 2024-12-04 15:55:11 +00:00
Kittywhiskers Van Gogh
0321fa053a
merge bitcoin#24915: Convert lint-circular-dependencies.sh to Python 2024-12-04 15:55:11 +00:00
Kittywhiskers Van Gogh
e3dc4b1e27
merge bitcoin#24902: Convert lint-include-guards.sh to Python 2024-12-04 15:55:10 +00:00