-
Notifications
You must be signed in to change notification settings - Fork 725
[RPC] Provider-Register transactions #2296
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
[RPC] Provider-Register transactions #2296
Conversation
7d2abfe to
2d04317
Compare
2d04317 to
45aaf46
Compare
45aaf46 to
b0899bc
Compare
|
Rebased on master. This too is ready to go. |
furszy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments mostly over the new commands help texts. Other than that code review ACK b0899bce84fb21b1493389fb891b34f5dc9f7f08 .
There are some architectural improvements that we can do moving forward but nothing that would stop this for getting merge. Better to have a high percentage of test coverage before start with them.
b0899bc to
3f622b9
Compare
and set it to 100 PIV on regtest
Instead of relying on 'signrawtransaction' and 'sendrawtransaction' rpcs to send ProReg txes, work directly with the MutableTransaction object.
3f622b9 to
2f02e0a
Compare
|
Help texts fixed as per feedback. RPC-Cli examples will be added later (ref 2f71d8d). |
furszy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small finding, cherry-pick this one here if you want a00adc5293b96214800ba58d9ebae75eb66ab1df
We missed to lock the Masternode internal mutex when the collateral spent flag is set. Which could cause a concurrency problem between the message handler thread and the tier two thread as they are both accessing to the same data.
Other than that, no functional changes after the help text fixes and the rebase.
All good and ready to go for me 👍
2f02e0a to
e754732
Compare
|
Commit cherry-picked. |
furszy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code ACK e754732 after cherry-pick.
Fuzzbawls
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code ACK e754732
With some nits for redundant checks to ensure the wallet exists or is unlocked. these checks are done directly inside the main RPC command functions and shouldn't need to be re-done in dependent helper functions.
Note: the SignSpecialTxPayloadByHash() and ParsePrivKey() functions are also included here unused, but connected in a separate PR, which i think is fine.
Also, for future discussion prior to 6.0 release: as with the sapling RPC command names when they were first introduced; I'd really like to avoid snake case in our final naming convention, but that is not something to change here and can be discussed in a separate issue without slowing down the progress of this series of PRs.
Good catch.
Yes, I thought so. Merging... |
|
yes, the particular naming convention is something completely outside the scope of these PRs, which is why i only mentioned it as an aside comment and not a blocking comment...has nothing to do with the code itself, as the command names can easily be changed prior to release without issue. As more RPC commands are added in this chain of PRs, I'm thinking it may be best for me to open up an RFC issue specifically for the purpose of brainstorming/discussing more appropriate command names that conform to our existing naming convention, that won't have any tangible effect/block on existing PRs. |
Sounds good. |
6b7b9df [BUG][Test] Return directly block template without mempool txes (random-zebra) f593706 [test] add mnsync and spork8 activation in deterministicmns_tests (furszy) 753986a [test] Add unit test coverage for invalid block payee (furszy) a81abb4 [Trivial] Fix typo utoxs --> utxos (random-zebra) f6aefd8 [Tests] Check masternode payments in evo_deterministicmns_tests (random-zebra) 4c731a9 [Consensus] New DMN payment logic (random-zebra) Pull request description: Estracted from #2267 This implements the new payment logic for deterministic masternodes, to be used after the deactivation of the legacy system with SPORK_21. Based on top of: - [x] #2275 - [x] #2296 ACKs for top commit: furszy: ACK 6b7b9df Tree-SHA512: 9328e2e2d820510845ede63e4db557ceb49df9cfb27f1ac1b36a20878c99728bc60b8f5c4cbfa00f161be5a3c5b7d72cba8ba4dc476383718f66a6d8cdddd70c
…voting 04cd17e [QA][BUG] Fix test and rework setupDMN to return only proTx hash (random-zebra) 9aeeb76 [Test] Add test coverage for MN and DMN votes expiration removal. (furszy) 3f16936 [Test] Update tiertwo_mn_compatibility and check winners (random-zebra) ad2cc30 [Consensus] Check against current hash when no payee is found (random-zebra) ede4519 [Cleanup] Remove unused parameter in GetCurrentMasternode (random-zebra) dd3bce9 [Tests] Raise regtest ping timeouts to 1/10th of mainnet value (random-zebra) d616239 [Cleanup] Remove redundant checks in CMasternodePaymentWinner::IsValid (random-zebra) 0db3f57 [Consensus] Compatibility: sign/verify mnw with deterministic nodes (random-zebra) dbc19ff [Refactor] Decouple getting active mn keys from VoteOnFinalizedBudgets (random-zebra) 971f1da [Consensus] DMN payment compatibility code (random-zebra) acfa24b [Tests] Introduce tiertwo_dmn_compatibility functional test (random-zebra) 6ad7ea6 [BUG] Fix locking order between CDeterministicMNManager/CMasternodeman (random-zebra) aa867d5 [RPC] Add DMN support to listmasternodes (random-zebra) 064f774 [RPC] getmasternodestatus for DMN (random-zebra) 8b10fc2 [P2P] Stop processing mnw messages when Legacy MN system is obsolete (random-zebra) baf60c7 [Tests] governance_sync_basic sign final budget with DMN too (random-zebra) 474e0b2 [RPC][Refactoring] Use ProcessProposal(FinalBudget)Vote directly (random-zebra) 72c2a70 [RPC] Get all required keys before signing budgets (random-zebra) 0591957 [RPC][Refactoring] Mn final budget / proposal voting code de-duplication (random-zebra) a7557f7 [Validation] Sign/Verify final budgets with DMNs (random-zebra) 6fcd53d [MN] Active MN manager: return key and dmn after validation (random-zebra) 5df5067 [Tests] tiertwo_governance_basic: add deterministic masternodes (random-zebra) 972d236 [RPC] Init Deterministic masternode on-demand (random-zebra) f93bc0f [Budget] Validate proposal votes from deterministic masternodes (random-zebra) c5b9e6f [RPC][Budget] Deterministic MNs: vote for proposals (random-zebra) 366bfd0 [RPC] Remove redundant checks for wallet existing/unlocked (random-zebra) Pull request description: Extrated from #2267. This enables proposals and budget voting for DMNs. It also implements the compatibility code for masternode payments, to be used between v6 enforcement and SPORK_21 activation (when both systems coexist). Based on top of: - [x] #2275 - [x] #2296 ACKs for top commit: furszy: ACK 04cd17e ☕. Fuzzbawls: ACK 04cd17e Tree-SHA512: d9504fdd87a7cd05c385e08d51cde0566738bd8992b493ca77592f9b1d1254374d0c5d49d9278edb4525c5559f7e26496fc6b0dd846bbb3acb2164e330ccc92e
…tatic 10k PIV strings. 3c5b5f3 Move MN collateral hardcoded 10,000 PIV strings for the specific chain collateral value. (furszy) 2442b5b GUI: MN creation wizard, use chain specific MN collateral value instead of the hardcoded amount. (furszy) Pull request description: Since #2296, we have a different masternode collateral output amount for regtest. As the GUI has the 10k value harcoded in some places, the masternode creation wizard got broken and there are some misaligned strings as well. This PR fixes it and aligns every static 10k PIV string to be set dynamically consuming the chain params value. ACKs for top commit: random-zebra: utACK 3c5b5f3 Tree-SHA512: cdc3de21216fa61c76105feed7eedbde9b2686309437c8bfef079185b31bc06b2ad9120d2ac89a99a161e7097695493c19746263946f2068fe42c746a0a8d938
Extracted from #2267. Based on top of
Implement
protx_registerandprotx_listRPC commands.Add DMN support to
listmasternodes.Deprecate
startmasternodeafter SPORK_21 activation.