Commit graph

7947 commits

Author SHA1 Message Date
Gregory Sanders
0ed009fbfd assettag -> assetcommitment 2017-04-02 14:30:01 -04:00
Mark Friedenbach
f887514445 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-04-02 14:30:01 -04:00
Mark Friedenbach
0e3683b062 CT/CA: Switch from "UNKNOWN" to "CONFIDENTIAL" in the debug logs, for clarity 2017-04-02 14:30:01 -04:00
Mark Friedenbach
6e78bde2f8 CA: Fix code comments 2017-04-02 14:30:01 -04:00
Mark Friedenbach
de2fba4c1b CA: Assert the size of the pubkey, protecting against a regression to uncompressed pubkeys 2017-04-02 14:30:01 -04:00
Mark Friedenbach
588d54890b Format: Fix indentation 2017-04-02 14:30:01 -04:00
Mark Friedenbach
287421e031 TODO: Reminder to add issuance information to the JSON-RPC response 2017-04-02 14:30:01 -04:00
Mark Friedenbach
71d52fa0b6 CT: Switch to standard CConfidentialValue::IsCommitment() API instead checking the size of the commitment vector directly 2017-04-02 14:30:01 -04:00
Mark Friedenbach
d081aeda5e f "CT: Turn CTxOut::vchNonceCommitment into a CConfidentialCommitment subclass" 2017-04-02 14:30:01 -04:00
Jorge Timón
fbde518eb3 f'DEMO ONLY: issuance skeleton' 2017-04-02 14:30:01 -04:00
Jorge Timón
6e0a9eec14 f'fixup! CA: Use fee asset instead of BITCOINID' 2017-04-02 14:30:01 -04:00
Mark Friedenbach
478e53a2e8 CA: Add reissuance object to transaction serialization for signature purposes. 2017-04-02 14:30:01 -04:00
Mark Friedenbach
22d1f49c0b [Hard-Fork] CT/CA: Put the asset surjection proof, value range proof, and issuance rangeproofs under the witness commitment 2017-04-02 14:30:01 -04:00
Mark Friedenbach
889a05fdd4 Segwit: Rename CTransaction::GetWitnessHash() -> CTransaction::GetHashWithWitness()
The upstream name of GetWitnessHash() is very confusing as it is not a hash of the witness data for the transaction, but rather a hash of the full serialization of the transaction including witness data. This goes beyond confusing to downright wrong with CT/CA where the witness hash will be a hash tree of witness data (rangeproofs, surjectionproofs, script signatures, etc.) and NOT have any transaction data.
2017-04-02 14:28:28 -04:00
Mark Friedenbach
d3f60513d2 Segwit: Use fAllowWitness in more places instead of recomputing 2017-04-02 14:28:28 -04:00
Mark Friedenbach
8a2c09b441 [Hard-Fork] CT: Move nNonce from the witness to the transaction format proper, so as to put it under the signature 2017-04-02 14:28:28 -04:00
Gregory Sanders
1ebbd1dcd6 Remove asset wildcard, make default behavior 2017-04-02 14:28:28 -04:00
Gregory Sanders
7fddf61e92 Allow FillOutputs to continue on failure to deblind output 2017-04-02 14:28:24 -04:00
Gregory Sanders
a144f600e8 Revamp BlindOutputs 2017-04-02 14:28:24 -04:00
Mark Friedenbach
814200a50c f "CT: Turn CTxOut::vchNonceCommitment into a CConfidentialCommitment subclass" 2017-04-02 14:28:18 -04:00
Mark Friedenbach
320c4de1ea CA: Remove TODO note that has already been done 2017-04-02 14:28:18 -04:00
Mark Friedenbach
2736802263 CT: Don't assume size of a serialized pubkey (removes a magic number). 2017-04-02 14:28:18 -04:00
Mark Friedenbach
449b827ebb CT/CA: Enforce validity of confidential commitments via CConfidentialCommitment::IsValid() 2017-04-02 14:28:18 -04:00
Mark Friedenbach
cd6b2929c8 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-04-02 14:28:18 -04:00
Mark Friedenbach
7c35c08302 CT/CA: Unify CTxOutAsset and CTxOutValue into a single templated abstract base class 2017-04-02 14:28:18 -04:00
Mark Friedenbach
9db43d8b48 CT: Move CTxOutValue::vchNonceCommitment into CTxOut 2017-04-02 14:28:18 -04:00
Mark Friedenbach
203fa8f7a9 CT: Move CTxOutValue::vchRangeproof into CTxOut 2017-04-02 14:28:18 -04:00
Mark Friedenbach
c88fec9660 CA: Move CTxOutAsset::vchSurjectionproof into CTxOut 2017-04-02 14:28:18 -04:00
Mark Friedenbach
96221efaab CT: CTxOutValue::IsAmount() -> CTxOutValue::IsExplicit() 2017-04-02 14:28:18 -04:00
Mark Friedenbach
e2077844f6 CA: CTxOutAsset::vchAssetTag -> CTxOutAsset::vchCommitment 2017-04-02 14:28:18 -04:00
Mark Friedenbach
343bf9176f CA: CTxOutAsset::IsAsset() -> CTxOutAsset::IsExplicit() 2017-04-02 14:28:18 -04:00
Mark Friedenbach
8135667a12 CA: CTxOutAsset::IsAssetCommitment() -> CTXOutAsset::IsCommitment() 2017-04-02 14:28:18 -04:00
Jorge Timón
a14aa412c6 fixup! CA: Use fee asset instead of BITCOINID 2017-04-02 14:28:18 -04:00
Jorge Timón
f179f963e8 CA: Introduce -feeasset option 2017-04-02 14:28:18 -04:00
Mark Friedenbach
082fee5a1c CA: Remove unnecessary return statment after exception throw 2017-04-02 14:28:18 -04:00
Mark Friedenbach
c0cd48e639 CT: Remove residual code using the Elements alpha serialization prefixes 2017-04-02 14:28:18 -04:00
Mark Friedenbach
e9c8cf5051 CA: Standardize prefixes so that value and asset commitments use the same constant values for null/empty and explicit values. 2017-04-02 14:28:18 -04:00
Mark Friedenbach
31abc52e0a 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-04-02 14:28:18 -04:00
Mark Friedenbach
063aae664f CA: Switch to CAsset::SetNull() API instead of assignment & default constructor. 2017-04-02 14:28:18 -04:00
Mark Friedenbach
3d46e206e3 CA: Switch to standard CAsset::IsNull() API instead of comparing against CAset() 2017-04-02 14:28:18 -04:00
Mark Friedenbach
baf3051cf0 CA: Change CAsset from a typedef of uint256 into its own class, so that it has stictly enforced semantics about its usage/API. 2017-04-02 14:28:18 -04:00
Mark Friedenbach
944d602526 CA: Switch CTxOutAsset::GetAssetID() to return a constant reference to the stored asset ID rather than perform unnecessary memory reallocation. 2017-04-02 14:28:18 -04:00
Mark Friedenbach
947920581e CA: Remove call to GetAssetID() that doesn't actually do anything (result is never used). 2017-04-02 14:28:18 -04:00
Jorge Timón
e6d57ef610 CA: fixup! Make CWallet::mapAssetLabels and CWallet::mapAssets private 2017-04-02 14:28:18 -04:00
Mark Friedenbach
b2d8685a41 CA: hashAssetIdentifier -> assetEntropy 2017-04-02 14:28:18 -04:00
Mark Friedenbach
83456d6037 CA: CAssetID -> CAsset 2017-04-02 14:28:18 -04:00
Mark Friedenbach
6e8f1b7247 CA: uint256 -> CAssetID 2017-04-02 14:25:06 -04:00
Gregory Sanders
d611d0eecd f'BlindOuputs succeeds if...' BlindOutputs now returns number of outputs blinded 2017-04-02 14:23:35 -04:00
Mark Friedenbach
bdcafff6b7 2WP: Remove residual traces of bitcoin serialization from src/primitives/transaction* 2017-04-02 14:23:35 -04:00
Gregory Sanders
34db2aa734 BlindOuputs succeeds if no blinding known/attempted 2017-04-02 14:23:35 -04:00