Commit graph

13408 commits

Author SHA1 Message Date
Gregory Sanders
9d04bf58ba Rangeproof validation and rewinding should fail gracefully 2017-06-16 12:02:36 -04:00
Karl-Johan Alm
5157fc17ba [rpc] Include the name of the asset in error message when the asset cannot be identified. 2017-06-16 12:02:36 -04:00
Gregory Sanders
2ac5eafbca Remove spendable 0-value outputs from consensus, wallet 2017-06-16 12:02:36 -04:00
Gregory Sanders
366bdec11f f'Confidential Assets python testing' - move parent up to here 2017-06-16 12:02:36 -04:00
Gregory Sanders
fef9ca4843 audit log asset blinder info and issuance blinder info 2017-06-16 12:02:36 -04:00
Gregory Sanders
31bc28858d show assetlabel in listunspent if set 2017-06-16 12:02:36 -04:00
Gregory Sanders
6c4b6b9f04 remove unused value field in bitcoin-tx input addition 2017-06-16 12:02:36 -04:00
Gregory Sanders
46e13e2aa9 blindrawtransaction takes auxiliary generator args 2017-06-16 12:02:36 -04:00
Gregory Sanders
a08d6fbc6a getbalance "*" adds issuances to mapBalance since there is no corresponding receipt in previous transaction. 2017-06-16 12:02:36 -04:00
Gregory Sanders
8b41ac4b98 policyAsset instead of BITCOINID for fee in getbalance 2017-06-16 12:02:36 -04:00
Gregory Sanders
bc5b2b383f remove out of date help for assetlabel wildcard 2017-06-16 12:02:36 -04:00
Gregory Sanders
0d00c31d4f getrawtransaction returns details about issuances 2017-06-16 12:02:36 -04:00
Gregory Sanders
5a09e7ee30 Enhance confidential tests to cover new issuance method 2017-06-16 12:02:36 -04:00
Gregory Sanders
171cbf8b98 add {dump, import}issuanceblindingkey functionality 2017-06-16 12:02:36 -04:00
Gregory Sanders
d33fbcc631 add listissuances rpc call 2017-06-16 12:02:36 -04:00
Gregory Sanders
56ba0e5378 add reissueasset rpc call 2017-06-16 12:02:36 -04:00
Gregory Sanders
f37db5e608 add issueasset rpc call 2017-06-16 12:02:36 -04:00
Gregory Sanders
984967c40e Update wallet infrastructure to support blinding issuances 2017-06-16 12:02:35 -04:00
Gregory Sanders
0723e05119 Change dust to policyAsset instead of BITCOINID 2017-06-16 12:02:35 -04:00
Gregory Sanders
7e12ebe802 Fees can never be dust 2017-06-16 12:02:35 -04:00
Gregory Sanders
6c3b1f25c0 Move asset issuance funcionality to own file 2017-06-16 12:02:35 -04:00
Gregory Sanders
28e1565796 assetBlindingNonce is never a blinding key, but blinding factor 2017-06-16 12:02:35 -04:00
Gregory Sanders
3be1c9e097 Extend sigcache to properly cover all input to each verification 2017-06-16 12:02:35 -04:00
Gregory Sanders
05b245b9b5 CAssetIssuance validation 2017-06-16 12:02:35 -04:00
Gregory Sanders
034273a9a9 Issuances are IsNull if both nAmount and nInflationKeys are 2017-06-16 12:02:35 -04:00
Jorge Timón
c6a70906f4 CA: RPC: Add destroyamount rpc call in rpcwallet 2017-06-16 12:02:35 -04:00
Jorge Timón
5f90417261 CA: Decouple CWallet from CAssetsDir
Remove:

