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
Gregory Sanders
a3899da08d
Allow FillOutputs to continue on failure to deblind output
2017-06-16 12:02:34 -04:00
Gregory Sanders
f9dfc025cb
Revamp BlindOutputs
2017-06-16 12:02:34 -04:00
Mark Friedenbach
5ced151f4b
CA: Remove TODO note that has already been done
2017-06-16 12:02:34 -04:00
Mark Friedenbach
d2d0fd02fa
CT: Don't assume size of a serialized pubkey (removes a magic number).
2017-06-16 12:02:34 -04:00
Mark Friedenbach
88a31dff93
CT/CA: Enforce validity of confidential commitments via CConfidentialCommitment::IsValid()
2017-06-16 12:02:34 -04:00
Mark Friedenbach
58c21ae15c
CT: Turn CTxOut::vchNonceCommitment into a CConfidentialCommitment subclass
...
Note: This changes the serialization of the nonce commitment, from an arbitrary length vector to an either 1 (null) or 33 (commitment) byte fixed format.
2017-06-16 12:02:34 -04:00
Mark Friedenbach
a2c0f11f8e
CT/CA: Unify CTxOutAsset and CTxOutValue into a single templated abstract base class
2017-06-16 12:02:34 -04:00
Mark Friedenbach
9ebe6371a1
CT: Move CTxOutValue::vchNonceCommitment into CTxOut
2017-06-16 12:02:34 -04:00
Mark Friedenbach
515bed6331
CT: Move CTxOutValue::vchRangeproof into CTxOut
2017-06-16 12:02:34 -04:00
Mark Friedenbach
2103355a30
CA: Move CTxOutAsset::vchSurjectionproof into CTxOut
2017-06-16 12:02:34 -04:00
Mark Friedenbach
690a403a6d
CT: CTxOutValue::IsAmount() -> CTxOutValue::IsExplicit()
2017-06-16 12:02:34 -04:00
Mark Friedenbach
6d3406185f
CA: CTxOutAsset::vchAssetTag -> CTxOutAsset::vchCommitment
2017-06-16 12:02:34 -04:00
Mark Friedenbach
37230ccc1b
CA: CTxOutAsset::IsAsset() -> CTxOutAsset::IsExplicit()
2017-06-16 12:02:34 -04:00
Mark Friedenbach
b1d487d3e7
CA: CTxOutAsset::IsAssetCommitment() -> CTXOutAsset::IsCommitment()
2017-06-16 12:02:33 -04:00
Jorge Timón
0f79b488a2
fixup! CA: Use fee asset instead of BITCOINID
2017-06-16 12:02:33 -04:00
Jorge Timón
745194e5b7
CA: Introduce -feeasset option
2017-06-16 12:02:33 -04:00
Mark Friedenbach
fbee09383d
CA: Remove unnecessary return statment after exception throw
2017-06-16 12:02:33 -04:00
Mark Friedenbach
21ecd834d7
CT: Remove residual code using the Elements alpha serialization prefixes
2017-06-16 12:02:33 -04:00
Mark Friedenbach
8e288cbb66
CA: Standardize prefixes so that value and asset commitments use the same constant values for null/empty and explicit values.
2017-06-16 12:02:33 -04:00
Mark Friedenbach
ba3926500f
CA: Remove CAsset::ToString() as it is exactly identical in implementation to CAsset::GetHex(), and GetHex() more clearly matches up with the actual semantics.
2017-06-16 12:02:33 -04:00
Mark Friedenbach
9897078ec8
CA: Switch to CAsset::SetNull() API instead of assignment & default constructor.
2017-06-16 12:02:33 -04:00
Mark Friedenbach
0cf9d89441
CA: Switch to standard CAsset::IsNull() API instead of comparing against CAset()
2017-06-16 12:02:33 -04:00