Commit graph

9434 commits

Author SHA1 Message Date
Gregory Sanders
f2161b411f Improve raw peg-in creation logic/help and add basic tests 2018-11-14 21:58:02 -05:00
Steven Roose
99cc03457f
Merge #460: fix endianness of getrawtransaction issuance entropy, add basic test
8b0ebae27 fix endianness of getrawtransaction issuance entropy, add basic test (Gregory Sanders)
2018-11-08 16:57:33 +00:00
Gregory Sanders
8b0ebae271 fix endianness of getrawtransaction issuance entropy, add basic test 2018-11-08 11:20:42 -05:00
Gregory Sanders
3cf35fc090
Merge #410: compact block RPC calls
c3fe935 test compact block rpcs (Gregory Sanders)
c3cbe6e compact block RPC calls (Gregory Sanders)

Pull request description:

  Combined with https://github.com/ElementsProject/elements/pull/339 should be pretty powerful for speed of block proposal transmission.

Tree-SHA512: 305256b844a28542bb720ab86a36ec91982dd41c4d8e455e34ad3db12daa6e8b25ccfe2728fa514812655c2121c8d1d36e71f2af83f86b2de6c5d0c72541d79e
2018-10-29 12:46:35 -04:00
Gregory Sanders
f3a424f0d0 update secp256k1-zkp 2318f18a909dffa1f962e681db7ff62cdc0f8e1c 2018-10-08 15:03:18 +09:00
Gregory Sanders
abb7b015d8 Add some additional comments about BitcoindRPCCheck infra 2018-10-03 17:57:57 +09:00
Gregory Sanders
62c56f446a don't set CorruptionPossible for peg-in transaction failure
Previously the peg-in validation logic was done in script
which means it was handled correctly by mempool/block logic.

We then moved these checks outside of script, which means
that these checks aren't multithreaded/batched, and return
the specific error states, including CorruptionPossible.

This means that blocks are never considered permanently invalid and
in certain circumstances tried in an infinite loop.

Instead we mark it as a normal failure, and allow the peg-in invalid
block queue to take care of it instead.
2018-10-03 17:57:57 +09:00
Gregory Sanders
5d7cd6b843 parameterize the rpc re-checking of peg-in validation failed blocks 2018-10-03 17:57:42 +09:00
Gregory Sanders
ba8d498559 bitcoind rpc check should take main locks for mapBlockIndex, check for key 2018-10-03 17:57:42 +09:00
Gregory Sanders
5fe9c2cbeb
Merge #419: fix various undefined behavior and null ptr dereferences
0184575 re-enable failing travis build (Gregory Sanders)
f6875bd fix use after free in peg-in mempool logic (Gregory Sanders)
ea9d92d only try to set best chain if signal is registered (Gregory Sanders)
61c5491 fix undefined behavior in confidential commitment serialization (Gregory Sanders)
2018-09-27 12:11:56 -04:00
Gregory Sanders
ba1c470aef
Merge #417: require 0.16.3 parent Core node
c37eb06 require 0.16.3 parent Core node (Gregory Sanders)
2018-09-27 10:11:31 -04:00
Gregory Sanders
f6875bd32c fix use after free in peg-in mempool logic 2018-09-26 18:05:15 -04:00
Gregory Sanders
35364b6746
rpc: reject non-hex strings for claim_script 2018-09-26 19:05:42 +02:00
Gregory Sanders
ea9d92d453 only try to set best chain if signal is registered 2018-09-26 12:09:57 -04:00
Gregory Sanders
61c54913c9 fix undefined behavior in confidential commitment serialization 2018-09-25 19:57:36 -04:00
Gregory Sanders
c37eb06b94 require 0.16.3 parent Core node 2018-09-25 12:17:50 -04:00
Suhas Daftuar
05c8066c8e Fix crash bug with duplicate inputs within a transaction
Introduced by #9049
2018-09-19 11:27:25 -04:00
Jorge Timón
8b037a3913
Merge #407: Replace median fee rate with feerate percentiles
61064b3 Replace median fee rate with feerate percentiles (Marcin Jachymiak)
2018-09-17 03:43:14 +02:00
Gregory Sanders
7927e8763a
Merge #400: 2WP: Verify number of transactions in SPV proof
85eb502 2WP: Verify number of transactions in SPV proof (Steven Roose)
621b52f Check parent RPC version on startup (Steven Roose)
7bfb100 expose CBlockIndex::nTx in getblock(header) (Gregory Sanders)
2018-09-16 18:12:06 -07:00
Steven Roose
85eb5026de 2WP: Verify number of transactions in SPV proof
Use the getblockheader RPC from Bitcoin Core to verify if the number of
transactions mentioned in the SPV proof matches the number for the
block known by the Core daemon.

