Skip to content
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

feat: store protx version in CSimplifiedMNListEntry and use it to ser/deser pubKeyOperator #5397

Merged
merged 2 commits into from
Jun 11, 2023

Conversation

UdjinM6
Copy link

@UdjinM6 UdjinM6 commented May 27, 2023

Issue being fixed or feature implemented

Mobile wallets would have to convert 4k+ pubkeys at the V19 fork point and it's a pretty hard job for them that can easily take 10-15 seconds if not more. Also after the HF, if a masternode list is requested from before the HF, the operator keys come in basic scheme, but the merkelroot was calculated with legacy. From mobile team work it wasn't possible to convert all operator keys to legacy and then calculate the correct merkleroot.

This PR builds on top of #5392 #5403 (changes that belong to this PR: 26f7e96 and 4b42dc8) and aims to solve both of these issues.

cc @HashEngineering @QuantumExplorer

What was done?

Introduce nVersion on p2p level for every CSimplifiedMNListEntry. Set nVersion to the same value we have it in CDeterministicMNState i.e. pubkey serialization would not be via basic scheme only after the V19 fork, it would match the way it’s serialized on-chain/in CDeterministicMNState for that specific MN.

How Has This Been Tested?

run tests

Breaking Changes

NOTE: testnet is going to re-fork at v19 forkpoint because merkleRootMNList is not going to match

Checklist:

  • 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
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

@github-actions
Copy link

github-actions bot commented Jun 4, 2023

This pull request has conflicts, please rebase.

@UdjinM6 UdjinM6 force-pushed the smnle_versioned branch 2 times, most recently from 0c4b514 to 2e5cca0 Compare June 4, 2023 21:41
@UdjinM6 UdjinM6 changed the title feat: store protx version in CSimplifiedMNListEntry and use it to ser/deser/show pubKeyOperator feat: store protx version in CSimplifiedMNListEntry and use it to ser/deser pubKeyOperator Jun 4, 2023
@UdjinM6 UdjinM6 marked this pull request as ready for review June 4, 2023 22:12
@github-actions
Copy link

This pull request has conflicts, please rebase.

should also match the scheme it was created with in the original protx and match nVersion in CSimplifiedMNListEntry
Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

@ogabrielides I'd like you to review this, but in mean time; let's get 19.2-rc.1 out

@PastaPastaPasta PastaPastaPasta merged commit a760e33 into dashpay:develop Jun 11, 2023
@UdjinM6 UdjinM6 deleted the smnle_versioned branch June 11, 2023 18:38
UdjinM6 added a commit to UdjinM6/dash that referenced this pull request Jun 11, 2023
…/deser pubKeyOperator (dashpay#5397)

Mobile wallets would have to convert 4k+ pubkeys at the V19 fork point
and it's a pretty hard job for them that can easily take 10-15 seconds
if not more. Also after the HF, if a masternode list is requested from
before the HF, the operator keys come in basic scheme, but the
merkelroot was calculated with legacy. From mobile team work it wasn't
possible to convert all operator keys to legacy and then calculate the
correct merkleroot.

~This PR builds on top of ~dashpay#5392~ dashpay#5403 (changes that belong to this PR:
26f7e96 and
4b42dc8) and aims to solve both of
these issues.~

cc @HashEngineering @QuantumExplorer

Introduce `nVersion` on p2p level for every CSimplifiedMNListEntry. Set
`nVersion` to the same value we have it in CDeterministicMNState i.e.
pubkey serialization would not be via basic scheme only after the V19
fork, it would match the way it’s serialized on-chain/in
CDeterministicMNState for that specific MN.

run tests

NOTE: `testnet` is going to re-fork at v19 forkpoint because
`merkleRootMNList` is not going to match