- std::vector<CAsset> GetKnownAssets() const;
- std::string GetLabelFromAsset(const CAsset& id) const;
- CAsset GetAssetFromLabel(const std::string& label) const;
2017-06-16 12:02:35 -04:00
Jorge Timón
246919c32d CA: Use CAssetsDir that inits from config instead of wallet
- Don't maintain asset petnames in wallet.
- RPC: Remove addassetlabel
- Remove load functions in CWallet for asset labels.
- "bitcoin" already hardcoded in CAssetsDir::InitFromStrings, remove from CWallet::InitLoadWallet
- Remove CWallet::SetAssetPair
2017-06-16 12:02:35 -04:00
Jorge Timón
44ceb66a15 CA: Globals: Introduce global CAssetsDir gAssetsDir 2017-06-16 12:02:35 -04:00
Jorge Timón
360e1d083f CA: Introduce CAssetsDir with unittests 2017-06-16 12:02:35 -04:00
Gregory Sanders
7d45e74d47 Fix issuance serialization to disk 2017-06-16 12:02:35 -04:00
Jorge Timón
d3e3d8f0e7 CA: Tests-py: Remove addassetlabel from rpc-tests/confidential_transactions.py 2017-06-16 12:02:35 -04:00
Jorge Timón
b4317426cf CA: Allow using unknown assets
- Improve GetAssetFromString and take it out of CWallet
2017-06-16 12:02:35 -04:00
Jorge Timón
2c06858416 CA: Tests-py: wallet needs no knowledge of asset hex ids 2017-06-16 12:02:35 -04:00
Gregory Sanders
8367f048a9 return assetcommitment with listunspent 2017-06-16 12:02:35 -04:00
Gregory Sanders
8db4309fe9 assettag -> assetcommitment 2017-06-16 12:02:35 -04:00
Mark Friedenbach
ced0decc8d CA: In debug log, make display of both CAssetIssuance::nAmount and CAssetIssuance::nInflationKeys optional and by keyword, as either one can be specified independent of the other 2017-06-16 12:02:35 -04:00
Mark Friedenbach
8ea5bedc29 CT/CA: Switch from "UNKNOWN" to "CONFIDENTIAL" in the debug logs, for clarity 2017-06-16 12:02:35 -04:00
Mark Friedenbach
60d53ca169 CA: Fix code comments 2017-06-16 12:02:35 -04:00
Mark Friedenbach
80d725222a CA: Assert the size of the pubkey, protecting against a regression to uncompressed pubkeys 2017-06-16 12:02:35 -04:00
Mark Friedenbach
b4be08a70d Format: Fix indentation 2017-06-16 12:02:35 -04:00
Mark Friedenbach
82aafe82f1 TODO: Reminder to add issuance information to the JSON-RPC response 2017-06-16 12:02:35 -04:00
Mark Friedenbach
91f40de0c5 CT: Switch to standard CConfidentialValue::IsCommitment() API instead checking the size of the commitment vector directly 2017-06-16 12:02:34 -04:00
Mark Friedenbach
48751f33b6 use IsNull for CConfidentialNonce 2017-06-16 12:02:34 -04:00
Jorge Timón
b14385780f fixup! CA python tests 2017-06-16 12:02:34 -04:00
Mark Friedenbach
fa452a5ba7 CA: Add reissuance object to transaction serialization for signature purposes. 2017-06-16 12:02:34 -04:00
Mark Friedenbach
4c8f785185 [Hard-Fork] CT/CA: Put the asset surjection proof, value range proof, and issuance rangeproofs under the witness commitment 2017-06-16 12:02:34 -04:00
Mark Friedenbach
b7704f1717 Segwit: Rename CTransaction::GetWitnessHash() -> CTransaction::GetHashWithWitness() 2017-06-16 12:02:34 -04:00
Mark Friedenbach
6053519cea [Hard-Fork] CT: Move nNonce from the witness to the transaction format proper, so as to put it under the signature 2017-06-16 12:02:34 -04:00
Gregory Sanders
a922d3c8ee Remove asset wildcard, make default behavior 2017-06-16 12:02:34 -04:00