Commit graph

500 commits

Author SHA1 Message Date
Steven Roose
0f9b1a2ed1
dynafed: Only verify proposed parameters if they differ from current
This allows the initial relaxed restriction on non-segwit fedpeg
programs to be extended as long as the fedpeg program is not changed
while the block signing parameters can be changed.
2021-03-02 15:33:58 +00:00
Steven Roose
c0e7cf64eb
Fix mainchain RPC warmup message 2020-10-06 13:44:56 +02:00
Steven Roose
214789b693
Place the mainchain RPC warmup message in a better place 2020-03-17 17:42:57 +00:00
Gregory Sanders
be4606970e Refactor IsPAKValid to not magically acquire chainparams 2019-09-06 10:24:00 -04:00
Gregory Sanders
c6070be5a2 Remove script/standard dependence of ContextualCheckDynaFedHeader 2019-09-06 10:24:00 -04:00
Gregory Sanders
9a3b9b9cfd Enforce PAK checks on dynafed proposals 2019-09-06 10:24:00 -04:00
Gregory Sanders
04cadcd689 fixup proposal checks 2019-09-06 10:24:00 -04:00
Gregory Sanders
1122fc28af Add dynafed proposal restrictions 2019-09-06 10:24:00 -04:00
Gregory Sanders
a7bb36f6cf Remove misleading comment for ContextualCheckDynaFedHeader use 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
285daab400 s/m_dyna_params/m_dynafed_params/ 2019-09-06 10:24:00 -04:00
Gregory Sanders
8f12b617fc s/ConsensusParamEntry/DynaFedParamEntry/ 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
2eded09b6a Have removeForBlock boot transactions when required 2019-09-06 10:06:44 -04:00
Gregory Sanders
0cfe03bec4 Expose fedpeg fetching to consensus and mempool internals 2019-09-06 10:06:44 -04:00
Gregory Sanders
f5e46328ee ContextualCheckBlockHeader: dynafed doesn't call CheckChallenge 2019-09-06 10:06:44 -04:00
Gregory Sanders
fb333b3ed8 Introduce contextual block checks for dynafed 2019-09-06 10:06:44 -04:00
Gregory Sanders
8f2194c901 Enable pak enforcement at mempool/block level when appropriate 2019-09-06 10:06:44 -04:00
Gregory Sanders
a306c0c6ec Update PAK internals, helper functions 2019-09-06 10:06:44 -04:00
Gregory Sanders
5e273e806e Add inactive versionbits dynafed deployment 2019-09-06 10:06:44 -04:00
Gregory Sanders
1f470d3201 ReadBlockFromDisk: do genesis block check before block proof check 2019-09-06 10:06:44 -04:00
Gregory Sanders
a7742ca3a2 Merge remote-tracking branch 'bitcoin-gh/0.18' into 0.18.0-backports 2019-06-26 11:58:58 -04:00
Gregory Sanders
8838e76753 Do non-depth check for peg-in witness where possible 2019-06-13 10:56:54 -04:00
Steven Roose
619b438dab
Merge branch 'master' into catchup 2019-05-29 14:17:08 +01:00
Steven Roose
de81c0d97e
MERGE-FIX: Fix linter (mostly RPC help)
I also moved some RPC methods that were not at the end of the file with
the other ELEMENTS RPC methods. This makes the diff on my machine look
crazy. Let's hope GitHub has more intelligent diffs..
2019-05-27 17:40:16 +01:00
Gregory Sanders
8591de929e kill useless mapPeginsSpentToTxid 2019-05-20 13:57:56 -04:00
Steven Roose
f4889a5253
UPSTREAM MERGE BROKEN: Merge upstream commit '519b0bc5dc' into master 2019-05-17 16:17:09 +01:00
Steven Roose
dc900eb7d7
Merge branch 'master' into catchup 2019-05-14 16:49:18 +01:00
Gregory Sanders
63bc3e3f02
Merge #614: Improve double pegin claim behavior
52ef283 Improve the fedpeg test with extra double claim tests (Steven Roose)
48a82fa Make claimpegin fail in the case of a double claim (Steven Roose)
af22646 Prevent pegin double spends from entering the mempool (Steven Roose)
50c5570 Report IsValidPeginWitness error message (Steven Roose)

Pull request description:

  Fixes #612 and #613.

  - prevents a double claim from entering mempool
  - makes `claimpegin` throw an exception when trying to double claim a pegin
  - check the last commit message on all the extra cases that are tested.

