Commit graph

13882 commits

Author SHA1 Message Date
Dmitry Petukhov
07f2178eb5
add test: UnblindConfidentialPair: invalid pubk in nNonce.vchCommitment
Added to prevent regression, code supplied by @instagibbs
(https://github.com/ElementsProject/elements/pull/489#issuecomment-450933962)
2019-01-02 23:12:56 +05:00
Dmitry Petukhov
f8a9d8bfa5
Fix UnblindConfidentialPair: use IsFullyValid() for ephemeral_key
if nNonce.vchCommitment contains invalid key of correct length,
IsValid() check will pass, but then assertion will be hit
when secp256k1_ec_pubkey_parse() is called on it inside CKey::ECDH().
Therefore, the check should be done with IsFullyValid()
2018-12-31 22:30:36 +05:00
Gregory Sanders
5467be3b16
Merge #475: rawreissuance rpc
bc257db f'rawreissueasset functional tests' (Gregory Sanders)
181d099 rawreissueasset functional tests (Gregory Sanders)
21cb8aa rawreissuance rpc (Gregory Sanders)
1251ecd fixup rawissueasset help comment (Gregory Sanders)
23371af add confidential_key explanation in validateaddress help (Gregory Sanders)
c579f4b Correct how wallet blinding logic detects which token id to use based on blinding keys (Gregory Sanders)
fff2dcc blindrawtransaction: Have blind_issuances parse correctly from command line (Gregory Sanders)
756bdc0 issueasset_base: Push 0-value value to issuance field if blinding (Gregory Sanders)
2018-12-17 15:53:59 -05:00
Gregory Sanders
bc257db852 f'rawreissueasset functional tests' 2018-12-17 15:52:59 -05:00
Gregory Sanders
181d09958b rawreissueasset functional tests 2018-12-12 16:27:52 -05:00
Gregory Sanders
21cb8aab9b rawreissuance rpc 2018-12-12 16:27:52 -05:00
Gregory Sanders
1251ecd411 fixup rawissueasset help comment 2018-12-12 16:27:52 -05:00
Gregory Sanders
23371af262 add confidential_key explanation in validateaddress help 2018-12-12 16:22:09 -05:00
Gregory Sanders
c579f4b524 Correct how wallet blinding logic detects which token id to use based on blinding keys 2018-12-12 16:22:09 -05:00
Gregory Sanders
fff2dccc1e blindrawtransaction: Have blind_issuances parse correctly from command line 2018-12-12 16:22:09 -05:00
Gregory Sanders
756bdc060e issueasset_base: Push 0-value value to issuance field if blinding 2018-12-12 16:22:09 -05:00
Gregory Sanders
71c69c3d4b
Merge #474: rawissueasset RPC call
ca383ac add functional testing for raw issuance call (Gregory Sanders)
a5e1af5 rawissueasset RPC call (Gregory Sanders)
f9f91ba Fixup issueasset help results information (Gregory Sanders)
69d8d15 Break out issuance-specific testing to its own functional test (Gregory Sanders)
2b22b6d Fixup (raw)blindrawtransaction (Gregory Sanders)
a5e9e0e Fix blinding logic for issuances on input 1 or higher (Gregory Sanders)
83df289 fixup BlindTransaction issuance counting assertion (Gregory Sanders)

Pull request description:

  Resolves the initial issuance portion of: https://github.com/ElementsProject/elements/issues/471

  The user follows this flow:
  `createrawtransaction->fundrawtransaction->rawissueasset->blindrawtransaction->signrawtransaction`

  `rawissueasset` is a new RPC call that allows the user to append N-many issuances, up to the amount of inputs the transaction has, at once. It allows the issuances to be "marked" for blinding later(only effects reissance token asset id), and for the destination outputs to be arbitrary addresses, blinded or otherwise.

  Previously `fundrawtransaction` would not blind issuances(pretty much on accident), so I have added an argument, default `true`, on whether to blind issuances, since there is no field in the transaction itself to mark as whether we want to blind it or not.

  Note: This will cause your transactions' fee-rate to go down, so the caller may want to over-shoot fees during the `fundrawtransaction` call as cushion.

  I also fixed a couple bugs on the way as I uncovered them.

Tree-SHA512: fa77158c390743f579797d426b9d9cb000a5d686a8b10aa818b1e9ad65fdc42ac139a36ad226e31676b3bd9c6643bc69074869d6a927309a7ec328c91e853bec
2018-12-12 11:12:32 -05:00
Gregory Sanders
ca383ac533 add functional testing for raw issuance call 2018-12-03 19:04:34 +01:00
Gregory Sanders
a5e1af5285 rawissueasset RPC call 2018-12-03 19:04:33 +01:00
Gregory Sanders
f9f91ba137 Fixup issueasset help results information 2018-12-01 15:33:40 -05:00
Gregory Sanders
69d8d158cd Break out issuance-specific testing to its own functional test 2018-11-29 16:35:42 -05:00
Gregory Sanders
2b22b6dfc6 Fixup (raw)blindrawtransaction 2018-11-29 16:35:42 -05:00
Gregory Sanders
a5e9e0e40f Fix blinding logic for issuances on input 1 or higher 2018-11-29 16:13:12 -05:00
Gregory Sanders
83df289765 fixup BlindTransaction issuance counting assertion 2018-11-29 16:13:12 -05:00
Steven Roose
e2c8580085
Merge #466: Add basic raw pegin creation test and fixup return name in help
f2161b411 Improve raw peg-in creation logic/help and add basic tests (Gregory Sanders)

Pull request description:

  shores up concerns in https://github.com/ElementsProject/elements/issues/465 and fixes a return variable help text. Adds tests.

Tree-SHA512: d32305a355c3bbac22c9cf5ceab57825f9dd1ced40a401cda62d25cba4313a832032720b0ecc30f2ca0025c3992099d32660fec566955dd00973ffb42362e32b
2018-11-15 18:34:07 +00:00
Gregory Sanders
1d52ca257e
Merge #464: Liquid forward ports
0064b03 Add Asset parameter to MutateTxAddOutData (yoshihide shimada)
0dd6605 Remove comma for `claimpegin` in command line help info (Stefan Liu)
a2715eb validation: change pindexPrev->nHeight + 1 to nHeight (shafisher)
2018-11-15 12:51:40 -05:00
Gregory Sanders
f2161b411f Improve raw peg-in creation logic/help and add basic tests 2018-11-14 21:58:02 -05:00
yoshihide shimada
0064b03f39 Add Asset parameter to MutateTxAddOutData 2018-11-14 09:26:51 -05:00
Stefan Liu
0dd6605820 Remove comma for claimpegin in command line help info
When calling this method(`claimpegin`) with liquid-cli, we don't commas between parameters.
2018-11-13 10:13:04 -05:00
shafisher
a2715eb9a5 validation: change pindexPrev->nHeight + 1 to nHeight 2018-11-13 10:12:36 -05:00
Gregory Sanders
64611df613
Merge #462: Add stevenroose key to contib
db5cd8e Add stevenroose key to contib (Steven Roose)

Pull request description:

Tree-SHA512: 44aee075687c6e6b0ed306a56a9752afa386f7819e1981c1deacf68267ee24584b171f01687278eaf2ec135617ec082509b41f27dea2dda493ae407f6185f715
2018-11-08 12:07:27 -05:00
Steven Roose
db5cd8ed55 Add stevenroose key to contib
Also removed jtimon's
2018-11-08 16:59:11 +00: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
f58d62eca9
Merge #454: Changed tutorial bitcoin config file to work with new core v0.17 format
16113d8 Removed redundant .rpcuser, .rpcpassword (wintercooled)
370e797 Changed config file to work with new core v0.17 format as well as previous versions (wintercooled)

Pull request description:

  Core v0.17 now handles config file settings differently and loads the existing config settings as mainnet and not regtest. This means our e1 and e2 nodes in the tutorial can't connect.

  This PR makes the bitcoin.conf file compatible with both formats. Without this change the tutorial code fails if you are using bitcoind v0.17.0.0.

  REF: https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.17.0.md

  If the following options are not in a section, they will only apply to mainnet:
  `addnode=`, `connect=`, `port=`, `bind=`, `rpcport=`, `rpcbind=` and `wallet=`.
  The options to choose a network (`regtest=` and `testnet=`) must be specified
  outside of sections.

  Tested with bitcoind v0.16.2.0 and v0.17.0.0

Tree-SHA512: 3136703da17570e410c1e86ab31f3ac0bca60847164dd10e75a57affd1b7b67fdfbba2be5437ad9ffdd5428c10f6d34073d3e746f55dacda858ab47b517cd3fc
2018-11-02 14:21:37 -04:00
wintercooled
16113d89db Removed redundant .rpcuser, .rpcpassword 2018-11-01 15:28:46 +00:00
wintercooled
370e797615 Changed config file to work with new core v0.17 format as well as previous versions 2018-11-01 14:29:55 +00:00
Gregory Sanders
3d2a0852a7
Merge #440: Updated README links to point to new elementsproject.org content.
61cbc79 changed link name for easier diff (wintercooled)
ef0451d added link to schnorr as research (wintercooled)
2652861 Modified intro text (wintercooled)
f68ba12 Modified what is elements? text (wintercooled)
b0ac198 changed link from github.io to .org (wintercooled)
7b2a331 Amend links to point at new .org site content (wintercooled)
2018-10-31 13:05:18 -04: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
wintercooled
61cbc79ad5 changed link name for easier diff 2018-10-26 12:39:01 +01:00
wintercooled
ef0451dba4 added link to schnorr as research 2018-10-26 12:37:32 +01:00
wintercooled
2652861554 Modified intro text 2018-10-20 10:06:30 +01:00
wintercooled
f68ba12ebd Modified what is elements? text 2018-10-20 09:59:57 +01:00
wintercooled
b0ac198046 changed link from github.io to .org 2018-10-20 09:52:07 +01:00
wintercooled
7b2a3311f1 Amend links to point at new .org site content 2018-10-20 09:27:10 +01:00
Gregory Sanders
71890d50e5
Merge #426: update secp256k1-zkp b2dca3ae19dbe47ba978a79a5022a289efbdc846
f3a424f update secp256k1-zkp 2318f18a909dffa1f962e681db7ff62cdc0f8e1c (Gregory Sanders)
2018-10-08 17:23:09 +09:00
Gregory Sanders
f3a424f0d0 update secp256k1-zkp 2318f18a909dffa1f962e681db7ff62cdc0f8e1c 2018-10-08 15:03:18 +09:00
Gregory Sanders
138d55a1b7
Merge #425: peg-in re-checking cleanup and fixes
abb7b01 Add some additional comments about BitcoindRPCCheck infra (Gregory Sanders)
62c56f4 don't set CorruptionPossible for peg-in transaction failure (Gregory Sanders)
5d7cd6b parameterize the rpc re-checking of peg-in validation failed blocks (Gregory Sanders)
ba8d498 bitcoind rpc check should take main locks for mapBlockIndex, check for key (Gregory Sanders)
2018-10-03 18:35:25 +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
3634aaf98f
Merge #422: feature_fedpeg.py bitcoind parent2 uses rpc cookie auth
f6528e9 feature_fedpeg.py parent2 uses rpc cookie auth (Gregory Sanders)
f349e17 allow start_node to create/take cookie files (Gregory Sanders)
2018-10-03 17:55:59 +09:00
Gregory Sanders
f9231a2102
Merge #418: qa: Use bitcoind as parent in Travis tests
7e02f39 qa: Use bitcoind as parent in Travis tests (Steven Roose)
2018-10-03 17:42:23 +09:00
Gregory Sanders
f6528e96f2 feature_fedpeg.py parent2 uses rpc cookie auth 2018-10-03 10:01:27 +09:00