Commit Graph

24145 Commits

Author SHA1 Message Date
MarcoFalke
1915914e5b Merge bitcoin/bitcoin#23806: fuzz: follow up for #22704
8f79831ab57b8fce48bb7b01fce86fac338755a5 Refactor the chacha20 differential fuzz test (stratospher)

Pull request description:

  This PR addresses [comments from #22704](https://github.com/bitcoin/bitcoin/pull/22704/files#discussion_r771510963)  to make the following changes in `src/test/fuzz/crypto_diff_fuzz_chacha20.cpp`:

  - replace `memcmp()` with ==
  - add a missing assert statement to compare the encrypted bytes

Top commit has no ACKs.

Tree-SHA512: 02338460fb3a89e732558bf00f3aebf8f04daba194e03ae0e3339bb2ff6ba35d06841452585b739047a29f8ec64f36b1b4ce2dfa39a08f6ad44a6a937e7b3acb
2023-11-19 10:20:12 -06:00
W. J. van der Laan
c8650ec003 Merge bitcoin/bitcoin#22704: fuzz: Differential fuzzing to compare Bitcoin Core's and D. J. Bernstein's implementation of ChaCha20
4d0ac72f3ae78e3c6a0d5dc4f7e809583abd0546 [fuzz] Add fuzzing harness to compare both implementations of ChaCha20 (stratospher)
65ef93203cc6a977c8e96f07cb9155f46faf5004 [fuzz] Add D. J. Bernstein's implementation of ChaCha20 (stratospher)

Pull request description:

  This PR compares Bitcoin Core's implementation of ChaCha20 with D. J. Bernstein's in order to find implementation discrepancies if any.

ACKs for top commit:
  laanwj:
    Code review ACK 4d0ac72f3ae78e3c6a0d5dc4f7e809583abd0546

Tree-SHA512: f826144b4db61b9cbdd7efaaca8fa9cbb899953065bc8a26820a566303b2ab6a17431e7c114635789f0a63fbe3b65cb0bf2ab85baf882803a5ee172af4881544
2023-11-19 10:20:12 -06:00
MarcoFalke
47828bd76b Merge bitcoin/bitcoin#22649: fuzz: Avoid OOM in system fuzz target
fa7718344d2879bb3f3c00a4185c5445390c017d fuzz: Avoid OOM in system fuzz target (MarcoFalke)

Pull request description:

  If the inputs size is unlimited, the target may consume unlimited memory, because the argsmanager stores the argument names. Limiting the size should fix this issue.

  Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36906

ACKs for top commit:
  practicalswift:
    cr ACK fa7718344d2879bb3f3c00a4185c5445390c017d

Tree-SHA512: 6edfcf324ee9d94e511038ee01340f02db50bcb233af3f1a1717c3602164c88528d9d987e971ec32f1a4593b868019bea0102c53c9b02bfefec3dfde959483cf
2023-11-19 10:20:12 -06:00
MacroFake
e98e5dc740 Merge bitcoin/bitcoin#24946: Unroll the ChaCha20 inner loop for performance
81c09ee45caecf8d9daf6766b94cebf54f3f08cd Unroll the ChaCha20 inner loop for performance (Pieter Wuille)

Pull request description:

  Unrolling the inner ChaCha20 loop gives a ~15% speedup for me in the CHACHA20_* benchmarks. It's a simple change, this performance helps with RNG generation, and will matter more for BIP324.

ACKs for top commit:
  martinus:
    tested ACK  81c09ee with clang++ 13.0.1, test `CHACHA20_1MB`:
  MarcoFalke:
    ACK 81c09ee45caecf8d9daf6766b94cebf54f3f08cd 🍟

Tree-SHA512: 108bd0ba573bb08de92d611e7be7c09a2c2700f9655f44129b87f9b71f7e101dfc6bd345783e7b4b9b40f0b003913cf59187f422da8cdb5b20887f7855b2611a
2023-11-19 10:20:12 -06:00
PastaPastaPasta
105acfd5fc
Merge pull request #5698 from knst/v20-fix-todo-2
fix: TODO related fixes for post-v20 release
2023-11-19 10:14:13 -06:00
Konstantin Akimov
a620a6b6cd refactor: a new struct CDKGJustification::Contribution instead std::pair 2023-11-18 02:43:47 +07:00
Konstantin Akimov
3f902384c9 cleanup: remove TODO so far as it is not clear what exactly to do 'cleanup' 2023-11-18 02:43:47 +07:00
Konstantin Akimov
33728107ec cleanup: drop UpgradeDB for llmq::BlockProcessor 2023-11-18 02:43:47 +07:00
Konstantin Akimov
e6391b606a refactor: use emplace_back in simplifiedmns constructors 2023-11-18 02:43:47 +07:00
Konstantin Akimov
d82b0ec72e feat: improve log of amount in governance classes 2023-11-18 02:43:47 +07:00
Konstantin Akimov
cfe9efe793 cleanup: remove outdated TODO to follow-up bitcoin#16624 2023-11-18 02:43:47 +07:00
Konstantin Akimov
7f15dcff8a refactor: avoid code duplication and data copy 2023-11-18 02:43:47 +07:00
fanquake
0beae4007c Merge bitcoin/bitcoin#23878: doc: Remove TODO comment in tx_verify
fa50d8b66e74792eb46515853e4aa8a99f25561b doc: Remove TODO comment in tx_verify (MarcoFalke)

Pull request description:

  The comment has no clear motivation, so it seems better to remove it and fix it when there is a reason.

  An alternative (if a fix isn't possible when there is a clear motivation) would be to create an issue thread for easier discussion.

ACKs for top commit:
  fanquake:
    ACK fa50d8b66e74792eb46515853e4aa8a99f25561b

Tree-SHA512: e9c25bab46a73b7c2db288c62ed9838a5e794b3b72db494173f4502da60b58dec4383064964c0842932cd30e4251fc01ad0c28681e2ef6cb442482eea2bad595
2023-11-18 02:43:42 +07:00
Konstantin Akimov
89f10e7d67 cleanup: remove out-dated TODO
TODO itself is removed in bitcoin#10618 (DNM)
But actually fixed in [merged] Merge #18021: Convert undo.h to new serialization framework
2023-11-18 02:41:04 +07:00
Konstantin Akimov
ba97f49f2f
refactor: re-order headers and forward declarations to improve compile time (#5693)
## Issue being fixed or feature implemented
Some headers include other heavy headers, such as `logging.h`,
`tinyformat.h`, `iostream`. These headers are heavy and increase
compilation time on scale of whole project drastically because can be
used in many other headers.

## What was done?
Moved many heavy includes from headers to cpp files to optimize
compilation time.
In some places  added forward declarations if it is reasonable.

As side effect removed 2 circular dependencies:
```
"llmq/debug -> llmq/dkgsessionhandler -> llmq/debug"
"llmq/debug -> llmq/dkgsessionhandler -> llmq/dkgsession -> llmq/debug"
```


## How Has This Been Tested?
Run build 2 times before refactoring and after refactoring: `make clean
&& sleep 10s; time make -j18`

Before refactoring:
```
real    5m37,826s
user    77m12,075s
sys     6m20,547s

real    5m32,626s
user    76m51,143s
sys     6m24,511s
```

After refactoring:
```
real    5m18,509s
user    73m32,133s
sys     6m21,590s

real    5m14,466s
user    73m20,942s
sys     6m17,868s
```

~5% of improvement for compilation time. That's not huge, but that's
worth to get merged

There're several more refactorings TODO but better to do them later by
backports:
 - bitcoin/bitcoin#27636
 - bitcoin/bitcoin#26286
 - bitcoin/bitcoin#27238
 - and maybe this one: bitcoin/bitcoin#28200


## 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
2023-11-17 10:04:18 -06:00
UdjinM6
7fc8a04e1c
fix: make CONFIGFLAGS optional (#5713)
## Issue being fixed or feature implemented
make it possible to run `./contrib/guix/guix-build` without specifying
`CONFIGFLAGS`

## What was done?

## How Has This Been Tested?
run `./contrib/guix/guix-build` w/ and w/out this patch

## 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)_
2023-11-16 13:19:18 -06:00
PastaPastaPasta
a81310ad2c
build(guix): add debug symbols for osx (#5708)
## Issue being fixed or feature implemented
Add debug symbols for Darwin

## What was done?
Added Darwin debug symbols and combine them as output

## How Has This Been Tested?
guix build

## Breaking Changes
  _Please describe any breaking changes your code introduces_


## 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
- [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>
2023-11-16 12:38:59 -06:00
UdjinM6
b5d82832da
fix: should not notify about mnlist changes while ConnectBlock isn't done yet (#5711)
## Issue being fixed or feature implemented
`ConnectBlock` can fail after `ProcessSpecialTxsInBlock`, we shouldn't
be notifying too early. Same for `DisconnectBlock` but that's less of an
issue imo.

## What was done?
Move notifications to the end of `ConnectBlock`/`DisconnectBlock`. There
is no `connman` in `CChainState` and I don't want to pass it in updates
struct so I changed `NotifyMasternodeListChanged` and used `connman`
from `CDSNotificationInterface` instead.

## How Has This Been Tested?
run unit test, run testnet qt wallet

## Breaking Changes

## 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)_
2023-11-16 12:36:46 -06:00
Konstantin Akimov
9efabdb43f
chore: inacuracies in release notes for v20 and v19 (#5709)
## What was done?
Fixes some inaccuracies for release notes for v20.0.0, for v19.2.0.


## 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
- [x] I have assigned this pull request to a milestone
2023-11-16 12:14:12 -06:00
UdjinM6
74f42218ce
build: let additional configure params to be passed into guix (#5705)
## Issue being fixed or feature implemented
Make it possible to pass additional configure params into Guix. This
could be used to setup various sets of nightly/debug builds which could
then be deployed automagically to catch potential issues early.

## What was done?


## How Has This Been Tested?
`CONFIGFLAGS="--enable-debug" HOSTS="x86_64-linux-gnu"
./contrib/guix/guix-build`

## 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)_
2023-11-16 12:11:11 -06:00
UdjinM6
0833974a81
fix: add missing log categories (#5707)
## Issue being fixed or feature implemented
`creditpool` and `ehf` categories are missing in `logging`/`debug` RPCs
😞

## What was done?


## How Has This Been Tested?
run `debug` and `logging` RPCs and make sure these categories are listed
now

## 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)_
2023-11-16 11:56:34 -06:00
PastaPastaPasta
25e5ce6c9a
docs: update dmg format (#5703)
## Issue being fixed or feature implemented
Docs was slightly incorrect after moving to guix

## What was done?
fixed docs

## How Has This Been Tested?
Did notarization :)

## Breaking Changes


## 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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-11-15 21:39:25 -06:00
PastaPastaPasta
4c0c3cc1b5
Merge pull request #5704 from UdjinM6/merge_master_20.0.0
chore: Merge master v20.0.0 back into develop
2023-11-15 21:37:13 -06:00
UdjinM6
3d5ab37f9b
Merge branch 'master' into merge_master_20.0.0 2023-11-15 20:14:03 +03:00
PastaPastaPasta
4dff2e0631
chore: bump version to v20.1.0 non-release (#5696)
## Issue being fixed or feature implemented
Bump develop version to v20.1.0; v21 features should not yet be merged
into develop; when the time is come to begin merging v21 features into
develop, we can then bump version again.

## What was done?
Bump version

## How Has This Been 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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-11-14 09:23:00 -06:00
PastaPastaPasta
df79078a2e
chore: set release version to true; set rc to 0 (#5695)
## Issue being fixed or feature implemented
Bump release to true; rc to 0

This should be the final PR merged to v20.x branch

## What was done?


## How Has This Been 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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-11-14 09:17:48 -06:00
UdjinM6
3be7979c04
docs: add v20.0.0 release notes, archive v19.3.0 and drop partial ones (#5674)
## Issue being fixed or feature implemented
NOTE: this PR is for v20.x branch, to be merged as the last one before
v20 release.

## What was done?


## How Has This Been Tested?


## Breaking Changes

## 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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-11-14 09:16:26 -06:00
PastaPastaPasta
4a639eb7bd
Merge pull request #5697 from UdjinM6/translations202311
chore: Translations2023-11
2023-11-14 09:09:19 -06:00
UdjinM6
acfff1a060 ru 2023-11-14 09:08:39 -06:00
UdjinM6
358692e2e5 make translate 2023-11-14 09:08:39 -06:00
PastaPastaPasta
402e937d29
fix: enable the mn_rr hard fork in v20 so that a v20.1 in the future may activate mn_rr (#5699)
## Issue being fixed or feature implemented
mn_rr should be backwards compatible to v20.0.0; in the case we need to
introduce breaking changes on any of the features in mn_rr then we
should create a new mn_rr_v2 hard fork.

## What was done?
Add timestamps for mn_rr for main net activation

## 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._
- [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)_

---------

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: Konstantin Akimov <knstqq@gmail.com>
2023-11-14 09:08:06 -06:00
PastaPastaPasta
6715fc2075
Merge pull request #5692 from UdjinM6/mainnet_seeds
chore: update mainnet chainparams and seeds
2023-11-13 10:13:26 -06:00
UdjinM6
696f8a806a chore: define v20 start/timeout on mainnet 2023-11-13 10:13:12 -06:00
UdjinM6
4b26efa102 chore: update mainnet chainparams 2023-11-13 10:13:12 -06:00
UdjinM6
7e55f09a98 chore: update mainnet seeds
```
cd contrib/seeds
dash-cli protx list valid 1 > protx.txt
./makeseeds.py protx.txt > nodes_main.txt
./generate-seeds.py . > ../../src/chainparamsseeds.h
```
2023-11-13 10:13:12 -06:00
UdjinM6
c2db29439a
fix: rename SPORK_24_EHF to SPORK_24_TEST_EHF, make sure it has no effect on mainnet (#5691)
## Issue being fixed or feature implemented
Be more explicit about the fact that spork24 is for non-mainnet only,
enforce it in code.

NOTE: I know we have EHF signalling disabled for mainnet in v20 but I
think it still makes sense to make sure spork24 condition won't slip
into mainnet in some future version accidentally.

## What was done?
pls see individual commits

## 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)_
2023-11-13 10:03:46 -06:00
UdjinM6
704c594237
fix: some fixes for block payee validation and corresponding tests (#5684)
## Issue being fixed or feature implemented
1. we _should not_ skip masternode payments checks below
nSuperblockStartBlock or when governance is disabled
2. we _should_ skip superblock payee checks while we aren't synced yet
(should help recovering from missed triggers)

## What was done?
pls see individual commits. 

## How Has This Been Tested?
run tests, sync w/ and w/out `--disablegovernance`, reindexed on testnet

## 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)_
2023-11-13 10:02:52 -06:00
Odysseas Gabrielides
c2354fb55f
fix: keep platform quorum data for 2 months (#5690)
## Issue being fixed or feature implemented
When Platform restarts on a network, it needs to sign requests using old
quorums.
We shouldn't remove data (secret key shares, vvec) for old Platform
quorums as we do with the rest of the llmqs.

## What was done?
We skip removing for Platform quorums younger than 2 months.

## How Has This Been Tested?


## Breaking Changes
no

## 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)_

---------

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2023-11-13 10:02:15 -06:00
UdjinM6
b1d249d102
fix: avoid some crashes on invalidateblock (#5683)
## Issue being fixed or feature implemented
```
Assertion failure:
  assertion: quorum != nullptr
  file: quorums.cpp, line: 547
  function: ScanQuorums
```

## What was done?
Hold cs_main while scanning to make sure tip doesn't move. Happened in
`ProcessPendingInstantSendLocks()` only for me but I thought that it
would probably make sense to apply the same fix in other places too.

## How Has This Been Tested?
run `invalidateblock` for a deep enough height (100s of blocks)

## 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)_
2023-11-11 13:14:26 +03:00
PastaPastaPasta
6e639c7ac3
refactor: use more gsl::not_null in utils.h and deterministicmns.h (#5651)
## Issue being fixed or feature implemented
Use not_null if the function would crash if given a nullptr

## What was done?
Refactored to use gsl::not_null

## How Has This Been Tested?
Compiled

## Breaking Changes
Should be none

## 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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-11-10 08:33:21 -06:00
Odysseas Gabrielides
d5b2c260a4
test: ensure that mining is possible without CL info (#5689)
## Issue being fixed or feature implemented
With DIP29 added to v20, miners include best CL Signature in CbTx.
The purpose of this test, is to ensure that mining is still possible
when CL information isn't available.
In such case, miners are expected to copy best CL Signature from CbTx of
previous block.

## What was done?
Two scenarios are implemented:

- Add dynamically a node, make sure `getbestchainlock()` fails, let it
mine a block.
- Disable `SPORK_19_CHAINLOCKS_ENABLED`, add dynamically a node, make
sure `getbestchainlock()` fails, let it mine a block.

In both tests, we make sure the block is accepted by everyone and that
the `bestCLSignature` in CbTx is copied from previous block.

## How Has This Been Tested?
`feature_llmq_chainlocks.py`

## Breaking Changes
no

## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [x] 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>
2023-11-10 08:32:01 -06:00
Konstantin Akimov
216a5f7563
refactor: make MNActivationHeight in Params() indeed constant (#5658)
## Issue being fixed or feature implemented
Addressed issues and comments from [PR
comment](https://github.com/dashpay/dash/pull/5469#discussion_r1317886678)
and [PR
comment](https://github.com/dashpay/dash/pull/5469#discussion_r1338704082)

`Params()` should be const; global variable `CMNHFManager` is a better
out-come.


## What was done?
The helpers and direct calls of `UpdateMNParams` for each block to
update non-constant member in `Params()` is not needed anymore. Instead
`CMNHFManager` takes cares about status of Signals for each block,
update them dynamically and save in evo db.


## How Has This Been Tested?
Run unit/functional tests.

## Breaking Changes
Changed rpc `getblockchaininfo`. 
the field `ehf` changed meaning: it's now only a flag -1/0; but it is
introduced a new field `ehf_height` now that a height.


## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] 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

---------

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Co-authored-by: thephez <thephez@users.noreply.github.com>
2023-11-10 08:31:12 -06:00
Konstantin Akimov
8022b4497a
feat: improving unit tests for Basic BLS and enforcing Basic BLS for Evo Nodes (#5463)
## Issue being fixed or feature implemented
https://github.com/dashpay/dash/issues/5471


## What was done?
It splits from https://github.com/dashpay/dash/pull/5443

Adds extra unit tests for BLS basic scheme; enforces BLS basic for Evo
Nodes in serialization/unserialization of CProRegTx, CProUpServTx.

## How Has This Been Tested?
Run functional/unit tests + added new unit tests.

## Breaking Changes
Serialization slightly changed, but it should be not breaking change

## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] 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
2023-11-08 10:30:39 -06:00
UdjinM6
ab56dcf34e
docs: update man pages (#5672)
## Issue being fixed or feature implemented

## What was done?
`./contrib/devtools/gen-manpages.sh` and drop `rc2` and `dirty` suffixes

## 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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-11-07 08:04:39 -06:00
Odysseas Gabrielides
c293593be2
test: v20 earlier activation for regtest (#5668)
## Issue being fixed or feature implemented
Currently, on functional tests v20 activates at height 1440 which is
later than needed.

## What was done?
Reduced the window size of v20 from 480 to 400 which activates v20 at
1200.
Adjusted tests to this change.

Note regarding the window analysis for MN payments in
`feature_llmq_evo.py` (reduced from 256 to 48 blocks):
48 window is enough to analyse 4 MNs and 5 EvoNodes (Weighted count=24)

On my machine using develop:
`python3 feature_llmq_rotation.py 145.45s user 30.00s system 68% cpu
4:16.93 total`

With this PR:
`python3 feature_llmq_rotation.py 119.26s user 24.61s system 62% cpu
3:50.89 total`


## How Has This Been Tested?
all tests


## Breaking Changes
no

## 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)_
2023-11-07 08:03:03 -06:00
PastaPastaPasta
7bae092519
Merge pull request #5661 from knst/fix-backport-21689
backport: bitcoin#21689 (fix unit test failure test/net_tests.cpp:275)
2023-11-07 07:54:21 -06:00
MarcoFalke
944a4d758d Merge #21689: test: Remove intermittently failing and not very meaningful BOOST_CHECK in cnetaddr_basic
63631beef6a0046390469971adf4500718ab34ad test: Remove intermittently failing and not very meaningful `BOOST_CHECK` in `cnetaddr_basic` (practicalswift)

Pull request description:

  Remove intermittently failing and not very meaningful `BOOST_CHECK` in `cnetaddr_basic`.

  Fixes #21682.

  Rationale from https://github.com/bitcoin/bitcoin/issues/21682#issuecomment-819897122:

  > I've looked at that test before and I don't think that specific `BOOST_CHECK` makes much sense TBH :)
  >
  > 1.) I don't understand why we test if `ToString()` output includes `%zone_index`: it clearly doesn't on some platforms, so we cannot rely on it anyways. Then why test it?
  >
  > 2.) And perhaps more fundamentally: why would we even _want_ to have `%zone_index` in our textual `ToString()` output? I think the expectation is to get say `fe80::1ff:fe23:4567:890a` (without zone index) and not say `fe80::1ff:fe23:4567:890a%eth2 ` or `fe80::1ff:fe23:4567:890a%3 `when doing `ipv6_addr.ToString()` :)

ACKs for top commit:
  MarcoFalke:
    review ACK 63631beef6a0046390469971adf4500718ab34ad

Tree-SHA512: 06863d1edfb9ad1ca9bcae09cf3f0f47b58bb29d222b70799c3dc059b96452889026e4b99b132782846d9896e3e798d17c7f9406e0e6a0bec1bffc6edb54e9df
2023-11-07 07:54:03 -06:00
UdjinM6
343c25594f
feat!: reuse nHighSubsidyBlocks as a starting point for a fixed nSubsidyBase value to better mimic mainnet (#5664)
## Issue being fixed or feature implemented
We need some network that mimics v20 governance budget changes a bit
better. All our networks _lower_ the budget after v20 activation while
mainnet would actually rise it.

## What was done?
Reuse `nHighSubsidyBlocks` as a starting point for a fixed nSubsidyBase
value to better mimic mainnet changes on v20.

## How Has This Been Tested?
That's a devnet-only change, so no testing yet

## Breaking Changes
Won't sync on old devnets after these changes

## 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)_

---------

Co-authored-by: Konstantin Akimov <knstqq@gmail.com>
2023-11-07 07:51:23 -06:00
PastaPastaPasta
1c29238296
Merge pull request #5676 from knst/fix-ubuntu-23-10-backports
backport:  bitcoin#26189, bitcoin-core/gui#137, gui#46, partial bitcoin#25233
2023-11-07 07:44:34 -06:00
MacroFake
17d017ec88 partial Merge bitcoin/bitcoin#25233: compat: remove glibcxx sanity checks
It's partial due to this missing changes:
```
https://github.com/bitcoin/bitcoin/pull/25233/files#diff-4cb884d03ebb901069e4ee5de5d02538c40dd9b39919c615d8eaa9d364bbbd77L632
```

cc61bc2e19b1c8cb32778ef42746d32b02cc2671 compat: remove glibcxx sanity checks (fanquake)

Pull request description:

  These checks were added in #4339, (see also #4081), to test
  our back-compat stubs, however, those stubs no-longer exist (#22930),
  meaning that these checks are now just testing some specific standard
  library behaviour, without a particular rationale, or reason, compared
  to any other standard library functionlity we use.

  There has also been some discussion about our sanity checks in the
  context of the libbitcoinkernel refactoring, see https://github.com/bitcoin/bitcoin/pull/25065#discussion_r880668218.
  Removing the checks removes the need to worry about atleast the
  glibcxx checks.

  Also remove the list of checks from the doc in `init.h`, because it is
  incomplete, and anyone who wants to know what checks are included can
  look at the function.

  Guix Build (arm64):
  ```bash
  e18a81e25b4707cbe113fb4d3ba2459013c1178e7cecfe446e4f14ee5ecd2ce8  guix-build-cc61bc2e19b1/output/arm-linux-gnueabihf/SHA256SUMS.part
  9928cc38b79f827018cba0bdde98666b31806afcc79dd95a00acb8e153c36eec  guix-build-cc61bc2e19b1/output/arm-linux-gnueabihf/bitcoin-cc61bc2e19b1-arm-linux-gnueabihf-debug.tar.gz
  ebf4635ba4688899ae62e4bb17ebb2afb25c538c4a8068ef515920fd4e43754e  guix-build-cc61bc2e19b1/output/arm-linux-gnueabihf/bitcoin-cc61bc2e19b1-arm-linux-gnueabihf.tar.gz
  74c7e35b47c6d101fda7205f144d37150329b4c360db09d37b8c1437f3390898  guix-build-cc61bc2e19b1/output/arm64-apple-darwin/SHA256SUMS.part
  6e12643b17be9326f1d873dfe51a52c082671540792877af624b42ca9f6e1791  guix-build-cc61bc2e19b1/output/arm64-apple-darwin/bitcoin-cc61bc2e19b1-arm64-apple-darwin-unsigned.dmg
  1d86d0416c7a50afd7bd8d850f416b7c7277464ccc95e4dae53b5b59415fc83d  guix-build-cc61bc2e19b1/output/arm64-apple-darwin/bitcoin-cc61bc2e19b1-arm64-apple-darwin-unsigned.tar.gz
  84070843f23839e7191ad3a667eb63c45f668eb95afbfb3fcdfb8363320f67d4  guix-build-cc61bc2e19b1/output/arm64-apple-darwin/bitcoin-cc61bc2e19b1-arm64-apple-darwin.tar.gz
  bf6ccd7b8c40476b1dc52b491757313ea3e96c43a01c8aabaf39f94dc1837329  guix-build-cc61bc2e19b1/output/dist-archive/bitcoin-cc61bc2e19b1.tar.gz
  25e7e1ff7d8de38632abf9926343c8ba556209f3d03109c92864ffe72813a05f  guix-build-cc61bc2e19b1/output/powerpc64-linux-gnu/SHA256SUMS.part
  d0398de83841607b1bf921d4553b30ad5e2d70d0570e96a2eaaf2762e1103c79  guix-build-cc61bc2e19b1/output/powerpc64-linux-gnu/bitcoin-cc61bc2e19b1-powerpc64-linux-gnu-debug.tar.gz
  f09cdc2ac2a2bb644f4749f3d74b5210ddb531594c33d127a907f0223e7793e5  guix-build-cc61bc2e19b1/output/powerpc64-linux-gnu/bitcoin-cc61bc2e19b1-powerpc64-linux-gnu.tar.gz
  ef36a68ef4e5ee9b311df40062cd2296f897e7b1550e39e0643601cd7d469010  guix-build-cc61bc2e19b1/output/powerpc64le-linux-gnu/SHA256SUMS.part
  937b600a2b86304ccc5b6c71a7eaf8aa5e2020592724cef6a933a1955995480b  guix-build-cc61bc2e19b1/output/powerpc64le-linux-gnu/bitcoin-cc61bc2e19b1-powerpc64le-linux-gnu-debug.tar.gz
  eca4eec41e71fdf7a7b0fa4065afa49c47d3b9541ed2cb4d083ad4a0de102e37  guix-build-cc61bc2e19b1/output/powerpc64le-linux-gnu/bitcoin-cc61bc2e19b1-powerpc64le-linux-gnu.tar.gz
  981c0968c19905925a599cff357ec259c1e806bdb7691c7b52039be450bdad7c  guix-build-cc61bc2e19b1/output/riscv64-linux-gnu/SHA256SUMS.part
  89c709967f9a157256281fbf682aad246f2eaad9c2f1797c2787253cbabe12f8  guix-build-cc61bc2e19b1/output/riscv64-linux-gnu/bitcoin-cc61bc2e19b1-riscv64-linux-gnu-debug.tar.gz
  454cd830dd382e176f5a23041fc33f93937668245481b0dd29fc04882d9528eb  guix-build-cc61bc2e19b1/output/riscv64-linux-gnu/bitcoin-cc61bc2e19b1-riscv64-linux-gnu.tar.gz
  e0812c2dc492e5c5f06e3685d19da8fb29ed38d3b32821d293ef01cb4fefbd79  guix-build-cc61bc2e19b1/output/x86_64-apple-darwin/SHA256SUMS.part
  0e7d4241d8ac882a8091fa00a7813db87a3e5afec59627e45b6c910cfdd4a7b0  guix-build-cc61bc2e19b1/output/x86_64-apple-darwin/bitcoin-cc61bc2e19b1-x86_64-apple-darwin-unsigned.dmg
  3faaca046cbb2642445a7dd1f389ed7bf94a65de8372441c36d5cb79c030ce31  guix-build-cc61bc2e19b1/output/x86_64-apple-darwin/bitcoin-cc61bc2e19b1-x86_64-apple-darwin-unsigned.tar.gz
  73080f032a42db679baf0d09619671ac5b9d85be84a68bdd6b6709eb0e6465bd  guix-build-cc61bc2e19b1/output/x86_64-apple-darwin/bitcoin-cc61bc2e19b1-x86_64-apple-darwin.tar.gz
  07b6e1b6291404bca1044df4a45b6958b882ffb88c143ba98f1959960a394897  guix-build-cc61bc2e19b1/output/x86_64-linux-gnu/SHA256SUMS.part
  16b455f62398f4aa0d3821abb1cceb8151e31c2664e3f974a764a5b8702b50f3  guix-build-cc61bc2e19b1/output/x86_64-linux-gnu/bitcoin-cc61bc2e19b1-x86_64-linux-gnu-debug.tar.gz
  3c1a3a6a343f17b83f3b3d47e9426eccd2d0bcc7f824cd958fcf2cf06cdc3276  guix-build-cc61bc2e19b1/output/x86_64-linux-gnu/bitcoin-cc61bc2e19b1-x86_64-linux-gnu.tar.gz
  f05afa688ea7211b0049555385fb2acc26986e24d8d00893389160e07037e693  guix-build-cc61bc2e19b1/output/x86_64-w64-mingw32/SHA256SUMS.part
  8bcbae67dd0746c42e1e7c7db67725a69289b08e9aa97b873d443d0aa355615d  guix-build-cc61bc2e19b1/output/x86_64-w64-mingw32/bitcoin-cc61bc2e19b1-win64-debug.zip
  efa45e3b76e5ae08a8392d58e741325df572d92c7dd69b65d876cdcda541d2fc  guix-build-cc61bc2e19b1/output/x86_64-w64-mingw32/bitcoin-cc61bc2e19b1-win64-setup-unsigned.exe
  3a8c2461ca826138c3017d06279a79b4c6bee2a507ad362aa6e424f76678596c  guix-build-cc61bc2e19b1/output/x86_64-w64-mingw32/bitcoin-cc61bc2e19b1-win64-unsigned.tar.gz
  e56ae4f609d4e6a3ca5917a4bb763c91012ece2d236d6b62a666358791e43525  guix-build-cc61bc2e19b1/output/x86_64-w64-mingw32/bitcoin-cc61bc2e19b1-win64.zip
  ```

ACKs for top commit:
  MarcoFalke:
    lgtm ACK cc61bc2e19b1c8cb32778ef42746d32b02cc2671
  laanwj:
    Concept and code review ACK cc61bc2e19b1c8cb32778ef42746d32b02cc2671

Tree-SHA512: 3da6aba44eef3f864fcbe897db1faa964923756e68c6a713e444b5d01c6d3542c3d7ca26678760e81a7a9e3cd40bd90622d0a7b697c27166817ba4f1023661ef
2023-11-07 07:44:05 -06:00