Tree-SHA512: dd9602cd4bc78a3e8f7a6b566f881ede09dba54900425348c1eb528268a3e869416e3c9ca97c1a8da4d120875ef59c4e21a857256312ce77e06b7b6ae04abf92
2019-05-08 11:10:58 -04:00
Steven Roose
af2264665e
Prevent pegin double spends from entering the mempool
This bug got introduced with the 0.17 rebase. In 0.14.1 the double pegin
claim check was done in the beginning of the validation logic, where the
coins view was the actual UTXO set. In 0.17, Core moved several checks
because the intermediate method CheckInputs was removed and some logic
moved to tx_verify.cpp, where we also put the pegin check.  In the
mempool acceptance check, however (as opposed to the ConnectBlock
check), CheckTxInputs is called with only a partial UTXO view for
optimization reasons. This commit adds an extra pegin check in the
beginning of the mempool code where we have a full UTXO view.
2019-05-08 15:34:55 +01:00
Gregory Sanders
ad43f9c60f Only spin-wait MainchainRPCCheck on initial loading with warmup code 2019-05-06 09:39:29 -04:00
Steven Roose
7f894ae00b
UPSTREAM MERGE BROKEN: Merge commit 'f617e05c38' into master 2019-05-01 19:18:18 +01:00
Gregory Sanders
789d4b97f7 Disallow output witness data in coinbase transactions 2019-04-12 11:50:01 -04:00
Gregory Sanders
8140a87dec Reject unneeded pegin witness by policy 2019-04-12 11:50:01 -04:00
Steven Roose
ade539cbb4 Don't assume mainchain is Bitcoin 2019-03-21 19:30:52 +00:00
Steven Roose
aba54b3f92
Make validatepegin default to true if has parent chain 2019-03-21 17:55:02 +00:00
Gregory Sanders
4ea4401e93
Merge #516: [0.17] Fix progress reporting issue
5b8c79a Fix progress reporting issue (Steven Roose)

Pull request description:

  Based on https://github.com/ElementsProject/elements/pull/515

  Reimplementation of https://github.com/Blockstream/liquid/pull/6

Tree-SHA512: 292be614802d0ca74bc9a19080bce46812bc4d5c386ed01f87e74898830946276359100d404868dda8fd4b4087699a9be804370a8ad387c7d92f4a3f5572d0b0
2019-03-21 08:09:25 -04:00
Steven Roose
5b8c79ac9d
Fix progress reporting issue
Reimplementation of https://github.com/Blockstream/liquid/pull/6
2019-03-21 11:01:16 +00:00
Sjors Provoost
a657da02a7
Validation: stop logging fake pow data 2019-03-20 23:05:15 +00:00
Steven Roose
0b5066143d
[BROKEN] Add CA validation 2019-03-20 12:05:46 +00:00
Wladimir J. van der Laan
0fd3632868
Merge #15552: 0.18: Granular invalidateblock and RewindBlockIndex
519b0bc5dc Make last disconnected block BLOCK_FAILED_VALID, even when aborted (Pieter Wuille)
8d220417cd Optimization: don't add txn back to mempool after 10 invalidates (Pieter Wuille)
9ce9c37004 Prevent callback overruns in InvalidateBlock and RewindBlockIndex (Pieter Wuille)
9bb32eb571 Release cs_main during InvalidateBlock iterations (Pieter Wuille)
9b1ff5c742 Call InvalidateBlock without cs_main held (Pieter Wuille)
241b2c74ac Make RewindBlockIndex interruptible (Pieter Wuille)
880ce7d46b Call RewindBlockIndex without cs_main held (Pieter Wuille)
436f7d735f Release cs_main during RewindBlockIndex operation (Pieter Wuille)
1d342875c2 Merge the disconnection and erasing loops in RewindBlockIndex (Pieter Wuille)
32b2696ab4 Move erasure of non-active blocks to a separate loop in RewindBlockIndex (Pieter Wuille)
9d6dcc52c6 Abstract EraseBlockData out of RewindBlockIndex (Pieter Wuille)

Pull request description:

  Same repo and branch like  "Granular invalidateblock and RewindBlockIndex #15402 ", can be merged as is.

  This saves us all the cherry-picks and review of the backport cherry-picks.

Tree-SHA512: 20c27c5f807c3d85e0072f9e2cdefad4ad7d329d6b26658a00844d5fcf0ed729059daf765e04e6382db2b5915117b15949cd4989d864917ab105c92e2e5e9986
2019-03-07 17:41:45 +01:00
Pieter Wuille
519b0bc5dc Make last disconnected block BLOCK_FAILED_VALID, even when aborted 2019-03-03 13:01:26 -08:00
Pieter Wuille
8d220417cd Optimization: don't add txn back to mempool after 10 invalidates 2019-02-28 14:12:26 -08:00
Pieter Wuille
9ce9c37004 Prevent callback overruns in InvalidateBlock and RewindBlockIndex 2019-02-28 14:12:26 -08:00
Pieter Wuille
9bb32eb571 Release cs_main during InvalidateBlock iterations 2019-02-28 14:12:22 -08:00
Wladimir J. van der Laan
ef362f2773 rpc/gui: Remove 'Unknown block versions being mined' warning
Due to miners inserting garbage into the version numbers, the current
version signalling has become completely useless. This removes the
"unknown block versions" warning which has the tendency to scare
users unnecessarily (and might get them to "update" to something
bad).

It preserves the warning in the logs. Whether this is desirable can
be a point of discussion.
2019-02-25 15:59:02 +01:00
Pieter Wuille
9b1ff5c742 Call InvalidateBlock without cs_main held 2019-02-24 18:55:21 -08:00
Pieter Wuille
241b2c74ac Make RewindBlockIndex interruptible 2019-02-24 18:55:21 -08:00
Pieter Wuille
436f7d735f Release cs_main during RewindBlockIndex operation 2019-02-24 18:55:17 -08:00
Pieter Wuille
1d342875c2 Merge the disconnection and erasing loops in RewindBlockIndex 2019-02-24 18:41:13 -08:00