Commit graph

310 commits

Author SHA1 Message Date
Gregory Sanders
984967c40e Update wallet infrastructure to support blinding issuances 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
b4317426cf CA: Allow using unknown assets
- Improve GetAssetFromString and take it out of CWallet
2017-06-16 12:02:35 -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
Gregory Sanders
f9dfc025cb Revamp BlindOutputs 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
690a403a6d CT: CTxOutValue::IsAmount() -> CTxOutValue::IsExplicit() 2017-06-16 12:02:34 -04:00
Mark Friedenbach
37230ccc1b CA: CTxOutAsset::IsAsset() -> CTxOutAsset::IsExplicit() 2017-06-16 12:02:34 -04:00
Jorge Timón
0f79b488a2 fixup! CA: Use fee asset instead of BITCOINID 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
Mark Friedenbach
8b2cb06617 CA: Switch CTxOutAsset::GetAssetID() to return a constant reference to the stored asset ID rather than perform unnecessary memory reallocation. 2017-06-16 12:02:33 -04:00
Gregory Sanders
c8307f5f58 CA: fixup! Make CWallet::mapAssetLabels and CWallet::mapAssets private 2017-06-16 12:02:33 -04:00
Mark Friedenbach
a25f6c6e08 CA: CAssetID -> CAsset 2017-06-16 12:02:33 -04:00
Mark Friedenbach
892cb984ae CA: uint256 -> CAssetID 2017-06-16 12:02:33 -04:00
Gregory Sanders
755cefb173 BlindOuputs succeeds if no blinding known/attempted 2017-06-16 12:02:33 -04:00
Gregory Sanders
d3c966d7cd FundTransaction: better estimate final tx size 2017-06-16 12:02:18 -04:00
Karl-Johan Alm
db66dd03d1 [rpc] Include amount blinding factor in ListTransactions. 2017-06-16 12:02:18 -04:00
Karl-Johan Alm
99dc60f8d1 [rpc] Include asset blinding factor in ListTransactions. 2017-06-16 12:02:18 -04:00
Karl-Johan Alm
da36309317 [wallet] Add GetAssetIDFromString method to get an asset id from either an id or a label string. 2017-06-16 12:02:17 -04:00
Gregory Sanders
abefb6e1b1 Wallet: fix more tx creation corner cases 2017-06-16 12:02:17 -04:00
Gregory Sanders
97f4bad4a2 Fix wallet accounting and txn construction corner cases 2017-06-16 12:02:17 -04:00
Gregory Sanders
dcc378adae Allow arbitrary assets for fees 2017-06-16 12:02:16 -04:00
Gregory Sanders
9e669c8837 Move rest of CAmountMap stuff 2017-06-16 12:02:16 -04:00
Gregory Sanders
fa0a86fb74 Move CAmountMap to amount.h 2017-06-16 12:02:16 -04:00
Gregory Sanders
2f7a9a5846 Replace nTxFee with explicit output fees 2017-06-16 12:02:16 -04:00
instagibbs
7aae7bada7 Don't attempt to copy CReserveKeys 2017-06-16 12:02:16 -04:00
Gregory Sanders
4f3f87649f Wallet: Support arbitrary assets 2017-06-16 12:02:16 -04:00
Gregory Sanders
f9fd37cc8e Consensus: Add asset type to CTxOut and validation 2017-06-16 12:02:15 -04:00
Gregory Sanders
2977a541c6 Remove deprecated static key blinding 2017-06-16 12:02:15 -04:00
instagibbs
cf158f0185 Don't log scary message about withdrawLock outputs 2017-06-16 12:02:12 -04:00
instagibbs
e30340a8d6 CreateTransaction stores destination blinding keys,factors, and amounts 2017-06-16 12:02:12 -04:00
instagibbs
c5cc67a999 Rename wallet-based blinding pubkey lookups 2017-06-15 14:31:27 -04:00
Pieter Wuille
03b5b6be2f Fix caching of blinding data 2017-06-15 14:31:26 -04:00
Pieter Wuille
ee74131673 Better algorithm for determining whether a dummy output is needed 2017-06-15 14:31:25 -04:00
Pieter Wuille
d09823f5a3 Deal better with unknown amounts in balances 2017-06-15 14:31:25 -04:00
Matt Corallo
a1fb565bd2 Allow CreateTransaction to return the values of the outputs 2017-06-15 14:30:12 -04:00
Pieter Wuille
8eb5eaab32 Wallet updates for CT 2017-06-15 14:30:12 -04:00
Luke Dashjr
b5f1b6dd38 Refactors in anticipation of blinded values 2017-06-15 14:20:38 -04:00
Matt Corallo
b8264355f1 Add explicit fee field to transaction 2017-06-15 14:20:38 -04:00
Matt Corallo
bde5c0a819 Add withdraw-claimed tracking to mempool and enforce it 2017-06-15 14:20:38 -04:00
Russell Yanofsky
9072395e5f
Return errors from importmulti if complete rescans are not successful
Github-Pull: #9773
Rebased-From: e2e2f4c856
2017-02-22 12:45:43 +01:00
Russell Yanofsky
a80f98b1c7 Use importmulti timestamp when importing watch only keys
When importing a watch-only address over importmulti with a specific timestamp,
the wallet's nTimeFirstKey is currently set to 1. After this change, the
provided timestamp will be used and stored as metadata associated with
watch-only key. This can improve wallet performance because it can avoid the
need to scan the entire blockchain for watch only addresses when timestamps are
provided.

Also adds timestamp to validateaddress return value (needed for tests).

Fixes #9034.
2017-02-10 16:11:19 -05:00
Russell Yanofsky
a58370e6a2 Dedup nTimeFirstKey update logic
Also make nTimeFirstKey member variable private.

This is just a cleanup change, it doesn't change behavior in any significant
way.
2017-02-10 15:49:00 -05:00
Wladimir J. van der Laan
02464da5e4
Merge #9227: Make nWalletDBUpdated atomic to avoid a potential race.
d63ff62 Make nWalletDBUpdated atomic to avoid a potential race. (Patrick Strateman)
2017-02-06 16:14:17 +01:00
Suhas Daftuar
d625b907a1 wallet: Refactor dummy signature signing for reusability 2017-01-30 11:47:10 -05:00
Wladimir J. van der Laan
d2c9e4d422
Merge #9615: Wallet incremental fee
4b189c1 Change bumpfee result value from 'oldfee' to 'origfee'. (Alex Morcos)
0c0c63f Introduce WALLET_INCREMENTAL_RELAY_FEE (Alex Morcos)
e8021ec Use CWallet::GetMinimumFee in bumpfee (Alex Morcos)
ae9719a Refactor GetMinimumFee to give option of providing targetFee (Alex Morcos)
fe8e8ef [rpc] Add incremental relay fee to getnetworkinfo (Alex Morcos)
6b331e6 Fix to have miner test aware of new separate block min tx fee (Alex Morcos)
de6400d Fix missing use of dustRelayFee (Alex Morcos)
5b15870 Use incrementalRelayFee for BIP 125 replacement (Alex Morcos)
2017-01-30 10:38:56 +01:00
practicalswift
cc16d99f1d [trivial] Fix typos in comments 2017-01-27 21:22:35 +01:00