Commit Graph

810 Commits

Author SHA1 Message Date
Doyle 644557d44d Stop endlessly asking the user for password after refreshing 2020-01-07 12:35:06 +11:00
Doyle 0ec0780fd9 Add long polling to wallet-rpc 2020-01-07 12:35:06 +11:00
Doyle 3009f8fff7 Add wallet long polling to wallet-cli 2020-01-07 12:35:06 +11:00
moneromooo-monero d64e5aa719
wallet: allow message sign/verify for subaddresses 2019-12-31 08:44:36 +00:00
moneromooo-monero a6c24412e5
wallet: fix exceptions getting the hash of a pruned tx 2019-12-30 15:14:57 +00:00
Jason Rhinelander 292a3b11d0 Blink RPC updates & fixes
Blink txes were not being properly passed in/out of the RPC wallet.
This adds the necessary bits both to submit a blink and to get a blink
submission status back from the daemon.
2019-12-26 12:29:05 -04:00
moneromooo-monero f717d5936c
wallet2: guard against race with multiple decrypt_keys users
If more than one thread wants to make sure of the spend secret key,
then we decrypt on the first caller and reencrypt on the last caller,
otherwise we could use an invalid secret key.
2019-12-17 01:38:29 +00:00
luigi1111 b4e1dc83d2
Merge pull request #6057
3b8dcc2 wallet2: make keys unlocker reentrant (moneromooo-monero)
2019-12-12 13:49:58 -06:00
Jason Rhinelander 2d96bc3241 Show mined, but uncheckpointed, blink txes as blinks
Current when a blink gets mined it just looks like an ordinary
transaction, but this isn't right: it's still a blink with special
status until it gets checkpointed.
2019-12-10 19:57:52 -04:00
Jason Rhinelander 5ad70135f0 Don't count unmined blink txes in unlocked balance
It still has to go through unlocking until we have reblinking.
2019-12-10 19:57:43 -04:00
Jason Rhinelander 452bc72ee3 Simplify serialization code and drop unsupported versions
loki started life with transfer details serialization version 9, so we
can drop the stuff to handle earlier versions.  Also this code structure
that repeats a call to `initialize_transfer_details` 100 times is gross,
so fix it.
2019-12-10 19:57:32 -04:00
Doyle 291ba112b4 enum_top, use burn hf in sanity check, fill new construction data 2019-12-04 15:17:55 +11:00
Doyle 1eb45e523e Build/core test fixes, incoporate staking changes from LNS
- Fix assert to use version_t::_count in service_node_list.cpp
- Incoporate staking changes from LNS which revamp construct tx to
  derive more of the parameters from hf_version and type. This removes
  extraneous parameters that can be derived elsewhere.

  Also delegate setting loki_construct_tx_params into wallet2 atleast,
  so that callers into the wallet logic, like rpc server, simplewallet
  don't need bend backwards to get the HF version whereas the wallet has
  dedicated functions for determining the HF.
2019-12-04 15:17:55 +11:00
Doyle ef62658dfc
Merge pull request #911 from Doy-lee/LokiRPCDocUpdates
Add rpc markup for transfer_view and add no doc gen markers
2019-12-02 09:57:36 +11:00
Jason Rhinelander 6659b64a07 Move burn application into construct_tx_with_tx_key
This allows anything to add burn amounts by specifying burn_fixed in the
loki_tx_params.

burn_percent is more complicated (because it is a percentage of the base
tx fee, not a percentage of the actual tx fee), and gets handled and
converted to a fixed amount in the wallet code.
2019-11-27 20:50:35 -04:00
Jason Rhinelander 9b624e6853 Properly support fee burning in the wallet
This revamps the `loki_construct_tx_params` a bit to be able to carry
fixed and %-based burn amounts (in addition to the staking tx flag) and
modifies it to set the hf version from within wallet2 rather than at
construction.

This is then used to implement proper fee burning in the wallet
(replacing the uncommitted hack I was using up until now to test it) by
changing wallet2 to understand the burn amount: initially it adds a
placeholder amount so that an appropriate amount of space in tx extra is
taken up, then once the transaction has been built and final fees
calculated it replaces the placeholder with the final burn amount before
tx finalization.
2019-11-27 14:38:00 -04:00
Jason Rhinelander 6a886b69ea Generic burn fee checking + blink burn fee checking
This adds the ability for check_fee() to also check the burn amount.
This requires passing extra info through `add_tx()` (and the various
things that call it), so I took the:

    bool keeped_by_block, bool relayed, bool do_not_relay

argument triplet, moved it into a struct in tx_pool.h, then added the other fee
options there (along with some static factory functions for generating the
typical sets of option).

The majority of this commit is chasing that change through the codebase and
test suite.

This is used by blink but should also help LNS and other future burn
transactions to verify a burn amount simply when adding the transation to the
mempool.  It supports a fixed burn amount, a burn amount as a multiple of the
minimum tx fee, and also allows you to increase the minimum tx fee (so that,
for example, we could require blink txes to pay miners 250% of the usual
minimum (unimportant) priority tx fee.

- Removed a useless core::add_new_tx() overload that wasn't used anywhere.

Blink-specific changes:

(I'd normally separate these into a separate commit, but they got interwoven
fairly heavily with the above change).

- changed the way blink burning is specified so that we have three knobs for
fee adjustment (fixed burn fee; base fee multiple; and required miner tx fee).
The fixed amount is currently 0, base fee is 400%, and require miner tx fee is
simply 100% (i.e. no different than a normal transaction).  This is the same as
before this commit, but is changing how they are being specified in
cryptonote_config.h.

- blink tx fee, burn amount, and miner tx fee (if > 100%) now get checked
before signing a blink tx.  (These fee checks don't apply to anyone else --
when propagating over the network only the miner tx fee is checked).

- Added a couple of checks for blink quorums: 1) make sure they have reached
the blink hf; 2) make sure the submitted tx version conforms to the current hf
min/max tx version.

- print blink fee information in simplewallet's `fee` output

- add "typical" fee calculations in the `fee` output:

    [wallet T6SCwL (has locked stakes)]: fee
    Current fee is 0.000000850 loki per byte + 0.020000000 loki per output
    No backlog at priority 1
    No backlog at priority 2
    No backlog at priority 3
    No backlog at priority 4
    Current blink fee is 0.000004250 loki per byte + 0.100000000 loki per output
    Estimated typical small transaction fees: 0.042125000 (unimportant), 0.210625000 (normal), 1.053125000 (elevated), 5.265625000 (priority), 0.210625000 (blink)

where "small" here is the same tx size (2500 bytes + 2 outputs) used to
estimate backlogs.
2019-11-27 14:23:56 -04:00
Jason Rhinelander 64e6c97064 Fixed blink support work in wallet2 & simplewallet 2019-11-27 14:09:30 -04:00
Jason Rhinelander 442f2182d2 Blink synchronization
- Adds blink signature synchronization and storage through the regular
  p2p network
- Adds wallet support (though this is still currently buggy and needs
  additional fixes - it sees the tx when it arrives in the mempool but
  isn't properly updating when the blink tx gets mined.)
2019-11-27 14:09:28 -04:00
Jason Rhinelander dd7a4104b5 Blink
This is the bulk of the work for blink.  There is two pieces yet to come
which will follow shortly, which are: the p2p communication of blink
transactions (which needs to be fully synchronized, not just shared,
unlike regular mempool txes); and an implementation of fee burning.

Blink approval, multi-quorum signing, cli wallet and node support for
submission denial are all implemented here.

This overhauls and fixes various parts of the SNNetwork interface to fix
some issues (particularly around non-SN communication with SNs, which
wasn't working).

There are also a few sundry FIXME's and TODO's of other minor details
that will follow shortly under cleanup/testing/etc.
2019-11-27 14:07:52 -04:00
Jason Rhinelander c21b800b9c Remove sweep_style
This was preliminary to support including v1 txes in sweeps, but we
didn't actually build the support and elected instead to effectively
just burn those txes.
2019-11-27 14:07:52 -04:00
moneromooo-monero 0de8a0d37d
wallet_rpc_server: new estimate_tx_size_and_weight RPC 2019-11-06 15:18:21 +00:00
moneromooo-monero fd35e2304a
wallet: fix another facet of "did I get some monero" information leak
We get new pool txes before processing any tx, pool or not.
This ensures that if we're asked for a password, this does not
cause a measurable delay in the txpool query after the last
block query.
2019-11-01 18:59:38 +00:00
moneromooo-monero d5472bd87b
wallet2: do not send an unnecessary last getblocks.bin call on refresh
The "everything refreshed" state was detected when a refresh call did
not return any new blocks. This can be detected without that extra
"empty" call by comparing the claimed node height to the height of
the last block retrieved. Doing this avoids that last call, saves
some bandwidth, and makes the common refresh case use only one call
rather than two.

As a side effect, it prevents an information leak reported by
Tramèr et al: if the wallet retrieves a set of blocks which includes
an output sent to the refreshing wallet, the wallet will prompt the
user for the password to decode the amount and calculate the key
image for the new output, and this will delay subsequent calls to
getblocks.bin, allowing a passive adversary to note the delay and
deduce when the wallet receives at least one output.

This can still happen if the wallet downloads more than 1000 blocks,
since this will be split in several calls, but then the most the
adversary can tell is which 1000 block section the user received
some monero (the adversary can estimate the heights of the blocks
by calculating how many "large" transfers are done, which will be
sections of blocks, the last of which will usually be below 1000,
but the size of the data should allow the actual number of blocks
sent to be determined fairly accurately).

This timing trick still be used via the subsequent scan for incoming
txes in the txpool, which will be fixed later.
2019-11-01 18:59:37 +00:00
moneromooo-monero 3b8dcc290d
wallet2: make keys unlocker reentrant
protects against having your keys mangled
2019-10-29 13:53:57 +00:00
moneromooo-monero ffa46026b5
simplewallet: add public_nodes command
Lists nodes exposing their RPC port for public use
2019-10-25 09:34:41 +00:00
moneromooo-monero 2899379791
daemon, wallet: new pay for RPC use system
Daemons intended for public use can be set up to require payment
in the form of hashes in exchange for RPC service. This enables
public daemons to receive payment for their work over a large
number of calls. This system behaves similarly to a pool, so
payment takes the form of valid blocks every so often, yielding
a large one off payment, rather than constant micropayments.

This system can also be used by third parties as a "paywall"
layer, where users of a service can pay for use by mining Monero
to the service provider's address. An example of this for web
site access is Primo, a Monero mining based website "paywall":
https://github.com/selene-kovri/primo

This has some advantages:
 - incentive to run a node providing RPC services, thereby promoting the availability of third party nodes for those who can't run their own
 - incentive to run your own node instead of using a third party's, thereby promoting decentralization
 - decentralized: payment is done between a client and server, with no third party needed
 - private: since the system is "pay as you go", you don't need to identify yourself to claim a long lived balance
 - no payment occurs on the blockchain, so there is no extra transactional load
 - one may mine with a beefy server, and use those credits from a phone, by reusing the client ID (at the cost of some privacy)
 - no barrier to entry: anyone may run a RPC node, and your expected revenue depends on how much work you do
 - Sybil resistant: if you run 1000 idle RPC nodes, you don't magically get more revenue
 - no large credit balance maintained on servers, so they have no incentive to exit scam
 - you can use any/many node(s), since there's little cost in switching servers
 - market based prices: competition between servers to lower costs
 - incentive for a distributed third party node system: if some public nodes are overused/slow, traffic can move to others
 - increases network security
 - helps counteract mining pools' share of the network hash rate
 - zero incentive for a payer to "double spend" since a reorg does not give any money back to the miner

And some disadvantages:
 - low power clients will have difficulty mining (but one can optionally mine in advance and/or with a faster machine)
 - payment is "random", so a server might go a long time without a block before getting one
 - a public node's overall expected payment may be small

Public nodes are expected to compete to find a suitable level for
cost of service.

The daemon can be set up this way to require payment for RPC services:

  monerod --rpc-payment-address 4xxxxxx \
    --rpc-payment-credits 250 --rpc-payment-difficulty 1000

These values are an example only.

The --rpc-payment-difficulty switch selects how hard each "share" should
be, similar to a mining pool. The higher the difficulty, the fewer
shares a client will find.
The --rpc-payment-credits switch selects how many credits are awarded
for each share a client finds.
Considering both options, clients will be awarded credits/difficulty
credits for every hash they calculate. For example, in the command line
above, 0.25 credits per hash. A client mining at 100 H/s will therefore
get an average of 25 credits per second.
For reference, in the current implementation, a credit is enough to
sync 20 blocks, so a 100 H/s client that's just starting to use Monero
and uses this daemon will be able to sync 500 blocks per second.

The wallet can be set to automatically mine if connected to a daemon
which requires payment for RPC usage. It will try to keep a balance
of 50000 credits, stopping mining when it's at this level, and starting
again as credits are spent. With the example above, a new client will
mine this much credits in about half an hour, and this target is enough
to sync 500000 blocks (currently about a third of the monero blockchain).

There are three new settings in the wallet:

 - credits-target: this is the amount of credits a wallet will try to
reach before stopping mining. The default of 0 means 50000 credits.

 - auto-mine-for-rpc-payment-threshold: this controls the minimum
credit rate which the wallet considers worth mining for. If the
daemon credits less than this ratio, the wallet will consider mining
to be not worth it. In the example above, the rate is 0.25

 - persistent-rpc-client-id: if set, this allows the wallet to reuse
a client id across runs. This means a public node can tell a wallet
that's connecting is the same as one that connected previously, but
allows a wallet to keep their credit balance from one run to the
other. Since the wallet only mines to keep a small credit balance,
this is not normally worth doing. However, someone may want to mine
on a fast server, and use that credit balance on a low power device
such as a phone. If left unset, a new client ID is generated at
each wallet start, for privacy reasons.

To mine and use a credit balance on two different devices, you can
use the --rpc-client-secret-key switch. A wallet's client secret key
can be found using the new rpc_payments command in the wallet.
Note: anyone knowing your RPC client secret key is able to use your
credit balance.

The wallet has a few new commands too:

 - start_mining_for_rpc: start mining to acquire more credits,
regardless of the auto mining settings
 - stop_mining_for_rpc: stop mining to acquire more credits
 - rpc_payments: display information about current credits with
the currently selected daemon

The node has an extra command:

 - rpc_payments: display information about clients and their
balances

The node will forget about any balance for clients which have
been inactive for 6 months. Balances carry over on node restart.
2019-10-25 09:34:38 +00:00
Doyle fbbf6a8234 Add rpc markup for transfer_view and add no doc gen markers 2019-10-23 12:45:48 +11:00
luigi1111 40e71742a0
Merge pull request #5952
93d5cf2 wallet2: add ignore-outputs-{above/below} option (stoffu)
2019-10-16 13:40:44 -05:00
moneromooo-monero 19c0506e14
wallet: remove long payment ID sending support 2019-10-14 11:43:47 +00:00
moneromooo-monero 455f9e3e9f
wallet2: ignore received unencrypted payment IDs (but warn hard) 2019-10-14 11:43:46 +00:00
Doyle 7acd639e41 Merge transfer_view and transfer_entry together 2019-10-03 12:12:25 +10:00
Doyle dded026a3a Display checkpointedness of transactions in wallet 2019-10-02 17:48:24 +10:00
stoffu 93d5cf2441
wallet2: add ignore-outputs-{above/below} option
https://github.com/aeonix/aeon/pull/131
2019-10-02 13:04:24 +09:00
moneromooo-monero cc4be4fa15
wallet: add edit_address_book RPC 2019-09-17 11:38:23 +00:00
Doyle 6689f70d09
Check wallet is connected before entering trigger happy exception functions (#838) 2019-09-13 13:10:47 +10:00
sachaaaaa b54f492199 New wallet rpc command `get_transfers_csv` (#749)
* new wallet rpc command `get_transfers_csv`

* Refactor get_transfers: hoist down to wallet2 and use it in simplewallet and wallet_rpc
2019-09-13 12:54:26 +10:00
luigi1111 9325501762
Merge pull request #5855
2ec455d wallet: fix mismatch between two concepts of 'balance' (moneromooo-monero)
2019-09-08 20:04:00 -05:00
moneromooo-monero 2ec455df1f
wallet: fix mismatch between two concepts of "balance"
One considers the blockchain, while the other considers the
blockchain and some recent actions, such as a recently created
transaction which spend some outputs, but isn't yet mined.

Typically, the "balance" command wants the latter, to reflect
the recent action, but things like proving ownership wants
the former.

This fixes a crash in get_reserve_proof, where a preliminary
check and the main code used two concepts of "balance".
2019-09-05 11:19:34 +00:00
moneromooo-monero 1a367d6a22
simplewallet: lock console on inactivity 2019-08-28 19:01:48 +00:00
Jason Rhinelander 0350ccfc9a Switch to per-byte + per-output fees, reduce max multiplier
This switches loki 5.x to use a fee formula of

    SIZE * PER_BYTE + OUTPUTS * PER_OUTPUT

where we reduce the PER_BYTE fee back to what it was in 3.x; and with
the PER_OUTPUT fee set to 0.02 LOKI.  This compares to the 4.x fee of:

    SIZE * PER_BYTE * 80

(the *80 multiple was introduced in 4.x).

It also reduces the multiplier for the maximum priority level to 125
instead of 1000 because 1000 produced uselessly high tx fees.  The new
multipliers go up 5x at each level: {1, 5, 25, 125} while previously
they went {1, 5, 25, 1000}.

As for the base change: we added the *80 multiplier in 4.x because we
wanted to make a theoretical de-anonymizing tx spam attack more costly.
The unanticipated consequence was that we also made *large* transactions
(such as sweeps) considerably more costly despite the fact that these
transactions typically only create 2 outputs.

This better captures what we meant to do in 4.x (making output creation
relatively more expensive) without making large txes (e.g. sweeps
required for staking) highly expensive.

The end effect is that the fee for a minimum-sized, 1-input/2-output
transaction should stay roughly the same (slightly over 0.04 LOKI),
while a 100-input/2-output transction (a typical spend or sweep from a
wallet with lots of smaller rewards) will drop in fee by somewhere
around 95%.

The most efficient theoretical deanonymizing tx spamming of this sort
was a 1-input/16-output transaction which will become about 2.5x as
expensive as currently the case in v4.x.
2019-08-26 17:42:30 -03:00
Jason Rhinelander 43ae4f72e1 Remove obsolete hard fork wallet code
This commit prunes the various code paths in wallet that can't happen
anymore.  Aside from removing a bunch of dead code, this also removes a
bunch of `use_fork_rules` calls (each of which add an RPC call).
2019-08-24 20:55:59 -03:00
Tadeas Moravec 63186a01ce
Wallet: Option to export data to ASCII
New CLI wallet variable: export-format with options "binary" (the default),
or "ascii". "Binary" behaves as before, "ascii" forces the wallet to convert
data to ASCII using base64.

Reading files from the disk tries to auto detect what format has been
used (using a magic string added when exporting the data).

Implements https://github.com/monero-project/monero/issues/2859
2019-08-22 16:03:22 +02:00
luigi1111 65e937168e
Merge pull request #5722
8be5fea simplewallet: optional all flag to export_outputs/export_key_images (moneromooo-monero)
2019-08-21 15:08:10 -05:00
luigi1111 c4071a00fb
Merge pull request #5600
dd58057 Remember RPC version on initial connect (hyc)
2019-07-24 14:29:10 -05:00
luigi1111 8ae2681e08
Merge pull request #5594
f074b6b device: show address on device display (ph4r05)
2019-07-24 14:24:40 -05:00
luigi1111 407683a38c
Merge pull request #5513
bc94ba4 wallet: distinguish between empty and absent attributes (moneromooo-monero)
2019-07-24 13:59:19 -05:00
moneromooo-monero 8be5fea1de
simplewallet: optional all flag to export_outputs/export_key_images 2019-07-02 19:42:28 +00:00
Doyle f761ed6345 Merge commit '51766d0' into LokiMergeUpstream 2019-06-26 12:43:21 +10:00
Dusan Klinec f074b6b571
device: show address on device display
- Trezor: support for device address display (subaddress, integrated address)
- Wallet::API support added
- Simplewallet:
  - address device [<index>]
  - address new <label>  // shows address on device also
  - integrated_address [device] <payment_id|address>  // new optional "device" arg to display also on the device
2019-06-17 16:49:04 +02:00
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