Commit graph

22 commits

Author SHA1 Message Date
Andrew Poelstra
5b9f316537 Merge dcf2ccbfde into merged_master (Bitcoin PR #18115)
I really like this PR, but it wound up being pretty nontrivial to merge.
The crux is that it pulls PSBT signing logic into scriptpubkey manager,
which is where it belongs, but for us this means reasoning about pegins
inside script/sign.cpp.

However, sign.cpp is part of libbitcoin_common, which does not include
anything for reasoning about PoW or RPC (lol) or anything heavy about
that. This means that some pegin validation had to remain split between
the wallet/rpc layer and sign.cpp. I added a new file script/pegins.cpp
which has the (one) method we actually need in sign.cpp.

Aside from that, this diff is very large but is mostly just moving our
code changes to wallet/psbtwallet.* into wallet/wallet.* where those
functions now live. As far as review, it's probably not worthwhile to
spend too much too much time on this since it's going to be change
again in #16528 and others. The test coverage is pretty extensive.
2020-11-26 01:07:51 +00:00
Andrew Chow
a90d1521c8 Refactor peg-in witness construction to it's own function
Also changes to Use CVectorWriter instead of casting for peg-in value serialization
2019-10-14 16:06:58 -04:00
Gregory Sanders
b73ff4ccfe Fix liquidv1 sync
A single field wasn't given a positive value which
meant it considers no peg-ins to be valid.
2019-09-26 09:06:31 -04:00
Gregory Sanders
f7905d6dfb Generalize the number of epochs old a peg-in can be and still be valid 2019-09-05 10:51:09 -04:00
Gregory Sanders
44f55d36c0 Make future parent segwit versions in fedpegscripts be vacuously true 2019-09-05 10:51:09 -04:00
Gregory Sanders
bd11097cec Add fedpeg_program field in dynafed header 2019-09-05 10:51:09 -04:00
Gregory Sanders
0fd39edf54 s/d_params/dynafed_params/ 2019-09-05 10:51:09 -04:00
Gregory Sanders
525b24cf5c Expose fedpeg fetching to consensus and mempool internals 2019-09-03 10:55:29 -04:00
Gregory Sanders
8d3091bbcb Deserialize merkle proofs without witness, which matters for dynafed 2019-09-03 10:55:06 -04:00
Gregory Sanders
830f917235 Add fedpegscript-fetching helper 2019-09-03 10:55:06 -04:00
Gregory Sanders
b56fe14956 calculate_contract: remove most template checks and assert in preperation for dynafed 2019-09-03 10:55:06 -04:00
Steven Roose
9f4f2e7519
MERGE-FIX: Fix compilation errors 2019-05-03 17:46:12 +01:00
Gregory Sanders
870e41609e Enforce coinbase maturity on bitcoin peg-ins 2019-03-28 16:27:18 -04:00
Steven Roose
aba54b3f92
Make validatepegin default to true if has parent chain 2019-03-21 17:55:02 +00:00
Steven Roose
d53479c9ff
[BROKEN] Introduce CA in data structures 2019-03-20 12:05:45 +00:00
Gregory Sanders
aa375e66c1
Replace CScriptID and CKeyID in CTxDestination with dedicated type 2019-03-20 12:05:31 +00:00
Steven Roose
36a5d5d0f8
Fix bug in calculate_contract for Liquid 2019-03-20 12:05:28 +00:00
Gregory Sanders
a36ee6c0ed MERGE FIX: Augment IsValidPeginWitness with err string return 2019-01-31 10:55:34 +00:00
Gregory Sanders
4202671221 MERGE FIX: spelling linter fixes 2019-01-31 10:55:03 +00:00
Gregory Sanders
592a622b4b Add detection of liquidv1 fedpeg script, startup sanity check 2019-01-24 13:24:08 -05:00
Steven Roose
d8885400fb Add support for signed-blocks parent chains 2019-01-02 18:46:02 +01:00
Steven Roose
fb8a4533df Add pegin validation utility methods 2019-01-02 16:14:09 +01:00