Commit graph

13756 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
Gregory Sanders
dfcb26c7bf
Merge #374: Port tweakfedpegscript from liquid-deamon
9bcfdd8 Port tweakfedpegscript from liquid (Mike)
2018-06-22 09:47:00 -04:00
Mike
9bcfdd8c5c Port tweakfedpegscript from liquid
Port tweakfedpegscript from liquid
2018-06-21 13:11:12 -07:00
Jorge Timón
c929443996
Merge #373: QA: Introduce feature_blocksign.py
f66e94a QA: Introduce feature_blocksign.py (Steven Roose)
2018-06-20 20:34:08 +02:00
Steven Roose
f66e94a712
QA: Introduce feature_blocksign.py 2018-06-19 22:21:47 +02:00
Jorge Timón
7a3720a1d5
Merge #344: RPC: Signblock: Support signblock info on rpc/blockchain
b857c43 RPC: Signblock: Support signblock on rpc/blockchain (Jorge Timón)
cdb79e9 RPC: Stop providing useless fake pow data (Jorge Timón)
2018-06-13 04:40:09 +02: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
375c022308
Merge #364: Non-malleable zero-knowlege proofs
6f80bce Remove redundant checks of size of range proof and surjection proof (Tim Ruffing)
7ad4d95 Reject issuances with explicit values but non-empty range proofs (Tim Ruffing)
2018-06-06 09:58:41 -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
Gregory Sanders
0c7ab1f128
Merge #365: QA: Reactivate and improve rpc_blockchain tests
7b6a393 QA: Reactivate and improve rpc_blockchain tests (Jorge Timón)
2018-06-04 17:34:06 -07:00
Jorge Timón
7b6a393a53
QA: Reactivate and improve rpc_blockchain tests 2018-06-05 00:56:05 +02: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
5ad7e17034
Merge #363: allow setting parent chain address prefix in configuration file
3832e4a allow setting parent chain address prefix in configuration file (Gregory Sanders)
2018-06-01 13:08:48 -04: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
Gregory Sanders
12d367a5c0
Merge #361: Remove overflow checks for explicit input amounts
b2a729c Remove overflow checks for explicit input amounts (Tim Ruffing)
2018-05-29 13:10:01 -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
Gregory Sanders
6ec0b129a6
Merge #358: update libsecp256k1-zkp to f1c601ed9d6c990a164305bf1b552952d16547da
d8c8ac3 update libsecp256k1-zkp to f1c601ed9d6c990a164305bf1b552952d16547da (Andrew Poelstra)
2018-05-24 09:05:13 -04:00
Andrew Poelstra
d8c8ac3200 update libsecp256k1-zkp to f1c601ed9d6c990a164305bf1b552952d16547da 2018-05-23 17:02:50 +00:00
Gregory Sanders
31fa0aa1cf
Merge #357: Improve pegging test
88ae603 tests: Update pegging test to Python 3 (Tim Ruffing)
61b6ef1 tests: Return meaningful exit status in pegging test (Tim Ruffing)
2018-05-21 09:58:53 -04:00
Tim Ruffing
88ae603ee1 tests: Update pegging test to Python 3 2018-05-19 00:22:57 +02:00
Tim Ruffing
61b6ef14ff tests: Return meaningful exit status in pegging test 2018-05-19 00:22:52 +02:00
Gregory Sanders
c849ded4fe
Merge #185: Rpc: Introduce call for per-block fee statistics
b142b2c Tests: Add data file (Anthony Towns)
9dde7d7 Tests: Test new getblockstats RPC (Jorge Timón)
bcb509c RPC: Introduce getblockstats (Jorge Timón)
938b509 Refactor: RPC: Separate GetBlockChecked() from getblock() (Jorge Timón)
2018-05-16 12:26:32 -04:00
Anthony Towns
b142b2c29a
Tests: Add data file 2018-05-16 00:52:19 +02:00
Jorge Timón
9dde7d7606
Tests: Test new getblockstats RPC
Includes commit from Anthony Towns @ajtowns:

Tests: Save and load block and corresponding expected statistics
2018-05-16 00:52:18 +02: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
Jorge Timón
1ea6967190
Merge #353: speedup and fix wallet-hd functional test for CA
f8aaa95 speedup and fix wallet-hd functional test for CA (Gregory Sanders)
2018-05-16 00:38:34 +02:00
Gregory Sanders
f8aaa95fa4 speedup and fix wallet-hd functional test for CA 2018-05-14 09:35:57 -04:00
Gregory Sanders
0daa8ccdfb
Merge #351: Default custom chains to no free coins
b1fcfa3 don't allow anyonecanspends at gen to exist without wallet seeing (Gregory Sanders)
5e97d95 BugFix: Make initialfreecoins configurable, default of 0 (Jorge Timón)
2018-05-14 09:18:47 -04: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
1348313eb7 add basic functional tests for signed block rpcs and validation 2018-05-11 09:26:09 -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
Gregory Sanders
864b122368
Merge #347: Correct chain selection help
c7e6aff Correct chain selection help (Jorge Timón)
2018-05-10 08:11:02 -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