Commit graph

9386 commits

Author SHA1 Message Date
Gregory Sanders
72a7dd0704 subtract fee from reissuance token if token is fee asset during reissuance 2018-07-11 11:43:07 -04:00
Mike
9bcfdd8c5c Port tweakfedpegscript from liquid
Port tweakfedpegscript from liquid
2018-06-21 13:11:12 -07:00
Jorge Timón
b857c43ce9
RPC: Signblock: Support signblock on rpc/blockchain
QA: Adapt rpc_blockchain tests to signed blocks
2018-06-13 04:31:17 +02:00
Jorge Timón
cdb79e9596
RPC: Stop providing useless fake pow data
QA: Adapt rpc_blockchain tests to not having pow
2018-06-13 04:31:12 +02:00
Gregory Sanders
e73265e202
Merge #367: allow all other base58 prefix things to be set by conf file
e8d416c allow all other base58 prefix things to be set by conf file (Gregory Sanders)
2018-06-06 09:59:23 -07:00
Gregory Sanders
e8d416c9c0 allow all other base58 prefix things to be set by conf file 2018-06-05 13:19:58 -07:00
Tim Ruffing
6f80bcedfe Remove redundant checks of size of range proof and surjection proof
The checks are redudant because too large range proofs and surjection
proofs will be rejected by libsecp256k1. Furthermore, the checks are not
precise, and they are anyway not present in other similar code locations.
2018-06-03 15:57:24 +02:00
Tim Ruffing
7ad4d950a4 Reject issuances with explicit values but non-empty range proofs 2018-06-03 15:57:24 +02:00
Gregory Sanders
3832e4ab79 allow setting parent chain address prefix in configuration file 2018-06-01 09:40:33 -04:00
Gregory Sanders
c5c6497967
Merge #350: Make block solutions more strictly validated
1348313 add basic functional tests for signed block rpcs and validation (Gregory Sanders)
c07b0af Add signature checking flag for when no sighash byte is expected (Gregory Sanders)
8f92b21 remove block (multi)signature malleability vectors (Gregory Sanders)
2018-05-30 10:36:31 -04:00
Gregory Sanders
884005be37
Merge #335: Fix range/surjection proof caching
4815bc6 simplify and speedup surjection proof caching (Gregory Sanders)
9572165 simplify rangeproof validation caching (Gregory Sanders)
92871c6 Actually cache range and surjection proofs (Gregory Sanders)
2018-05-30 10:35:12 -04:00
Gregory Sanders
1381c68e1b
Merge #359: Rework control flow in VerifyAmount()
05602ed Improve comments for VerifyAmount() (Tim Ruffing)
42b62ac Ensure that input witness is present before accessing range proofs (Tim Ruffing)
670229e Use new helper function to verify issuance of re-issuance tokens (Tim Ruffing)
d7abf18 Extract helper function from VerifyAmount() (Tim Ruffing)
e183868 Forbid explicit issuance of 0 asset units (Tim Ruffing)
bef2760 Assert return value of secp256k1_pedersen_commit() for issuances (Tim Ruffing)
46f2416 Remove old testing code (Tim Ruffing)
2018-05-29 13:19:23 -04:00
Tim Ruffing
b2a729c4a5 Remove overflow checks for explicit input amounts
This removes checks from the pre-asset era that reject amounts on the
input side of a transaction if these amounts overflow. The checks are
superficial because VerifyAmounts() already rejects input amounts that
could potentially overflow.

