dash/src/node
pasta 21af5af6c5
Merge #6051: refactor: proper support for composite commands such as 'bls generate'
9413ecdc66 fix: disable linter 'check-rpc-mapping.py' for composite commands (Konstantin Akimov)
f4bc19fb99 refactor: proper support for composite commands such as 'bls generate' (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  We have composite commands such as 'bls generate' that do not exist in bitcoin's implementation of rpc.
  It doesn't let to backport yet bitcoin#18531 which enforced extra checks for arguments name (name of rpc and list arguments in rpc help and actual implementation must match).

  ## What was done?
  This PR improves support of composite commands in Dash Core. New style of composite commands are applied for `bls` composite commands: `bls generate` and `bls fromsecret` as proof of concept.
  Once this PR is merged, I will provide similar fixes for other "compose" rpc commands: `protx`, `masternode` (and everything else if any).

  Beside better validation of arguments and command names, it improves suggest menu in Qt app (see a screenshot) for composite commands.

  ![image](https://github.com/dashpay/dash/assets/545784/08dcc0b4-df92-4090-b163-af498bf200ef)

  ## How Has This Been Tested?
  Run unit and functional tests. Also extra tests to conduct in qt app:
   - check suggest for 'bls ....' and 'help bls ...'
   - check output of next commands:
  ```
  help bls
  help bls generate
  help bls from secret
  bls
  bls generate
  bls generate 1
  ```
   - also let's see that old-fashion composite commands are not broken:
  ```
  help protx
  help protx diff
  protx diff 00000021c7604b9992254f9f1ed91de5d65eaade33c773abea63a7b0e93293ee 000000e44f9894838ebf768b464177cfce8859dcf92b0509f5c2fba774315996
  ```

  ## 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
  - [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:
  PastaPastaPasta:
    utACK 9413ecdc66

Tree-SHA512: c8accd2f1ea1d2168d7a2bf25311c92b7839782fc300c587c7537880df5d3fbbf7e79cedb2c6fa88ab067b696994beaf7d92185ae3e64fe1a5f70ad9e8620bec
2024-06-10 11:46:14 -05:00
..
blockstorage.cpp refactor: limit fMasternodeMode usage in blockstorage, init, net_processing 2024-04-24 18:46:14 +00:00
blockstorage.h refactor: remove CActiveMasternodeManager global, move to NodeContext 2024-04-12 17:01:24 +00:00
coin.cpp
coin.h
coinstats.cpp Merge #21390: test: Test improvements for UTXO set hash tests 2024-04-11 02:26:01 +07:00
coinstats.h Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
context.cpp refactor: remove CDeterministicMNManager global, move to NodeContext 2024-04-16 12:55:14 -05:00
context.h refactor: remove CDeterministicMNManager global, move to NodeContext 2024-04-16 12:55:14 -05:00
interfaces.cpp Merge #6051: refactor: proper support for composite commands such as 'bls generate' 2024-06-10 11:46:14 -05:00
psbt.cpp fix: follow-up bitcoin#15638 to move AnalyzePSBT related code 2024-01-10 12:05:57 -06:00
psbt.h fix: follow-up bitcoin#15638 to move AnalyzePSBT related code 2024-01-10 12:05:57 -06:00
README.md
transaction.cpp Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
transaction.h Merge bitcoin/bitcoin#22528: refactor: move GetTransaction to node/transaction.cpp 2023-12-03 20:13:09 -06:00
ui_interface.cpp Merge #18152: qt: Use SynchronizationState enum for signals to GUI 2024-01-10 19:15:47 -06:00
ui_interface.h Merge bitcoin/bitcoin#24191: refactor: Make MessageBoxFlags enum underlying type unsigned 2024-02-28 13:16:39 -06:00
utxo_snapshot.h Merge bitcoin/bitcoin#21681: validation: fix ActivateSnapshot to use hardcoded nChainTx 2024-04-23 22:41:09 +07:00

src/node/

The src/node/ directory contains code that needs to access node state (state in CChain, CBlockIndex, CCoinsView, CTxMemPool, and similar classes).

Code in src/node/ is meant to be segregated from code in src/wallet/ and src/qt/, to ensure wallet and GUI code changes don't interfere with node operation, to allow wallet and GUI code to run in separate processes, and to perhaps eventually allow wallet and GUI code to be maintained in separate source repositories.

As a rule of thumb, code in one of the src/node/, src/wallet/, or src/qt/ directories should avoid calling code in the other directories directly, and only invoke it indirectly through the more limited src/interfaces/ classes.

This directory is at the moment sparsely populated. Eventually more substantial files like src/validation.cpp and src/txmempool.cpp might be moved there.