Commit Graph

23407 Commits

Author SHA1 Message Date
thephez
490f32c8d1
chore: update dash_hash install and instructions (#5291)
## Issue being fixed or feature implemented
Install of dash_hash will change once
https://github.com/dashpay/dash_hash/pull/17/ is merged

## What was done?
- Changed install instructions to match new install in dash_hash README
- Updated Dockerfile to install correctly

## How Has This Been Tested?
N/A

## 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
- [x] I have made corresponding changes to the documentation
2023-05-11 20:19:45 -05:00
PastaPastaPasta
11b64fc2e8
Merge pull request #5352 from kittywhiskers/peermgr_refac
backport: merge bitcoin#19791, #19911, #19910, #20217, #20649, #18458, #20811 (peer manager backports)
2023-05-11 09:23:34 -05:00
Kittywhiskers Van Gogh
d663d47be9 merge bitcoin#20811: move net_processing implementation details out of header 2023-05-11 09:19:47 -05:00
Kittywhiskers Van Gogh
3a4c4633a4 merge bitcoin#18458: Add missing cs_vNodes lock 2023-05-11 09:19:47 -05:00
Kittywhiskers Van Gogh
6f3060b763 merge bitcoin#20649: Remove nMyStartingHeight from CNode/Connman 2023-05-11 09:19:47 -05:00
Kittywhiskers Van Gogh
2c3feb8e4b merge bitcoin#20217: Remove g_relay_txes 2023-05-11 09:19:47 -05:00
Kittywhiskers Van Gogh
296e0dd28e merge bitcoin#19910: Move peer_map to PeerManager 2023-05-11 09:19:47 -05:00
Kittywhiskers Van Gogh
d0a35831db net: rename misbehavior members using scripted-diff
implements 8e35bf59062b3a823182588e0bf809b3367c2be0 from https://github.com/bitcoin/bitcoin/pull/19607
2023-05-11 09:19:47 -05:00
Kittywhiskers Van Gogh
60d589014c merge bitcoin#19911: guard vRecvGetData with cs_vRecv and orphan_work_set with g_cs_orphans 2023-05-11 09:19:47 -05:00
Kittywhiskers Van Gogh
f2384ffa90 merge bitcoin#19791: Move Misbehaving() to PeerManager 2023-05-11 09:19:47 -05:00
Kittywhiskers Van Gogh
d9d98505e4 net: pass PeerLogicValidation to remaining ProcessMessages 2023-05-11 09:19:47 -05:00
Kittywhiskers Van Gogh
f1f1d6392b net: pass PeerLogicValidation to LLMQ objects 2023-05-11 09:19:47 -05:00
PastaPastaPasta
d4f2c354b6
Merge pull request #5364 from kittywhiskers/py_bump
build: downgrade to python 3.8, consistently use focal across images and documentation
2023-05-11 09:19:23 -05:00
Kittywhiskers Van Gogh
a287a51b39 ci: update documentation to use focal instead of bionic 2023-05-11 09:18:48 -05:00
Kittywhiskers Van Gogh
8b054d49c7 ci: harmonize parent images, use focal consistently 2023-05-11 09:18:48 -05:00
Kittywhiskers Van Gogh
49e01820bb merge bitcoin#18705: Remove xenial tsan workaround 2023-05-11 09:18:48 -05:00
Kittywhiskers Van Gogh
0b9500f3e9 partial bitcoin#27483: Bump python minimum version to 3.8 2023-05-11 09:18:48 -05:00
Kittywhiskers Van Gogh
7bd22afacb partial bitcoin#26226: Bump minimum python version to 3.7 2023-05-11 09:18:48 -05:00
Kittywhiskers Van Gogh
4fb0a43052 merge bitcoin#23317: fix python detection 2023-05-11 09:18:48 -05:00
Kittywhiskers Van Gogh
d6de466369 merge bitcoin#23182: add python3.10 alias to AC_PATH_PROGS call in configure 2023-05-11 09:18:48 -05:00
Kittywhiskers Van Gogh
5edac8c86e merge bitcoin#26445: bump patch version to 3.6.15 2023-05-11 09:18:48 -05:00
Kittywhiskers Van Gogh
1bfb3328e6 merge bitcoin#19504: Bump minimum python version to 3.6 2023-05-11 09:18:48 -05:00
Kittywhiskers Van Gogh
d27e71f2c7 revert dash#4717: bump .python-version
This reverts commit 7746f19399.
2023-05-11 09:18:48 -05:00
UdjinM6
6542ea53eb
ci: clone dash_hash at a specific tag (#5369)
## Issue being fixed or feature implemented
should fix ci failures like
https://gitlab.com/dashpay/dash/-/jobs/4261565118 in #5291

## What was done?
Use the exact dash_hash version/tag instead of simply using `master`.
Bumping `DASH_HASH_VERSION` invalidates docker cache.

## How Has This Been Tested?
Ran it in my gitlab ci

## 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-05-11 12:26:07 +03:00
UdjinM6
e78ce77ee6
test: Fix activate_by_name (#5367)
## Issue being fixed or feature implemented
I think the logic in activate_by_name is broken 

## What was done?
fix it

## 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)_
2023-05-11 12:25:41 +03:00
UdjinM6
9770e06bfd
fix(wallet): autobackup fixes (#5269)
## Issue being fixed or feature implemented
pls see individual commits

fixes an issue (reported by @strophy recently) where mixing wouldn't
start in a fresh new wallet

not 100% sure but
[99867eb](99867eb769)
might also fix #5350 reported by @splawik21 so this could also be a v19
backport candidate

## What was done?


## How Has This Been Tested?
mixing on testnet

## Breaking 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

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone
2023-05-10 07:46:36 -05:00
UdjinM6
72899530bf
test: Fix feature_pruning.py (#5353)
## Issue being fixed or feature implemented
`feature_pruning.py` is failing atm

## What was done?
pls see individual commits

## How Has This Been Tested?
run `feature_pruning.py` locally

gitian for this branch with `INTEGRATION_TESTS_ARGS` set to `--extended
--exclude feature_dbcrash --timeoutscale=4 --jobs=4`:
https://gitlab.com/dashpay/dash/-/pipelines/852044104
NOTE:
[`linux64_tsan-test`](https://gitlab.com/dashpay/dash/-/jobs/4197383660)
failed because tsan build binaries are super slow and we hit 30 minutes
timeout for 1 single test because of that. This is not an actual test
failure.

## 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)_
2023-05-09 12:13:14 -05:00
Odysseas Gabrielides
b1626f9af0
feat!: Insertion of best CL signature in CbTx (#5262)
## Issue being fixed or feature implemented


## What was done?
- Bumped version of `CbTx`. Added fields `bestCLHeightDiff`,
`bestCLSignature`
- Miner starting from v20 fork, includes best CL signature in `CbTx` (if
available) or null signature.
- All nodes should verify included CL signature before accepting the
block.

## How Has This Been Tested?
Basically, activated v20 on in the beginning of
`feature_llmq_chainlocks.py`

## Breaking Changes
Yes, new version of CbTx

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

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone

---------

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2023-05-08 22:34:26 -05:00
UdjinM6
5f28ecf305
fix: serialize GovernanceObject properly (#5357)
## Issue being fixed or feature implemented
gobject sync is broken after #5322 

## What was done?
implement proper serialization

## How Has This Been Tested?
run dash-qt/dashd on testnet/mainnet

## Breaking Changes
n/a, fixes breaking changes introduced earlier

## 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-05-08 11:02:14 -05:00
Konstantin Akimov
750f627a90
fix: improved reliability of functional tests that activates dip24 (#5313)
## Issue being fixed or feature implemented
Functional tests in CI and locally often fails without a good reason
(pretty randomly)

## What was done?
It was re-implemented `get_recovered_sig` and updated `create_raw_tx`
for better selection/change output.

## How Has This Been Tested?
Run functional times with bug amount of parrallel jobs:
```
test/functional/test_runner.py -j 20 feature_llmq_is_cl_conflicts.py feature_llmq_is_cl_conflicts.py feature_llmq_is_cl_conflicts.py feature_llmq_is_cl_conflicts.py feature_llmq_is_cl_conflicts.py feature_llmq_is_cl_conflicts.py feature_llmq_is_cl_conflicts.py feature_llmq_is_cl_conflicts.py feature_llmq_is_cl_conflicts.py feature_llmq_is_cl_conflicts.py  feature_llmq_is_cl_conflicts.py feature_llmq_is_cl_conflicts.py feature_llmq_is_cl_conflicts.py feature_llmq_is_cl_conflicts.py feature_llmq_is_cl_conflicts.py feature_llmq_is_cl_conflicts.py feature_llmq_is_cl_conflicts.py feature_llmq_is_cl_conflicts.py feature_llmq_is_cl_conflicts.py feature_llmq_is_cl_conflicts.py feature_llmq_is_cl_conflicts.py
```
Without these changes usually 2-3 instance fails.
With these changes all failures happened only for `p2p_addrv2_relay.py`
and `mempool_unbroadcast.py`. Beside feature_llmq_is_conflicts.py
improved stability of `interface_zmq_dash.py` also.

## Breaking Changes
No 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

---------

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2023-05-06 21:36:45 -05:00
Ivan Shumkov
457f91da14
docs: wrong threshold for LLMQ_25_67 (#5358)
Invalid number of minimum members in comments for LLMQ_25_67


## Issue being fixed or feature implemented

Invalid number of minimum members in comments for LLMQ_25_67


## What was done?
- Replaced `67` with `17`


## How Has This Been Tested?
None


## Breaking Changes
None


## 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
- [x] 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-05-04 23:33:47 -05:00
UdjinM6
4cd7e9a9b7
fix(qt): fix few gui issues (#5351)
## Issue being fixed or feature implemented
- red `#800000` looks ugly in Dark theme, use TS_ERROR like we did prior
to 17453 backport (via #5255), also introduce TS_WARNING for `#999900`
to unify things
before:
<img width="454" alt="Screenshot 2023-04-26 at 22 40 54"
src="https://user-images.githubusercontent.com/1935069/234685172-129bc88e-bfaf-45d9-ad93-f2c5139b545a.png">
after:
<img width="432" alt="Screenshot 2023-04-26 at 22 41 30"
src="https://user-images.githubusercontent.com/1935069/234685179-2c304b67-fb48-4f36-b8e7-869cb3400c74.png">

using TS_WARNING in sendcoinsdialog:
<img width="582" alt="Screenshot 2023-05-01 at 20 38 12"
src="https://user-images.githubusercontent.com/1935069/235508898-cdb0f875-21bc-451e-b19f-2e6465f14e38.png">
<img width="419" alt="Screenshot 2023-05-01 at 21 38 20"
src="https://user-images.githubusercontent.com/1935069/235508909-0c999cb9-445d-4b5d-96aa-5f8a094df114.png">


- there are ugly borders in statusbar when running on windows, fix them
via css

before:

![dc_before](https://user-images.githubusercontent.com/1935069/234683392-e0d97760-dd81-4e87-bb37-c67d8a03e4de.png)

after:

![dc_after](https://user-images.githubusercontent.com/1935069/234683382-d9d9d1a0-d136-4018-b470-c091e4285979.png)

## What was done?


## How Has This Been Tested?
run `dash-qt --regtest --nowallet --resetguisettings` 

## 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-05-01 23:13:02 -05:00
UdjinM6
6c5d6c1a5c
fix(qt): provide correct data into intro dlg (#5348)
## Issue being fixed or feature implemented
we failed to backport 13216 correctly in #4359

noticed this while reviewing/testing #5255 

## What was done?
fix it

## How Has This Been Tested?
run qt with `-resetguisetting` and check info with and without the patch
on testnet for example (or tweak regtest params and test there)

## 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-04-25 23:47:05 -05:00
PastaPastaPasta
e697554c68
Merge pull request #5255 from knst/bc-bp-missing-4
backport: bitcoin#15584, #16060, #16465, #16477, #16680, #16714, #16941, #16991, #17453, #17696, #19058 (last batch for v19)
2023-04-25 23:44:41 -05:00
Konstantin Akimov
84573364f5 feat: burry DIP0008 deployment to follow-up bitcoin#16060 2023-04-25 23:41:20 -05:00
Konstantin Akimov
d26b07a8f7 feat: burry DIP0001 deployment to follow-up bitcoin#16060 2023-04-25 23:41:20 -05:00
MarcoFalke
6ad9bdf722 Merge #16060: Bury bip9 deployments
e78aaf41f43d0e2ad78fa6d8dad61032c8ef73d0 [docs] Add release notes for burying bip 9 soft fork deployments (John Newbery)
8319e738f9f118025b332e4fa804d4c31e4113f4 [tests] Add coverage for the content of getblockchaininfo.softforks (James O'Beirne)
0328dcdcfcb56dc8918697716d7686be048ad0b3 [Consensus] Bury segwit deployment (John Newbery)
1c93b9b31c2ab7358f9d55f52dd46340397c906d [Consensus] Bury CSV deployment height (John Newbery)
3862e473f0cb71a762c0306b171b591341d58142 [rpc] Tidy up reporting of buried and ongoing softforks (John Newbery)

Pull request description:

  This hardcodes CSV and segwit activation heights, similar to the BIP 90 buried deployments for BIPs 34, 65 and 66.

  CSV and segwit have been active for over 18 months. Hardcoding the activation height is a code simplification, makes it easier to understand segwit activation status, and reduces technical debt.

  This was originally attempted by jl2012 in #11398 and again by me in #12360.

ACKs for top commit:
  ajtowns:
    ACK e78aaf41f43d0e2ad78fa6d8dad61032c8ef73d0 ; checked diff to previous acked commit, checked tests still work
  ariard:
    ACK e78aaf4, check diff, run the tests again and successfully activated csv/segwit heights on mainnet as expected.
  MarcoFalke:
    ACK e78aaf41f43d0e2ad78fa6d8dad61032c8ef73d0 (still didn't check if the mainnet block heights are correct, but the code looks good now)

Tree-SHA512: 7e951829106e21a81725f7d3e236eddbb59349189740907bb47e33f5dbf95c43753ac1231f47ae7bee85c8c81b2146afcdfdc11deb1503947f23093a9c399912
2023-04-25 23:41:20 -05:00
MarcoFalke
3e1c8a6a58 Merge #16465: test: Test p2sh-witness and bech32 in wallet_import_rescan
fa3c6575cac5e3841797980fe60b8368ae579dba lint: Add false positive to python dead code linter (MarcoFalke)
fa25668e1c8982548f1c6f94780709c625811469 test: Test p2sh-witness and bech32 in wallet_import_rescan (MarcoFalke)
fa79af298917d501cee26370fdf9d44d05133d15 test: Replace fragile "rng" with call to random() (MarcoFalke)
fac3dcf7d052586548f2100a0d576618a85741f9 test: Generate one block for each send in wallet_import_rescan (MarcoFalke)

Pull request description:

  This adds test coverage for segwit in the `wallet_import_rescan` test, among other cleanups.

ACKs for top commit:
  jnewbery:
    ACK fa3c6575cac5e3841797980fe60b8368ae579dba

Tree-SHA512: 877741763c62c1bf9d868864a1e3f0699857e8c028e9fcd65c7eeb73600c22cbe97b7b51093737743d9e87bcb991c1fe1086f673e18765aef0fcfe27951402f0
2023-04-25 23:41:20 -05:00
Wladimir J. van der Laan
2307f97784 Merge #16991: qa: Fix service flag comparison check in rpc_net test (luke-jr)
9c23ebd6b18fb1058a8d3e8aae9e0595d3a57ad5 qa: Fix service flag comparison check in rpc_net test (Luke Dashjr)

Pull request description:

  Rebase of #16936

ACKs for top commit:
  darosior:
    ACK 9c23ebd6b18fb1058a8d3e8aae9e0595d3a57ad5

Tree-SHA512: 74f287740403da1040ab1e235ef6eba4e304f3ee5d57a3b25d1e2e1f2f982d256528d398a4d6cb24ba393798e680a8f46cd7dae54ed84ab2c747e96288f1f884
2023-04-25 23:41:20 -05:00
Wladimir J. van der Laan
dc5da97e05 Merge #16941: travis: Disable feature_block in tsan run due to OOM
faa079db92e614bddfe8bd323ddcd2adb77e0961 travis: Disable feature_block in tsan run (MarcoFalke)

Pull request description:

  The `feature_block` test causes the travis machine to OOM, when run with the thread sanitizer.

  The stderr says:

  ```
  ==27237==ERROR: ThreadSanitizer failed to allocate 0xf6000 (1007616) bytes of LargeMmapAllocator (error code: 12)
  ...
  FATAL: ThreadSanitizer CHECK failed: /build/llvm-toolchain-3.8-_PD09B/llvm-toolchain-3.8-3.8/projects/compiler-rt/lib/sanitizer_common/sanitizer_common.cc:183 "((0 && "unable to mmap")) != (0)" (0x0, 0x0)

  ERROR: Failed to mmap
  ```
  (from https://travis-ci.org/bitcoin/bitcoin/jobs/588194563#L10505)

  Fix this by disabling `feature_block` on travis. Longer term, I'd like to move away from travis, but I'll leave this for a follow-up.

ACKs for top commit:
  fanquake:
    ACK faa079db92e614bddfe8bd323ddcd2adb77e0961

Tree-SHA512: c0dc2272853aac53f68eb9e110c8500c4a92211ba89d856660bacdf6e959d875477e422b3280b743d85fc8a65e083bf9153911f12039d026e2501f426540dac4
2023-04-25 23:41:20 -05:00
fanquake
3e0160b85e Merge #19058: doc: Drop protobuf stuff
ea9fcfd1305f92a7c3ca4d3c05951ceba1b6b05b doc: Drop protobuf stuff (Hennadii Stepanov)

Pull request description:

  This is a follow-up to #17165.

ACKs for top commit:
  fanquake:
    ACK ea9fcfd1305f92a7c3ca4d3c05951ceba1b6b05b -  clicked the links and they seem to work.

Tree-SHA512: 0861bbac3a3ff781a413e15f5ed02c624bc15d572a001a53cd2fb9f7683456175f69e9d666b72f260abbb5114b67cefca9fada4d179c62384c90479534ae63d5
2023-04-25 23:41:20 -05:00
Wladimir J. van der Laan
d4bc451492 Merge #15584: build: disable BIP70 support by default
BIP70 is removed in "merge #17165: Remove BIP70 support  (#4023)".
So, this commit contains only some follow-ups to unify codebase

e09913f1c47e693b0c6fafef55b9ca78e5f3abc0 doc: specify protobuf as optional in build docs (fanquake)
376f4929f8f75011b72b2f9c3164980db482278a build: disable BIP70 support by default (fanquake)

Pull request description:

  Disable BIP70 support in the GUI by default for `0.19.0` (for eventual removal in `0.20.0`?).

  Users who want to compile with BIP70 support enabled can pass `--enable-bip70` to `./configure`.

  I've inverted the current `--disable-bip70` test to instead pass `--enable-bip70`.

  Tested configurations on `macOS` (`protobuf` installed with `brew`).
  Protobuf available and `./configure`:
  ```
  Options used to compile and link:
    with wallet   = yes
    with gui / qt = yes
      with bip70  = no
  ```

  Protobuf available and `./configure --enable-bip70`:
  ```
  Options used to compile and link:
    with wallet   = yes
    with gui / qt = yes
      with bip70  = yes
  ```

  Protobuf not available (i.e `brew unlink protobuf`) and `./configure`:
  ```
  Options used to compile and link:
    with wallet   = yes
    with gui / qt = yes
      with bip70  = no
  ```

  Protobuf not available and `./configure --enable-bip70`:
  ```
  checking whether to build test_bitcoin-qt... yes
  checking whether to build BIP70 support... configure: error: protobuf missing
  ```

  TODO:
  - [x] Remove `protobuf` from other Travis builds
  - [ ] Documentation updates (mention that `protobuf` is now optional)?
  - [ ] Could split release notes into GUI and build

ACKs for top commit:
  laanwj:
    ACK e09913f1c47e693b0c6fafef55b9ca78e5f3abc0
  elichai:
    ACK e09913f1c47e693b0c6fafef55b9ca78e5f3abc0 Read the autotools changes. awesome that this removes the protobuf requirement.
  practicalswift:
    ACK e09913f1c47e693b0c6fafef55b9ca78e5f3abc0 -- diff looks correct

Tree-SHA512: 7bf87ae8555e24db2da2e89cc4d4e90d09be27499ad386ad65879d05df8f96d9a1384379891ac8963d17728c90e55961560813df97e849e631e2de8c08e210c8
2023-04-25 23:41:20 -05:00
Jonas Schnelli
78e475a70a Merge #17453: gui: Fix intro dialog labels when the prune button is toggled
4f7127d1e3a51f0f55d42a08439c516dcc8d1a26 gui: Make Intro consistent with prune checkbox (Hennadii Stepanov)
4824a7d36cf47e766865e0fefe952ec860eb82dd gui: Add Intro::UpdateFreeSpaceLabel() (Hennadii Stepanov)
daa3f3fa9071a229275dd6a1b8445237ddc3fa97 refactor: Add Intro::UpdatePruneLabels() (Hennadii Stepanov)
e4caa82a03df5c6a6d5d29f34ab006d732c6dac1 refactor: Replace static variable with data member (Hennadii Stepanov)
2bede28cd9ec638d8bb32c187ccf12d89345218e util: Add PruneGBtoMiB() function (Hennadii Stepanov)
e35e4b2ba052c9a533626286026dbe0a2d546c5b util: Add PruneMiBtoGB() function (Hennadii Stepanov)

Pull request description:

  On master (a6f6333ba253cda83221ee529810cacf930e413f) and on 0.19.0.1 the intro dialog with prune enabled (checkbox "Discard blocks..." is checked) provides a user with wrong info about the required disk space:

  ![DeepinScreenshot_bitcoin-qt_20191208112228](https://user-images.githubusercontent.com/32963518/70387510-8daab400-19ae-11ea-9338-29add9c31118.png)

  Also the paragraph "If you have chosen to limit..." is missed.

  ---

  With this PR when prune checkbox is toggled, the related text labels and the amount of required space shown are updated (previously they were only updated when the data directory was updated):
  ![Screenshot from 2019-12-08 11-34-53](https://user-images.githubusercontent.com/32963518/70387542-eed28780-19ae-11ea-9565-49d8a64b2f33.png)

  ---

  This PR is an alternative to #17035.

  **ryanofsky**'s [suggestion](https://github.com/bitcoin/bitcoin/pull/17035#discussion_r337594268) also has been implemented.

ACKs for top commit:
  emilengler:
    ACK 4f7127d1e3a51f0f55d42a08439c516dcc8d1a26
  Sjors:
    tACK 4f7127d1e3a51f0f55d42a08439c516dcc8d1a26
  ryanofsky:
    Code review ACK 4f7127d1e3a51f0f55d42a08439c516dcc8d1a26. It seems like there are a few visible changes here:
  jonasschnelli:
    utACK 4f7127d1e3a51f0f55d42a08439c516dcc8d1a26

Tree-SHA512: fa0bbdcfafde97d7906cda066cbd4608b936a71cae1b4cda3ee3aa2eed3a9795f279f14c6b1b4997278e094db891c7d3bb695368ba0882347aa42165a86e5172
2023-04-25 23:41:20 -05:00
fanquake
e75d5b7366 Merge #17696: qt: Force set nPruneSize in QSettings after the intro dialog
af112ab62895b145660f4cd7ff842e9cfea2a530 qt: Rename SetPrune() to InitializePruneSetting() (Hennadii Stepanov)
b0bfbe50282877a1eee87118902901a280d6656d refactor: Drop `bool force' parameter (Hennadii Stepanov)
68c9bbe9bc91f882404556998666b1b5acea60e4 qt: Force set nPruneSize in QSettings after intro (Hennadii Stepanov)
a82bd8fa5708c16d1db3edc4e82d70788eb5af19 util: Replace magics with DEFAULT_PRUNE_TARGET_GB (Hennadii Stepanov)

Pull request description:

  On master (5622d8f3156a293e61d0964c33d4b21d8c9fd5e0), having `QSettings` set already
  ```
  $ grep nPruneSize ~/.config/Bitcoin/Bitcoin-Qt-testnet.conf
  nPruneSize=6
  ```

  enabling prune option in the intro dialog

  ```
  $ ./src/qt/bitcoin-qt -choosedatadir -testnet
  ```
  ![DeepinScreenshot_select-area_20191208120425](https://user-images.githubusercontent.com/32963518/70388183-eed68580-19b6-11ea-9aa1-f9ad9aaa68a6.png)

  has no effect:
  ```
  $ grep Prune ~/.bitcoin/testnet3/debug.log
  2019-12-08T10:04:41Z Prune configured to target 5722 MiB on disk for block and undo files.
  ```

  ---

  With this PR:
  ```
  $ grep Prune ~/.bitcoin/testnet3/debug.log
  2019-12-08T10:20:35Z Prune configured to target 1907 MiB on disk for block and undo files.
  ```

  This PR has been split of #17453 (the first two commits) as it fixes an orthogonal bug.

  Refs:
  - https://github.com/bitcoin/bitcoin/pull/17453#discussion_r345424240
  - https://github.com/bitcoin/bitcoin/pull/17453#discussion_r350960201

ACKs for top commit:
  Sjors:
    Code review re-ACK af112ab62895b145660f4cd7ff842e9cfea2a530
  ryanofsky:
    Code review ACK af112ab62895b145660f4cd7ff842e9cfea2a530. Just suggested changes since last review (thanks!)
  promag:
    Tested ACK af112ab62895b145660f4cd7ff842e9cfea2a530. Latest suggestions and changes look good to me.

Tree-SHA512: 8ddad34b30dcc2cdcad6678ba8a0b36fa176e4e3465862ef6eee9be0f98d8146705138c9c7995dd8c0990af41078ca743fef1a90ed9240081f052f32ddec72b9
2023-04-25 23:41:20 -05:00
Jonas Schnelli
6ea934964a Merge #16714: gui: add prune to intro screen with smart default
9924bce317b96ab0c57efb99330abd11b6f16b9a [gui] intro: enable pruning by default unless disk is big (Sjors Provoost)
c8de347a9d6c88fe67d77aba6fcce1b7fd66791c [gui] intro: add prune preference (Sjors Provoost)
1bbc49d2078ee53488e214d00eb47462687b05c5 [gui] intro: inform caller if intro was shown (Sjors Provoost)
1957103786f97135f35ababc97efa1b481865eb0 [gui] add explicit prune setter (Sjors Provoost)
1bccf6a52d7fc08d8f605cfb2edc3277ec299c72 [node] add forceSetArg to interface (Sjors Provoost)

Pull request description:

  This adds a checkbox to the intro screen to enable pruning from the get go.

  If the user has plenty of space, it's unchecked by default:

  <img width="671" alt="big" src="https://user-images.githubusercontent.com/10217/63641289-10339000-c6ac-11e9-98d7-caf64dff0da6.png">

  If the user has insufficient space it's checked by default:
  <img width="897" alt="low" src="https://user-images.githubusercontent.com/10217/63641276-d4002f80-c6ab-11e9-9f5b-a53472f814ff.png">

  When the user has barely enough space and is likely to need pruning in the near future, this is shown in yellow and we also check the prune box:

  <img width="662" alt="medium" src="https://user-images.githubusercontent.com/10217/63641294-1c1f5200-c6ac-11e9-8ecb-6b69e42b1ece.png">

  The cut-off for this 10 GB above `m_assumed_blockchain_size` (`=240` in `chainparams.cpp`).

  If the user launches the first time with `-prune=...` then we disable the check box and display the correct size (rounded to GB):
  <img width="658" alt="Schermafbeelding 2019-08-24 om 20 23 14" src="https://user-images.githubusercontent.com/10217/63641351-09594d00-c6ad-11e9-94fe-fe5ed562e109.png">

  The 2 GB default matches the settings default. The user can't change it in the intro screen, but can change it later. I'm tempted to increase that default to 10 GB, and then have the intro screen reduce it if space is really tight.

  Tips for testing:
  * move your existing data dir elsewhere
  * wipe data dir at every restart (behavior is different if it exists)
  * launch with `bitcoin-qt -resetguisettings -lang=en` (there's some space issues in different languages)
  * fake your free space by changing `intro.cpp` line 90: `freeBytesAvailable = 5000000000; // 5 GB`
  * try both testnet and mainnet, because settings are seperate. In particular note how step 7 in `GuiMain` switches where `QTSettings settings` points to; this had me thoroughly confused on testnet, because I was setting them too early.

ACKs for top commit:
  jonasschnelli:
    Tested ACK 9924bce317b96ab0c57efb99330abd11b6f16b9a
  ryanofsky:
    utACK 9924bce317b96ab0c57efb99330abd11b6f16b9a. The changes are very logical, and implement the feature in a clean that way that doesn't add a lot of complication and shouldn't interfere with future improvements. I looked at Luke's branch too, and I think there's also a lot of great stuff there that seems fully compatible with this change.

Tree-SHA512: 9523961451c53aebd347716976bc3a4a398f989dc21e9bbbd357060bd11a8f46c435f068bd421bb31ccb08e55445ef67bc347d8d19a4fb8fde9d6d3f9a3bcbb0
2023-04-25 23:41:20 -05:00
MarcoFalke
d5d3c3e35d Merge #16680: Preparations for more testchains
3bf9d8cac09fc88727ef2f2a2bea33b90b625e50 Testchains: Qt: Simplify network/chain styles (Jorge Timón)
052c54ecb02695e5d2694e8e0cbf5ccc89de86e8 Testchains: Generic selection with -chain=<str> in addition of -testnet and -regtest (Jorge Timón)

Pull request description:

  Separated from #8994 as suggested by MarcoFalke and Sjors in https://github.com/bitcoin/bitcoin/pull/8994#issuecomment-522555390

  You can't really test the qt changes on their own, so to test them, use #8994 .

ACKs for top commit:
  MarcoFalke:
    ACK 3bf9d8cac09fc88727ef2f2a2bea33b90b625e50

Tree-SHA512: 5b5e6083ebc0a44505a507fac633e7af18037c85e5e73f5d1e6f7e730575d3297ba8a31d1c2441df623b273f061c32d8fa324f4aa6bead01d23e88582029b568
2023-04-25 23:41:20 -05:00
fanquake
a778ddd62f Merge #16477: build: skip deploying plugins we dont use in macdeployqtplus
1ac7b7f66bd53d2d719377c7e0ab8b38e970c88f scripts: filter more qt plugins we don't use in macdeployqtplus (fanquake)
57cdd0697d5c8fdae4a4c1da1cfa092916be87e7 scripts: misc cleanups in macdeployqtplus (fanquake)
51729a4dfacb5b8d3945d39fa581eaaa9ac9603d scripts: use format() in macdeployqtplus (fanquake)
1c37e81694efb08fea889d9f5151c91dbb74d025 scripts: add type annotations to macdeployqtplus (fanquake)

Pull request description:

  I frequently run `make deploy` while testing on macOS to get a properly light themed .app. With a brew installed Qt, this currently results in a pretty bloated executable:

  | branch | .app size | .dmg size | `make deploy` time |
  | ------- | --------- | --------- | --------------------- |
  | master (febf3a856bcfb8fef2cb4ddcb8d1e0cab8a22580) | 235mb | 86mb | 38s |
  | This PR (da98f6d470d236c027b7eb8b5f5552fdca04e803) | 51mb | 21mb | 22s |

  Similar change to dd367ff8c9.

  ```diff
                           'QtGui.framework'],
    'pluginPath': '/usr/local/opt/qt/plugins',
    'qtPath': '/usr/local/opt/qt'}
  -[('platforminputcontexts', 'libqtvirtualkeyboardplugin.dylib'),
  - ('geoservices', 'libqtgeoservices_esri.dylib'),
  - ('geoservices', 'libqtgeoservices_mapboxgl.dylib'),
  - ('geoservices', 'libqtgeoservices_nokia.dylib'),
  - ('geoservices', 'libqtgeoservices_itemsoverlay.dylib'),
  - ('geoservices', 'libqtgeoservices_osm.dylib'),
  - ('geoservices', 'libqtgeoservices_mapbox.dylib'),
  - ('sceneparsers', 'libgltfsceneexport.dylib'),
  - ('sceneparsers', 'libgltfsceneimport.dylib'),
  - ('platforms', 'libqwebgl.dylib'),
  +[('platforms', 'libqwebgl.dylib'),
    ('platforms', 'libqoffscreen.dylib'),
    ('platforms', 'libqminimal.dylib'),
    ('platforms', 'libqcocoa.dylib'),
    ('platformthemes', 'libqxdgdesktopportal.dylib'),
  - ('printsupport', 'libcocoaprintersupport.dylib'),
  - ('webview', 'libqtwebview_webengine.dylib'),
  - ('webview', 'libqtwebview_darwin.dylib'),
  - ('geometryloaders', 'libdefaultgeometryloader.dylib'),
  - ('geometryloaders', 'libgltfgeometryloader.dylib'),
    ('styles', 'libqmacstyle.dylib'),
  - ('canbus', 'libqttinycanbus.dylib'),
  - ('canbus', 'libqtpassthrucanbus.dylib'),
  - ('canbus', 'libqtvirtualcanbus.dylib'),
  - ('canbus', 'libqtpeakcanbus.dylib'),
    ('bearer', 'libqgenericbearer.dylib'),
  - ('imageformats', 'libqgif.dylib'),
  - ('imageformats', 'libqwbmp.dylib'),
  - ('imageformats', 'libqwebp.dylib'),
  - ('imageformats', 'libqico.dylib'),
  - ('imageformats', 'libqmacheif.dylib'),
  - ('imageformats', 'libqjpeg.dylib'),
  - ('imageformats', 'libqtiff.dylib'),
  - ('imageformats', 'libqicns.dylib'),
  - ('imageformats', 'libqtga.dylib'),
  - ('imageformats', 'libqmacjp2.dylib'),
  - ('texttospeech', 'libqtexttospeech_speechosx.dylib'),
  - ('generic', 'libqtuiotouchplugin.dylib'),
  - ('renderplugins', 'libscene2d.dylib'),
  - ('gamepads', 'libdarwingamepad.dylib'),
  - ('virtualkeyboard', 'libqtvirtualkeyboard_thai.dylib'),
  - ('virtualkeyboard', 'libqtvirtualkeyboard_openwnn.dylib'),
  - ('virtualkeyboard', 'libqtvirtualkeyboard_hangul.dylib'),
  - ('virtualkeyboard', 'libqtvirtualkeyboard_pinyin.dylib'),
  - ('virtualkeyboard', 'libqtvirtualkeyboard_tcime.dylib')]
  + ('generic', 'libqtuiotouchplugin.dylib')]
  ```

ACKs for top commit:
  laanwj:
    ACK 1ac7b7f66bd53d2d719377c7e0ab8b38e970c88f (purely Python code review and the fact that this passes travis, cannot run this on a mac)
  dongcarl:
    tested ACK 1ac7b7f66bd53d2d719377c7e0ab8b38e970c88f

Tree-SHA512: 5974eeaf7229bb5bde2b283c1331ec57ee87f624db146401f6b77dee4ee5502e0bd669958a46205f10398a371f8e6c91ddacb9f0e1943f9f7d042fb6de7957a8
2023-04-25 23:41:20 -05:00
Konstantin Akimov
e3c8dcc340
refactor: prefer using TxValidationState directly for unification with bitcoin implementation (#5335)
## Issue being fixed or feature implemented
The benefits of using custom struct `maybe_error` is less significant
since the interface `TxValidationState` became simpler after
refactorings from bitcoin#15921 and bitcoin#17004

The refactoring of `maybe_error` as a class result from PR #5109 is
still useful but not for case of TxValidationState.



## What was done?
Unified using TxValidationState in dash's related code.

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


## Breaking Changes
No breaking changes, logic are same.

## 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-04-25 23:17:30 +03:00
UdjinM6
f402423dd4
Merge pull request #5340 from knst/bc-bp-v20-missing-4
backport: bitcoin#16658, #17473, #17549, #17578, #17593, #17661, #17674, #17678, #17725, #17762, #1780
2023-04-25 23:15:19 +03:00
MarcoFalke
b885060802 Merge #17549: ci: misc cleanups
fad88e6f86d1dd32cf01db2287df9c63e66c5116 ci: Remove use of cd (MarcoFalke)
fa2941bbf47a8a6b79b8db4a87e1aedcf6a29a5e ci: Remove unmaintained extended_lint (MarcoFalke)
fa041875284d01602647519cc452185ba1ad5a8f scripted-diff: Use ci DEPENDS_DIR, remove BASE_BUILD_DIR (MarcoFalke)
fa0656d1ebc2a01d900fead4ce055d59eb818a1f ci: Add DEPENDS_DIR variable, Add documentation for folders (MarcoFalke)
faeeca87b65dd98e0efbc54443b3f8854cae9c00 scripted-diff: Move various folders to ci scratch dir (MarcoFalke)

Pull request description:

  Some minor cleanups:

  * Remove unused and unmaintained extended_lint to avoid ci bottlenecks and waste of CPU
  * Move all folders that hold temporary ci files to the ci scratch dir (except for the build dirs)
  * Add some documentation to folders and remove the `BASE_BUILD_DIR` alias for the root directory
  * Fixes #17178 by removing `cd`

Top commit has no ACKs.

Tree-SHA512: f6eb9d47ab98c08af59a79c2a4bf62fc331f0f6f3174909a28f2c2f48b0234423da5aee876225d2e188619b71b008d882a20d29a7aca68248039ea5080be5af5
2023-04-25 23:14:25 +03:00