-
Notifications
You must be signed in to change notification settings - Fork 725
[Validation][RPC] Provider-Update-Service special tx type #2349
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
[Validation][RPC] Provider-Update-Service special tx type #2349
Conversation
773a56a to
c6d7503
Compare
8e1fddb to
82d8863
Compare
996af20 to
7d1cb98
Compare
|
Rebased on master. 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.
Looking really nice, liked a lot the test coverage. Code review ACK 7d1cb9872e0218145427cc272c59e8e5cae41ed7.
Left few comments.
7d1cb98 to
b8938d1
Compare
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 b8938d1 after feedback completion.
check: - valid payload - payload malleability - operator script payout change - duplicate IP
If, during a reorg, a ProReg tx is disconnected, and not reconnected in the other chain, we need to evict any mempool transaction that depends on the masternode registered by the ProReg, before adding it back to the mempool. Otherwise (as the tiertwo_reorg_mempool functional test shows) a node, after a reorganization, could try to mine a block which includes a ProUpServ transaction linked to a no-longer-existing masternode.
b8938d1 to
aacada8
Compare
|
Rebased on master, fixing conflict in the RPC code after the introduction of named-args (#2386). |
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.
utACK aacada8 after rebase.
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 aacada8
27d9f4e [QA] exercise generic calls to CheckSpecialTx and fix random bug (random-zebra) 2552e53 [Trivial][Cleanup] Remove unused vZC_DENOMS from the test framework (random-zebra) 9e42dfb [Tests] Fix random failure and add MN revival test in deterministicmns (random-zebra) e2081a7 [Consensus] Don't Allow ProUpReg txes while in transition to DMN (random-zebra) 336e18c [RPC][Trivial] Add missing RPC help examples (random-zebra) b02d147 [Tests] Functional testing for ProUpRev txes (random-zebra) 2c16960 [RPC] Implement "protx_revoke" call (random-zebra) 86fd9db [Mempool] Conflict handling for ProUpRev txes (random-zebra) a822a03 [Tests] Add provider-update-revoke to dip3_protx unit-test (random-zebra) a4a0afb [TierTwo] Connect ProUpRev payload management in dmn manager (random-zebra) 9699143 [Tests] Add Get/Set payload unit-test for ProUpRev txes (random-zebra) 055f5d3 [Core] Introduce ProUpRev payload and transaction type (random-zebra) 1f01a5f [Tests] Functional testing for ProUpReg txes (random-zebra) 48e8862 [RPC] Implement "protx_update_registrar" call (random-zebra) cb4ce9e [Mempool] Conflict handling for ProUpReg txes (random-zebra) 864c0f5 [BUG] Check for duplicate operator key when processing ProUpReg txes (random-zebra) 553cd56 [Tests] Add provider-update-registrar to dip3_protx unit-test (random-zebra) 060729a [TierTwo] Connect ProUpReg payload management in dmn manager (random-zebra) ceeaf31 [Tests] Add Get/Set payload unit-test for ProUpReg txes (random-zebra) 1f9e61c [Core] Introduce ProUpReg payload and transaction type (random-zebra) Pull request description: Built on top of: - [x] #2349 This concludes the first DMN-milestone list #2267 (comment). Here we introduce the last two payloads and transaction types, adding relative RPC commands, and updating the tests: - `PROUPREG` (provider-update-registrar) submitted by the owner (the payload must be signed with the owner key) to update the operator key and/or the voting key and/or the payout address. - `PROUPREV` (provider-update-revoke) submitted by the operator, to revoke the service, and put the mn in PoSe-banned state (e.g. in case of compromised keys). The masternode can be "revived" later, by sending a ProUpReg tx, which sets a new operator key, and then a ProUpServ tx (signed with the new operator key), which sets the new IP address for the masternode. ACKs for top commit: furszy: No changes after rebase, only serialization code update. ACK 27d9f4e. furszy: have run all the tests locally one more time, ACK 27d9f4e. Merging.. Tree-SHA512: 756688cf2da66703a70ac668f6d7747041f0c28c102fe253d17ff85b71d05670088e71ca4ac0d1739d101986602ea69abb1e5a54f283aad8e8ad8f58f0f5dc96
Exctracted from #2267
This PR:
introduces the
PROUPSERVpayload and transaction type.This special transaction is submitted by the operator (the payload must be signed with the operator key) to update the IP/port fields.
If the original ProReg transaction set a non-zero operatorReward, this payload can also be used to update the operator's payout address.
adds the new RPC
protx_update_serviceto create ProUpServ transactionsadds unit and functional testing
Builds on top of: