Commit graph

130 commits

Author SHA1 Message Date
moneromooo-monero
b11539fda7
wallet: detect and handle failed outgoing transfers
When a transaction is not found in the pool anymore, it is marked
as failed, and displayed as such in show_transfers.
2016-01-29 19:44:48 +00:00
moneromooo-monero
3b1d7e03fc
Fix V1/V2 use of hard fork related parameters
Some of it uses hardcoded height, which will need some thinking
for next (voted upon) fork.
2016-01-29 17:21:11 +00:00
moneromooo-monero
67bbb56a6c
wallet2: decide at runtime which upper tx size to use
The value will be different depending on whether we've reached
the first hard fork, which allows a larger size, or not.

This fixes transactions being rejected by the daemon on mainnet
where the first hard fork is not yet active.
2016-01-10 11:56:13 +00:00
Riccardo Spagni
de03926850
updated copyright year 2015-12-31 08:39:56 +02:00
moneromooo-monero
bc8a52efd8
wallet: add a rescan_bc command and rescan_blockchain RPC
Blockchain hashes and key images are flushed, and blocks are
pulled anew from the daemon.
The console command is shortened to match bc_height.
This should make it a lot easier on users who are currently
told to remove this particular cache file but keep the keys
one, etc, etc.
2015-12-30 15:06:03 +00:00
moneromooo-monero
92ef6b54fe
wallet: protect against exceptions in the block pull thread
This can happen when the daemon exits, which would also cause
the wallet to crash via unhandled exception
2015-12-30 12:43:15 +00:00
Riccardo Spagni
c41f785d56
Merge pull request #550
8c93608 wallet: fix load/save versioning bug for recently added tx data (moneromooo-monero)
2015-12-22 10:27:44 +02:00
moneromooo-monero
8c93608f2f
wallet: fix load/save versioning bug for recently added tx data
The version number passed to those data's serialize function
was always 0, not the wallet's version as I had expected.
A version number now exists for these structures so they're
versioned correctly.
2015-12-20 14:03:15 +00:00
moneromooo-monero
8ea7af1ba3
Allow the wallet to access hard fork information
And make it change behavior slightly when close/after first hard fork
2015-12-19 14:52:30 +00:00
moneromooo-monero
c6cfe0f26d
wallet: make the wallet refresh type a wallet setting
instead of a command line setting. It makes sense that is is
a long lived setting.
2015-12-05 21:44:25 +00:00
Riccardo Spagni
bc1bc4adb2
Merge pull request #507
62e49a5 wallet: optional automatic refresh from the daemon (moneromooo-monero)
2015-11-30 00:19:47 +02:00
moneromooo-monero
62e49a5f02
wallet: optional automatic refresh from the daemon
The daemon will be polled every 90 seconds for new blocks.
It is enabled by default, and can be turned on/off with
set auto-refresh 1 and set auto-refresh 0 in the wallet.
2015-11-28 12:41:06 +00:00
moneromooo-monero
490590306e
wallet2: parallelize pulling blocks and processing them on refresh
This needed locking the use of m_http_client, to avoid collisions
in I/O.
2015-11-27 17:25:15 +00:00
moneromooo-monero
d0eaf1d4e1
wallet2: maintain the short chain manually when refreshing 2015-11-27 00:35:41 +00:00
moneromooo-monero
a4e9506069
wallet2: split pull blocks between pulling and processing 2015-11-27 00:03:43 +00:00
moneromooo-monero
9b945f5211
wallet: make the refresh optimizations selectable via command line
Take the opportunity to add a no-coinbase case too, for even faster
sync when an address is known to never have mined to.
2015-11-22 19:03:10 +00:00
moneromooo-monero
d2c031332e
wallet: speedup refresh from daemon
Assume the whole of a coinbase goes to the same address (so that
if the first output isn't for us, none of it is), and only look
for payment id when we received something in the transaction.
2015-11-22 18:07:19 +00:00
moneromooo-monero
55a2da7475
wallet2: speedup refresh a bit
Use the NoodleDoodle threading technique to speedup a couple
code blocks on the main path when refreshing blocks without
any transactions for us.
2015-11-22 18:07:07 +00:00
moneromooo-monero
db1fb66e66
wallet: storing outgoing tx info now defaults to enabled
The info is stored encrypted, and is pretty useful, often after
the fact.
2015-11-22 12:40:03 +00:00
moneromooo-monero
9156ba3a3c
wallet: rename store-tx-keys to store-tx-info
With backward compatibility
2015-11-22 12:26:27 +00:00
moneromooo-monero
b3d4d41e29
wallet: improve show_transfers
More information is now saved and displayed
2015-11-22 12:13:59 +00:00
moneromooo-monero
725ae4e710
wallet: use incoming blocks to keep track of payments too 2015-11-21 23:22:15 +00:00
moneromooo-monero
3f611bc3dc
wallet: track outgoing payments and add a show_transfers command
It's a user friendly display of incoming and outgoing transfers,
listed by height, within an optional height range.
2015-11-15 21:59:40 +00:00
moneromooo-monero
c7dc6ef8e8
simplewallet: add a set default-mixin command
The default default mixin is 4. It can now be changed per wallet.
2015-10-30 21:16:51 +00:00
moneromooo-monero
6df4e67cd2
Fix a possibly-unused warning, and rationalize types 2015-10-27 09:05:07 +00:00
moneromooo-monero
ecbb732faa
Fix leak on real output when using a very recent output
The wallet and the daemon applied different height considerations
when selecting outputs to use. This can leak information on which
input in a ring signature is the real one.

Found and originally fixed by smooth on Aeon.
2015-10-25 16:34:57 +00:00
moneromooo-monero
ac90d488e7
from hard fork 2, all outputs must be decomposed
The wallet decomposes fully as of now too.
2015-10-11 13:02:55 +01:00
moneromooo-monero
d91eb8c7b4
wallet: only return tx keys via RPC if requested
To get the tx keys returned via RPC, set the "get_tx_key" or
"get_tx_keys" request field to true (defaults to false).
2015-08-24 17:36:44 +01:00
Riccardo Spagni
c24a7e8fc0
Merge pull request #381
f197599 wallet: encrypt the cache file (moneromooo-monero)
98c76a3 chacha8: add a key generation variant that take a pointer and size (moneromooo-monero)
2015-08-24 19:20:36 +02:00
moneromooo-monero
f19759992c
wallet: encrypt the cache file
It contains private data, such as a record of transactions.
The key is derived from the view and spend secret keys.

The encryption currently is one shot, so may require a lot of
memory for large wallet caches.
2015-08-22 21:04:50 +01:00
moneromooo-monero
6c995710d8
make tx keys available to the user
They are also stored in the cache file, to be retrieved using
a new get_tx_key command.
2015-08-19 21:11:48 +01:00
moneromooo-monero
aa5bc351d4
wallet: new rescan_spent command to update outputs' spent status
This obsoletes the need for a lengthy blockchain rescan when
a transaction doesn't end up in the chain after being accepted
by the daemon, or any other reason why the wallet's idea of
spent and unspent outputs gets out of sync from the blockchain's.
2015-08-11 15:55:08 +01:00
moneromooo-monero
a2d7a5fb49
encrypted payment ids are now 64 bit, instead of 256 bit
Pros:
 - smaller on the blockchain
 - shorter integrated addresses

Cons:
 - less sparseness
 - less ability to embed actual information

The boolean argument to encrypt payment ids is now gone from the
RPC calls, since the decision is made based on the length of the
payment id passed.
2015-08-09 10:13:51 +01:00
moneromooo-monero
988fe1f843
wallet: new transaction construction algorithm
It should avoid a lot of the issues sending more than half the
wallet's contents due to change.

Actual output selection is still random. Changing this would
improve the matching of transaction amounts to output sizes,
but may have non obvious effects on blockchain analysis.

Mapped to the new transfer_new command in simplewallet, and
transfer uses the existing algorithm.

To use in RPC, add "new_algorithm: true" in the transfer_split
JSON command. It is not used in the transfer command.
2015-07-22 19:24:30 +01:00
moneromooo-monero
8fe180ab80
wallet: add boolean to always confirm transactions with the user
This can be useful if you want to be given a veto over the tx fee,
or if you want to see what a tx fee would be without actually sending.
2015-07-18 22:11:53 +01:00
moneromooo-monero
dc4dbc1ceb
simplewallet: allow creating a wallet from a public address and view secret key
The needed information is supplied via a triple:

--generate-from-view-key address:viewkey:filename
2015-06-20 17:33:14 +01:00
moneromooo-monero
c882af63c1
wallet: add watch only wallet support
The new save_watch_only saves a copy of the keys file without the
spend key. It can then be given away to be used as a normal keys
file, but with no spend ability.
2015-05-31 15:34:55 +01:00
moneromooo-monero
3204f0d536
wallet: add a sweep_dust command
Sends all the dust to your own wallet. May fail (if the fee required
is more than the dust total). May end up paying most of the dust in fees.
Unlocked dust total is now also displayed in "balance".
2015-05-30 21:47:56 +01:00
moneromooo-monero
09324764c0
wallet: add consts where appropriate
because const is always appropriate
2015-05-27 19:16:22 +01:00
Riccardo Spagni
9e0516c1dd
Merge pull request #215
24d500c Add a --restricted-rpc flag to simplewallet (moneromooo-monero)
2015-01-15 14:03:48 +02:00
moneromooo-monero
24d500ce8e
Add a --restricted-rpc flag to simplewallet
It restricts RPC to a subset of "view only" commands. Kind of like
a poor man's view key replacement.
2015-01-11 12:11:43 +00:00
moneromooo-monero
87839cd484
Allow get_bulk_payments to return all payments regardless of payment ID
by giving an empty list of payment IDs.
2015-01-11 12:04:05 +00:00
Riccardo Spagni
f4b69d553a
year updated in license 2015-01-02 18:52:46 +02:00
Riccardo Spagni
f4675dc05d
Merge pull request #203
583cf0a Document existing function (warptangent)
95eb944 Repeat prompt for wallet path if invalid (warptangent)
2014-12-13 13:52:30 +02:00
warptangent
583cf0ad8a Document existing function 2014-12-11 02:55:44 -08:00
warptangent
95eb944ead
Repeat prompt for wallet path if invalid
simplewallet run without a wallet path argument should prompt again if
an invalid path was entered.

Validity here currently means the string isn't empty.
2014-12-11 02:52:48 -08:00
warptangent
26b87dfdc2
Add wallet2::verify_password method
Allows wallet password to be verified without changing wallet state.
2014-12-08 21:57:03 -08:00
warptangent
1beedb9dd4 Extract check for deterministic keys to wallet2::is_deterministic()
It's cleaner for wallet2.cpp and it also allows deterministic check by
simplewallet.cpp.
2014-12-06 02:05:50 -08:00
warptangent
3dd19c4cd4 prompt for seed language and error handling
- "seed" simplewallet command was only displaying seed if wallet was newly generated
2014-12-01 14:36:24 -08:00
Oran Juice
70971be96b
Doxygen comments 2014-10-19 01:08:21 +05:30
Oran Juice
031ca23ce9
Rewrites to old wallet file correctly 2014-10-19 01:00:18 +05:30
Oran Juice
1f833dcf77
Doxygen comments in 2014-10-18 23:11:05 +05:30
Oran Juice
0bd88ff256
Writes seed language while generating wallet. Wallet open fix. 2014-10-18 23:01:43 +05:30
Oran Juice
09a659edb5
Stores seed language in wallet file. added rapidjson. Yet to test backward compatibility 2014-10-18 02:21:37 +05:30
Oran Juice
4517bac7f3
Restructured language sources to be singletons 2014-10-02 21:43:28 +05:30
Thomas Winget
c14c7e1683 change to allow (at least a bit) for multiple TXT records 2014-09-23 22:58:28 +02:00
Thomas Winget
a5757a628f Monero addres from DNS TXT record implemented, tests pass
Still need to deal with DNSSEC and optional fields in the TXT record.
2014-09-23 22:58:21 +02:00
Zachary Michaels
d03308734b
Separate testnet address prefix 2014-09-15 15:54:59 +02:00
Zachary Michaels
07470fd400
Add testnet flag
Source: cryptonotefoundation
2014-09-15 15:53:01 +02:00
Jakob Lind
2ba77629ad refactoring. get seed code in wallet2 2014-08-03 16:58:21 +02:00
Jakob Lind
e4273f2415 #36 simplewallet refresh include optional height param
height param is used optionally in refresh command 

TODO: This should also be the default behaviour 
when generating a new wallet.
2014-08-01 10:17:50 +02:00
fluffypony
6fc995fe5d License updated to BSD 3-clause 2014-07-23 15:03:52 +02:00
Zachary Michaels
12596ad566 Add get_bulk_payments rpc call 2014-07-22 12:16:15 -04:00
Thomas Winget
d433a696e5 wallet RPC converted to use new transaction semantics
wallet RPC now uses wallet2::create_transactions and wallet2::commit_tx instead
of wallet2::transfer.  This made it possible to add the RPC call /transfer_split, which
will split transactions automatically if they are too large.  The old call to
/transfer will return an error stating to use /transfer_split if multiple
transactions are needed to fulfill the request.
2014-06-30 07:16:50 -04:00
Thomas Winget
7c7696a830 missed removing a debug print 2014-06-30 07:16:50 -04:00
tom
62109840d6 Transaction splitting *seems* to be working!!! 2014-06-30 07:16:50 -04:00
Thomas Winget
2e048a4679 final changes to get transaction splitting building. needs testing. 2014-06-30 07:16:50 -04:00
Thomas Winget
fc1180bc6c Added comments to wallet functions 2014-06-30 07:16:50 -04:00
Thomas Winget
da37b6f15b allow two-random-numbers wallet generation (but not as default) 2014-06-12 19:05:52 -04:00
Thomas Winget
d22e458c6c builds, but doesn't link. other than that, electrum-style recovery implemented (but not tested\!) 2014-06-12 19:05:51 -04:00
tom
f70bc3a345 defaulted new parameters in modified functions 2014-06-12 19:05:51 -04:00
Thomas Winget
4f382b3830 most functions prototyped/modified for wallet recovery 2014-06-12 19:05:51 -04:00
Neozaru
117393d562 Added 'payment_id' optional argument to 'transfer' wallet RPC method 2014-06-02 00:22:42 +02:00
mydesktop
31a59785b0 temporary fix for block reward dos 2014-05-25 20:25:37 -04:00
mydesktop
3a3a817678 0.8.8update 2014-05-25 13:06:40 -04:00
mydesktop
333f975760 initial [broken] update 2014-05-03 12:19:43 -04:00
Antonio Juarez
a401a02ddb Improvements in JSON RPC 2014-04-07 16:02:15 +01:00
Antonio Juarez
29c2859a3e json rpc for wallet and bugfix 2014-04-02 17:00:17 +01:00
Antonio Juarez
8efa1313f3 some fixes 2014-03-20 11:46:11 +00:00
Antonio Juarez
296ae46ed8 moved all stuff to github 2014-03-03 22:07:58 +00:00