Commit graph

1093 commits

Author SHA1 Message Date
Andrew Poelstra
cac878cf89 Merge 8071ec179d into merged_master (Bitcoin PR bitcoin/bitcoin#21789) 2021-07-29 12:55:13 +00:00
Andrew Poelstra
9fc1ba6008 Merge 3f56ef7bef into merged_master (Bitcoin PR bitcoin/bitcoin#22146) 2021-07-29 07:14:19 +00:00
Andrew Poelstra
ae37da1ad8 Merge 9c1ec689f3 into merged_master (Bitcoin PR bitcoin/bitcoin#22102) 2021-07-25 13:23:19 +00:00
Andrew Poelstra
34da23bd1a Merge a55904a80c into merged_master (Bitcoin PR bitcoin/bitcoin#21866)
Paying the piper for some lazy use of globals, including ones I added
in 8e770d3f21

Had to add another couple methods to interfaces::Chain
2021-07-29 13:18:11 +00:00
Andrew Poelstra
b413362d11 Merge ef8f2966ac into merged_master (Bitcoin PR bitcoin/bitcoin#22084) 2021-07-24 01:43:31 +00:00
Andrew Poelstra
b3fdb4bed1 Merge 82bc7faec8 into merged_master (Bitcoin PR bitcoin/bitcoin#21946)
Adds a new test which is broken, but which will be fixed in a few PRs.
Disabled it for now.
2021-07-23 13:50:58 +00:00
Andrew Poelstra
5e3a998967 Merge 346e52afd6 into merged_master (Bitcoin PR bitcoin/bitcoin#22121) 2021-07-22 13:24:16 +00:00
Andrew Poelstra
35c1809ce9 Merge a748782a11 into merged_master (Bitcoin PR bitcoin/bitcoin#15545) 2021-07-21 23:54:38 +00:00
Andrew Poelstra
69d1898e00 Merge 0a3b8ea11a into merged_master (Bitcoin PR bitcoin/bitcoin#22106) 2021-07-20 14:13:28 +00:00
Andrew Poelstra
8a669eccfb Merge 7257e50dba into merged_master (Bitcoin PR bitcoin/bitcoin#20833) 2021-07-18 18:11:25 +00:00
Andrew Poelstra
29a8292858 Merge 599000903e into merged_master (Bitcoin PR bitcoin/bitcoin#21850)
Copied GetMainchainAuthCookieFile logic from GetAuthCookieFile, since
the former no longer compiled.
2021-07-12 15:20:15 +00:00
Andrew Poelstra
1fd44e5dfc Merge ee9befe8b4 into merged_master (Bitcoin PR bitcoin/bitcoin#21584) 2021-07-09 21:14:15 +00:00
Andrew Poelstra
400268064d Merge f8176b768a into merged_master (Bitcoin PR bitcoin/bitcoin#21836) 2021-07-08 08:34:10 +00:00
Andrew Poelstra
7b25418b9c Merge 128b98fce3 into merged_master (Bitcoin PR bitcoin/bitcoin#21681) 2021-07-07 03:49:35 +00:00
Andrew Poelstra
87c10268ee Merge 3275c6e578 into merged_master (Bitcoin PR bitcoin/bitcoin#21727) 2021-07-06 21:07:44 +00:00
Andrew Poelstra
c4182106af Merge 2b45cf0bcd into merged_master (Bitcoin PR bitcoin/bitcoin#19521)
This is part of the "UTXO Set Statistics" project in Core, which aims
to make things like "checking coin supply" faster. This stuff, and
related things in coinstats.cpp, have always been broken for Elements
in the sense that we consider only explicit outputs and we ignore
assets (so everything just gets added together to get a meaningless
total). It probably wouldn't be too hard to restrict this to only
consider policyAsset, but it's out of scope for a rebase IMO.

Also, I think this situation is fine .. I don't understand the motivation
for this or why Core is merging this when they refuse to merge an address
index .. but I guess we'll see if there are users who care about this data
and who care about it being meaningful on Elements.

Also, apologies for the big diff -- there were some mechanical changes
to deal with CT amounts, but most of the changes related to the difference
in how fees are accounted for. While I'm not thrilled with this PR, its
functional test is really good! So I think what I eventually came up with
is internally consistent.
2021-07-04 19:51:38 +00:00
Andrew Poelstra
6f238f5ad9 Merge c6d6bc8abb into merged_master (Bitcoin PR bitcoin/bitcoin#21523) 2021-07-01 13:43:23 +00:00
Andrew Poelstra
95ab1aa7cb Merge 19a56d1519 into merged_master (Bitcoin PR bitcoin/bitcoin#21009) 2021-07-01 04:00:30 +00:00
Andrew Poelstra
6995de8b1a Merge a839303edc into merged_master (Bitcoin PR #21244) 2021-06-30 21:56:22 +00:00
Andrew Poelstra
56c521bb04 Merge a12962ca89 into merged_master (Bitcoin PR #21585) 2021-06-30 13:31:17 +00:00
Andrew Poelstra
a9ef79acbc Merge 1f14130cb0 into merged_master (Bitcoin PR #21575) 2021-06-30 03:43:01 +00:00
Andrew Poelstra
5f399720ac Merge 41a8d2b96f into merged_master (Bitcoin PR #21582) 2021-06-29 20:25:59 +00:00
fanquake
8071ec179d
Merge bitcoin/bitcoin#21789: refactor: Remove ::Params() global from CChainState
fa0d9211ef refactor: Remove chainparams arg from CChainState member functions (MarcoFalke)
fa38947125 refactor: Remove ::Params() global from inside CChainState member functions (MarcoFalke)

Pull request description:

  The `::Params()` global is verbose and confusing. Also it makes tests a bit harder to write because they'd have to mock a global.

  Fix all issues by simply using a member variable that points to the right params.

  (Can be reviewed with `--word-diff-regex=.`)

ACKs for top commit:
  jnewbery:
    ACK fa0d9211ef
  kiminuo:
    utACK fa0d9211
  theStack:
    ACK fa0d9211ef 🍉

Tree-SHA512: 44676b19c9ed471ccb536331d3029bad192d7d50f394fd7b8527ec431452aeec8c4494164b9cf8e16e0123c4463b16be864366c6b599370032c17262625a0356
2021-06-29 11:22:57 +08:00
Andrew Poelstra
020de0b30c Merge 66daf4cb3b into merged_master (Bitcoin PR #21567) 2021-06-29 02:31:41 +00:00
Andrew Poelstra
bc51e4e896 Merge 80a699fda9 into merged_master (Bitcoin PR #21525) 2021-06-29 01:29:25 +00:00
MarcoFalke
3f56ef7bef
Merge bitcoin/bitcoin#22146: Reject invalid coin height and output index when loading assumeutxo
fa9ebedec3 Reject invalid coin height and output index when loading assumeutxo (MarcoFalke)

Pull request description:

  It should be impossible to have a coin at a height higher than the height of the snapshot block, so reject those early to avoid integer wraparounds and hash collisions later on.

  Same for the outpoint index.

  Both issues were found by fuzzing:

  * The height issue by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34793
  * The outpoint issue by my fuzz server: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34793#c2

ACKs for top commit:
  practicalswift:
    cr ACK fa9ebedec3: patch looks correct
  jamesob:
    crACK https://github.com/bitcoin/bitcoin/pull/22146/commits/fa9ebedec3f982bb5bb459ea33d74c94d9b5cec4
  theStack:
    Code review ACK fa9ebedec3
  benthecarman:
    crACK fa9ebedec3

Tree-SHA512: dae7caee4b3862b23ebdf2acb7edec4baf75b0dbf1409b370b1a73aa6b632b317ebfac596dcbaf4edfb1301b513f45465ea75328962460f35e2af0d7e547c9ac
2021-06-28 16:11:44 +02:00
Andrew Poelstra
3a62250bbc Merge 786654aa5e into merged_master (Bitcoin PR #21498) 2021-06-27 21:54:10 +00:00
Andrew Poelstra
651b96887d Merge 63952f73b3 into merged_master (Bitcoin PR #20921) 2021-06-27 20:52:33 +00:00
Andrew Poelstra
26fd4eb181 Merge a9d1b40d53 into merged_master (Bitcoin PR #21415) 2021-06-27 15:02:35 +00:00
Andrew Poelstra
a9e992bab1 Merge 67ec26cacf into merged_master (Bitcoin PR #19259) 2021-06-27 00:59:35 +00:00
Andrew Poelstra
8c54b98b25 Merge e0bc27a14c into merged_master (Bitcoin PR #21404) 2021-06-26 22:39:09 +00:00
Andrew Poelstra
6ab18fa738 Merge 3172615d2c into merged_master (Elements PR ElementsProject/elements#986)
Note: up to this point I still had the old "sort by UNIX timestamp"
behavior on, which may have meant that some PRs were merged out of
order (i.e. multiple merged at once, followed by no-op merges). I
turned this off, and now just use git's default topo-sort (and manually
switch between Elements merges and Bitcoin merges).
2021-06-26 20:57:54 +00:00
Andrew Poelstra
05bd3e6667 Merge 767bb7d5c5 into merged_master (Bitcoin PR #21270) 2021-06-26 19:21:09 +00:00
Andrew Poelstra
1668dac3d6 Merge 702cfc8c53 into merged_master (Bitcoin PR #21055) 2021-06-26 01:21:19 +00:00
Andrew Poelstra
3b07a0813a Merge 34d7030063 into merged_master (Bitcoin PR #21202) 2021-06-24 19:34:45 +00:00
Andrew Poelstra
4268df69bc Merge 828bb776d2 into merged_master (Bitcoin PR #20750) 2021-06-24 17:22:15 +00:00
Andrew Poelstra
5a654c9bab Merge 9017d55e7c into merged_master (Bitcoin PR #15946) 2021-06-24 02:56:40 +00:00
Andrew Poelstra
61a241c5ca Merge 92fee79dab into merged_master (Bitcoin PR #19806)
Looks like James hardcoded a couple hashes in hard-to-find places, which
caused a unit test to fail. I just changed the hash (which covers UTXO
data which naturally will be different for us on account of our differently
formatted CTxOuts).

TODO: determine how Assumeutxo interacts with the fact that we don't save
out nonces in our normal UTXO serialization. Probably we will need to remove
the nonce from the CCoinStats serialization to avoid having inconsistent
hashes across nodes, since these hashes are now checked in assumeutxo?
2021-06-23 23:36:26 +00:00
Andrew Poelstra
283eff1475 Merge 937dfa8398 into merged_master (Bitcoin PR #21041) 2021-06-22 23:04:36 +00:00
Andrew Poelstra
f250da483b Merge 8e1913ae02 into merged_master (Bitcoin PR #21062) 2021-06-22 22:39:50 +00:00
Andrew Poelstra
e66b70d884 Merge f1239b70d1 into merged_master (Bitcoin PR #21025) 2021-06-21 00:03:36 +00:00
Andrew Poelstra
2885d86bf7 Merge 44f4bcd302 into merged_master (Bitcoin PR #20749)
More-or-less mechanical fixes to conflicts (checking upstream diff and chasing
compiler errors).
2021-06-20 14:54:25 +00:00
Andrew Poelstra
1594d797c4 Merge 87394b6741 into merged_master (Bitcoin PR #20868) 2021-06-20 14:13:18 +00:00
Andrew Poelstra
a7f2499713 Merge b386d37360 into merged_master (Bitcoin PR #18710) 2021-06-18 19:12:18 +00:00
Andrew Poelstra
653212c39e Merge f91587f050 into merged_master (Bitcoin PR #20834) 2021-06-17 22:28:24 +00:00
Andrew Poelstra
e5cb4cb00e Merge f13e03cda2 into merged_master (Bitcoin PR #20584) 2021-06-16 20:58:56 +00:00
Andrew Poelstra
549c9b182e Merge c37600777e into merged_master (Bitcoin PR #20854) 2021-06-16 18:11:34 +00:00
MarcoFalke
fa0d9211ef
refactor: Remove chainparams arg from CChainState member functions
Passing this is confusing and redundant with the m_params member.
2021-06-13 09:43:54 +02:00
MarcoFalke
fa38947125
refactor: Remove ::Params() global from inside CChainState member functions
It is confusing and verbose to repeatedly access the global when a
member variable can simply refer to it.
2021-06-13 09:39:37 +02:00
MarcoFalke
9c1ec689f3
Merge bitcoin/bitcoin#22102: Remove Warning: from warning message printed for unknown new rules
6d7e46ce23 Remove `Warning:` (Prayank)

Pull request description:

  Reason: I noticed that `Warning` is printed 2 times in `-getinfo` while reviewing https://github.com/bitcoin/bitcoin/pull/21832#issuecomment-851004943

  Same string is used for GUI, log and stderr. If we need to add `Warning:` in GUI or other place we can always prepend to this string.

  CLI:

  ```
  Warnings: Unknown new rules activated (versionbit 28)

  ```

  GUI:

  ![image](https://user-images.githubusercontent.com/13405205/120110401-e36ab180-c18a-11eb-8031-4d52287dc263.png)

ACKs for top commit:
  MarcoFalke:
    review ACK 6d7e46ce23

Tree-SHA512: 25760cf6d850f6c2216d651fa46574d2d21a9d58f4577ecb58f9566ea8cd07bfcd6679bb8a1f53575e441b02d295306f492c0c99a48c909e60e5d977ec1861f6
2021-06-13 09:21:46 +02:00