Commit Graph

24384 Commits

Author SHA1 Message Date
Konstantin Akimov
c4d634c051 refactor: use DeploymentActiveAfter in init.cpp 2023-12-21 23:02:31 -06:00
Konstantin Akimov
7bce9d8209 refactor: use CFinalCommitment::GetVersion in llmq/{commitment,dkgsession} 2023-12-21 23:02:31 -06:00
Konstantin Akimov
9aa437115a refactor: use DeploymentActiveAfter in evo/mnauth 2023-12-21 23:02:31 -06:00
Konstantin Akimov
2128d58b4f refactor: use DeploymentActiveAfter in cbtx 2023-12-21 23:02:31 -06:00
Konstantin Akimov
488c895a65 refactor: use DeploymentActiveAfter in ehf_signals 2023-12-21 23:02:31 -06:00
Konstantin Akimov
377d929edc refactor: drop dependency evo/simplifiedmns on llmq/utils 2023-12-21 23:02:31 -06:00
Konstantin Akimov
c742b9acf5 refactor: drop unused llmq::utils::IsMNRewardReallocationActive 2023-12-21 23:02:31 -06:00
Konstantin Akimov
a79aa56d9b refactor: move out helper IsDIP3Enforced from deterministicmns 2023-12-21 23:02:31 -06:00
Konstantin Akimov
5a84eb0f0a refactor: drop default value from IsDIP3Enforced() 2023-12-21 23:02:31 -06:00
Konstantin Akimov
f7274c450b refactor: use deployment status in deterministicmns instead llmq's helpers 2023-12-21 23:02:31 -06:00
Konstantin Akimov
13adedb423 refactor: move common code in deterministicmns to the helper 2023-12-21 23:02:31 -06:00
Konstantin Akimov
251a89736d refactor: rename argument pindex to pindexPrev in GetMNPayee and GetProjectedMNPayees 2023-12-21 23:02:31 -06:00
Konstantin Akimov
82c01ea664 refactor: drop dependency creditpool on llmq/utils 2023-12-21 23:02:31 -06:00
Konstantin Akimov
e94f5753c9 refactor: drop dependency of specialtxman on llmq/utils 2023-12-21 23:02:31 -06:00
Konstantin Akimov
bacaa805ea fix: use proper pindex/pindex->pprev in credit pool code during v20/mn_rr activations 2023-12-21 23:02:31 -06:00
Konstantin Akimov
f3d2f2da26 refactor: drop dependency unit test block_reward_reallocation_tests on llmq/utils 2023-12-21 23:02:31 -06:00
Konstantin Akimov
c25d336e95 refactor: drop dependency masternode/payments on llmq/utils 2023-12-21 23:02:31 -06:00
Konstantin Akimov
8f3d3db9a4 refactor: drop dependency governance/classes on llmq/utils 2023-12-21 23:02:31 -06:00
Konstantin Akimov
c329615584 refactor: use value_or in std::optional 2023-12-21 23:02:31 -06:00
Konstantin Akimov
a7ad399824 refactor: drop IsDIP0024Active and its usage of llmq_vbc 2023-12-21 23:02:31 -06:00
Konstantin Akimov
68442e8dfe chore: add TODO for llmq/utils.h refactoring 2023-12-21 23:02:31 -06:00
PastaPastaPasta
3855f9775e
chore: do not include dash-qt in the docker images (#5775)
## Issue being fixed or feature implemented
Remove dash-qt from docker images; save ~41MB

## What was done?


## How Has This Been Tested?
Hasn't

## Breaking Changes
I guess in theory someone could've been relying on dash-qt from docker 🤷

## Checklist:
_Go over all the following points, and put an `x` in all the boxes that
apply._
- [ ] 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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-12-21 21:59:01 -06:00
PastaPastaPasta
acd2acd592
refactor: pass large structure by const reference on every RPC call (#5780) 2023-12-21 12:01:39 -06:00
UdjinM6
6fe36cc1cb
fix: Improve quorum caching (again) (#5761)
## Issue being fixed or feature implemented
1. `scanQuorumsCache` is a special one and we use it incorrectly.
2. Platform doesn't really use anything that calls `ScanQuorums()`
directly, they specify the exact quorum hash in RPCs so it's
`GetQuorum()` that is used instead. The only place `ScanQuorums()` is
used for Platform related stuff is `StartCleanupOldQuorumDataThread()`
because we want to preserve quorum data used by `GetQuorum()`. But this
can be optimised with its own (much more compact) cache.
3. RPCs that use `ScanQuorums()` should in most cases be ok with smaller
cache, for other use cases there is a note in help text now.

## What was done?
pls see individual commits

## How Has This Been Tested?
run tests, run a node (~in progress~ looks stable)

## Breaking Changes
n/a

## Checklist:
- [x] I have performed a self-review of my own code
- [x] 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
- [x] I have assigned this pull request to a milestone
2023-12-20 09:54:00 -06:00
UdjinM6
647f4831c1
chore: update file permissions in tests, add missing executable flag (#5778)
## Issue being fixed or feature implemented
old mode 100644
new mode 100755

## What was done?
`chmod +x test/functional/*.py`

## How Has This Been Tested?
can now run these test directly e.g. `./test/functional/rpc_quorum.py`

## Breaking Changes
n/a

## Checklist:
- [x] 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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-12-19 08:03:11 -06:00
UdjinM6
9a99a4abdc
fix(rpc): pass blockhash into TxToJSON so that getspecialtxes could show correct instantlock/chainlock values (#5774)
## Issue being fixed or feature implemented
`instantlock` and `chainlock` are broken in `getspecialtxes`

kudos to @thephez for finding the issue

## What was done?
pass the hash and also rename the variable to self-describing

## How Has This Been Tested?
run `getspecialtxes` on a node with and without the patch

## Breaking Changes
`instantlock` and `chainlock` will show actual values and not just
`false` all the time now (not sure if that qualifies for "breaking"
though)

## Checklist:
- [x] 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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-12-19 07:43:36 -06:00
Odysseas Gabrielides
3bc77a6e1d
feat(rpc): submit chainlock signature if needed RPC (#5765)
## Issue being fixed or feature implemented
Once Platform is live, there could be an edge case where the CL could
arrive to an EvoNode faster through Platform quorum than regular P2P
propagation.

## What was done?
This PR introduces a new RPC `submitchainlock` with the following 3
mandatory parameters:
- `blockHash`, `signature` and `height`.

Besides some basic tests:
- If the block is unknown then the RPC returns an error (could happen if
the node is stucked)
- If the signature is not verified then the RPC return an error.
- If the node already has this CL, the RPC returns true.
- If the node doesn't have this CL, it inserts it, broadcast it through
the inv system and return true.

## How Has This Been Tested?
`feature_llmq_chainlocks.py` was modified with the following scenario:

1. node0 is isolated from the rest of the network
2. node1 mines a new block and waits for CL
3. Make sure node0 doesn't know the new block/CL (by checking
`getbestchainlock()`)
4. CL is submitted via the new RPC on node0
5. checking `getbestchainlock()` and make sure the CL was processed +
'known_block' is false
6. reconnect node0

## Breaking Changes
no

## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [x] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] 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)_

---------

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: thephez <thephez@users.noreply.github.com>
2023-12-18 22:27:19 -06:00
PastaPastaPasta
714be63de5
Merge pull request #5743 from knst/bitcoinserver-15639-p1
refactor: pull libbitcoin_server code out of wallet code 3/N
2023-12-17 12:43:32 -06:00
Konstantin Akimov
e3d9327d17 refactor: replace usage of deterministicMNManager to new interface listMNCollaterials 2023-12-17 12:42:45 -06:00
Konstantin Akimov
2c61d842a9 refactor: new method listMNCollaterials() for chain interface 2023-12-17 12:42:45 -06:00
Konstantin Akimov
4966bf7582 refactor: use static method CDeterministicMNManager without touching global variable in wallet's code 2023-12-17 12:42:45 -06:00
Konstantin Akimov
2310e353ff refactor: use std::all_of in isGroupISLocked 2023-12-17 12:42:45 -06:00
Konstantin Akimov
41b71dc0f5 refactor: removed usage of llmq::chainLocksHandler from wallet 2023-12-17 12:42:45 -06:00
Konstantin Akimov
0fea98b65f refactor: replace llmq::quorumInstantSendManager->IsLocked() to new chain's interface 2023-12-17 12:42:45 -06:00
Konstantin Akimov
808e631a08 fix: dirty removal of dependency of scriptpubkeyman on ShutdownRequested introduced in #5456 2023-12-17 12:42:45 -06:00
Konstantin Akimov
d95d7f63c9 refactor: remove dependency scriptpubkeyman on uiInterface 2023-12-17 12:42:45 -06:00
Konstantin Akimov
aa48c222ab follow-up bitcoin#15288 - missing fPrune usage 2023-12-17 12:42:45 -06:00
PastaPastaPasta
40f7ae8fbc
Merge pull request #5682 from vijaydasmp/bp23_4
backport: Merge partial bitcoin#24203,22523,22739,13533
2023-12-11 15:49:15 -06:00
fanquake
5cd9882759 Merge bitcoin/bitcoin#22739: doc: link to managing-wallets from docs README
1ea11e10acd60807a06adea5ecf553974a1b0346 doc: link to managing-wallets from doc readme (fanquake)

Pull request description:

  This was forgotten in #22523.

ACKs for top commit:
  achow101:
    ACK 1ea11e10acd60807a06adea5ecf553974a1b0346
  jarolrod:
    ACK 1ea11e10acd60807a06adea5ecf553974a1b0346

Tree-SHA512: b82664b282cc0fe733b752c011621593df0f846d2188f12dbc5fedb7ffed2bd161293ce2a369ca973926030795b5f7acde7a1cbf5e337042a6f665906069c656
2023-12-11 15:48:44 -06:00
Samuel Dobson
5bd334a33b Merge bitcoin/bitcoin#22523: Document about wallet backup and restoration
ce4e90629ed70f4d45906d7e79563b2f7ad6493e Document about wallet backup and restoration (lsilva01)

Pull request description:

  This PR adds a document about backing up and restoring the Bitcoin Core wallet as suggested in the issue https://github.com/bitcoin/bitcoin/issues/20149 .

ACKs for top commit:
  achow101:
    re-ACK ce4e90629ed70f4d45906d7e79563b2f7ad6493e
  prayank23:
    reACK ce4e90629e
  meshcollider:
    re-ACK ce4e90629ed70f4d45906d7e79563b2f7ad6493e

Tree-SHA512: 68881fc1d81ff27cb59b891e6d422e303844a751afd9f4699f7ae505f204452afe9496c9be915ba94a7045f3cf3eaeb2af0e42ff2a12b4c77ef1f71a9de4faad
2023-12-11 15:48:44 -06:00
Vijay Das Manikpuri
38b9074275 (partial) Merge #24203: doc: Fix typos pointed out by lint-spelling 2023-12-11 15:48:44 -06:00
PastaPastaPasta
985da9ab93
Merge pull request #5759 from UdjinM6/bp26532
backport: partial merge bitcoin#26532: wallet: bugfix, invalid crypted key "checksum_valid" set
2023-12-11 15:43:57 -06:00
furszy
d7bae33f57
partial merge bitcoin#26532: wallet: bugfix, invalid crypted key "checksum_valid" set
backports cc5a5e81217506ec6f9fff34056290f8f40a7396 only

```
wallet: bugfix, invalid crypted key "checksum_valid" set

At wallet load time, we set the crypted key "checksum_valid" variable always to false.
Which, on every wallet decryption call, forces the process to re-write the entire ckeys to db when
it's not needed.
```
2023-12-10 20:04:48 +03:00
UdjinM6
3c516eeec4
Merge pull request #5534 from vijaydasmp/bp22_15
backport: Merge bitcoin#18842, 21162, 21043, 17556, 18017, 8795, 19362, 20932, bitcoin-core/gui#162
2023-12-09 12:36:28 +03:00
MarcoFalke
09973f2bee Merge #20932: refactor: Replace fs::absolute calls with AbsPathJoin calls
da9caa1cedd69702aea44cb44b2fd0a2d6d56916 Replace fs::absolute calls with AbsPathJoin calls (Kiminuo)
66576c4fd532ac18b8b355ea93d25581a2c15654 test: Clear forced -walletdir setting after wallet init_tests (Kiminuo)

Pull request description:

  This adds better test coverage and will make it easier in #20744 to remove our dependency on the two-argument boost::filesystem::absolute() function which does not have a direct equivalent in C++17.

  This PR doesn't change behavior aside from adding an assert and fixing a test bug.

ACKs for top commit:
  jonatack:
    Code review ACK da9caa1cedd69702aea44cb44b2fd0a2d6d56916 only doxygen improvements since my last review per `git diff d867d7a da9caa1`
  MarcoFalke:
    review ACK da9caa1cedd69702aea44cb44b2fd0a2d6d56916 📯
  ryanofsky:
    Code review ACK da9caa1cedd69702aea44cb44b2fd0a2d6d56916. Just comment and test tweaks since previous review.

Tree-SHA512: c940ee60f3ba374d4927cf34cf12d27c4c735c94af591fbc0ca408c641b30f8f8fbcfe521d66bfbddf9877a1fc8cd99bd8a47ebcd2fa59789de6bd87a7b9cf4d
2023-12-08 21:16:00 +03:00
MarcoFalke
d6d3e0905c Merge bitcoin/bitcoin#19362: rpc/blockchain: Reset scantxoutset progress before inferring descriptors
8c4129b4540f4f739413ed9a6fbfc78afc252f42 rpc: reset scantxoutset progress on finish (Pavol Rusnak)

Pull request description:

  Fixes https://github.com/bitcoin/bitcoin/issues/19361 by moving resetting the `g_scan_progress` variable **before** inferring the descriptors

ACKs for top commit:
  achow101:
    Code review ACK 8c4129b4540f4f739413ed9a6fbfc78afc252f42

Tree-SHA512: 2b81e5c930b9c201a1b9cc742c37e0617582326acd9adbd6b14991d33c05d51b1d5ff6a26f3accab7d274dc8c6a48bc8cbccf0811b60c1f76dd805f9b31482c0
2023-12-08 21:16:00 +03:00
MarcoFalke
8b98e1ab7b Merge bitcoin/bitcoin#18795: Test: wallet issue with orphaned rewards
e4356f6a6c18e5027a064a4d3a5deda27985f584 Testcase for wallet issue with orphaned rewards. (Daniel Kraft)

Pull request description:

  This adds a new test case demonstrating the wallet issue when block rewards are orphaned (#14148).

ACKs for top commit:
  LarryRuane:
    ACK e4356f6a6c18e5027a064a4d3a5deda27985f584
  leonardojobim:
    reACK e4356f6a6c .

Tree-SHA512: e9a2310ee1b3d52cfa302f431ed3d272bbc1b9195439ff318d9eb1006c0b28968dbe840e1600b6ff185e5d7ea57e4dcc837cef16051b5537445e10bc363b8c22
2023-12-08 21:16:00 +03:00
Wladimir J. van der Laan
99c1307ae3 Merge #18017: txmempool: split epoch logic into class
fd6580e405699ccb051fd2a34525e48d3253673d [refactor] txmempool: split epoch logic into class (Anthony Towns)

Pull request description:

  Splits the epoch logic introduced in #17925 into a separate class.

  Uses clang's thread safety annotations and encapsulates the data more strongly to reduce chances of bugs from API misuse.

ACKs for top commit:
  jonatack:
    ACK fd6580e405699ccb051fd2a34525e48d3253673d using clang thread safety annotations looks like a very good idea, and the encapsulation this change adds should improve robustness (and possible unit test-ability) of the code. Verified that changing some of the locking duly provoked build-time warnings with Clang 9 on Debian and that small changes in the new `Epoch` class were covered by failing functional test assertions in `mempool_updatefromblock.py`, `mempool_resurrect.py`, and `mempool_reorg.py`
  hebasto:
    re-ACK fd6580e405699ccb051fd2a34525e48d3253673d, since my [previous](https://github.com/bitcoin/bitcoin/pull/18017#pullrequestreview-569619362) review:

Tree-SHA512: 7004623faa02b56639aa05ab7a078320a6d8d54ec62d8022876221e33f350f47df51ddff056c0de5be798f8eb39b5c03c2d3f035698555d70abc218e950f2f8c
2023-12-08 21:16:00 +03:00
MarcoFalke
b8267bb5a2 Merge #17556: test: Change feature_config_args.py not to rely on strange regtest=0 behavior
ff44cae279bef7997f76db18deb1e41b39f05cb6 test: Change feature_config_args.py not to rely on strange regtest=0 behavior (Russell Yanofsky)

Pull request description:

  Update test to simply generate a normal mainnet configuration file instead of using a crazy setup where a regtest=1 config file using an includeconf in the [regtest] section includes another config file that specifies regtest=0, retroactively switching the network to mainnet.

  This setup was fragile and only worked because the triggered InitError happened early enough that none of the ignored [regtest] options mattered (only affecting log output).

  This change was originally made as part of #17493

Top commit has no ACKs.

Tree-SHA512: 3f77305454f04438493dfc2abd78a00434b30869454d1c3f54587b9c1f63239c49c90fb3b4d3a777ad130f2184e0f2dac87cee4cd23c50f1b3496a375943da01
2023-12-08 21:16:00 +03:00
Wladimir J. van der Laan
da20789983 Merge bitcoin-core/gui#162: Add network to peers window and peer details
e262a19b0ba07d8d2334551f49ca1577ab2999fc gui: display network in peer details (Jon Atack)
913695307360d3582f74ffe225cb122b2e48023d gui: rename peer tab column headers, initialize in .h (Hennadii Stepanov)
05c08c696a1bc45ab28abe6f82bebbdbd6239c23 gui: add network column in peers tab/window (Jon Atack)
e0e55060bf697fe8b9ed43ff62383a0451e9c0ce gui: fix broken doxygen formatting in src/qt/guiutil.h (Jon Atack)
0d5613f9ded846aa20a95c757672e9560c664c4c gui: create GUIUtil::NetworkToQString() utility function (Jon Atack)
af9103cc792e17f35249f1d4cb30f0d6958ceb75 net, rpc: change CNodeStats::m_network from string to Network (Jon Atack)

Pull request description:

  and rename peers window column headers from NodeId and Node/Service to Peer Id and Address.

  ![Screenshot from 2020-12-27 14-45-31](https://user-images.githubusercontent.com/2415484/103172228-efec8600-4849-11eb-8cee-04a3d2ab1273.png)

ACKs for top commit:
  laanwj:
    ACK e262a19b0ba07d8d2334551f49ca1577ab2999fc

Tree-SHA512: 709c2a805c109c2dd033aca7b6b6dc94ebe2ce7a0168c71249e1e661c9c57d1f1c781a5b9ccf3b776bedeb83ae2fb5c505637337c45b1eb9a418cb1693a89761
2023-12-08 21:16:00 +03:00