Commit graph

13894 commits

Author SHA1 Message Date
Gregory Sanders
d954b5e43a
Merge #480: remove redundant value validity check
a9dcc1d remove redundant value validity check (Gregory Sanders)

Pull request description:

  This condition is already checked two conditionals above.

Tree-SHA512: b8ba752877c081e4f5a7e796ff6ca065ddf7b644089eb38033c17a17ca2da8243833fbfe2e669a427f90a6c21c8de022c8db237990e088efaf218b9775d75222
2019-03-06 09:11:42 -05:00
Steven Roose
7f6351782a
Merge #399: add RPC to deblind transactionwith blinding keys in wallet
fa2c2641b add RPC to deblind transactionwith blinding keys in wallet (Gregory Sanders)
2019-02-14 16:28:31 +00:00
Gregory Sanders
0da3b15df9
Merge #492: check amount against MAX_MONEY with unsigned comparison
36a40e8 check amount against MAX_MONEY with unsigned comparison (Dmitry Petukhov)

Pull request description:

  Because explicit conversion of arbitrarily large unsigned values
  to signed values of the same bit width is implementation defined
  until c++20, better check against MAX_MONEY with unsigned comparison.

Tree-SHA512: c4c40a7126b66e7d1c18750a7151619ab76d48098139a800cbf2123dc5f52091c07508c75846415d05ac67d1d21da71bc30d726e120bf35480a48d85df3e7fe5
2019-02-12 13:08:54 -05:00
Dmitry Petukhov
36a40e853f
check amount against MAX_MONEY with unsigned comparison
Because explicit conversion of arbitrarily large unsigned values
to signed values of the same bit width is implementation defined
until c++20, better check against MAX_MONEY with unsigned comparison.
2019-01-04 00:33:49 +05:00
Gregory Sanders
43f6cdbd31
Merge #491: Use proper parsing API for generator comparison
15371c3 Refactor UnblindConfidentialPair, and use proper generator serialization comparison (Gregory Sanders)
67fa949 Use proper secp API to compare generators in issuance validation (Gregory Sanders)

Pull request description:

  Shouldn't be an issue, but just as a precaution to protect against non-guaranteed conditions changing.

Tree-SHA512: 2bc983c36abd6157852b1f38636612ebde7519adb7c210b39a4b3dd9f36f497b7e80861223f4d582f6c35abdc669847126b246a0418f7d8d24455c841566f145
2019-01-03 13:00:34 -05:00
Gregory Sanders
15371c3f78 Refactor UnblindConfidentialPair, and use proper generator serialization comparison 2019-01-03 12:06:22 -05:00
Gregory Sanders
67fa9497cf Use proper secp API to compare generators in issuance validation 2019-01-03 12:06:15 -05:00
Gregory Sanders
2300bcf1b5
Merge #489: Fix UnblindConfidentialPair: use IsFullyValid() for ephemeral_key
07f2178 add test: UnblindConfidentialPair: invalid pubk in nNonce.vchCommitment (Dmitry Petukhov)
f8a9d8b Fix UnblindConfidentialPair: use IsFullyValid() for ephemeral_key (Dmitry Petukhov)
2019-01-02 13:15:07 -05:00
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
Gregory Sanders
329395fc43
Merge #486: add standard license header to src/blind.cpp
f7a5476 add standard license header to src/blind.cpp (Dmitry Petukhov)

Pull request description:

  As discussed in #485, src/blind.cpp should have a standard license header.

Tree-SHA512: cf15808a6a1189d4beb4911d0e55e8288df839908202b534bfd0fe5a80c74c0e174060454320e01b0c83295b62f4b9184d2de37d378b686b95428cd39a72bf22
2019-01-02 09:57:03 -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
Dmitry Petukhov
f7a5476082
add standard license header to src/blind.cpp 2018-12-22 21:01:25 +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
a9dcc1d431 remove redundant value validity check 2018-12-13 13:08:33 -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