-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bring Elements up to date with Bitcoin Core 0.21 #935
Bring Elements up to date with Bitcoin Core 0.21 #935
Conversation
This caused a segfault because we have no checkpoints. Added a NULL check which jnewbery suggested on the original PR, but for some reason didn't get in.
This commit adds signet support, which is a little bit silly/redundant for us :) Was a surprisingly easy merge to handle, and hopefully in future Core is more mindful of signed blocks when they are changing code architecture. I had to change a couple lines of src/signet.cpp to add blank assets to the CTxOuts and to find transaction input scriptWitnesses. No need to add any other tx witness data (and the CAsset()s that I did add to make things compile won't be used..) because signet will always have g_con_elementsmode off.
More RPC cleanups. This one discovered that the `createpsbt` and `rawblindrawtransaction` RPCs had incorrect argument lists :)
We have a couple RPC hacks in src/wallet/rpcwallet.cpp that were a bit annoying to adapt, but nothing too bad. Found a misspelling of `ignoreblindfail` in the `sendtoaddress` args, and a discrepancy in the `createrawpegin`/`createpegin` args
…r test Everyone is _not_ connected in this test, so on slow machines where this check triggers (e.g. the CI boxes) the test incorrectly fails. This was also a source of (very infrequent) spurious failures during the rebase.
This was causing build failures on win64, and since we (currently) do not expose any dynafed or PAK stuff in libelementsconsensus, there is no reason to be trying to link these.
Should revisit; I am not sure whether we have a long-term stable URL for prebuilt past Elements releases, but we should be able to just point test/get-previous-releases.py at that, and change the set of versions (since we do not have 0.15, 0.19, etc), and we're good to go.
Mostly harmless signed/unsigned conversions but also an actual memory leak related to `BlindingData`.
Thanks, ubsan + fuzzer!
6a1129e
to
e801e95
Compare
It looks like the last commit that merges a PR into the new branch is 0699c4d, and the fixups are after that. I'm going to create a |
Looking at the newly-merged commits: copy-paste error in d891120:
(New error message refers to I think it's your call whether you want to make this a fixup commit, or try to fix it in-place, given that it's fairly shallow at this point. (This would require rebasing the fixups, obviously, but the rebase should be trivial.) I think it ought to be possible to fix this in-place with an interactive rebase, without having to redo any of the subsequent merges, as long as the fix doesn't overlap with any of them. This might be worth trying as an experiment, just to figure out whether we can, but I'm also fine with leaving that for future work. (I have never successfully rebased a merge before.) |
Reviewed the new Elements MR merges. Everything looks good except for the comment above. |
@gwillen sounds good, re As for the copy/paste error, oops. For what it's worth, this wasn't a traditional "copied a bunch of code then failed to edit it" error, this was me copying one of a dozen error lines and picking the wrong one :P. In any case I think we should fix it in a followup PR because this one is a giant pain in the ass to work with, run CI on, etc. |
For the benefit of the peanut gallery: andrew is seeing a test error that doesn't reproduce locally, so there will be some noise trying to pin it down in CI. |
73897af
to
24ca09c
Compare
50b2af6
to
291da8b
Compare
utACK from me! With the understanding that there's going to be a bunch of followup work, of course. |
f2a0050 primitives: do not de/serialize asset issuance in bitcoin mode (Andrew Poelstra) 9c1de4d ci: give more memory to a couple Cirrus jobs (Andrew Poelstra) 40c09f6 rpc: fix error message accidentally changed in 5e62edc (Andrew Poelstra) adbd9f1 qt: fix PSBT/PSET change from 4839db8 (Andrew Poelstra) 057237b qt: fix double-scoping of enum introduced in c3b6bbb (Andrew Poelstra) 5819f25 bitcoin-tx: add ASSET to the help text of some option (Andrew Poelstra) 1f3cfb4 chainparamsbase: fix bool-vs-enum mistake in 9c3480f (Andrew Poelstra) 2573747 fix test code duplication from 3a0de44 (Andrew Poelstra) 0045caf rpc/mining: restore code erroneously dropped in 0e2c963 (Andrew Poelstra) 39112e1 correct copy/paste error in error message (Andrew Poelstra) Pull request description: ACKs for top commit: stevenroose: utACK f2a0050 Tree-SHA512: 5ce831ef24e51e76b93cd4d8e345a382dbd716e38c99565a7c2f25b5eeb8bac1e36c623491c5763ceb7b47444024b5821a878942df150bb01b33eeae33f292b1
Requires a bunch of followup work which I will open other issues for. See also #743 which was our checklist for 0.19.
Then in followup PRs:
Fix the fuzz tests; I did not test these at any point throughout the rebase Post-0.21: fix fuzz tests #936merge-prs
script to run the fuzzer, linter etc., as well as do a full cleanmake check
WIP: Addmerge-prs.sh
script to contrib/ #923signblock
RPC which involves both wallet and node logic. Core's solution to this for Signet may be to introduce a separate signblock tool which we may want to also do; see #bitcoin-core-dev IRC logs for the meeting on 2020-12-03. Post-0.21: Separate wallet and node #939loadblocks
test, assess the "extended tests" which are broken on master Post-0.21: functional test failures #940g_con_elementsmode
Assess current value ofg_con_elementsmode
and consider removal #929pak=
format is undocumented and there is no functional test for it #926), movecomputefastmerkleroot
into Python rather than using the RPC; Implement fast merkleroot computations in Python #941bumpfee
RPC to support CT. There is an existing issue for this Fix bumpfee #527-enforce_pak
is off on a network that uses PAK proofs #925 which was discovered through the rebase.bilingual_str
fromstd::string
for many Core RPCs; we should follow suit for our own RPCs Post-0.21: usebilingual_str
rather thanstd::string
in RPCs and elsewhere #942avoid_reuse
param tosendtoaddress
and a couple other RPCs moves some Elements fields out of the way. For backward compatibility we should putavoid_reuse
after these Elements fields. (I think this is the only time I did this; after talking to Glenn I tried to make future RPC extensions backward compatible)fee
field of the RPC output)Then a couple large followups. Tracking issues: