Commit graph

115 commits

Author SHA1 Message Date
Byron Hambly
b7b2288a74
discount: implement mempool logic 2024-05-14 19:03:36 +02:00
Byron Hambly
f9aca0e104 Merge fd25d3493d into merged_master (Bitcoin PR bitcoin/bitcoin#24319) 2023-06-30 15:07:15 +00:00
Byron Hambly
62697be8d9 Merge 3d223712d3 into merged_master (Bitcoin PR bitcoin/bitcoin#16795) 2023-06-28 16:32:17 +00:00
Byron Hambly
3ce9952451 Merge 66be456d93 into merged_master (Bitcoin PR bitcoin/bitcoin#23320) 2023-06-15 04:56:56 +00:00
Byron Hambly
47626b5a64 Merge 623745ca74 into merged_master (Bitcoin PR bitcoin/bitcoin#23912) 2023-06-14 15:44:11 +00:00
James Dorfman
3caddc4317 Merge 986003aff9 into merged_master (Bitcoin PR bitcoin/bitcoin#22918) 2023-05-13 10:47:39 +00:00
Byron Hambly
498907a233 Merge 816e15ee81 into merged_master (Bitcoin PR bitcoin/bitcoin#22951) 2023-05-09 11:50:39 +00:00
James Dorfman
ff57e1e65f Merge d6492d4ed0 into merged_master (Bitcoin PR bitcoin/bitcoin#22650) 2023-04-27 04:55:34 +00:00
Glenn Willen
16507123c0 Merge 80862ff943 into merged_master (Elements PR ElementsProject/elements#1075) 2022-05-25 13:00:55 -07:00
James Dorfman
79f5a000a8 getblockheader: properly display 'signblock_witness_hex' field and remove irrelevant 'signblock_witness_asm' field in post-dynafed RPC response 2022-04-25 13:08:48 -04:00
MarcoFalke
fa6065661a
refactor: Avoid unsigned integer overflow in core_write 2022-02-11 17:21:44 +01:00
Gregory Sanders
6498ba151b transaction decoding infer output descriptors 2022-01-26 09:56:51 +08:00
W. J. van der Laan
66be456d93
Merge bitcoin/bitcoin#23320: rpc: Add RPC help for getblock verbosity level 3
059f88b6a9 Add RPC help for getblock verbosity level 3 (Kiminuo)
1bdd5f6322 Address review comments from #22918 (Kiminuo)

Pull request description:

  This is a follow-up PR to #22918 which addresses review comments (first commit). The second commit adds missing RPC help for verbosity level 3.

ACKs for top commit:
  pg156:
    ACK https://github.com/bitcoin/bitcoin/pull/23320/commits/059f88b6a97b7a3ae1f033885e40ac01f91e6d60
  laanwj:
    re-ACK 059f88b6a9

Tree-SHA512: f27d53ac34b93a304ef5668701ed2b5c986a926bc8ad0df4de89695fc9e1df26acb008611451319ea897658acd9c56c6a0555d60359960c9cd28238ebefa2d50
2022-01-04 15:35:42 +01:00
Hennadii Stepanov
f47dda2c58
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-

Commits of previous years:
* 2020: fa0074e2d8
* 2019: aaaaad6ac9
2021-12-30 19:36:57 +02:00
Kiminuo
1bdd5f6322 Address review comments from #22918
* fix English in release notes
* Simplify `switch` to `if`.
2021-10-20 10:51:01 +02:00
fyquah
5c34507ecb core_write: Rename calculate_fee to have_undo for clarity 2021-10-05 10:42:34 +02:00
fyquah
51dbc167e9 rpc: Add level 3 verbosity to getblock RPC call.
Display the prevout in transaction inputs when calling getblock level 3
verbosity.

Co-authored-by: Luke Dashjr <luke_github1@dashjr.org>
Co-authored-by: 0xB10C <19157360+0xB10C@users.noreply.github.com>
2021-10-05 10:42:34 +02:00
fanquake
d09071da5b
[MOVEONLY] consensus: move amount.h into consensus
Move amount.h to consensus/amount.h.
Renames, adds missing and removes uneeded includes.
2021-09-30 07:41:57 +08:00
Michael Dietz
2b1fdc2c6c
refactor: minor styling, prefer snake case and same line if 2021-09-24 14:22:53 -05:00
Michael Dietz
d64deac7b8
refactor: share logic between ScriptPubKeyToUniv and ScriptToUniv 2021-09-24 14:22:53 -05:00
Michael Dietz
8721638daa
rpc: remove deprecated addresses and reqSigs from rpc outputs 2021-09-24 14:22:49 -05:00
Andrew Poelstra
d39d57c704 Merge 1c7be9ab90 into merged_master (Bitcoin PR #20286)
I hate this PR.
2021-06-28 21:30:17 +00:00
Andrew Poelstra
bf95eb15d9 Merge 47b99ab1a9 into merged_master (Bitcoin PR #20406) 2021-06-25 23:14:56 +00:00
Andrew Poelstra
27930edc9c Merge 4a540683ec into merged_master (Bitcoin PR #20813) 2021-06-16 14:11:07 +00:00
Andrew Poelstra
658b2312da Merge f656165e9c into merged_master (Bitcoin PR #18772)
I'm gonna be honest, I largely just rewrote this one. It adds a "fee" field
to the RPC transaction output, which I replaced with a feemap which is
directly extracted from the transaction rather than computed implicitly
from inputs - outputs.

Removed a functional test that fee computations become impossible without
chain data, since in Elements there is no chain data lookup involved.
2021-06-16 01:07:10 +00:00
Michael Dietz
085b3a7299
rpc: deprecate addresses and reqSigs from rpc outputs
1) add a new sane "address" field (for outputs that have an
   identifiable address, which doesn't include bare multisig)
2) with -deprecatedrpc: leave "reqSigs" and "addresses" intact
   (with all weird/wrong behavior they have now)
3) without -deprecatedrpc: drop "reqSigs" and "addresses" entirely,
   always.
2021-03-23 10:51:43 -04:00
practicalswift
1f05dbd06d util: Avoid invalid integer negation in ValueFromAmount: make ValueFromAmount(const CAmount& n) well-defined also when n is std::numeric_limits<CAmount>::min() 2021-03-02 16:05:28 +00:00
MarcoFalke
fa0074e2d8
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2020-12-31 09:45:41 +01:00
Andrew Poelstra
ecf4d0de5c Merge 81a19e7253 into merged_master (Bitcoin PR #19852) 2020-11-28 23:16:39 +00:00
Andrew Poelstra
419fd4f90d Merge b75f2ad72d into merged_master (Bitcoin PR #19660) 2020-11-27 04:05:36 +00:00
Andrew Poelstra
c6cb7be640 Merge c57dc566b0 into merged_master (Bitcoin PR #16525) 2020-11-26 12:15:14 +00:00
Andrew Poelstra
dc44b27189 Merge d3a5dbfd1f into merged_master (Bitcoin PR #19114) 2020-11-26 01:09:14 +00:00
Andrew Poelstra
b431cfa2d7 Merge 532b134cb0 into merged_master (Bitcoin PR #19373) 2020-11-26 01:09:12 +00:00
Andrew Poelstra
7444e07772 Merge 297466b49f into merged_master (Bitcoin PR #18826) 2020-11-26 01:09:01 +00:00
Andrew Poelstra
009bc2fdfb Merge 99813a9745 into merged_master (Bitcoin PR #17829) 2020-11-14 16:52:02 +00:00
Andrew Poelstra
3d7ed201af Merge 335b34c30c into merged_master (Bitcoin PR #16725) 2020-11-09 21:20:23 +00:00
Andrew Poelstra
62ce823f8f Merge c67ef2938c into merged_master (Elements PR #600)
Also uncommented a bunch of PSBT functional tests (had to add a fee output
to one transaction, update `find_output` to skip CT outputs, and change two
constant checks at the end of the commented-out section).
2020-11-09 21:20:10 +00:00
Andrew Poelstra
68d9951825 Merge d0f81a96d9 into merged_master (Bitcoin PR #16129) 2020-11-06 15:20:13 +00:00
Elliott Jin
bf7d6e31b1 RPC: getblock: tx fee calculation for verbosity 2 via Undo data
Co-authored-by: Felix Weis <mail@felixweis.com>
2020-10-09 08:50:44 -07:00
João Barbosa
ac2ff4fb1e refactor: Avoid duplicate map lookup in ScriptToAsmStr 2020-09-04 10:25:44 +01:00
Wladimir J. van der Laan
0a8aa626dd refactor: Make HexStr take a span
Make HexStr take a span of bytes, instead of an awkward pair of
templated iterators.
2020-08-06 19:41:43 +02:00
Wladimir J. van der Laan
c57dc566b0
Merge #16525: Dump transaction version as an unsigned integer in RPC/TxToUniv
e80259f197 Additionally treat Tx.nVersion as unsigned in joinpsbts (Matt Corallo)
970de70bdd Dump transaction version as an unsigned integer in RPC/TxToUniv (Matt Corallo)

Pull request description:

  Consensus-wise we already treat it as an unsigned integer (the
  only rules around it are in CSV/locktime handling), but changing
  the underlying data type means touching consensus code for a
  simple cleanup change, which isn't really worth it.

  See-also, https://github.com/rust-bitcoin/rust-bitcoin/pull/299

ACKs for top commit:
  sipa:
    ACK e80259f197
  practicalswift:
    ACK e80259f197
  ajtowns:
    ACK e80259f197 code review -- checked all other uses of tx.nVersion treat it as unsigned (except for policy.cpp:IsStandard anyway), so looks good.
  naumenkogs:
    ACK e80259f

Tree-SHA512: 6760a2c77e24e9e1f79a336ca925f9bbca3a827ce02003c71d7f214b82ed3dea13fa7d9f87df9b9445cd58dff8b44a15571d821c876f22f8e5a372a014c9976b
2020-07-16 21:38:09 +02:00
MarcoFalke
d3a5dbfd1f
Merge #19114: scripted-diff: TxoutType C++11 scoped enum class
fa32adf9dc scripted-diff: TxoutType C++11 scoped enum class (MarcoFalke)
fa95a694c4 doc: Update outdated txnouttype documentation (MarcoFalke)
fa58469c77 rpc: Properly use underlying type in GetAllOutputTypes (MarcoFalke)
fa41c65702 rpc: Simplify GetAllOutputTypes with the Join helper (MarcoFalke)

Pull request description:

  Non-scoped enums can accidentally and silently decay into an integral type. Also, the symbol names of the keys are exported to the surrounding (usually global) namespace.

  Fix both issues by switching to an `enum class TxoutType` in a (mostly) scripted-diff.

ACKs for top commit:
  practicalswift:
    ACK fa32adf9dc -- patch looks correct
  hebasto:
    re-ACK fa32adf9dc, since fa5997bd6fc82e16b597ea96e3c5c665f1f174ab (https://github.com/bitcoin/bitcoin/pull/19114#pullrequestreview-421425198) rebased only (verified with `git range-diff`).

Tree-SHA512: f42a9db47f9be89fa4bdd8d2fb05a16726286d8b12e3d87327b67d723f91c7d5a57deb4b2ddae9e1d16fee7a5f8c00828b6dc8909c5db680fc5e0a3cf07cd465
2020-06-28 14:20:00 -04:00
Wladimir J. van der Laan
bd93e32292 refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o)
HexStr can be called with anything that bas `begin()` and `end()` functions,
so clean up the redundant calls.
2020-06-24 18:41:45 +02:00
MarcoFalke
fa32adf9dc
scripted-diff: TxoutType C++11 scoped enum class
-BEGIN VERIFY SCRIPT-
 # General rename helper: $1 -> $2
 rename_global() { sed -i "s/\<$1\>/$2/g" $(git grep -l "$1"); }

 # Helper to rename TxoutType $1
 rename_value() {
   sed -i "s/    TX_$1,/    $1,/g" src/script/standard.h;  # First strip the prefix in the definition (header)
   rename_global TX_$1 "TxoutType::$1";                    # Then replace globally
 }

 # Change the type globally to bring it in line with the style-guide
 # (clsses are UpperCamelCase)
 rename_global 'enum txnouttype' 'enum class TxoutType'
 rename_global      'txnouttype'            'TxoutType'

 # Now rename each enum value
 rename_value 'NONSTANDARD'
 rename_value 'PUBKEY'
 rename_value 'PUBKEYHASH'
 rename_value 'SCRIPTHASH'
 rename_value 'MULTISIG'
 rename_value 'NULL_DATA'
 rename_value 'WITNESS_V0_KEYHASH'
 rename_value 'WITNESS_V0_SCRIPTHASH'
 rename_value 'WITNESS_UNKNOWN'

-END VERIFY SCRIPT-
2020-06-21 06:41:55 -04:00
Rod Vagg
3e4421070a
Expose txinwitness for coinbase in JSON form
txinwitness is used as the witness commitment nonce so is necessary if
reconstructing block data from RPC data.
2020-05-08 12:19:26 +10:00
MarcoFalke
aaaaad6ac9
scripted-diff: Bump copyright of files changed in 2019
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2019-12-30 10:42:20 +13:00
nicolas.dorier
6d803494b5
Don't show addresses or P2PK in decoderawtransaction 2019-08-30 11:29:21 +09:00
Matt Corallo
970de70bdd Dump transaction version as an unsigned integer in RPC/TxToUniv
Consensus-wise we already treat it as an unsigned integer (the
only rules around it are in CSV/locktime handling), but changing
the underlying data type means touching consensus code for a
simple cleanup change, which isn't really worth it.

See-also, https://github.com/rust-bitcoin/rust-bitcoin/pull/299
2019-08-02 15:37:13 -04:00
Glenn Willen
2848b520b2 PSBT for Confidential Assets 2019-07-31 10:50:03 -07:00