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

backport: V19.2 rc.1 backports #5427

Merged
merged 20 commits into from
Jun 13, 2023

Conversation

PastaPastaPasta
Copy link
Member

@PastaPastaPasta PastaPastaPasta commented Jun 11, 2023

I was unable to backport 5397 due to conflicts @UdjinM6 please evaluate; also 5403 and later backports had conflicts so review them with more vigor.

Issue being fixed or feature implemented

backports

What was done?

backports

How Has This Been Tested?

reindexed, and individual commits were tested

Breaking Changes

Checklist:

Go over all the following points, and put an x in all the boxes that apply.

  • 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)

UdjinM6 and others added 13 commits June 11, 2023 12:30
## Issue being fixed or feature implemented
we missed it in dashpay#5385

## What was done?

## How Has This Been Tested?

## Breaking Changes
n/a

## Checklist:
- [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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
…pay#5394)

## Issue being fixed or feature implemented
gmp can't be detected on macos when installed via `brew` atm

## What was done?
detect package prefix and adjust CPPFLAGS and LDFLAGS accordingly


## How Has This Been Tested?
`./configure`

before: `configure: error: libgmp headers missing`
after: passes

## Breaking Changes
n/a

## Checklist:
- [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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
## Issue being fixed or feature implemented
LLMQ_400_85 requires four days worth of LLMQs
https://github.com/dashpay/dash/blob/master/src/llmq/params.h#L416

## What was done?

## How Has This Been Tested?
n/a

## Breaking Changes
n/a

## Checklist:
- [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)_
…ment (dashpay#5398)

## Issue being fixed or feature implemented
Currently, Chainlocks are either enabled or disabled. This PR adds a
third state: enabled but we will not sign new ones.

Should probably backport this to v19.x

## What was done?
Spork state != 0 but active will now result in chain locks being
enforced but not created.

## How Has This Been Tested?

## Breaking Changes
None

## Checklist:
_Go over all the following points, and put an `x` in all the boxes that
apply._
- [ ] 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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_

---------

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
…9.py (dashpay#5402)

## Issue being fixed or feature implemented
fix a couple of issues in helpers, extend feature_dip3_v19.py to check
more after v19 fork

## What was done?
pls see individual PRs


## How Has This Been Tested?
run tests

## 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
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
…nd dstx after v19 activation (dashpay#5404)

## Issue being fixed or feature implemented
Should fix dashpay#5401 with minimal potential coinjoin service interruption
(~1 minute around v19 fork point) for up to date clients. Fully
backwards compatible prior to v19 activation. Old clients won't be able
to mix after v19 activation though until they implement similar changes.
_EDIT: Actually, this is already the case cause bls sigs are going to
change too._ And I think we should also be able to finally drop
`masternodeOutpoint` from `CCoinJoinQueue` and `CCoinJoinBroadcastTx`
once v19 is active because of that which would be a nice bonus.

cc @HashEngineering

## What was done?
re-use v19 activation to switch `GetSignatureHash` logic

## How Has This Been Tested?
mixing on mainnet

## Breaking Changes
mixing won't work on current testnet until MNs are updated 

## Checklist:
- [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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
## Issue being fixed or feature implemented
Dash does not have `sethdseed`, but the help mentioned it.

## What was done?
Switched to `upgradetohd`.

## How Has This Been Tested?

## Breaking Changes
N/A

## Checklist:
_Go over all the following points, and put an `x` in all the boxes that
apply._
- [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)_
backport: bitcoin#26633 (update qt 5.12 url to archive location)
same as  dashpay#5392, alternative solution

~based on dashpay#5402 atm, will rebase later~

pls see individual commits

reorg mainnet around forkpoint with a patched client (to allow low
difficulty), run tests

Another evodb migration is required. Going back to an older version or
migrating after the fork requires reindexing.

- [x] I have performed a self-review of my own code
- [x] 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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
…isticMNState (dashpay#5413)

## Issue being fixed or feature implemented
Member obj.keyIDOwner is read & write twice



## What was done?
Fixed: it is serialized once

## How Has This Been Tested?
Unit/functional tests in CI


## Breaking Changes
Data format in database changed in incompatible way

## Checklist:
- [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
- [x] I have assigned this pull request to a milestone
current develop fails to reindex whenever there is an issue at node
start (prints `should not be overwriting a chainstate` in `debug.log`)

reset chainman to allow it re-initialize chainstate

simulated an issue with
```
 if (!fReset) {
     strLoadError = _("DEBUG");
     break;
 }
```

should not be any but pls test

- [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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
@PastaPastaPasta PastaPastaPasta added this to the 19.2 milestone Jun 11, 2023
src/evo/providertx.cpp Outdated Show resolved Hide resolved
src/evo/providertx.cpp Outdated Show resolved Hide resolved
@UdjinM6
Copy link

UdjinM6 commented Jun 11, 2023

pls see a4b8df7 and 2ab29e0

@PastaPastaPasta PastaPastaPasta force-pushed the v19.2-rc.1-backports branch 2 times, most recently from e2ae9ee to 747a411 Compare June 12, 2023 15:31
- CBLSLazyWrapper is doing to much and not enough at the same time
- nVersion assignment in CDeterministicMNState(Diff) is incomplete
- pubKeyOperator deserialization needs nVersion but nVersion is deser-ed
much later
- protx rpcs are implicitly converting pubKeyOperator (by forcing
nVersion=2), they shouldn't do that

pls see individual commits

- [x] run tests locally
- [x] reindex on testnet:
  - [x] with and without `--assumevalid=0` to the tip
  - [x] with 19.1 almost to the forkpoint, then with this version
- [x] reindex on mainnet:
  - [x] with and without `--assumevalid=0` to the tip
  - [x] with 19.1 to height 1100000+, then with this version

might need reindexing if you were running develop on testnet already

- [x] I have performed a self-review of my own code
- [x] 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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
…/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)_
…nd chainTxData for testnet (dashpay#5428)

Having these above v19 forkpoint (850100) would result in v19.2 nodes
forking at the wrong height (864000) when reindexing without
`--assumevalid=<0 or some pre-v19 block height>`

Go back to pre-v19 block (850000) in chainparams

reindex

n/a

- [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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
UdjinM6
UdjinM6 previously approved these changes Jun 12, 2023
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK, looks compilable 😅

…nd chainTxData for testnet (again) (dashpay#5430)

Same as dashpay#5428 but with a lower block number this time. This should let
us simply reorg testnet with 18.2.2 at deeper blocks instead of bumping
v19 testnet activation params for 19.2.

n/a

- [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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
UdjinM6
UdjinM6 previously approved these changes Jun 12, 2023
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

re-utACK

@UdjinM6 UdjinM6 dismissed their stale review June 12, 2023 19:12

need to check smth

Some conditions won't trigger when reorging exactly from the forkpoint

pls see individual commits, tl;dr: you can't get correct results with
`GetAncestor` cause the answer is in the future

reorg to 850000 and back on testnet
```
invalidateblock 0000003eddb94218e7a3f41b2ac6e26143f8a748b50cd26e86bdbbab9ebe50aa
reconsiderblock 0000003eddb94218e7a3f41b2ac6e26143f8a748b50cd26e86bdbbab9ebe50aa
```
this fails on develop and work with this patch

n/a

- [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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

LGTM, utACK

@PastaPastaPasta PastaPastaPasta merged commit 44cd30f into dashpay:v19.x Jun 13, 2023
@PastaPastaPasta PastaPastaPasta deleted the v19.2-rc.1-backports branch June 13, 2023 14:36
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.

5 participants