- [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
- [ ] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 12, 2023
…/deser pubKeyOperator (dashpay#5397)

Mobile wallets would have to convert 4k+ pubkeys at the V19 fork point
and it's a pretty hard job for them that can easily take 10-15 seconds
if not more. Also after the HF, if a masternode list is requested from
before the HF, the operator keys come in basic scheme, but the
merkelroot was calculated with legacy. From mobile team work it wasn't
possible to convert all operator keys to legacy and then calculate the
correct merkleroot.

~This PR builds on top of ~dashpay#5392~ dashpay#5403 (changes that belong to this PR:
26f7e96 and
4b42dc8) and aims to solve both of
these issues.~

cc @HashEngineering @QuantumExplorer

Introduce `nVersion` on p2p level for every CSimplifiedMNListEntry. Set
`nVersion` to the same value we have it in CDeterministicMNState i.e.
pubkey serialization would not be via basic scheme only after the V19
fork, it would match the way it’s serialized on-chain/in
CDeterministicMNState for that specific MN.

run tests

NOTE: `testnet` is going to re-fork at v19 forkpoint because
`merkleRootMNList` is not going to match

- [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
- [ ] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 12, 2023
…/deser pubKeyOperator (dashpay#5397)

Mobile wallets would have to convert 4k+ pubkeys at the V19 fork point
and it's a pretty hard job for them that can easily take 10-15 seconds
if not more. Also after the HF, if a masternode list is requested from
before the HF, the operator keys come in basic scheme, but the
merkelroot was calculated with legacy. From mobile team work it wasn't
possible to convert all operator keys to legacy and then calculate the
correct merkleroot.

~This PR builds on top of ~dashpay#5392~ dashpay#5403 (changes that belong to this PR:
26f7e96 and
4b42dc8) and aims to solve both of
these issues.~

cc @HashEngineering @QuantumExplorer

Introduce `nVersion` on p2p level for every CSimplifiedMNListEntry. Set
`nVersion` to the same value we have it in CDeterministicMNState i.e.
pubkey serialization would not be via basic scheme only after the V19
fork, it would match the way it’s serialized on-chain/in
CDeterministicMNState for that specific MN.

run tests

NOTE: `testnet` is going to re-fork at v19 forkpoint because
`merkleRootMNList` is not going to match

- [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
- [ ] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
thephez added a commit to thephez/docs-core that referenced this pull request Jun 14, 2023
thephez added a commit to dashpay/docs-core that referenced this pull request Jun 20, 2023
* docs(rpc): update protx list for 19.2

* docs(rpc): update quick reference

* docs(rpc): update protx info for 19.2

* docs(rpc): minor update to protx diff and example updated

* chore: update protx diff example command to match results

* docs(rpc): update masternode status for 19.2

* chore: minor formatting update

* docs(rpc): update quick ref

* docs: update protocol version

* chore: add DIP-28 link

* docs(p2p): add nVersion to  sml entry

From dashpay/dash#5397

* docs(p2p):  update dsq and dstx for 19.2

Will use protx instead of mn outpoint after v19 activation per dashpay/dash#5404

* docs(rpc): update masternode status example

* docs(p2p): minor updates to mnlistdiff

change order of some fields. mnlistdiff version always 1

* docs(rpc): update masternode status example output

* docs(rpc): update protx diff field location and example output

* Update docs/reference/transactions-special-transactions.md

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

---------

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
thephez added a commit to dashpay/docs-core that referenced this pull request Jun 21, 2023
* docs: spork updates (#35)

* docs: integrate spork 6 info into paragraph

* docs: add updated info about spork 19 and refactor spork values info

* chore: update url and formatting

* chore: remove sporks deprecated more than 4 versions ago

* style: inconsistent list ending

* refactor: relocate hexdump to better location and add subheadings

* fix: correct typo

* feat: 19.2 rpc updates (#36)

* docs(rpc): update protx list for 19.2

* docs(rpc): update quick reference

* docs(rpc): update protx info for 19.2

* docs(rpc): minor update to protx diff and example updated

* chore: update protx diff example command to match results

* docs(rpc): update masternode status for 19.2

* chore: minor formatting update

* docs(rpc): update quick ref

* docs: update protocol version

* chore: add DIP-28 link

* docs(p2p): add nVersion to  sml entry

From dashpay/dash#5397

* docs(p2p):  update dsq and dstx for 19.2

Will use protx instead of mn outpoint after v19 activation per dashpay/dash#5404

* docs(rpc): update masternode status example

* docs(p2p): minor updates to mnlistdiff

change order of some fields. mnlistdiff version always 1

* docs(rpc): update masternode status example output

* docs(rpc): update protx diff field location and example output

* Update docs/reference/transactions-special-transactions.md

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

---------

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

---------

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants