Commit graph

13768 commits

Author SHA1 Message Date
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
c6f9fc0ba0
Merge #383: Fix issue #380 caused by change to initial free coins distribution
fe3a77e Update assets_tutorial.sh (wintercooled)
15c4943 Update assets_tutorial.py (wintercooled)
2018-06-28 09:09:25 -04:00
wintercooled
fe3a77efe8
Update assets_tutorial.sh
Fixed issue where e2 couldn't claim anyone-can-spend coins as they all reside in one address. Fixes issue #380
2018-06-28 12:47:06 +01:00
wintercooled
15c4943dee
Update assets_tutorial.py
Fixed issue where e2 couldn't claim anyone-can-spend coins as they all reside in one address. Fixes issue #380
2018-06-28 12:46:03 +01:00
Jorge Timón
c8677d44f6
Merge #379: [build] Add missing stuff to clean-local
9f04e1f [build] Add missing stuff to clean-local (Karl-Johan Alm)
2018-06-27 23:18:09 +02:00
Karl-Johan Alm
9f04e1fc04 [build] Add missing stuff to clean-local
Remaining of cache may interfere the expected execution of the rpc-test.py
This patch make "make clean-local" remove the cache and __pycache__ folders.
2018-06-27 20:16:00 +09: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
Gregory Sanders
0afba82182
Merge #376: QA: Elements tests first
22130f4 QA: Elements tests first (Jorge Timón)
2018-06-25 09:21:53 -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
22130f42f8
QA: Elements tests first 2018-06-20 20:38:05 +02: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
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
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