One of the removed checks is wrong because it rejects legitimate
transactions that spend more than MAX_MONEY asset units altogether,
even if those units belong to different assets. For example, a
transaction spending MAX_MONEY units of an asset "apple" and MAX_MONEY
units of an asset "orange" was previously rejected because the code
literally added apples and oranges in this case.
2018-05-25 18:51:48 +02:00
Tim Ruffing
05602edf6f Improve comments for VerifyAmount() 2018-05-24 22:17:51 +02:00
Tim Ruffing
42b62ac285 Ensure that input witness is present before accessing range proofs 2018-05-24 22:17:51 +02:00
Tim Ruffing
670229e060 Use new helper function to verify issuance of re-issuance tokens
This forbids the explicit issuance of 0 re-issuance tokens (like for the issuance of
normal assets. The proper way to issue no re-issuance tokens is to use a
null commitment for the amount.
2018-05-24 22:17:51 +02:00
Tim Ruffing
d7abf1870a Extract helper function from VerifyAmount() 2018-05-24 22:17:51 +02:00
Tim Ruffing
e183868516 Forbid explicit issuance of 0 asset units
The proper way to issue 0 units of an asset is a null commitment but not
an explicit commitment to 0.

This commit eliminates the issue that some checks in the verification of
the issuance of re-issuance tokes were skipped when issuing 0 asset units
explicitly. This commit also simplifies the control flow of the relevant
code locations.
2018-05-24 22:17:51 +02:00
Tim Ruffing
bef2760352 Assert return value of secp256k1_pedersen_commit() for issuances
secp256k1_pedersen_commit() is expected to succeed because the value and
the blinding factor are both 0.
2018-05-24 22:09:41 +02:00
Tim Ruffing
46f2416234 Remove old testing code 2018-05-24 22:09:31 +02:00
Andrew Poelstra
d8c8ac3200 update libsecp256k1-zkp to f1c601ed9d6c990a164305bf1b552952d16547da 2018-05-23 17:02:50 +00:00
Jorge Timón
bcb509cf0f
RPC: Introduce getblockstats 2018-05-16 00:52:17 +02:00
Jorge Timón
938b5090a0
Refactor: RPC: Separate GetBlockChecked() from getblock()
This does not change functionality
2018-05-16 00:52:16 +02:00
Gregory Sanders
b1fcfa341e don't allow anyonecanspends at gen to exist without wallet seeing 2018-05-11 10:30:08 -04:00
Jorge Timón
5e97d95a28 BugFix: Make initialfreecoins configurable, default of 0 2018-05-11 10:30:08 -04:00
Gregory Sanders
c07b0afd87 Add signature checking flag for when no sighash byte is expected 2018-05-11 09:25:07 -04:00
Gregory Sanders
8f92b21e04 remove block (multi)signature malleability vectors 2018-05-11 09:24:16 -04:00
Jorge Timón
c7e6aff26b
Correct chain selection help 2018-05-10 12:01:10 +02:00
Gregory Sanders
9f7ce52f33
Merge #341: fix miner block header proof accounting
eb893ed fix miner block header proof accounting (Gregory Sanders)
2018-04-27 16:47:04 -04:00
Gregory Sanders
eb893ed127 fix miner block header proof accounting 2018-04-27 11:50:25 -04:00
Gregory Sanders
ed121e8df1 getnewblockhex: add ability to pass over transactions based on mempool age 2018-04-25 12:24:44 -04:00
Gregory Sanders
4815bc62cd simplify and speedup surjection proof caching 2018-04-25 10:47:16 -04:00
Gregory Sanders
9572165238 simplify rangeproof validation caching 2018-04-25 10:45:14 -04:00
Gregory Sanders
865a47ef70 [backport] Use a verbosity instead of two verbose parameters 2018-04-20 12:42:42 -04:00
Gregory Sanders
92871c6231 Actually cache range and surjection proofs 2018-04-17 20:19:25 -04:00
Gregory Sanders
9f17022c5d
Merge #318: RPC: If a scriptPubKey is a pegout, show pegout info too
81a4ed4 QA: Test pegout (Jorge Timón)
190339b RPC: If a scriptPubKey is a pegout, show pegout info too (Jorge Timón)
8cea3b4 RPC: Add vdata option to createrawtransaction (Jorge Timón)
2018-04-09 12:16:13 -07:00
Gregory Sanders
474ceadbb6 Under certain circumstances we don't need to blind at all, allow it 2018-04-09 10:45:29 -04:00
Gregory Sanders
a231f2020b More correct pubkey checks in CreateTransaction 2018-04-06 14:47:13 -07:00
Jorge Timón
190339bcda
RPC: If a scriptPubKey is a pegout, show pegout info too 2018-04-06 18:02:51 +02:00
Jorge Timón
8cea3b4d45
RPC: Add vdata option to createrawtransaction 2018-04-06 18:02:50 +02:00
Gregory Sanders
0beeae51ce
Merge #330: add option to subtract fee from peg-out output amount
ed63547 add basic peg-out functional testing (Gregory Sanders)
0328059 add optional subtract fee argument to sendtomainchain (Gregory Sanders)
2018-04-05 16:38:37 -07:00
Gregory Sanders
0328059a69 add optional subtract fee argument to sendtomainchain 2018-04-05 14:12:04 -07:00
Gregory Sanders
d77df82196 parameterize the mandatory coinbase 2018-04-02 13:40:49 -07:00
Gregory Sanders
b628d91894 make peginconfirmationdepth a chain param 2018-03-28 12:47:25 -04:00
Gregory Sanders
e348f8248e simplify non-depth peg-in validity checking 2018-03-28 10:01:14 -04:00
Gregory Sanders
257602efc1
Merge #322: add better reject reason for immature peg-in, with test
20dee2e slight peg-test language fixup (Gregory Sanders)
248eb91 add better reject reason for immature peg-in, with test (Gregory Sanders)
2018-03-27 12:31:29 -04:00
Gregory Sanders
248eb9157b add better reject reason for immature peg-in, with test 2018-03-26 18:11:38 -04:00
Gregory Sanders
2d1a092ff2 fix segfault when block from disk has pegin failure 2018-03-26 12:18:57 -04:00
Gregory Sanders
e93a6fb502
Merge #316: fix testproposedblock standardness issues
fa34426 remove witnessEnabled standardness logic (Gregory Sanders)
b8ba4eb don't enforce standardness on coinbase (Gregory Sanders)
2018-03-15 12:33:31 -04:00
Gregory Sanders
fa34426ab1 remove witnessEnabled standardness logic 2018-03-13 12:20:24 -04:00