Gregory Sanders
7a94212eec
Fees can never be dust
2017-04-02 14:30:01 -04:00
Gregory Sanders
87ebb9a2e0
Move asset issuance funcionality to own file
2017-04-02 14:30:01 -04:00
Gregory Sanders
4891c1dbf1
assetBlindingNonce is never a blinding key, but blinding factor
2017-04-02 14:30:01 -04:00
Gregory Sanders
92e92eb523
Extend sigcache to properly cover all input to each verification
2017-04-02 14:30:01 -04:00
Gregory Sanders
6f29e9683e
CAssetIssuance validation
2017-04-02 14:30:01 -04:00
Gregory Sanders
9f3d650fc7
Issuances are IsNull if both nAmount and nInflationKeys are
2017-04-02 14:30:01 -04:00
Jorge Timón
9497027921
CA: RPC: Add destroyamount rpc call in rpcwallet
2017-04-02 14:30:01 -04:00
Jorge Timón
175168ad1e
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-04-02 14:30:01 -04:00
Jorge Timón
3cd9298b08
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-04-02 14:30:01 -04:00
Jorge Timón
bd48b5ed7b
CA: Globals: Introduce global CAssetsDir gAssetsDir
2017-04-02 14:30:01 -04:00
Jorge Timón
b1a065e6c3
CA: Introduce CAssetsDir with unittests
2017-04-02 14:30:01 -04:00
Jorge Timón
ec5bbed107
f'fixup! CA: Use fee asset instead of BITCOINID'
2017-04-02 14:30:01 -04:00
Jorge Timón
86b0db8f00
f'Wallet: fix rpc_wallet_tests'
2017-04-02 14:30:01 -04:00
Gregory Sanders
2ec2422069
Fix issuance serialization to disk
2017-04-02 14:30:01 -04:00
Jorge Timón
913e43cd97
CA: Tests-py: Remove addassetlabel from rpc-tests/confidential_transactions.py
2017-04-02 14:30:01 -04:00
Jorge Timón
bfd17264e9
CA: Allow using unknown assets
...
- Improve GetAssetFromString and take it out of CWallet
2017-04-02 14:30:01 -04:00
Jorge Timón
486378b0c5
CA: Tests-py: wallet needs no knowledge of asset hex ids
2017-04-02 14:30:01 -04:00
Gregory Sanders
3196439012
return assetcommitment with listunspent
2017-04-02 14:30:01 -04:00
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
3672383a54
fixup! CA python tests
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