Skip to content

Conversation

@random-zebra
Copy link

@random-zebra random-zebra commented Apr 27, 2021

Exctracted from #2267
This PR:

  • introduces the PROUPSERV payload 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_service to create ProUpServ transactions

  • adds unit and functional testing

Builds on top of:

@random-zebra
Copy link
Author

Rebased on master. Ready to go.

furszy
furszy previously approved these changes Jun 1, 2021
Copy link

@furszy furszy left a 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.

furszy
furszy previously approved these changes Jun 1, 2021
Copy link

@furszy furszy left a 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.
@random-zebra random-zebra force-pushed the 202103-dmn-proupserv branch from b8938d1 to aacada8 Compare June 2, 2021 08:05
@random-zebra
Copy link
Author

Rebased on master, fixing conflict in the RPC code after the introduction of named-args (#2386).

Copy link

@furszy furszy left a 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.

@random-zebra random-zebra requested a review from Fuzzbawls June 4, 2021 01:17
Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code ACK aacada8

@furszy furszy merged commit eadb88a into PIVX-Project:master Jun 17, 2021
furszy added a commit that referenced this pull request Jul 7, 2021
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants