Commit graph

278 commits

Author SHA1 Message Date
Tom Trevethan
2e5e6204e5 Merge 9dc4eedb67 into merged_master (Bitcoin PR bitcoin/bitcoin#31673) 2026-04-10 01:29:59 +01:00
ivanlele
6bb16229de
Merge 66aa6a47bd into merged_master (Bitcoin PR bitcoin/bitcoin#30391) 2026-04-09 15:17:56 +00:00
ivanlele
d4110b19f8
Merge c506f2cee7 into merged_master (Bitcoin PR bitcoin/bitcoin#31581) 2026-04-09 14:53:07 +00:00
ivanlele
33f3d54f21
Merge cd3d9fa5ea into merged_master (Bitcoin PR bitcoin/bitcoin#31318) 2026-04-09 09:23:15 +00:00
ikripaka
9c0f3edb5a
Merge 3867d2421a into merged_master (Bitcoin PR bitcoin/bitcoin#31112) 2026-04-08 10:07:51 +00:00
ivanlele
d4461d4c55
Merge f34fe0806a into merged_master (Bitcoin PR bitcoin/bitcoin#31122) 2026-04-06 09:06:05 +00:00
Tom Trevethan
47b759f1ed Merge 33adc7521c into merged_master (Bitcoin PR bitcoin/bitcoin#30765) 2026-03-26 22:41:05 +00:00
ivanlele
b72efc9f34
Merge b52d547361 into merged_master (Bitcoin PR bitcoin/bitcoin#30377) 2026-03-23 14:31:53 +00:00
ivanlele
c7d1ee1c41
Merge d184fc3ba4 into merged_master (Bitcoin PR bitcoin/bitcoin#30571) 2026-03-23 11:53:22 +00:00
Tom Trevethan
6e4faff0fc fix block index for tx 2026-03-18 11:45:03 +00:00
ikripaka
17631653e2
Merge 5ee6b76c69 into merged_master (Bitcoin PR bitcoin/bitcoin#29325) 2026-02-26 20:15:02 +00:00
ivanlele
bc5595301f
Merge 2251460f3e into merged_master (Bitcoin PR bitcoin/bitcoin#28830) 2026-02-26 11:59:42 +00:00
Byron Hambly
cffb3d4646
Merge 38941045c5 into merged_master (Bitcoin PR bitcoin/bitcoin#29361) 2025-11-29 14:38:05 +02:00
Byron Hambly
26b9abc2f2
Merge b5a271334c into merged_master (Bitcoin PR bitcoin/bitcoin#28922) 2025-11-11 08:56:23 +02:00
Byron Hambly
8cf8bd5564
Merge 108462139b into merged_master (Bitcoin PR bitcoin/bitcoin#28438) 2025-11-10 13:45:17 +02:00
Byron Hambly
6c55760a2d Merge 7ef2d4ee4d into merged_master (Bitcoin PR bitcoin/bitcoin#28244) 2025-07-04 17:24:18 +02:00
Byron Hambly
edc585d157 Merge 9564f98fee into merged_master (Bitcoin PR bitcoin/bitcoin#27636) 2025-06-25 11:40:46 +02:00
Byron Hambly
108652e2a4 Merge a8080c0def into merged_master (Bitcoin PR bitcoin/bitcoin#23897) 2025-04-09 13:04:18 +02:00
Byron Hambly
4ec18086ff Merge a245429d68 into merged_master (Bitcoin PR bitcoin/bitcoin#26940) 2025-04-07 10:05:17 +02:00
Byron Hambly
b4405ba453 Merge e9262ea32a into merged_master (Bitcoin PR bitcoin/bitcoin#26750) 2025-03-31 16:37:52 +02:00
Byron Hambly
f4756663f6 Merge 65f5cfda65 into merged_master (Bitcoin PR bitcoin/bitcoin#25311) 2025-03-31 10:42:10 +02:00
Byron Hambly
ef4fa0936a
Merge 542a2b567d into merged_master (Bitcoin PR bitcoin/bitcoin#26376) 2025-03-03 12:12:31 +02:00
Byron Hambly
ca0a68b350
Merge UP TO 551c8e9526 into merged_master (UP TO bitcoin/bitcoin#26349)
Includes FIXMEs for a few functional tests
2025-02-05 09:50:17 +02:00
Adlai Chandrasekhar
b30cc71e85 doc: fix typos 2025-01-16 17:36:16 +02:00
ismaelsadeeq
7c123c08dd
miner: add package feerate vector to CBlockTemplate
- The package feerates are ordered by the sequence in which
  packages are selected for inclusion in the block template.

- The commit also tests this new behaviour.

Co-authored-by: willcl-ark <will@256k1.dev>
2025-01-07 15:29:17 -05:00
Sjors Provoost
04249682e3
test: use Mining interface in miner_tests 2025-01-03 11:48:05 +01:00
Sjors Provoost
52fd1511a7
test: drop scriptPubKeyIn arg from CreateNewBlock
This removes the temporary overload added in the previous commit.

Also drop unneeded custom coinbase output scripts.
2024-12-04 12:46:33 +07:00
Pieter Wuille
146a3d5426 [validation] Make script error messages uniform for parallel/single validation
This makes the debug output mostly the same for -par=1 and parallel validation runs. Of course,
parallel validation is non-deterministic in what error it may encounter first if there are
multiple issues. Also, the way certain script-related and non-script-related checks are
performed differs between the two modes still, which may result in discrepancies.
2024-12-02 16:25:17 -05:00
Byron Hambly
54b236050d Merge e9035f867a into merged_master (Bitcoin PR bitcoin/bitcoin#25717)
The new minchainwork test was modified to use bitcoin regtest instead of
elements, which required a few changes and a FIXME.
2024-11-22 14:26:38 +02:00
Suhas Daftuar
7fb62f7db6 Apply mempool changeset transactions directly into the mempool
Rather than individually calling addUnchecked for each transaction added in a
changeset (after removing all the to-be-removed transactions), instead we can
take advantage of boost::multi_index's splicing features to extract and insert
entries directly from the staging multi_index into mapTx.

This has the immediate advantage of saving allocation overhead for mempool
entries which have already been allocated once. This also means that the memory
locations of mempool entries will not change when transactions go from staging
to the main mempool.

Additionally, eliminate addUnchecked and require all new transactions to enter
the mempool via a CTxMemPoolChangeSet.
2024-11-13 13:26:56 -05:00
Byron Hambly
14b8b74cef Merge 27724c23f7 into merged_master (Bitcoin PR bitcoin/bitcoin#25677) 2024-11-01 15:42:15 +02:00
Byron Hambly
8e5b356a85 Merge 36c83b40bd into merged_master (Bitcoin PR bitcoin/bitcoin#25023) 2024-10-25 11:11:26 +02:00
James Dorfman
438cb545b7 Merge 2364d17a31 into merged_master (Bitcoin PR bitcoin/bitcoin#25480) 2024-09-19 15:22:38 +00:00
Lőrinc
5e190cd11f Replace CScript _hex_v_u8 appends with _hex
This will skip vector conversion before serializing to the prevector in CScript.
2024-09-11 17:41:27 +02:00
James Dorfman
616633ec35 Merge a7a36590f5 into merged_master (Bitcoin PR bitcoin/bitcoin#25223) 2024-09-10 19:59:14 +00:00
Hodlinator
50bc017040
refactor: Hand-replace some ParseHex -> ""_hex
The following scripted-diff commit will replace ParseHex("...") with "..."_hex_u8, but this replacement will not work in cases where vectors are needed instead of arrays, and is not ideal in cases where std::byte is accepted.

For example, it is currently necessary to use _hex_v_u8 when calling CScript operator<< because that operator does not currently support std::array or std::byte.

Conversely, it is incorrect to use _hex_v instead of _hex in net_processing.cpp for the MakeAndPushMessage argument, because if the argument is a std::vector it is considered variable-length and serialized with a size prefix, but if the argument is a std::array or Span is it considered fixed length and serialized without a prefix.

By the same logic, it is also safe to change the NUMS_H constant in pubkey.cpp from a std::vector to std::array because it is never serialized.
2024-08-28 19:11:59 +02:00
MarcoFalke
fa0fe08eca
scripted-diff: [test] Use g_rng/m_rng directly
-BEGIN VERIFY SCRIPT-

 # Use m_rng in unit test files
 ren() { sed -i "s:\<$1\>:$2:g" $( git grep -l "$1" src/test/*.cpp src/wallet/test/*.cpp src/test/util/setup_common.cpp ) ; }
 ren InsecureRand32                m_rng.rand32
 ren InsecureRand256               m_rng.rand256
 ren InsecureRandBits              m_rng.randbits
 ren InsecureRandRange             m_rng.randrange
 ren InsecureRandBool              m_rng.randbool
 ren g_insecure_rand_ctx           m_rng
 ren g_insecure_rand_ctx_temp_path g_rng_temp_path

-END VERIFY SCRIPT-
2024-08-26 11:19:52 +02:00
James Dorfman
bfb0f5d1e1 Merge 640eb772e5 into merged_master (Bitcoin PR bitcoin/bitcoin#25064) 2024-08-13 21:57:29 +00:00
James Dorfman
66bc45020f Merge 4d0c00dffd into merged_master (Bitcoin PR bitcoin/bitcoin#25168) 2024-08-13 20:10:21 +00:00
James Dorfman
5854eae590 Merge 25dd4d8513 into merged_master (Bitcoin PR bitcoin/bitcoin#24595) 2024-08-12 02:29:42 +00:00
James Dorfman
3361822d32 Merge 59ac8bacd5 into merged_master (Bitcoin PR bitcoin/bitcoin#24804) 2024-08-09 16:39:33 +00:00
James Dorfman
83c1b39fee Merge b2e7811c62 into merged_master (Bitcoin PR bitcoin/bitcoin#24538) 2024-08-09 14:05:21 +00:00
merge-script
5ee6b76c69
Merge bitcoin/bitcoin#29325: consensus: Store transaction nVersion as uint32_t
429ec1aaaa refactor: Rename CTransaction::nVersion to version (Ava Chow)
27e70f1f5b consensus: Store transaction nVersion as uint32_t (Ava Chow)

Pull request description:

  Given that the use of a transaction's nVersion is always as an unsigned int, it doesn't make sense to store it as signed and then cast it to unsigned everywhere it is used and displayed.

  Since a few alternative implementations have recently been revealed to have made an error with this signedness that would have resulted in consensus failure, I think it makes sense for us to just make this always unsigned to make it clear that the version is treated as unsigned. This would also help us avoid future potential issues with signedness of this value.

  I believe that this is safe and does not actually change what transactions would or would not be considered both standard and consensus valid. Within consensus, the only use of the version in consensus is in BIP68 validation which was already casting it to uint32_t. Within policy, although it is used as a signed int for the transaction version number check, I do not think that this change would change standardness. Standard transactions are limited to the range [1, 2]. Negative numbers would have fallen under the < 1 condition, but by making it unsigned, they are still non-standard under the > 2 condition.

  Unsigned and signed ints are serialized and unserialized the same way so there is no change in serialization.

ACKs for top commit:
  maflcko:
    ACK 429ec1aaaa 🐿
  glozow:
    ACK 429ec1aaaa
  shaavan:
    ACK 429ec1aaaa 💯

Tree-SHA512: 0bcd92a245d7d16c3665d2d4e815a4ef28207ad4a1fb46c6f0203cdafeab1b82c4e95e4bdce7805d80a4f4a46074f6542abad708e970550d38a00d759e3dcef1
2024-06-12 10:32:31 +01:00
Ava Chow
429ec1aaaa refactor: Rename CTransaction::nVersion to version
In order to ensure that the change of nVersion to a uint32_t in the
previous commit has no effect, rename nVersion to version in this commit
so that reviewers can easily spot if a spot was missed or if there is a
check somewhere whose semantics have changed.
2024-06-07 13:55:23 -04:00
TheCharlatan
09ef322acc
[[refactor]] Check CTxMemPool options in constructor
This ensures that the tests run the same checks on the mempool options
that the init code also applies.
2024-05-17 23:37:25 +02:00
MarcoFalke
fad0fafd5a
refactor: Fix timedata includes 2024-02-01 13:52:05 +01:00
dergoegge
9e58c5bcd9 Use Txid in COutpoint 2023-11-21 13:15:44 +00:00
Anthony Towns
6e9e4e6130 Use ParamsWrapper for witness serialization 2023-11-14 08:45:30 +10:00
James Dorfman
3f110a3fe4 Merge 28bdaa3f76 into merged_master (Bitcoin PR bitcoin/bitcoin#24080) 2023-10-15 22:22:18 +00:00
Andrew Chow
f3c9078b4c Clean up things that include script/standard.h
Remove standard.h from files that don't use anything in it, and include
it in files that do.
2023-08-14 17:38:27 -04:00