Inspired by 6b9dc8ceae
2018-09-15 13:25:41 -07:00
Steven Roose
621b52f80b Check parent RPC version on startup 2018-09-15 13:25:34 -07:00
Gregory Sanders
7bfb1001df expose CBlockIndex::nTx in getblock(header) 2018-09-15 13:25:20 -07:00
Gregory Sanders
c3cbe6e203 compact block RPC calls 2018-09-12 16:50:43 -07:00
Marcin Jachymiak
61064b39d5
Replace median fee rate with feerate percentiles
Removes medianfeerate result from getblockstats.
Adds feerate_percentiles which give the feerate of the 10th, 25th, 50th,
75th, and 90th percentile weight unit in the block.
2018-09-12 23:51:51 +02:00
nkostoulas
2bf55e1d0a
Set policy asset for core unit tests 2018-09-12 16:32:09 +01:00
Jorge Timón
60efe08d94
Doc: RPC: Fix named arguments' documentation for importprivkey 2018-09-07 00:21:59 +02:00
Jorge Timón
cd1a9e2e89
Merge #362: 2WP: Allow other elements chains as parent chains for pegs
3f62b32 QA: Test 2wp using the test framework (Jorge Timón)
2de5765 2WP: QA: Introduce -con_parent_chain_signblockscript (Jorge Timón)
781953b QA: Optionally allow other chains (Jorge Timón)
2018-09-07 00:16:19 +02:00
Jorge Timón
2de576525b
2WP: QA: Introduce -con_parent_chain_signblockscript
This allows other elements chains as parent chains for pegs, for testing purposes

for now it also assumes that the parent chain has CT/CA tx format,
which is orthogonal to the parent chain having pow or signed blocks

It would be nice to also test bitcoin-like chains with signed blocks
instead of pow by adding another parameter -con_parent_chain_has_CT or
similar and decouple the logic

Introduce -con_parent_pegged_asset option to check the asset in the
peg-in txs from the parent chains.

CT: Introduce GetAmountFromParentChainPegin for CT txs
RPC: Adapt rpcwallet to initial -con_parent_chain_has_pow
Introduce CheckProofGeneric
Introduce pow::CheckProofParent
2018-08-16 19:29:23 +02:00
Gregory Sanders
bc2918d20a give hint on chain argument for -cli usage 2018-08-16 11:28:04 -04:00
Gregory Sanders
5a40e7d144 mainchainrpc* description fixes 2018-08-16 10:59:41 -04:00
Jorge Timón
a3b6ab088c
Merge #394: Explicit option for disabling 2wp
38dc2e7 Chainparams: Introduce -con_has_parent_chain option (Jorge Timón)
2018-07-22 07:50:12 +02:00
Jorge Timón
38dc2e71b6
Chainparams: Introduce -con_has_parent_chain option 2018-07-21 22:53:15 +02:00
wintercooled
10b9350334 Remove use of 'bitcoin' as hard coded default asset for sendtoaddress and sendmany. 2018-07-19 10:41:27 +01:00
wintercooled
82afeed34b Add ability to use listissuance with label as param. Plus tests. (amended for grammar) 2018-07-16 17:43:02 +01:00
wintercooled
92e3136336 Allow initial reissuance token count to be set via param 2018-07-12 18:52:23 +01:00
wintercooled
dd39cc4f80 Allow default asset name to be set via param 2018-07-12 18:51:49 +01:00
Jorge Timón
fb0494a577
RPC: Named arguments for signblock 2018-07-11 20:44:28 +02:00
Gregory Sanders
826621375d
Merge #391: subtract fee from reissuance token if token is fee asset during reiss…
72a7dd0 subtract fee from reissuance token if token is fee asset during reissuance (Gregory Sanders)
2018-07-11 13:50:18 -04:00
Gregory Sanders
72a7dd0704 subtract fee from reissuance token if token is fee asset during reissuance 2018-07-11 11:43:07 -04:00
Gregory Sanders
19b24da39d
Merge #386: NO-HF: Move block.proof.challenge to Consensus::Params::signblockscript
710df6d NO-HF: Move block.proof.challenge to Consensus::Params::signblockscript (Jorge Timón)
2018-07-11 10:48:20 -04:00
Gregory Sanders
13dda38880
Merge #388: Remove unused line giving a warning
8682dde Remove unused line giving a warning (Jorge Timón)
2018-07-11 09:32:35 -04:00
Jorge Timón
46263a11a0
RPC: Named arguments for combineblocksigs 2018-07-11 03:18:19 +02:00
Jorge Timón
8682ddec8e
Remove unused line giving a warning 2018-07-11 01:25:16 +02:00
Jorge Timón
710df6d4e8
NO-HF: Move block.proof.challenge to Consensus::Params::signblockscript
Since the scriptPubKey for signing blocks never changes, there's no
point reading repeating it from every block header.
2018-07-10 03:51:43 +02:00
Gregory Sanders
146a95724e
Merge #370: Refactor: Validation: Make parts of IsValidPeginWitness templated
a20986b 2WP: Refactor out GetAmountFromParentChainPegin (Jorge Timón)
2be9cae Refactor: Validation: Make parts of IsValidPeginWitness templated (Jorge Timón)
2018-06-25 20:28:34 -04:00
Gregory Sanders
b745444a19
Merge #355: Change initial issuance output to 1
1136ad3 Change initial issuance output to 1 (nkostoulas)
2018-06-25 09:22:41 -04:00
Mike
9bcfdd8c5c Port tweakfedpegscript from liquid
Port tweakfedpegscript from liquid
2018-06-21 13:11:12 -07:00
Jorge Timón
a20986b40d
2WP: Refactor out GetAmountFromParentChainPegin 2018-06-14 19:27:29 +02:00
Jorge Timón
2be9cae539
Refactor: Validation: Make parts of IsValidPeginWitness templated
this should not change behavior
2018-06-14 19:27:25 +02:00
nkostoulas
1136ad3a96 Change initial issuance output to 1 2018-06-14 09:46:10 +01:00