Commit Graph

28066 Commits

Author SHA1 Message Date
glozow
34e12fa3e7
Merge bitcoin/bitcoin#24564: doc: Clarify that CheckSequenceLocksAtTip is a validation function
fa8671018766b2f0e18c94cff3ab2a67c6b3a41d Clarify that CheckSequenceLocksAtTip is a validation function (MarcoFalke)

Pull request description:

  It has been pointed out that a bug in this function can prevent block template creation. ( https://github.com/bitcoin/bitcoin/pull/24080#issuecomment-1065148776 ) So it seems that the scope of this function is more than "policy". Rename it back to "validation", to partially revert commit fa4e30b0f36f2e7a09db7d30dca9008ed9dbcb35.

ACKs for top commit:
  ajtowns:
    ACK fa8671018766b2f0e18c94cff3ab2a67c6b3a41d - looks fine to me
  glozow:
    ACK fa8671018766b2f0e18c94cff3ab2a67c6b3a41d

Tree-SHA512: 2e0df8c70df4cbea857977f140a8616cfa7505e74df66c9c9fbcf184670ce3ce7567183c3f76e6f3fe8ca6de0e065b9babde6352d6cb495e71ea077ddedbc3f4
2024-10-29 13:01:23 -05:00
fanquake
d529751f47
Merge bitcoin/bitcoin#24788: doc: Add gpg key import instructions for Windows
107582039ac3cbfe072dc761f621c37c48aa2dc1 doc: Add gpg key import instructions for Windows (Dave Scotese)

Pull request description:

  This is a single commit to replace the three commits from #23916

  I propose this change so that Windows users can more easily import signers' keys.

ACKs for top commit:
  sipsorcery:
    tACK 107582039ac3cbfe072dc761f621c37c48aa2dc1.

Tree-SHA512: 7d4ec77ce10f751748c49f1453fa8baf0976b15af4f87dc27f4e2715ad73fbd7dc1f07fcf3e660d63a6b9eb895a5e4105774613d39a2328f73b92d9e6cff4ebd
2024-10-29 13:01:23 -05:00
MarcoFalke
61bae780b6
Merge bitcoin/bitcoin#24784: refactor: deduplicate integer serialization in RollingBloom benchmark
fff91418ffa4911f7262e824418af664b25d4026 refactor: Remove deduplication of data in rollingbloom bench (phyBrackets)

Pull request description:

  Fixed up #24088.

ACKs for top commit:
  vincenzopalazzo:
    ACK fff91418ff

Tree-SHA512: 9fef617bceb74a1aec4f4a1e7c4732c4764af3e8ac2fc02b84ce370e8b97431957ca17ee8f44fb96765f7304f8d7e5bfb951440db98ba40f240612f2232d215e
2024-10-29 13:01:23 -05:00
pasta
e3a0fce5c9
Merge #6371: ci: do not build derivations in parallel on GH
8abe646156 fix(ci): do not build derivations in parallel on GH (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  Should fix GH Guix builds

  develop: https://github.com/UdjinM6/dash/actions/runs/11563155278
  develop + this patch merged into it: https://github.com/UdjinM6/dash/actions/runs/11562899245

  more info https://github.com/dashpay/dash/blob/develop/contrib/guix/README.md#controlling-the-number-of-threads-used-by-guix-build-commands

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

ACKs for top commit:
  PastaPastaPasta:
    utACK 8abe646156

Tree-SHA512: eb689e69b741958bb65a368af8ab73662724ff8c003a1b162039fbe1b5b322c268de637efc298b17564dafdb76e21bf3f2d10623698bccea1da4684c4b0d2392
2024-10-29 13:00:51 -05:00
pasta
4cc3ee6286
test: update feature_asset_locks.py to reflect changes
This results in test time locally going from ~4 minutes to ~3 minutes
2024-10-29 12:57:35 -05:00
pasta
bfe1d2768d
refactor: activate DEPLOYMENT_WITHDRAWALS sooner on regtest 2024-10-29 12:54:04 -05:00
pasta
c8342e1b55
refactor: pull LimitBlocksToTrace into CChainParams (reduce regtest to 100) 2024-10-29 12:53:47 -05:00
Konstantin Akimov
2026c59d3c
perf: re-order functional tests to make slowest one to run faster
On CI it is not critical, because there are only 4-8 parallel jobs,
while locally it can be 12-20 or even more
2024-10-30 00:11:53 +07:00
Konstantin Akimov
d35ce1e5d9
fix: uncomment sethdseed to follow-up for #6017 and bitcoin#12560 2024-10-30 00:11:53 +07:00
Konstantin Akimov
71cd68d038
feat: run rpc_quorum.py with only one type of wallet 2024-10-30 00:11:53 +07:00
Konstantin Akimov
af1923f5c2
fix: missing governance.dat, spork.dat do not trigger a loud error message in logs
exmple of error during first start of dashd:
    [      init] [util/system.h:57] [error] ERROR: CoreRead: Failed to open file DASH/node0/regtest/governance.dat
2024-10-30 00:11:53 +07:00
Konstantin Akimov
678db6f43e
fix: error in log if no masternode's registered yet "ERROR! Failed to get payees for block at height"
[httpworker.0] [masternode/payments.cpp:116] [IsTransactionValid] CMNPaymentsProcessor::IsTransactionValid -- ERROR! Failed to get payees for block at height 110
    [httpworker.0] [masternode/payments.cpp:278] [IsBlockPayeeValid] CMNPaymentsProcessor::IsBlockPayeeValid -- Valid masternode payment at height 110: CTransaction(hash=837e35fab5, ver=3, type=5, vin.size=1, vout.size=1, nLockTime=0, vExtraPayload.size=70)
                                           CTxIn(COutPoint(0000000000000000000000000000000000000000000000000000000000000000, 4294967295), coinbase 016e0101)
                                           CTxOut(nValue=500.00000000, scriptPubKey=76a9148708dff2bf8b31363cb4201d)
2024-10-30 00:11:53 +07:00
Konstantin Akimov
80c5481c3e
fix: use unique port for interface_zmq_dash.py - follow-up for bitcoin/bitcoin#26805 2024-10-30 00:11:53 +07:00
Konstantin Akimov
87caafb92f
fix: dashify doc/JSON-RPC-interface.md to follow-up bitcoin#27225 2024-10-30 00:11:53 +07:00
Konstantin Akimov
237460c533
fix: initialization of CMerkleBlock() due to misusage of default argument to follow-up bitcoin#30552 2024-10-30 00:11:53 +07:00
pasta
93cfd5bc94
Merge #6368: fix(qt): set prune dependent options correctly
2d99b2c02b fix: force correct `-disablegovernance` and `-txindex` values when pruning is requested via init dialog (UdjinM6)
64b20f0691 fix(qt): set prune dependent options correctly (Kittywhiskers Van Gogh)

Pull request description:

  ## Issue being fixed or feature implemented
  A few things to note:
  1. we shouldn't rely on `bPrune` cause it can be overridden via cmd-line
  2. `addOverriddenOption` is used to highlight that there are GUI options that were overridden via cmd-line and neither `-disablegovernance` nor `-txindex` override anything, we simply set them to correct values here.
  3. we should do all that in `SetPruneEnabled` case that's the central point for GUI prune option logic

  fixes https://github.com/dashpay/dash/issues/6366

  https://github.com/dashpay/dash/pull/6367's alternative

  ## What was done?

  ## How Has This Been Tested?

  `./src/qt/dash-qt --regtest --resetguisettings` (could also add `--txindex=1` and/or `--disablegovernance=0`), check "Limit ..." box, click OK and confirm it continues with no errors (but with a warning about disabled governance, that's by design)

  close qt and check 2 more things:
  1. `./src/qt/dash-qt --regtest` should have a warning about disabled governance
  2. `./src/qt/dash-qt --regtest --prune=0` should have no warning about disabled governance (not true on `develop`)

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

ACKs for top commit:
  kwvg:
    ACK 2d99b2c02b
  PastaPastaPasta:
    utACK 2d99b2c02b

Tree-SHA512: 465bd2f1ca86358145c4671af554078b00b2472375d65b8de7e01ae0db8b24c9b01844a2b8e5a4c85a6d65a892a169ee61797591c0dfc0f51ec044a8e2bba58a
2024-10-29 09:16:14 -05:00
Kittywhiskers Van Gogh
5e65bb45a7
merge bitcoin#30270: update subtree to eb37a9b8
excludes:
- cb59af38 (subtree manipulation done in previous commits)
- 89464ad5 (see above)
2024-10-29 10:18:01 +00:00
Kittywhiskers Van Gogh
33035ffde0
depends: update 'src/minisketch' to sipa/minisketch@eb37a9b8 as ef10e83d 2024-10-29 10:16:07 +00:00
Kittywhiskers Van Gogh
ef10e83d4d Squashed 'src/minisketch/' changes from 3472e2f5ec..eb37a9b8e7
eb37a9b8e7 Merge sipa/minisketch#87: Avoid copy in self-assign
fe6557642e Merge sipa/minisketch#88: build: Add `-Wundef`
8ea298bfa7 Avoid copy in self-assign
978a3d8869 build: Add `-Wundef`
3387044179 Merge sipa/minisketch#86: doc: fix typo in sketch_impl.h
15c2d13b60 doc: fix typo in sketch_impl.h
7be08b8a46 Merge sipa/minisketch#85: Fixes for integer precision loss
00fb4a4d83 Avoid or make integer precision conversion explicit
9d62a4d27c Avoid the need to cast/convert to size_t for vector operations
19e06cc7af Prevent overflows from large capacity/max_elements

git-subtree-dir: src/minisketch
git-subtree-split: eb37a9b8e79f9e49d73b96a49bf97a96d9eb676c
2024-10-29 10:16:07 +00:00
Kittywhiskers Van Gogh
94dca7f9ae
merge bitcoin#29823: update subtree to 3472e2f5e
excludes:
- 1eea10a6 (subtree manipulation done in previous commits)
- e58e1323 (see above)
2024-10-29 10:09:02 +00:00
Kittywhiskers Van Gogh
9540ecbc34 Squashed 'src/minisketch/' changes from a571ba20f9..3472e2f5ec
3472e2f5ec Merge sipa/minisketch#81: Avoid overflowing shift by special casing inverse of 1
653d8b2e26 Avoid overflowing shift by special casing inverse of 1
33b7c200b9 Merge sipa/minisketch#80: Add c++20 version of CountBits
4a48f31a37 Merge sipa/minisketch#83: ci: Fix "s390x (big-endian)" task
82b6488acb Add c++20 version of CountBits
0498084d31 ci: Fix "s390x (big-endian)" task
71709dca9e Merge sipa/minisketch#82: ci: Fix `x86_64-w64-mingw32` task
9e6127fa98 Merge sipa/minisketch#74: Avoid >> above type width in BitWriter
ed420bc170 ci: Fix `x86_64-w64-mingw32` task
fe1040f227 Drop -Wno-shift-count-overflow compile flag
154bcd43bd Avoid >> above type width in BitWriter
67b87acdb6 Merge sipa/minisketch#78: ci: Update macOS image for CI
7de7250416 ci: Update macOS image for CI
83d812ea9f Merge sipa/minisketch#73: ci: Use correct variable to designate C++ compiler
e051a7d690 ci: Install wine32 package for Windows tests
2d2c695d78 build: Drop unused `CC` variable
1810fcbd11 ci: Use correct variable to designate C++ compiler
022b959049 Merge sipa/minisketch#77: Add missing include
08443c4892 Add missing include

git-subtree-dir: src/minisketch
git-subtree-split: 3472e2f5ec75ace39ce9243af6b3fee233a67492
2024-10-29 10:03:14 +00:00
Kittywhiskers Van Gogh
a53506def7
depends: update 'src/minisketch' to sipa/minisketch@3472e2f5 as 9540ecbc 2024-10-29 10:03:14 +00:00
Kittywhiskers Van Gogh
02320032c7
merge bitcoin#25060: add LIFETIMEBOUND to GetFirstStoredBlock()::start_time 2024-10-29 09:14:35 +00:00
Kittywhiskers Van Gogh
cfda9e5eb5
merge bitcoin#25016: GetFirstStoredBlock() and getblockchaininfo follow-ups 2024-10-29 09:14:35 +00:00
Kittywhiskers Van Gogh
99d028e9e1
merge bitcoin#24956: Call CHECK_NONFATAL only once where needed 2024-10-29 09:14:27 +00:00
Kittywhiskers Van Gogh
87b556d322
refactor: use loop to iterate through SoftForkDescPushBack args 2024-10-29 08:21:32 +00:00
Kittywhiskers Van Gogh
80615b8c01
merge bitcoin#24784: deduplicate integer serialization in RollingBloom benchmark 2024-10-29 08:20:00 +00:00
Kittywhiskers Van Gogh
092a11e2d1
merge bitcoin#15423: Query Tor for correct -onion configuration 2024-10-29 07:52:53 +00:00
Kittywhiskers Van Gogh
74dceb3c5c
merge bitcoin#24486: dedup sqlite blob binding 2024-10-29 07:52:53 +00:00
Kittywhiskers Van Gogh
aa945c2c1d
merge bitcoin#23595: Add ParseHex<std::byte>() helper
includes:
- facd1fb911abfc595a3484ee53397eff515d4c40

continuation of cf4522f8 in dash#5901
2024-10-29 07:52:53 +00:00
Kittywhiskers Van Gogh
c2defe7210
merge bitcoin#23819: don't serialize block hash twice
continuation of 7f2c84b7 in dash#5042

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2024-10-29 07:52:52 +00:00
UdjinM6
8abe646156
fix(ci): do not build derivations in parallel on GH
https://github.com/dashpay/dash/blob/develop/contrib/guix/README.md#controlling-the-number-of-threads-used-by-guix-build-commands
2024-10-29 00:49:27 +03:00
UdjinM6
2d99b2c02b
fix: force correct -disablegovernance and -txindex values when pruning is requested via init dialog 2024-10-28 22:30:30 +03:00
pasta
79ced62d6f
Merge #6369: feat: increased withdrawal limits to flat 2000 from v22
e43ca6243a feat: replace assert to error in p2p code of Asset Lock (Konstantin Akimov)
c97f5f5ca5 feat: update some asserts related to CreditPool in consensus code to exceptions (Konstantin Akimov)
877aa08144 feat: generate less blocks in feature_asset_locks.py to make it faster (Konstantin Akimov)
a51ade5cc9 style: apply clang-format (Konstantin Akimov)
ef6190e434 docs: add release notes for withdrawal changes in v22 (Konstantin Akimov)
5b0a2f56cd fix: string in credit pool logs 'previous' is renamed to recently unlocked (Konstantin Akimov)
31ca8a497a feat: update limit of withdrawals to flat 2000 starting from v22 (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  Limit 1000 seems a bit small at the moment, while limit 2000 is still safe enough.

  ## What was done?
  Withdrawals limits in pre-v22 are:
   - if credit pool is more than 10k -> limit withdrawals to 1k
   - if credit pool is between 100 dash and 10000 dash -> let to withdraw 10%.
   - if 10% of credit pool is less than 100 dash -> no limits, let to withdraw everything.

  The fork `withdrawals` introduces higher limit:
   - 2000 dash per last 576 blocks. That's all.

  ## How Has This Been Tested?
  Updated functional test `feature_asset_locks.py`

  ## Breaking Changes
  Limits of withdrawals are increased to 2000 dash. It changes consensus rules.

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

ACKs for top commit:
  PastaPastaPasta:
    utACK e43ca6243a
  UdjinM6:
    utACK e43ca6243a

Tree-SHA512: 77fc27b6b38105cc311ee5ea78d66edfe854600ad6fb9422c0d302dac436e9aa1dcdc394a36ccb980d42de98091c1596e01be260b3a940df4e6309842fd89065
2024-10-28 12:30:05 -05:00
pasta
75fd7b5ea2
Merge #6333: backport: merge bitcoin#23496, #26272, #23443, #26381, #26396, #26448, #26359, #26686, #23670, partial bitcoin#19953 (Erlay support)
cc98f9e724 merge bitcoin#23670: Build minisketch test in make check, not in make (Kittywhiskers Van Gogh)
606a444296 merge bitcoin#26686: Enable erlay setting in process_message(s) targets (Kittywhiskers Van Gogh)
38a16a24d7 merge bitcoin#26359: Erlay support signaling follow-ups (Kittywhiskers Van Gogh)
b55a6f794b merge bitcoin#26448: fix intermittent failure in p2p_sendtxrcncl.py (Kittywhiskers Van Gogh)
36be978fc9 merge bitcoin#26396: Avoid SetTxRelay for feeler connections (Kittywhiskers Van Gogh)
62dc9cb17b merge bitcoin#26381: Fix intermittent issue in p2p_sendtxrcncl.py (Kittywhiskers Van Gogh)
6a7868dba7 merge bitcoin#23443: Erlay support signaling (Kittywhiskers Van Gogh)
fdc3c07554 partial bitcoin#19953: Implement BIP 340-342 validation (Kittywhiskers Van Gogh)
477157d40b merge bitcoin#26272: Prevent UB in `minisketch_tests.cpp` (Kittywhiskers Van Gogh)
0cf7401173 merge bitcoin#23496: Add minisketch fuzz test (Kittywhiskers Van Gogh)
49ef53ce00 merge bitcoin#23491: Move minisketchwrapper to src/node (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * Dependent on https://github.com/dashpay/dash/pull/6332
  * Dependent on https://github.com/dashpay/dash/pull/6365
  * Erlay requires nodes to be `WTXIDRELAY` (as defined by BIP-339, [source](17c04f9fa1/bip-0339.mediawiki))-capable ([source](17c04f9fa1/bip-0330.mediawiki (sendtxrcncl))) as prior to `WTXIDRELAY` adoption, TXIDs of SegWit transactions didn't include the witness data in the hash, which meant, the witness data was malleable ([source](https://bitcoin.stackexchange.com/a/107394)), which would be a relevant factor when you are building out a reconciliation system where you need TXIDs to authoritatively identify a transaction's contents.

    As Dash _doesn't_ support SegWit, this requirement can be dispensed with. It has instead been replaced with checking if the node is running Dash Core v22 or above to retain the underlying test logic (but this can also be dispensed with as `SENDTXRCNCL`  will simply be ignored by older nodes and major releases are _generally_ mandatory upgrades anyways)

  ## Breaking Changes

  None expected.

  ## Checklist

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation **(note: N/A)**
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  PastaPastaPasta:
    utACK cc98f9e724
  UdjinM6:
    utACK cc98f9e724

Tree-SHA512: fe985f4df6c96c0a7b984882815a1bce7f23c54370198d099e41a59ac4c46c283a2b8dd95f5c8fc12eb1dc1330c4e5c21626b76d33d83d395326e8eb19d564ce
2024-10-28 10:59:40 -05:00
Konstantin Akimov
e43ca6243a
feat: replace assert to error in p2p code of Asset Lock
It is impossible situation which will never happen.
But better to change it to exception for better error-prune implementation
in case someone will decide to change this code:

    const auto quorums = qman.ScanQuorums(llmqType, pindexTip, quorums_to_scan);
    if (bool isActive = std::any_of(quorums.begin(), quorums.end(), [&](const auto &q) { return q->qc->quorumHash == quorumHash; }); !isActive) {
        return state.Invalid(TxValidationResult::TX_CONSENSUS, "bad-assetunlock-too-old-quorum");
    }
    ...
    const auto quorum = qman.GetQuorum(llmqType, quorumHash);
    assert(quorum); <-- for sure exist because we just scanned quorums
2024-10-28 22:25:11 +07:00
Konstantin Akimov
c97f5f5ca5
feat: update some asserts related to CreditPool in consensus code to exceptions 2024-10-28 22:21:16 +07:00
Konstantin Akimov
877aa08144
feat: generate less blocks in feature_asset_locks.py to make it faster 2024-10-28 21:47:46 +07:00
Kittywhiskers Van Gogh
9a8d6e149f
merge bitcoin#24265: Drop StripRedundantLastElementsOfPath() function 2024-10-28 10:45:28 +00:00
Kittywhiskers Van Gogh
2d299f128a
merge bitcoin#24136: Extract CTxIn::MAX_SEQUENCE_NONFINAL constant, rework BIP 65/68/112 docs 2024-10-28 10:45:28 +00:00
Kittywhiskers Van Gogh
9aacee78ae
merge bitcoin#23832: Changes time variables from int to chrono
includes:
- fe86eb50c986f7b5ccce63f984d8a51cd9ee9e2c

continuation of 9399f90a in dash#6097
2024-10-28 10:45:28 +00:00
Kittywhiskers Van Gogh
06bf649e1b
merge bitcoin#23499: Add interfaces::Node::broadCastTransaction method 2024-10-28 10:44:39 +00:00
Konstantin Akimov
a51ade5cc9
style: apply clang-format 2024-10-28 16:08:34 +07:00
Konstantin Akimov
ef6190e434
docs: add release notes for withdrawal changes in v22 2024-10-28 16:08:19 +07:00
Konstantin Akimov
5b0a2f56cd
fix: string in credit pool logs 'previous' is renamed to recently unlocked 2024-10-28 16:08:19 +07:00
Konstantin Akimov
31ca8a497a
feat: update limit of withdrawals to flat 2000 starting from v22 2024-10-28 16:08:16 +07:00
Kittywhiskers Van Gogh
64b20f0691
fix(qt): set prune dependent options correctly
A few things to note:
1. we shouldn't rely on `bPrune` cause it can be overridden via cmd-line
2. `addOverriddenOption` is used to highlight that there are GUI options that were overridden via cmd-line and neither `-disablegovernance` nor `-txindex` override anything, we simply set them to correct values here.
3. we should do all that in `SetPruneEnabled` case that's the central point for GUI prune option logic
2024-10-27 23:24:29 +03:00
Kittywhiskers Van Gogh
cc98f9e724
merge bitcoin#23670: Build minisketch test in make check, not in make 2024-10-27 19:38:30 +00:00
Kittywhiskers Van Gogh
606a444296
merge bitcoin#26686: Enable erlay setting in process_message(s) targets 2024-10-27 19:38:30 +00:00
Kittywhiskers Van Gogh
38a16a24d7
merge bitcoin#26359: Erlay support signaling follow-ups 2024-10-27 19:38:30 +00:00