Commit graph

21 commits

Author SHA1 Message Date
Glenn Willen
4ba4e0716d When validation is waiting for parent chain daemon, "stall".
Currently, if -validatepegin is given, and block validation can't proceed
because the parent chain is not synced, we mark the block invalid and put
it in a queue to be "revalidated" later. Unfortunately, marking a block
invalid has downstream consequences, in particular causing descendant blocks
to be marked invalid, which are not currently fixed by the queue.

Instead, we'll use a different strategy: if the mainchain daemon isn't
sufficiently synced to validate a block, we will "stall" connecting that
block to the chain, and have ActivateBestChain simply keep the tip at the
previous block until we're ready.

We can still download and validate (partly) blocks past this point while
we're waiting. They will be connected once the parent chain daemon catches
up.
2021-09-07 15:47:25 +00:00
Gregory Sanders
200a392d85
Fix liquidv1 sync
A single field wasn't given a positive value which
meant it considers no peg-ins to be valid.
2019-09-27 10:40:13 +02:00
Gregory Sanders
f11f066db4 Generalize the number of epochs old a peg-in can be and still be valid 2019-09-06 10:24:00 -04:00
Gregory Sanders
1892b67f99 Make future parent segwit versions in fedpegscripts be vacuously true 2019-09-06 10:24:00 -04:00
Gregory Sanders
b7aaf4be9e Add fedpeg_program field in dynafed header 2019-09-06 10:24:00 -04:00
Gregory Sanders
5e2aca1b9d s/d_params/dynafed_params/ 2019-09-06 10:24:00 -04:00
Gregory Sanders
0cfe03bec4 Expose fedpeg fetching to consensus and mempool internals 2019-09-06 10:06:44 -04:00
Gregory Sanders
7ec6c53503 Deserialize merkle proofs without witness, which matters for dynafed 2019-09-06 10:06:44 -04:00
Gregory Sanders
af485a8182 Add fedpegscript-fetching helper 2019-09-06 10:06:44 -04:00
Gregory Sanders
d1207bdd9b calculate_contract: remove most template checks and assert in preperation for dynafed 2019-09-06 10:06:44 -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