Commit Graph

810 Commits

Author SHA1 Message Date
Howard Chu dd58057126
Remember RPC version on initial connect
Don't keep asking for it on an intact connection
Wallet is too chatty over the wire
2019-06-02 09:31:50 +01:00
moneromooo-monero 915f59e3c0
wallet: add unlock_time details to show_transfers
also add a note when receiving the tx, because the user
might not notice the "XXX blocks to unlock" in the balance.
2019-05-16 21:37:05 +00:00
Doyle 170e841a12
Merge pull request #590 from Doy-lee/LokiMergeUpstream
Loki Merge Upstream 2019-05-07 2bf855e
2019-05-16 13:15:49 -04:00
Doyle de3844e12a
Fold down extraneous loops over the same data, add early break in check (#592) 2019-05-08 12:34:21 +10:00
moneromooo-monero bc94ba4d14
wallet: distinguish between empty and absent attributes 2019-05-02 13:00:08 +00:00
Doyle c5ff05728b Merge commit '9b10072' into LokiMergeUpstream 2019-05-02 13:46:10 +10:00
Doyle f1a5cd16c0 Merge commit 'c8ce421' into LokiMergeUpstream 2019-05-02 12:59:16 +10:00
Doyle 277586417a Merge commit '96696d1' into LokiMergeUpstream 2019-05-02 11:13:33 +10:00
Doyle 8f1e65522e Merge commit '98f4c8a' into LokiMergeUpstream 2019-05-01 17:04:00 +10:00
Doyle 455129c8ca Merge branch 'dev' into LokiMergeUpstream 2019-05-01 16:31:54 +10:00
Doyle 73e8ac0343
Service Node Checkpoint Storage (#579)
* Add functions for storing checkpoints to the DB

* Allocate the DB entry on the stack instead of heap

* Add virtual overrides for new checkpoint functions

* Clean up for pull request, simplify some logic

* Revise API to include height in checkpoint header

* Move log to top of function even if early exit

* Begin moving checkpoints to db

* Allow storing of checkpoints to DB

* Cleanup for code reviewer, fix unit tests

* Fix tests, fix casting issues

* Don't use DUPSORT, use height->checkpoint mapping in DB

* Remove if 0 disabling checkpoint vote, we already check HF12

* Fix unit test infinite loop

* Update db schemas to match blk_checkpoint_header

* Code review
2019-05-01 15:57:41 +10:00
moneromooo-monero 35e0a968bd
wallet2: "output lineup" fake out selection
Based on python code by sarang:
https://github.com/SarangNoether/skunkworks/blob/outputs/outputs/simulate.py
2019-04-18 15:14:38 +00:00
Riccardo Spagni c8ce4217cf
Merge pull request #5445
b18f0b10 wallet: new --offline option (moneromooo-monero)
2019-04-16 22:46:53 +02:00
Riccardo Spagni 96696d1e75
Merge pull request #5418
374f388d wallet_rpc_server: add a all flag to export_outputs (moneromooo-monero)
2019-04-16 22:37:52 +02:00
moneromooo-monero b18f0b1051
wallet: new --offline option
It will avoid connecting to a daemon (so useful for cold signing
using a RPC wallet), and not perform DNS queries.
2019-04-15 09:14:12 +00:00
Riccardo Spagni 8bf0a3f123
Merge pull request #5396
b40392fb wallet2: add --no-dns flag (moneromooo-monero)
2019-04-15 09:17:26 +02:00
Riccardo Spagni 37aea526a9
Merge pull request #5355
c68fe787 device/trezor: add button pressed request (Dusan Klinec)
827f52ad wallet: API changes to enable passphrase entry (Dusan Klinec)
2019-04-15 09:12:20 +02:00
Doyle 721fd318d5 Merge commit '5db72d1' into LokiMergeUpstream 2019-04-12 18:41:07 +10:00
Doyle 4778d862c9 Merge commit 'bd42903' into LokiMergeUpstream 2019-04-12 18:37:56 +10:00
Doyle e92357478c Merge commit '7c85f3b' into LokiMergeUpstream 2019-04-12 18:21:56 +10:00
Doyle c53bee7177 Merge commit '5dbcceb' into LokiMergeUpstream 2019-04-12 18:21:16 +10:00
Doyle ba0cd9afcf Merge commit '7e5651c' into LokiMergeUpstream 2019-04-12 18:12:04 +10:00
Doyle 9d1df98f37 Merge commit '4308a2e' into LokiMergeUpstream 2019-04-12 18:00:11 +10:00
Doyle 403b6f6df8 Merge commit '30a3a73' into LokiMergeUpstream 2019-04-12 17:22:42 +10:00
Doyle 450dc8dda8 Merge commit '7acfa9f3cc7b52c0f4776dde3c3f80674cc3306f' into LokiMergeUpstream 2019-04-12 16:56:45 +10:00
Doyle 9f2e091280 Merge commit 'e4b049d' into LokiMergeUpstream 2019-04-12 16:45:24 +10:00
Doyle b985a05dd3 Merge commit 'cd776b1' into LokiMergeUpstream 2019-04-12 16:23:54 +10:00
Doyle 9d9d309d03 Merge commit '48e3a341f8bb601895c94e7b637475f8911ae530' into LokiMergeUpstream 2019-04-12 15:48:19 +10:00
Doyle 2fe5ddb2ca Merge commit 'f2f725d8db3535055d1c7e102c0bba75b22a3409' into LokiMergeUpstream 2019-04-12 15:23:01 +10:00
Doyle ae5667a0e1 Merge commit '38dcd975f2ce6867be343edda140ad2919be57ab' into LokiMergeUpstream 2019-04-12 15:20:27 +10:00
Doyle 892469ded1 Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
Doyle 550e56ac1e Merge commit 'c88e9921043d7c40f023d24c3a3f39f2e96f8738' into LokiMergeUpstream 2019-04-12 14:17:05 +10:00
Riccardo Spagni 5db72d12b4
Merge pull request #5388
0be5b2ee simplewallet: new unset_ring command (moneromooo-monero)
2019-04-11 13:05:43 +02:00
Riccardo Spagni 5c02316598
Merge pull request #5382
c12b43cb wallet: add number of blocks required for the balance to fully unlock (moneromooo-monero)
3f1e9e84 wallet2: set confirmations to 0 for pool txes in proofs (moneromooo-monero)
36c037ec wallet_rpc_server: error out on getting the spend key from a hot wallet (moneromooo-monero)
cd1eaff2 wallet_rpc_server: always fill out subaddr_indices in get_transfers (moneromooo-monero)
2019-04-11 13:03:55 +02:00
Riccardo Spagni 3a4008f0fc
Merge pull request #5374
a2561653 wallet: new option to start background mining (moneromooo-monero)
2019-04-11 13:01:30 +02:00
moneromooo-monero 9f8dc4ce51
simplewallet: new net_stats command
displays total sent and received bytes
2019-04-11 10:46:41 +00:00
Doyle cdc1e2c936 Merge commit '5bbbe3902b4ee77ca1eb23edc0b5495812353b1f' into LokiMergeUpstream 2019-04-11 17:14:33 +10:00
moneromooo-monero 374f388de2
wallet_rpc_server: add a all flag to export_outputs
if we don't want to export new outputs only
2019-04-10 10:37:34 +00:00
Doyle 4f0a729533 Merge commit '4466f4504e8bc41d353a6becce0526df8272bc1d' into LokiMergeUpstream 2019-04-10 09:59:38 +10:00
Dusan Klinec c68fe7873b
device/trezor: add button pressed request 2019-04-07 13:35:49 +02:00
Lee Clagett 21eb1b0725 Pass SSL arguments via one class and use shared_ptr instead of reference 2019-04-07 00:44:37 -04:00
Lee Clagett a3b0284837 Change SSL certificate file list to OpenSSL builtin load_verify_location
Specifying SSL certificates for peer verification does an exact match,
making it a not-so-obvious alias for the fingerprints option. This
changes the checks to OpenSSL which loads concatenated certificate(s)
from a single file and does a certificate-authority (chain of trust)
check instead. There is no drop in security - a compromised exact match
fingerprint has the same worse case failure. There is increased security
in allowing separate long-term CA key and short-term SSL server keys.

This also removes loading of the system-default CA files if a custom
CA file or certificate fingerprint is specified.
2019-04-06 23:47:06 -04:00
Riccardo Spagni c7e536db23
Merge pull request #5350
050bb337 wallet2: factor the watchonly/multisig/etc fields on creation (moneromooo-monero)
2019-04-06 16:00:40 +02:00
Riccardo Spagni cd8fe937ad
Merge pull request #5347
d45b85e1 wallet2: skip derivation precalc for blocks we know we'll skip (moneromooo-monero)
2019-04-06 15:59:56 +02:00
moneromooo-monero a2561653cb
wallet: new option to start background mining
The setup-background-mining option can be used to select
background mining when a wallet loads. The user will be asked
the first time the wallet is created.
2019-04-04 18:10:45 +00:00
moneromooo-monero b40392fb02
wallet2: add --no-dns flag 2019-04-04 14:32:40 +00:00
moneromooo-monero 0be5b2ee78
simplewallet: new unset_ring command
Useful when debugging, though not much for users
2019-04-02 14:18:07 +00:00
Doyle 57c30032f1
Make sweep_all by default avoid v1 txes (workaround) for lack of non-rct mixable outputs (#545) 2019-04-02 18:18:10 +11:00
moneromooo-monero c12b43cb5a
wallet: add number of blocks required for the balance to fully unlock 2019-04-01 19:31:19 +00:00
Riccardo Spagni b6726aaa6c
Merge pull request #5319
f825055d wallet_rpc_server: error out on getting the spend key from a hot wallet (moneromooo-monero)
67aa4adc wallet_rpc_server: add a set_daemon RPC (moneromooo-monero)
705acbac wallet2: init some variables to default values if loading old wallets (moneromooo-monero)
f82bc29e wallet_rpc_server: always fill out subaddr_indices in get_transfers (moneromooo-monero)
01efdc6a wallet_rpc_server: set confirmations to 0 for pending/pool txes (moneromooo-monero)
2019-04-01 20:56:52 +02:00
moneromooo-monero 67aa4adcfc
wallet_rpc_server: add a set_daemon RPC 2019-04-01 16:03:25 +00:00
Riccardo Spagni 286dec012d
Merge pull request #5333
18faa6da wallet: add freeze/thaw/frozen commands (moneromooo-monero)
2019-04-01 17:36:16 +02:00
Riccardo Spagni 30a3a73609
Merge pull request #5303
0a6cb30d wallet: flush output cache upon reorg (moneromooo-monero)
2019-04-01 17:26:10 +02:00
Riccardo Spagni 4a06b3ee62
Merge pull request #5298
8fd7452b wallet: move light wallet RPC out of core RPC (moneromooo-monero)
2019-04-01 17:24:13 +02:00
Doyle 75ceae3443 Return correct status message, don't override status on register exit 2019-04-01 14:40:01 +11:00
moneromooo-monero 050bb337d7
wallet2: factor the watchonly/multisig/etc fields on creation
There's half a dozen calls, and it's easy to miss some when
adding a new field.
2019-03-27 08:51:16 +00:00
moneromooo-monero d45b85e170
wallet2: skip derivation precalc for blocks we know we'll skip 2019-03-25 14:28:05 +00:00
Lee Clagett 7acfa9f3cc Added socks proxy (tor/i2pd/kovri) support to wallet 2019-03-25 01:35:13 +00:00
Riccardo Spagni 8cb4293e82
Merge pull request #5277
adf6d773 wallet: fix offline signing calling a daemon RPC (moneromooo-monero)
2019-03-24 19:35:39 +02:00
moneromooo-monero 18faa6da0c
wallet: add freeze/thaw/frozen commands
These commands let one freeze outputs by key image, so they
do not appear in balance, nor are considered when creating
a transaction, etc

This is helpful when receiving an output from a suspected spy,
who might try to track your other outputs by seeing with what
other outputs it gets spent.

The frozen command may be used without parameters to list all
currently frozen outputs.
2019-03-22 09:19:24 +00:00
moneromooo-monero adf6d7730f
wallet: fix offline signing calling a daemon RPC 2019-03-21 14:46:29 +00:00
moneromooo-monero b05f10f82e
wallet2: sanity check new tx before sending
We generate and check tx proofs and verify the amounts in those
match what the original amounts were.
2019-03-21 13:03:45 +00:00
Riccardo Spagni 48e3a341f8
Merge pull request #5211
c9b13fbb tests/trezor: HF9 and HF10 tests (Dusan Klinec)
a1fd1d49 device/trezor: HF10 support added, wallet::API (Dusan Klinec)
d74d26f2 crypto: hmac_keccak added (Dusan Klinec)
2019-03-21 14:44:04 +02:00
Dusan Klinec a1fd1d499c
device/trezor: HF10 support added, wallet::API
- import only key images generated by cold signing process
- wallet_api: trezor methods added
- wallet: button request code added
- const added to methods
- wallet2::get_tx_key_device() tries to decrypt stored tx private keys using the device.
- simplewallet supports get_tx_key and get_tx_proof on hw device using the get_tx_key feature
- live refresh enables refresh with trezor i.e. computing key images on the fly. More convenient and efficient for users.
- device: has_ki_live_refresh added
- a thread is watching whether live refresh is being computed, if not for 30 seconds, it terminates the live refresh process - switches Trezor state
2019-03-20 21:11:02 +01:00
Riccardo Spagni 695d51a481
Merge pull request #5203
8b514645 add multisig tx sets to describe_transfer rpc endpoint (spoke0)
2019-03-19 10:59:42 +02:00
Riccardo Spagni 38dcd975f2
Merge pull request #4889
f42263eb wallet: adds rescan_bc option with preserving key images (Dusan Klinec)
2019-03-19 10:55:45 +02:00
Riccardo Spagni 4c91eb23a0
Merge pull request #5061
1f2930ce Update 2019 copyright (binaryFate)
2019-03-17 17:49:30 +02:00
moneromooo-monero 0a6cb30d62
wallet: flush output cache upon reorg
Fixes output usage tracking
2019-03-17 10:34:07 +00:00
moneromooo-monero 8fd7452b6e
wallet: move light wallet RPC out of core RPC
It's not nothing to do with it
2019-03-15 13:34:08 +00:00
Dusan Klinec f42263ebb6
wallet: adds rescan_bc option with preserving key images
- enables to perform rescan_spent / ki sync with untrusted daemon. Spent check status involves RPC calls which require trusted daemon status as it leaks information. The new call performs soft reset while preserving key images thus a sequence: refresh, ki sync / import, rescan_bc keep_ki will correctly perform spent checking without need for trusted daemon.

- useful to detect spent outputs with untrusted daemon on watch_only / multisig / hw-cold wallets after expensive key image sync.

- cli: rescan_bc keep_ki
2019-03-15 12:55:29 +01:00
Riccardo Spagni c88e992104
Merge pull request #4977
5ea17909 device/trezor: debugging features, trezor tests (Dusan Klinec)
2019-03-14 09:43:02 +02:00
Doyle 0b6a7706ac
Add rpc call for request stake unlock (#490) 2019-03-14 07:26:38 +00:00
Doyle b86e1ca32f
Refactor register service node into wallet2 to facilitate RPC call (#488)
* Refactor register service node into wallet2 to facilitate RPC call

* Handle command if prefixed with register_service_node
2019-03-14 07:16:32 +00:00
Doyle 29a793f9c0
Implement the relaxed contribution rules on the back end (#481)
* Implement the relaxed contribution rules on the back end

* Code review adjustments
2019-03-13 05:35:02 +00:00
binaryFate 1f2930ce0b Update 2019 copyright 2019-03-05 22:05:34 +01:00
spoke0 8b51464516 add multisig tx sets to describe_transfer rpc endpoint 2019-03-05 14:42:43 +01:00
Martijn Otto 057c279cb4
epee: add SSL support
RPC connections now have optional tranparent SSL.

An optional private key and certificate file can be passed,
using the --{rpc,daemon}-ssl-private-key and
--{rpc,daemon}-ssl-certificate options. Those have as
argument a path to a PEM format private private key and
certificate, respectively.
If not given, a temporary self signed certificate will be used.

SSL can be enabled or disabled using --{rpc}-ssl, which
accepts autodetect (default), disabled or enabled.

Access can be restricted to particular certificates using the
--rpc-ssl-allowed-certificates, which takes a list of
paths to PEM encoded certificates. This can allow a wallet to
connect to only the daemon they think they're connected to,
by forcing SSL and listing the paths to the known good
certificates.

To generate long term certificates:

openssl genrsa -out /tmp/KEY 4096
openssl req -new -key /tmp/KEY -out /tmp/REQ
openssl x509 -req -days 999999 -sha256 -in /tmp/REQ -signkey /tmp/KEY -out /tmp/CERT

/tmp/KEY is the private key, and /tmp/CERT is the certificate,
both in PEM format. /tmp/REQ can be removed. Adjust the last
command to set expiration date, etc, as needed. It doesn't
make a whole lot of sense for monero anyway, since most servers
will run with one time temporary self signed certificates anyway.

SSL support is transparent, so all communication is done on the
existing ports, with SSL autodetection. This means you can start
using an SSL daemon now, but you should not enforce SSL yet or
nothing will talk to you.
2019-03-05 14:16:08 +01:00
Dusan Klinec 5ea17909ca
device/trezor: debugging features, trezor tests 2019-03-05 14:02:45 +01:00
Riccardo Spagni 46fd181cca
Merge pull request #4054
24569454 epee: add SSL support (moneromooo-monero)
2019-03-04 21:17:21 +02:00
moneromooo-monero d3c7670794 wallet2: fix mishandling rct outputs in coinbase tx
Reported by cutcoin
2019-03-04 12:03:54 +11:00
moneromooo-monero fa2fbc3917
wallet2: fix mishandling rct outputs in coinbase tx
Reported by cutcoin
2019-03-03 18:55:12 +00:00
Doyle 53742cacd2 Merge branch 'dev' into IntegrationTestFramework 2019-02-18 16:30:06 +11:00
Doyle 8e2310a23e
Switch to unsigned for specifying early blocks in use_fork_rules (#417)
If a network version is requested but not found, earliest_height gets
returned as UINT64_MAX. The negative will overflow, so instead always
specify early blocks as a positive integer.
2019-02-14 12:30:35 +11:00
Doyle 43436b081d
Infinite Staking Part 2 (#406)
* Cleanup and undoing some protocol breakages

* Simplify expiration of nodes

* Request unlock schedules entire node for expiration

* Fix off by one in expiring nodes

* Undo expiring code for pre v10 nodes

* Fix RPC returning register as unlock height and not checking 0

* Rename key image unlock height const

* Undo testnet hardfork debug changes

* Remove is_type for get_type, fix missing var rename

* Move serialisable data into public namespace

* Serialise tx types properly

* Fix typo in no service node known msg

* Code review

* Fix == to >= on serialising tx type

* Code review 2

* Fix tests and key image unlock

* Add command to print locked key images

* Update ui to display lock stakes, query in print cmd blacklist

* Modify print stakes to be less slow

* Remove autostaking code

* Refactor staking into sweep functions

It appears staking was derived off stake_main written separately at
implementation at the beginning. This merges them back into a common
code path, after removing autostake there's only some minor differences.

It also makes sure that any changes to sweeping upstream are going to be
considered in the staking process which we want.

* Display unlock height for stakes

* Begin creating output blacklist

* Make blacklist output a migration step

* Implement get_output_blacklist for lmdb

* In wallet output selection ignore blacklisted outputs

* Apply blacklisted outputs to output selection

* Fix broken tests, switch key image unlock

* Fix broken unit_tests

* Begin change to limit locked key images to 4 globally

* Revamp prepare registration for new min contribution rules

* Fix up old back case in prepare registration

* Remove debug code

* Cleanup debug code and some unecessary changes

* Fix migration step on mainnet db

* Fix blacklist outputs for pre-existing DB's

* Remove irrelevant note

* Tweak scanning addresses for locked stakes

Since we only now allow contributions from the primary address we can
skip checking all subaddress + lookahead to speed up wallet scanning

* Define macro for SCNu64 for Mingw

* Fix failure on empty DB

* Add missing error msg, remove contributor from stake

* Improve staking messages

* Flush prompt to always display

* Return the msg from stake failure and fix stake parsing error

* Tweak fork rules for smaller bulletproofs

* Tweak pooled nodes minimum amounts

* Fix crash on exit, there's no need to store on destructor

Since all information about service nodes is derived from the blockchain
and we store state every time we receive a block, storing in the
destructor is redundant as there is no new information to store.

* Make prompt be consistent with CLI

* Check max number of key images from per user to node

* Implement error message on get_output_blacklist failure

* Remove resolved TODO's/comments

* Handle infinite staking in print_sn

* Atoi->strtol, fix prepare_registration, virtual override, stale msgs
2019-02-14 12:12:57 +11:00
moneromooo-monero 2456945408
epee: add SSL support
RPC connections now have optional tranparent SSL.

An optional private key and certificate file can be passed,
using the --{rpc,daemon}-ssl-private-key and
--{rpc,daemon}-ssl-certificate options. Those have as
argument a path to a PEM format private private key and
certificate, respectively.
If not given, a temporary self signed certificate will be used.

SSL can be enabled or disabled using --{rpc}-ssl, which
accepts autodetect (default), disabled or enabled.

Access can be restricted to particular certificates using the
--rpc-ssl-allowed-certificates, which takes a list of
paths to PEM encoded certificates. This can allow a wallet to
connect to only the daemon they think they're connected to,
by forcing SSL and listing the paths to the known good
certificates.

To generate long term certificates:

openssl genrsa -out /tmp/KEY 4096
openssl req -new -key /tmp/KEY -out /tmp/REQ
openssl x509 -req -days 999999 -sha256 -in /tmp/REQ -signkey /tmp/KEY -out /tmp/CERT

/tmp/KEY is the private key, and /tmp/CERT is the certificate,
both in PEM format. /tmp/REQ can be removed. Adjust the last
command to set expiration date, etc, as needed. It doesn't
make a whole lot of sense for monero anyway, since most servers
will run with one time temporary self signed certificates anyway.

SSL support is transparent, so all communication is done on the
existing ports, with SSL autodetection. This means you can start
using an SSL daemon now, but you should not enforce SSL yet or
nothing will talk to you.
2019-02-02 20:05:33 +00:00
doy-lee fe4b8f3e7a Merge branch 'IntegrationTestFramework2' into IntegrationTestFramework 2019-01-31 18:58:24 +11:00
doy-lee bebecbd0a6 Merge branch 'dev' into LokiMergeUpstream 2019-01-30 16:59:47 +11:00
doy-lee 245c4b3ba0 Merge commit '4f104a0' into LokiMergeUpstream 2019-01-30 15:03:46 +11:00
doy-lee 6634d97e29 Merge commit '0daa00e' into LokiMergeUpstream 2019-01-30 13:05:20 +11:00
doy-lee d0bab8e6f5 Merge commit '13b1297' into LokiMergeUpstream 2019-01-29 20:11:17 +11:00
Riccardo Spagni 756ed760f7
Merge pull request #5056
8258a9e7 wallet: do not check txpool in background mode (moneromooo-monero)
2019-01-28 21:27:34 +02:00
Doyle 3a7b6b59eb
Infinite Staking Part 1 (#387)
* Remove dead branches in hot-path check_tx_inputs

Also renames #define for mixins to better match naming convention

* Shuffle around some more code into common branches

* Fix min/max tx version rules, since there 1 tx v2 on v9 fork

* First draft infinite staking implementation

* Actually generate the right key image and expire appropriately

* Add framework to lock key images after expiry

* Return locked key images for nodes, add request unlock option

* Introduce transaction types for key image unlock

* Update validation steps to accept tx types, key_image_unlock

* Add mapping for lockable key images to amounts

* Change inconsistent naming scheme of contributors

* Create key image unlock transaction type and process it

* Update tx params to allow v4 types and as a result construct_tx*

* Fix some serialisation issues not sending all the information

* Fix dupe tx extra tag causing incorrect deserialisation

* Add warning comments

* Fix key image unlocks parsing error

* Simplify key image proof checks

* Fix rebase errors

* Correctly calculate the key image unlock times

* Blacklist key image on deregistration

* Serialise key image blacklist

* Rollback blacklisted key images

* Fix expiry logic error

* Disallow requesting stake unlock if already unlocked client side

* Add double spend checks for key image unlocks

* Rename get_staking_requirement_lock_blocks

To staking_initial_num_lock_blocks

* Begin modifying output selection to not use locked outputs

* Modify output selection to avoid locked/blacklisted key images

* Cleanup and undoing some protocol breakages

* Simplify expiration of nodes

* Request unlock schedules entire node for expiration

* Fix off by one in expiring nodes

* Undo expiring code for pre v10 nodes

* Fix RPC returning register as unlock height and not checking 0

* Rename key image unlock height const

* Undo testnet hardfork debug changes

* Remove is_type for get_type, fix missing var rename

* Move serialisable data into public namespace

* Serialise tx types properly

* Fix typo in no service node known msg

* Code review

* Fix == to >= on serialising tx type

* Code review 2

* Fix tests and key image unlock

* Add additional test, fix assert

* Remove debug code in wallet

* Fix merge dev problem
2019-01-25 14:15:52 +11:00
moneromooo-monero f931e16c6e
add a bulletproof version, new bulletproof type, and rct config
This makes it easier to modify the bulletproof format
2019-01-22 23:17:24 +00:00
Maxim Shishmarev 715f3d3698 allow less than 25% staking with large existing contributions (#339)
* allow less than 25% staking with large existing contributions

* remove readline depencency in wallet2
2019-01-22 10:44:30 +11:00
doy-lee 06cbe13f2f Merge commit 'e59813c' into LokiMergeUpstream 2019-01-18 11:27:03 +11:00
doy-lee 96d582038e Merge commit '31b6d12' into LokiMergeUpstream 2019-01-17 16:31:02 +11:00
doy-lee da32932ad9 Merge commit 'c8fc06c' into LokiMergeUpstream 2019-01-17 15:14:42 +11:00
moneromooo-monero 0debe7d7d3
wallet2: remember which output keys map to which key images
This allows filling in transfer_details when a cold signed tx
gets seen in a block next
2019-01-16 19:58:13 +00:00
Riccardo Spagni 3eb96fa512
Merge pull request #5027
9092fc4b wallet: do not display daemon controlled text if untrusted (moneromooo-monero)
2019-01-16 21:38:15 +02:00
Riccardo Spagni 00090aae7f
Merge pull request #5012
d7354c78 wallet_rpc_server: add all field to export_key_images (moneromooo-monero)
2019-01-16 21:31:40 +02:00
doy-lee 485bd27532 Merge branch 'dev' into IntegrationTestFramework 2019-01-11 17:05:30 +11:00
moneromooo-monero 8258a9e7a9
wallet: do not check txpool in background mode
This avoids the constant message about needed to run refresh
to enter a password.
Also mention the txpool when asking for the password if the
reason is a pool tx.
2019-01-09 11:21:39 +00:00
moneromooo-monero 5dc590cbdb
wallet2: speedup output tracking
It can get heavy for large wallets
2018-12-31 23:57:54 +00:00
moneromooo-monero db3f2a91fa
wallet: optionally keep track of owned outputs uses 2018-12-31 23:57:51 +00:00
moneromooo-monero 9092fc4bfd
wallet: do not display daemon controlled text if untrusted 2018-12-30 01:32:57 +00:00
moneromooo-monero d7354c7864
wallet_rpc_server: add all field to export_key_images
To use if you want all key images, not just the ones for
recently imported outputs
2018-12-24 13:00:29 +00:00
doy-lee f5b17fc86e Merge commit '6bc0c7e' into LokiMergeUpstream 2018-12-19 12:25:48 +11:00
rbrunner7 1ebcd7b9b0 MMS (Multisig Messaging System): Initial version 2018-12-12 21:49:20 +01:00
Riccardo Spagni 0b31baf6e4
Merge pull request #4839
d71f89e2 device/trezor: device/trezor: correct device initialization, status check (Dusan Klinec)
65b9bca7 device/trezor: python2 compatibility - bundle dependencies (Dusan Klinec)
9cf636af device/trezor: ask for KI sync on first refresh (Dusan Klinec)
d21dad70 device: enable to use multiple independent device wallets (Dusan Klinec)
318cc784 device/trezor: passphrase entry on host (Dusan Klinec)
2018-12-12 11:53:42 +02:00
doy-lee 7657c5a26e Add support for fakechain in wallet 2018-12-11 14:43:04 +11:00
doy-lee 40506127a4 Merge commit '7e957c1' into LokiMergeUpstream 2018-12-11 13:46:35 +11:00
doy-lee d5beaee824 Merge commit 'a605c0d' into LokiMergeUpstream 2018-12-10 19:32:50 +11:00
Dusan Klinec 9cf636af69
device/trezor: ask for KI sync on first refresh
When doing a first refresh on HW-token based wallet KI sync is required if money were received. Received money may indicate wallet was already used before the restore I.e., some transaction could have been already sent from the wallet. The spent UTXO would not be detected as spent which could lead to double spending errors on submitting a new transaction.

Thus if the wallet is HW-token based with the cold signing protocol and the first refresh detected received money the user is asked to perform the key image sync.
2018-12-04 18:38:17 +01:00
Dusan Klinec d21dad70dd
device: enable to use multiple independent device wallets
- adds a new option `--hw-device-deriv-path` to the simple wallet. Enables to specify wallet derivation path / wallet code (path avoided so it can be misinterpreted as a file path).
- devices can use different derivation mechanisms. Trezor uses standard SLIP-10 mechanism with fixed SLIP-44 prefix for Monero
- Trezor: when empty, the default derivation mechanism is used with 44'/128'/0'. When entered the derivation path is 44'/128'/PATH.
- Trezor: the path is always taken as elements are hardened (1<<31 bit turned on)
2018-12-04 18:38:16 +01:00
Riccardo Spagni 81418cb281
Merge pull request #4894
aee7a4e3 wallet_rpc_server: do not use RPC data if the call failed (moneromooo-monero)
1a0733e5 windows_service: fix memory leak (moneromooo-monero)
0dac3c64 unit_tests: do not rethrow a copy of an exception (moneromooo-monero)
5d9915ab cryptonote: fix get_unit for non default settings (moneromooo-monero)
d4f50cb1 remove some unused code (moneromooo-monero)
61163971 a few minor (but easy) performance tweaks (moneromooo-monero)
30023074 tests: slow_memmem now returns size_t (moneromooo-monero)
2018-12-04 17:33:19 +02:00
Riccardo Spagni c00ac446fd
Merge pull request #4854
bd98e99c Removed a lot of unnecessary includes (Martijn Otto)
2018-12-04 17:08:42 +02:00
Riccardo Spagni 94288d7d1d
Merge pull request #4845
6732fc7f Fix issue 4793 - M/N multisig transaction signature (naughtyfox)
2018-12-04 17:06:04 +02:00
Maxim Shishmarev 0c1183a2a0 Export all key images by default (#360) 2018-12-04 18:48:33 +11:00
doy-lee b523dc80ce Fix autostake regression deadlocking on idle mutex
Also allow the user to choose if the wallet should fork or not on
autostake to assist with debugging.
2018-12-01 12:58:33 +11:00
Dusan Klinec 318cc78457
device/trezor: passphrase entry on host
- simple device callback object added. Device can request passphrase/PIN entry via the callback or notify user some action is required
- callback is routed to wallet2, which routes the callback to i_wallet_callback so CLI or GUI wallets can support passphrase entry for HW tokens
- wallet: device open needs wallet callback first - passphrase protected device needs wallet callback so user can enter passphrase
2018-11-29 04:33:41 +01:00
Doyle 9c9e6eb0dc
Merge pull request #341 from Doy-lee/FestiveFreyaUpstreamCherryPicks
Festive Freya Upstream cherry-picks
2018-11-29 10:20:34 +11:00
moneromooo-monero 611639710d
a few minor (but easy) performance tweaks
Found by codacy.com
2018-11-23 15:36:48 +00:00
moneromooo-monero 2d64085542 wallet2: initialize amount to 0 in tx_scan_info_t ctor
It seems the more prudent thing to do here. It will not catch
attempts to use that value before it is initialized when using
ASAN or valgrind, but in a case where it does, it will have
smaller repercussions.

So it seems appropriate in this particular case.

Coverity 182498
2018-11-22 15:34:27 +11:00
naughtyfox 6732fc7fde Fix issue 4793 - M/N multisig transaction signature 2018-11-20 16:50:41 +03:00
Maxim Shishmarev 871197cc6c added per_output_unlock to tx construction data 2018-11-20 15:16:48 +11:00
Martijn Otto bd98e99c80
Removed a lot of unnecessary includes 2018-11-15 17:29:34 +01:00
Maxim Shishmarev fdaa45a53a Add API for staking from GUI wallet (#315)
* Enable staking in GUI wallet

* Move more helper functions into service_node_rules.h

* Move validation of arguments for staking into wallet2

* call stake validation from within create_stake_tx
2018-11-15 13:22:14 +11:00
Riccardo Spagni 59e8a4c306
Merge pull request #4753
157054b8 hardfork: initialize current_fork_index in ctor (moneromooo-monero)
2362baf7 network_throttle: initialize m_last_sample_time in ctor (moneromooo-monero)
d9400f69 serializtion: add missing mainnet and stagenet fields for 0mq (moneromooo-monero)
cbe0122b wallet2: initialize amount to 0 in tx_scan_info_t ctor (moneromooo-monero)
2018-11-14 21:33:02 +02:00
doy-lee 3afbc0bceb Merge branch 'dev' into LokiMergeUpstream 2018-11-12 15:25:39 +11:00
doy-lee 8f03bb3fd7 Merge commit '8534f71' into LokiMergeUpstream 2018-11-12 14:55:42 +11:00
Doyle 8c4b6cc602
Disambiguate coinbase and staking transactions in show_transfers (#306)
* Differentiate staking in show transfers

* Distinguish miner, node and governance rewards

* Fix assert to actually trigger instead of no-op

* Take out governance for show_transfers for now

* Update old hardfork enums
2018-11-12 14:24:13 +11:00
Riccardo Spagni 164ba3ef1c
Merge pull request #4731
f26ce08c wallet: add a non destructive blockchain rescan (moneromooo-monero)
2018-11-06 21:30:12 +02:00
Riccardo Spagni 1667d41064
Merge pull request #4728
1f35de23 simplewallet: display locked/unlocked state in show_transfers (moneromooo-monero)
2018-11-06 14:54:17 +02:00
doy-lee 42f0933e58 Merge commit '7e2483e' into LokiMergeUpstream 2018-11-05 11:27:45 +11:00
moneromooo-monero 8d71b2b1b3
wallet2: only export necessary outputs and key images
and disable annoying test that requires ridiculous amounts
of skullduggery every time some format changes
2018-11-04 22:27:01 +00:00
moneromooo-monero f26ce08c8a
wallet: add a non destructive blockchain rescan 2018-11-03 15:04:37 +00:00
Dusan Klinec 29ffb6bba8
device/trezor: trezor support added 2018-11-02 21:36:39 +01:00
moneromooo-monero cbe0122bf1
wallet2: initialize amount to 0 in tx_scan_info_t ctor
It seems the more prudent thing to do here. It will not catch
attempts to use that value before it is initialized when using
ASAN or valgrind, but in a case where it does, it will have
smaller repercussions.

So it seems appropriate in this particular case.

Coverity 182498
2018-10-29 16:22:55 +00:00
moneromooo-monero 1f35de2300
simplewallet: display locked/unlocked state in show_transfers
it doesn't display the details, which are already displayed
in show_transfer
2018-10-25 23:02:42 +00:00
doy-lee 7375725020 Add minor whitespace/delete dead code after diffing Monero and Loki
Mostly small whitespace changes that make comparing a diff of the
entirety of Loki and Monero less noisy.
2018-10-24 11:33:48 +11:00
doy-lee 339f96b0cc Merge commit 'c23b6f8' into LokiMergeUpstreamUntil_20181010_77e1ebf 2018-10-10 15:07:16 +11:00
doy-lee 7c3d7c49d3 Add missing outputs specifier to wallet 2018-10-10 14:39:16 +11:00
doy-lee c73da116ae Merge commit '4a652d6' into LokiMergeUpstreamUntil_20180911_e6d36c1 2018-10-10 13:48:01 +11:00
doy-lee d3501cfc73 Merge commit '4a1744e' into LokiMergeUpstreamUntil_20180911_e6d36c1 2018-10-10 13:28:43 +11:00
doy-lee 2d3adf003b Merge commit '7addabc' into LokiMergeUpstreamUntil_20180911_e6d36c1 2018-10-10 10:30:31 +11:00
doy-lee c1da4f690d Merge commit '5ffb2ff' into LokiMergeUpstreamUntil_20180911_e6d36c1 2018-10-09 12:31:08 +11:00
Riccardo Spagni e19652df51
Merge pull request #4036
9acf42d3 Multisig M/N functionality core tests added (naughtyfox)
9f3963e8 Arbitrary M/N multisig schemes: * support in wallet2 * support in monero-wallet-cli * support in monero-wallet-rpc * support in wallet api * support in monero-gen-trusted-multisig * unit tests for multisig wallets creation (naughtyfox)
2018-10-07 19:57:26 +02:00
doy-lee e2ef377b4a Merge commit '9ce9f8caf6e290088711ce4d5d90c1507a837bf2' into LokiMergeUpstreamUntil_20180911_e6d36c1 2018-10-04 14:59:49 +10:00
naughtyfox 9f3963e823 Arbitrary M/N multisig schemes:
* support in wallet2
* support in monero-wallet-cli
* support in monero-wallet-rpc
* support in wallet api
* support in monero-gen-trusted-multisig
* unit tests for multisig wallets creation
2018-10-01 19:16:56 +03:00
moneromooo-monero 25e5890d37
wallet: fix --generate-from-json using wrong password 2018-10-01 12:32:26 +00:00
doy-lee 4caffeff78 Merge branch 'dev' into LokiMergeUpstreamUntil_20180905_fad88e1 2018-10-01 16:48:40 +10:00
Riccardo Spagni 83d8f03c23
Merge pull request #4333
73403004 add --block-notify to monerod and --tx-notify to monero-wallet-{cli,rpc} (moneromooo-monero)
2018-09-29 22:20:44 +02:00
Riccardo Spagni 9a54d0033e
Merge pull request #4458
921b0fb1 use default create_address_file argument (m2049r)
2018-09-29 22:20:35 +02:00
doy-lee 5617593905 Merge commit '0722287' into LokiMergeUpstream20180821 2018-09-28 16:44:46 +10:00
doy-lee f73b72ad76 Consolidate duplicate outputs from same tx
Co-authored-by: msgmaxim <msgmaxim@gmail.com>
2018-09-27 18:24:51 +10:00
doy-lee 114ba40450 Fix double processing outputs after outs is processed
Co-authored-by: msgmaxim <msgmaxim@gmail.com>
2018-09-27 11:44:11 +10:00
Riccardo Spagni 85110b42ab
Merge pull request #4401
66901901 README: harmonize command formatting inside README.md (Andrea)
8cd98408 disable AES on s390x architecture (Tuan M. Hoang)
4ed30bab wallet: implement coin splitting for sweep_* 'outputs' option (whythat)
24f52396 wallet: add 'outputs' option for sweep_* commands (whythat)
52e19d69 README: Compile boost with cxxflags=-fPIC cflags=-fPIC (Italocoin Project)
0c77523d README: fill in libsodium package name for Arch (phloatingman)
2018-09-21 20:46:22 +02:00
doy-lee b83b5c8f8d Fix merge failures for Loki 2018-09-21 15:14:29 +10:00
doy-lee 204b3e5605 Merge commit '13a34fa' into LokiMergeUpstream20180821 2018-09-21 14:52:02 +10:00
doy-lee 879181d9b0 Merge commit 'b780cf4' into LokiMergeUpstream20180821 2018-09-20 20:01:13 +10:00
doy-lee 35f5a94753 Merge commit '88369c6' into LokiMergeUpstream20180821 2018-09-20 12:07:32 +10:00
m2049r bce474be7d
query backing device 2018-09-19 18:25:38 +02:00
doy-lee 0012fe9568 Merge batch upstream changes from monero 2018-09-19 19:21:56 +10:00
doy-lee ad8cdc1d1f Merge commit '702a410' into LokiMergeUpstream20180821 2018-09-19 14:18:52 +10:00
Riccardo Spagni b174527f1d
Merge pull request #4302
ba8dd347 api/wallet: properly disable key encryption (stoffu)
2018-09-18 17:31:35 +02:00
whythat 24f5239693
wallet: add 'outputs' option for sweep_* commands
'outputs' option allows to specify the number of
separate outputs of smaller denomination that will
be created by sweep operation.

rebased by moneromooo
2018-09-18 11:01:59 +00:00
stoffu ba8dd3479d
api/wallet: properly disable key encryption 2018-09-17 22:15:29 +09:00
Dusan Klinec f9b22a7b01
hw_device: support for multiple devices added [for review]
- device name is a new wallet property
- full device name is now a bit more structured so we can address particular device vendor + device path. Example: 'Ledger', 'Trezor:udp', 'Trezor:udp:127.0.0.1:21324', 'Trezor:bridge:usb01'. The part before ':' identifies HW device implementation, the optional part after ':' is device path to look for.
- new --hw-device parameter added to the wallet, can name the hardware device
- device reconnect added
2018-09-14 16:02:00 +02:00
Riccardo Spagni d743994086
Merge pull request #4324
44259e56 wallet: ask-password can now ask without encrypting the secret spend key (moneromooo-monero)
2018-09-14 13:15:41 +02:00
moneromooo-monero 44259e560e
wallet: ask-password can now ask without encrypting the secret spend key 2018-09-14 11:14:21 +00:00
Riccardo Spagni dd2fc3afe3
Merge pull request #4332
20171746 wallet2: factor the creation of a new wallet keys file (moneromooo-monero)
be6acfd5 wallet2: factor new blockchain setup (moneromooo-monero)
2018-09-14 13:05:43 +02:00
Riccardo Spagni 239a7e10ff
Merge pull request #4253
be001326 remove obsolete daemon selection of fake outs and old tx construction (moneromooo-monero)
2018-09-14 12:54:25 +02:00
moneromooo-monero be001326d1
remove obsolete daemon selection of fake outs and old tx construction 2018-09-14 10:51:45 +00:00
Riccardo Spagni c74d9057f8
Merge pull request #4260
a54dbaee blockchain_blackball: add --force-chain-reaction-pass flag (moneromooo-monero)
44439c32 record blackballs as amount/offset, and add export ability (moneromooo-monero)
4bce935b blockchain_blackball: more optimizations (moneromooo-monero)
b66ba783 blockchain_blackball: do not process duplicate blockchains parts (moneromooo-monero)
639a3c01 blockchain_blackball: make it clear secondary passes are not incremental (moneromooo-monero)
eb8a51be blockchain_blackball: detect spent outputs by partial ring reuse (moneromooo-monero)
d6d276c6 blockchain_blackball: fix chain reaction phase in incremental mode (moneromooo-monero)
2b2a681b blockchain_blackball: avoid false positives for different amounts (moneromooo-monero)
80e4fef3 blockchain_blackball: set transaction looping txn to read only (moneromooo-monero)
4801d6b5 blockchain_blackball: add stats (moneromooo-monero)
846190fd blockchain_blackball: support pre-v2 databases (moneromooo-monero)
daa6cc7d blockchain_blackball: use LMDB for the cache (moneromooo-monero)
50cb370d ringdb: allow blackballing many outputs at once (moneromooo-monero)
2018-09-14 12:45:18 +02:00
doy-lee 38de527bcd Merge commit 'c58758a' into LokiMergeUpstream20180821 2018-09-14 16:19:39 +10:00
doy-lee 0c85ff45e3 Merge commit '2329d2f' into LokiMergeUpstream20180821 2018-09-14 16:14:44 +10:00
doy-lee 656a5228bf Merge commit 'dcbc17e' into LokiMergeUpstream20180821 2018-09-14 15:50:42 +10:00
doy-lee 630213a5ce Merge commit '0e4c7d0' into LokiMergeUpstream20180821 2018-09-14 15:41:22 +10:00
doy-lee 76ac9c5af3 Merge commit '5d3e702' into LokiMergeUpstream20180821 2018-09-14 15:19:44 +10:00
doy-lee 1afdd98805 Merge commit 'dcfd299239cae50caad7a2f115489f86014b5114' into LokiMergeUpstream20180821 2018-09-14 13:56:28 +10:00
doy-lee b7e4e28ca1 Merge commit 'f025ae9' into LokiMergeUpstream20180821 2018-09-13 19:06:56 +10:00
doy-lee f36a8e86bb Merge commit 'ba8331c' into LokiMergeUpstream20180821 2018-09-13 18:59:23 +10:00
doy-lee ca464be3bd Merge commit 'ed2c81e' into LokiMergeUpstream20180821 2018-09-13 18:42:49 +10:00
moneromooo-monero 8d769392d9 replace std::list with std::vector on some hot paths
also use reserve where appropriate
2018-09-13 18:31:35 +10:00
moneromooo-monero 5ffb2ff9b7
v8: per byte fee, pad bulletproofs, fixed 11 ring size 2018-09-11 13:38:07 +00:00
moneromooo-monero 9ce9f8caf6
bulletproofs: add multi output bulletproofs to rct 2018-09-11 13:37:28 +00:00
moneromooo-monero 44439c3208
record blackballs as amount/offset, and add export ability 2018-09-10 09:04:18 +00:00
moneromooo-monero 20171746de
wallet2: factor the creation of a new wallet keys file 2018-09-03 11:27:46 +00:00
moneromooo-monero be6acfd5be
wallet2: factor new blockchain setup 2018-09-03 11:27:43 +00:00
stoffu 8ca1215f25
wallet: store trusted-daemon flag in wallet2 2018-08-23 14:55:09 +09:00
Doyle T ce980e31f0 Merge commit '8fad35f' into LokiMergeUpstream 2018-08-21 14:53:19 +10:00
Doyle T 2043478fdc Merge commit '4e7897e' into LokiMergeUpstream 2018-08-17 15:12:17 +10:00
Doyle T 97b4ed900b Merge commit '13d73d9' into LokiMergeUpstream 2018-08-17 11:47:44 +10:00
moneromooo-monero e9ffa91257
store secret keys encrypted where possible
The secret spend key is kept encrypted in memory, and
decrypted on the fly when needed.

Both spend and view secret keys are kept encrypted in a JSON
field in the keys file. This avoids leaving the keys in
memory due to being manipulated by the JSON I/O API.
2018-08-16 11:57:43 +00:00
moneromooo-monero ea37614efe
wallet: wipe seed from memory where appropriate 2018-08-16 09:17:52 +00:00
stoffu a64f57fe42
wallet2: make --restricted-rpc available for wallet RPC only 2018-08-16 09:54:23 +09:00
luigi1111 8d2e454929
Merge pull request #4188
a3fe1c5 simplewallet: add set_tx_key for importing tx keys from 3rd party wallets (stoffu)
2018-08-15 17:47:05 -05:00
luigi1111 564e9c3b5f
Merge pull request #4170
1c6cfd3 wallet-rpc: add get_address_index command (stoffu)
2018-08-15 17:35:49 -05:00
luigi1111 5e795ee7af
Merge pull request #4153
37f0799 wallet: distinguish coinbase from other txes in show_transfers (moneromooo-monero)
2018-08-15 17:23:56 -05:00
luigi1111 017e07a035
Merge pull request #4103
bcab579 wallet: allow adjusting number of rounds for the key derivation function (stoffu)
2018-08-15 17:09:52 -05:00
luigi1111 4cde4cb946
Merge pull request #3528
34d4b79 wallet2: use a gamma distribution to pick fake outs (moneromooo-monero)
2018-08-15 17:00:32 -05:00
Doyle 9577b5ee10 Fix get_service_node defn change in wallet, pluralise get_service_nodes (#152)
* Fix get_service_node defn change in wallet, pluralise get_service_nodes

* Re-add try-catch exception for stake and register
2018-08-15 14:27:45 +10:00
jcktm 7da679f49d
simplewallet: add checks against service node list state to CLI for staking command (#144) 2018-08-15 13:06:32 +10:00
stoffu bcab579864
wallet: allow adjusting number of rounds for the key derivation function 2018-08-08 01:56:54 +09:00
jcktm 453c68130f simplewallet: add automatic address scanning to service node registration 2018-08-07 17:02:15 +10:00
jcktm 54dece9691 fix change address and balance display for per-output unlock times 2018-08-05 03:08:51 +00:00
moneromooo-monero 37f0799284
wallet: distinguish coinbase from other txes in show_transfers 2018-08-03 12:48:16 +00:00
jcktm b81214ec6e wallet2: added staking transactions to create_transactions_2 2018-08-03 16:52:44 +10:00
jcktm bffd7c2d34
Per output unlock time rebased (#114)
* add per-output unlock time field to transaction class

* get output unlock time (and relevant const fixes)

* move output unlocked check to separate function

* tx unlocked -> output unlocked in Blockchain

* per output unlock in tx creation; needs fork rules and testing

* per output unlock in tx prefix so it is signed...

also fix a couple typos/goofs

* wallet: check if using per output unlock time

* add rules.h and rules.cpp.  git woopsie.

* update test for BlockchainDB changes

* Change tx v3 deregister to be a bool in tx header

* service_node_list: handle per output unlock times in contribution txs

* transaction: added verification of unlock_times.size()
2018-08-03 11:39:28 +10:00
stoffu 1c6cfd34f4
wallet-rpc: add get_address_index command 2018-07-31 21:36:12 +09:00
stoffu a3fe1c56ee
simplewallet: add set_tx_key for importing tx keys from 3rd party wallets 2018-07-30 20:50:05 +09:00
luigi1111 92b5d6c204
Merge pull request #4091
a4272de wallet2: unlock keys file before calling verify_password (needed for Windows) (stoffu)
2018-07-27 14:22:34 -05:00
luigi1111 5c102c60dc
Merge pull request #4087
d6440ab wallet2: recover from index out of hashchain bounds error (moneromooo-monero)
2018-07-19 14:14:10 -05:00
luigi1111 be81a27fa4
Merge pull request #4071
d6d78f1 Allow fractional outputs to be ignored (stoffu)
2018-07-19 14:06:54 -05:00
Doyle fb66b7e00b Service Node Deregister Part 5 (#89)
* Retrieve quorum list from height, reviewed

* Setup data structures for de/register TX

* Submit and validate partial/full deregisters

* Add P2P relaying of partial deregistration votes

* Code review adjustments for deregistration part 1

 - Fix check_tx_semantic
 - Remove signature_pod as votes are now stored as blobs. Serialization
   overrides don't intefere with crypto::signature anymore.

* deregistration_vote_pool - changed sign/verify interface and removed repeated code

* Misc review, fix sign/verify api, vote threshold

* Deregister/tx edge case handling for combinatoric votes

* core, service_node_list: separated address from service node pubkey

* Retrieve quorum list from height, reviewed

* Setup data structures for de/register TX

* Submit and validate partial/full deregisters

* Add P2P relaying of partial deregistration votes

* Code review adjustments for deregistration part 1

 - Fix check_tx_semantic
 - Remove signature_pod as votes are now stored as blobs. Serialization
   overrides don't intefere with crypto::signature anymore.

* deregistration_vote_pool - changed sign/verify interface and removed repeated code

* Misc review, fix sign/verify api, vote threshold

* Deregister/tx edge case handling for combinatoric votes

* Store service node lists for the duration of deregister lifetimes

* Quorum min/max bug, sort node list, fix node to test list

* Change quorum to store acc pub address, fix oob bug

* Code review for expiring votes, acc keys to pub_key, improve err msgs

* Add early out for is_deregistration_tx and protect against quorum changes

* Remove debug code, fix segfault

* Remove irrelevant check for tx v3 in blockchain, fix >= height for pruning quorum states

Incorrect assumption that a transaction can be kept in the chain if it could
eventually become invalid, because if it were the chain would be split and
eventually these transaction would be dropped. But also that we should not
override the pre-existing logic which handles this case anyway.
2018-07-18 12:42:47 +10:00
moneromooo-monero d6440ab319
wallet2: recover from index out of hashchain bounds error
This can happen when there's a very large reorg on the daemon
(ie, on testnet)
2018-07-16 23:13:56 +01:00
jcktm a71c049a03 Merge branch 'master' into dev 2018-07-11 16:15:59 +10:00
moneromooo-monero 5992cc1a87 wallet2: ensure outputs are processed only once
This should be proof against any way one might get to multiple
processing, such as generating the same derivation from the
same pubkey, etc
2018-07-10 13:29:08 +10:00
moneromooo-monero fc39d3b23c
wallet2: ensure outputs are processed only once
This should be proof against any way one might get to multiple
processing, such as generating the same derivation from the
same pubkey, etc
2018-07-08 12:56:51 +01:00
moneromooo-monero 34d4b798d4
wallet2: use a gamma distribution to pick fake outs
as per "An Empirical Analysis of Linkability in the Monero
Blockchain", by Miller et al.
2018-07-03 18:10:48 +01:00
stoffu a4272de797
wallet2: unlock keys file before calling verify_password (needed for Windows)
Also added notes to WalletManager::verifyWalletPassword (which afaik seems unused
by anyone at the moment) regarding the need to unlock the keys file beforehand.
2018-07-03 18:07:20 +09:00
stoffu d6d78f157b
Allow fractional outputs to be ignored 2018-07-03 18:04:31 +09:00
jcktm 8a92407f5f
servicenodes: Added service node list 2018-06-29 14:47:00 +10:00
stoffu 3d623a86d1
wallet: prevent the same wallet file from being opened by multiple processes 2018-06-28 09:41:43 +09:00
luigi1111 2329d2f4c8
Merge pull request #3907
dcbc17e wallet: include a suggested number of confirmations based on amount (moneromooo-monero)
2018-06-27 16:32:33 -05:00
luigi1111 8a27caeb22
Merge pull request #3998
8db23df wallet: on first refresh, start off with a quantized height (moneromooo-monero)
2018-06-27 16:30:38 -05:00
luigi1111 5eb2e01216
Merge pull request #3991
798dfcf wallet: allow unspendable unmixable outputs to be discarded (stoffu)
2018-06-27 16:25:03 -05:00
moneromooo-monero dcbc17e97e
wallet: include a suggested number of confirmations based on amount
This is based on how much an attacking miner stands to lose in block
rewardy by mining a private chain which double spends a payment.
This is not foolproof, since mining is based on luck, and breaks
down as the attacking miner nears 50% of the network hash rate,
and the estimation is based on a constant block reward.
2018-06-27 21:38:21 +01:00
luigi1111 a844844cda
Merge pull request #3716
a2b557f 6795bd0 209ec96 ed2c81e a830db2 57ea902 31a895e ba8331c f7f1917 41be339 f025ae9 ef2cb63 dcfd299 5d3e702 2704624 2771a18 0e4c7d0 (moneromooo-monero)
2018-06-27 15:33:01 -05:00
moneromooo-monero 0e4c7d0fae
wallet2: cache ringdb key while refreshing
Speeds up syncing with a lot of outgoing outputs as key generation
runs Cryptonight.
2018-06-26 22:15:38 +01:00
moneromooo-monero 5d3e70229e
wallet2: remove old blockchain size cache hack 2018-06-26 22:15:18 +01:00
moneromooo-monero dcfd299239
wallet2: speedup refresh
key derivation and checking for incoming outputs are threaded
in batch before adding blocks to the local blockchain. Other
minor bits and bobs are also cached.
2018-06-26 22:15:16 +01:00
moneromooo-monero f025ae9760
wallet2: avoid re-parsing blocks when refreshing in a loop 2018-06-26 22:15:12 +01:00
moneromooo-monero ba8331ce41
wallet2: parse blocks in the RPC thread, not the processing thread
Processing typically is the bottleneck
2018-06-26 22:14:33 +01:00
moneromooo-monero ed2c81ed95
replace std::list with std::vector on some hot paths
also use reserve where appropriate
2018-06-26 22:14:21 +01:00
luigi1111 506be80601
Merge pull request #3955
d7a6b72 wallet2: fix bulletproof cold signing (moneromooo-monero)
2018-06-25 15:09:48 -05:00
luigi1111 9226acca4b
Merge pull request #3804
89e51ec simple-wallet-cli: Add warnings about inaccurate balances to to watch-only wallet (jcktm)
2018-06-16 14:15:52 -05:00
luigi1111 4e7897e57c
Merge pull request #3780
9c2a7b4 wallet-rpc: watch-only and cold wallet features added (ph4r05)
2018-06-16 14:12:57 -05:00
jcktm 16ac6e77cc
Merge pull request #75 from jcktm/loki-cli-cold-storage-balance
simple-wallet-cli: warnings about missing key images in watchonly wallet
2018-06-15 15:49:49 +10:00
moneromooo-monero 8db23df581
wallet: on first refresh, start off with a quantized height
for privacy reasons, so an untrusted node can't easily track
wallets from IP address to IP address, etc. The granularity
is 1024 blocks, which is about a day and a half.
2018-06-13 22:44:27 +01:00
stoffu 798dfcfe79
wallet: allow unspendable unmixable outputs to be discarded 2018-06-13 11:56:40 +09:00
luigi1111 00635bd68b
Merge pull request #3598
b21bc00 Wallet: added methods to sign and verify arbitrary message with multisig public signer's key (libwallet & wallet api) (naughtyfox)
2018-06-08 14:40:06 -05:00
jcktm f0740b9a5e Merge remote-tracking branch 'monero/master' into dev 2018-06-08 16:40:07 +10:00
moneromooo-monero d7a6b72c15
wallet2: fix bulletproof cold signing
Cold signing was always using Borromean range proofs, causing
a larger tx, and an incorrect fee
2018-06-07 12:29:30 +01:00
Dusan Klinec 9c2a7b4638 wallet-rpc: watch-only and cold wallet features added
- unsigned_txset, signed_txset in transfer / submit_transfer / sign_transfer
- export_outputs, import_outputs

Squashed commits:
[f4d9f3d4] wallet-rpc: do_not_relay removed from submit_transfer
[5b16a86f] wallet-rpc: review-fix - method signature changes, renaming
[b7fbb10a] wallet-rpc: naming fixes (unsigned vs signed), consts renamed
[8c7d2727] wallet-rpc: sign_transfer added
[481d024a] wallet2: sign_tx splitted to work with strings and structs, more granular
[2a474db9] wallet-rpc: wallet2::load_unsigned_tx split to load from str, file
[b1e3a018] wallet-rpc: review fix, load_tx_from_str variable rename
[1f6373be] wallet-rpc: review fix: save_tx_to_{str,file}
[2a08eafc] wallet-rpc: review comments fixes
- redundant this removed from wallet2.cpp
- load_tx_from_str, load_tx_from_file
[43498052] wallet-rpc: submit_transfer added
[9c45d1ad] wallet-rpc: watch_only check, return unsigned_txset
[62831396] wallet2: added string variants to load_tx, save_tx

- analogously to save_multisig_tx
- required for monero-wallet-rpc to support watch-only wallet
2018-06-03 13:21:00 +02:00
luigi1111 3a373c3d3a
Merge pull request #3489
47fdb74 WalletApi: getMultisigInfo entry for gui wallets... (naughtyfox)
47fdb74 Refactored: work with wallet api statuses to make setting and getting operations atomic along with error strings (naughtyfox)
2018-05-31 14:34:34 -05:00
luigi1111 5b189ce2a8
Merge pull request #3405
80d2f80 wallet2: Update function parameter documentation (leonklingele)
2018-05-29 12:52:43 -05:00
jcktm 89e51ecd38 simple-wallet-cli: Add warnings about inaccurate balances to to watch-only wallet 2018-05-15 15:28:42 +10:00
jcktm 7bea32ddf8 simple-wallet-cli: Add warnings about inaccurate balances to to watch-only wallet 2018-05-15 15:27:40 +10:00
naughtyfox b21bc00704 Wallet: added methods to sign and verify arbitrary message with multisig public signer's key (libwallet & wallet api) 2018-04-25 17:55:54 +03:00