Commit Graph
100 Commits
Author SHA1 Message Date
moneromooo-monero 3126ba7425 ringct: use const refs as parameters where appropriate 2016-10-08 22:16:23 +01:00
moneromooo-monero d8eae67ef2 tests: add performance test for ge_frombytes_vartime
At luigi1111's request
2016-10-08 19:35:47 +01:00
moneromooo-monero 3cb2436528 core: remove some unused code 2016-10-08 19:35:40 +01:00
moneromooo-monero 1eaa3e8040 tests: add performance tests for rct signatures 2016-10-08 19:35:34 +01:00
moneromooo-monero 9f31e2d8c0 wallet: do not announce pool txes as money spent/received (yet) 2016-10-07 19:52:05 +01:00
moneromooo-monero 4e6d70808d wallet: better implementation of sweep_unmixable
This was still using the old transaction creation algorithm,
coupled with a deterministic output selection scheme, which
made it ill suited to the job, since it'd loop indefinitely
in case the fee increased between the test tx and adding the
fee.
2016-10-04 17:44:56 +01:00
moneromooo-monero 2a0ad8b2fe simplewallet: add mixin and payment id to sweep_all help 2016-10-04 17:44:30 +01:00
moneromooo-monero 3644aa94f3 blockchain: avoid using a reference to a temporary 2016-10-03 23:20:50 +01:00
moneromooo-monero e57379a819 p2p: drop any existing connection to a banned IP 2016-10-02 19:23:35 +01:00
moneromooo-monero 179b1f43af daemon: implement missing print_bc and matching RPC 2016-10-02 10:21:21 +01:00
moneromooo-monero 80b4da3330 wallet: wallet option to confirm transfers with no payment id
set confirm-missing-payment-id 0|1

Defaults to true.
2016-10-01 17:03:53 +01:00
moneromooo-monero baa3e80140 tests: fix build after addition of cryptonote_core::get_block_sync_size 2016-10-01 10:09:51 +01:00
moneromooo-monero bba6af9064 wallet: cold wallet transaction signing
This change adds the ability to create a new unsigned transaction
from a watch only wallet, and save it to a file. This file can
then be moved to another computer/VM where a cold wallet may load
it, sign it, and save it. That cold wallet does not need to have
a blockchain nor daemon. The signed transaction file can then be
moved back to the watch only wallet, which can load it and send
it to the daemon.

Two new simplewallet commands to use it:
sign_transfer (on the cold wallet)
submit_transfer (on the watch only wallet)

The transfer command used on a watch only wallet now writes an
unsigned transaction set in a file called 'unsigned_monero_tx'
instead of submitting the tx to the daemon as a normal wallet does.
The signed tx file is called 'signed_monero_tx'.
2016-09-27 07:46:39 +01:00
moneromooo-monero 9872dcbbe3 wallet: fix log confusion between bytes and kilobytes 2016-09-26 23:12:43 +01:00
moneromooo-monero d9b0bf9f35 cryptonote_core: make extra field removal more generic 2016-09-26 23:12:38 +01:00
moneromooo-monero 98f19d40aa serialization: add support for serializing std::pair and std::list 2016-09-26 23:12:28 +01:00
moneromooo-monero cec090fc8a Revert "Fix fake 'network synchronized, begin using' messages"
This reverts commit 78035d2b6c.

The patch doesn't work, and causes constant SYNCHRONIZED OK spam.
2016-09-25 19:08:35 +01:00
moneromooo-monero 5e3e362c85 core: make the sync chunk block count overridable 2016-09-24 17:00:19 +01:00
moneromooo-monero d2e11f374a db_lmdb: do not error if dropping a non existent hard fork table 2016-09-24 16:15:50 +01:00
moneromooo-monero 7b09e9ff77 wallet: update min mixin for sweep_unmixable on v4 2016-09-24 14:48:34 +01:00
moneromooo-monero 8b4e7c6c9c daemon: report status at 99.9% rather than 100% when not quite synced
Less confusing for users.
2016-09-24 11:45:19 +01:00
moneromooo-monero 0d036bec26 blockchain: do not reject chain histories matching only genesis
This is fine if our local chain is so small that it is entirely
contained within the last jump in the peer's short chain history.
2016-09-24 11:19:00 +01:00
moneromooo-monero eeb2bbc0fc epee: optionally restrict HTTP service to a configurable user agent
This is intended to catch traffic coming from a web browser,
so we avoid issues with a web page sending a transfer RPC to
the wallet. Requiring a particular user agent can act as a
simple password scheme, while we wait for 0MQ and proper
authentication to be merged.
2016-09-18 20:32:02 +01:00
moneromooo-monero d0fa9e74fb gpg_keys: update my keys' expiration dates 2016-09-18 19:17:47 +01:00
moneromooo-monero 1dd5b0b7df wallet: keep change dest separate from other dests
This fixes misreporting of amount/fee in rct txes, as the rct
tx construction code was lumping all dests (whether change or
not) in the same dests vector, while the pre-rct code was
keeping it separate.
2016-09-18 12:04:23 +01:00
moneromooo-monero 5f5d7279b6 wallet: fix empty tx in corner case sending nothing 2016-09-18 10:44:32 +01:00
moneromooo-monero c2491b91c0 README: make TORSOCKS_ALLOW_INBOUND optional 2016-09-18 10:34:45 +01:00
moneromooo-monero f06882f1bc README: mention --max-concurrency 1 for Mac 2016-09-18 10:23:02 +01:00
moneromooo-monero e86c5b9b53 miner: do not try to save config if the path isn't set
This saves on an exception dump when trying to write to /
after finding a block.
2016-09-18 09:57:42 +01:00
moneromooo-monero 368485d518 simplewallet: do not expose the details of tx splitting to the user
They're confusing, as people think it reports their balance.
2016-09-17 22:23:03 +01:00
moneromooo-monero 925086346a simplewallet: fix wrong amount in show_transfers for pending transactions
Change was not taken into consideration
2016-09-17 17:18:24 +01:00
moneromooo-monero 297e5836ca README: mention rlwrap pitfall when inputting seed and private keys 2016-09-17 15:55:27 +01:00
moneromooo-monero 423776f9b1 daemon: log version when starting
Helps with investigating bug reports
2016-09-16 20:47:52 +01:00
moneromooo-monero 9c7b0cb28e wallet: change priority/fee to ArticMine's recommendation
We keep 1, 2, 3 multipliers till the fee decrase from 0.01/kB
to 0.002/kB, where we start using 1, 20, 166 multipliers.
This ensures the higher multiplier will compensate for the
block reward penalty when pushing past 100% of the past median.

The fee-multiplier wallet setting is now rename to priority,
since it keeps its [0..3] range, but maps to different multiplier
values.
2016-09-16 11:50:52 +01:00
moneromooo-monero cd01bae735 Decrease minimum fee from 0.01/kB to 0.002/kB
The wallet will start using that fee about two weeks after hard
fork 3, when most people will likely have updated their daemons.
2016-09-15 09:28:33 +01:00
moneromooo-monero 70b78bb2c8 wallet: fix misdetection of duplicates 2016-09-14 20:23:28 +01:00
moneromooo-monero 7d413f635f rct: rework serialization to avoid storing vector sizes 2016-09-14 20:23:06 +01:00
moneromooo-monero 0ce79ef10e core: cleanup some typecasting 2016-09-14 20:22:16 +01:00
moneromooo-monero 0d7ce00793 epee: do not try network resolution if loopback worked
Fixes the wallet being unable to connect to the daemon
when there is no NIC.
2016-09-01 18:12:39 +01:00
moneromooo-monero f1d87c8064 simplewallet: add magic and public keys to key image export file
This ensures it's hard to mix files up
2016-09-01 11:32:44 +01:00
moneromooo-monero f4e894a526 simplewallet: make the key image export format binary
Saves on space, and on some pointless hex conversions
2016-09-01 11:04:53 +01:00
moneromooo-monero 85dc0ce3a5 wallet: sanity check on histogram response 2016-09-01 09:04:45 +01:00
moneromooo-monero 6cf8ca2a7f core: faster find_blockchain_supplement
Since this queries block heights for blocks that may or may not
exist, queries for non existing blocks would throw an exception,
and that would slow down the loop a lot. 7 seconds to go through
a 30 hash list.

Fix this by adding an optional return block height to block_exists
and using this instead. Actual errors will still throw an
exception.

This also cuts down on log exception spam.
2016-08-31 10:03:32 +01:00
moneromooo-monero 3112e24aa7 wallet: interpret 0 fee multiplier as default for sweep_all too 2016-08-30 13:19:20 +01:00
moneromooo-monero 1cdba42a77 db_lmdb: fix reorg with "halfway rct" coinbase outputs 2016-08-29 22:44:17 +01:00
moneromooo-monero 73b9b4ba34 wallet: fix not finding enough rct fake outputs
If picking coinbase outputs, those are locked for a longer time
than other outputs, so we ask for more of those
2016-08-29 20:51:21 +01:00
moneromooo-monero adca903589 wallet_rpc_server: return payment id in make_integrated_address RPC
It is useful, especially when requesting a random one
2016-08-29 12:18:22 +01:00
moneromooo-monero 91ca0b4065 core: allow empty global indices for txes with empty vout 2016-08-29 09:28:32 +01:00
moneromooo-monero 887db9f936 blockchain: testnet heights for v3, v4, and v5 2016-08-28 21:30:54 +01:00
moneromooo-monero f24ab58d18 ringct: remove unused code 2016-08-28 21:30:53 +01:00
moneromooo-monero b38452bd55 ringct: pass structure by const ref, not value 2016-08-28 21:30:51 +01:00
moneromooo-monero fd11271eea ringct: use memcpy/memset instead of handwritten loop where appropriate 2016-08-28 21:30:49 +01:00
moneromooo-monero 5d38206fcc ringct: remove spurious copies 2016-08-28 21:30:47 +01:00
moneromooo-monero 16732a85d7 rct: faster Cryptonote/rct conversions 2016-08-28 21:30:45 +01:00
moneromooo-monero fbd7c359ee wallet: fix some "may be used uninitialized" warnings
The compiler can't always work out the _found booleans are
set iff the value is initialized.
2016-08-28 21:30:44 +01:00
moneromooo-monero 4a41dd4068 wallet: do not generate 0 change 2016-08-28 21:30:42 +01:00
moneromooo-monero a0925e628e core: use full rct signatures if just one input
It is slightly smaller, but requires all rings to have the real
input on the same index, so can only be used for single input txes.
2016-08-28 21:30:40 +01:00
moneromooo-monero 94fd881f74 rct: early out on failure on verRange 2016-08-28 21:30:38 +01:00
moneromooo-monero 45349b6f7c wallet: do not ask for duplicate histograms 2016-08-28 21:30:36 +01:00
moneromooo-monero b951bc8780 wallet: transfer_selected_rct now also selects fake outs 2016-08-28 21:30:34 +01:00
moneromooo-monero 4f887dea6e increase minimum mixin to 4 on hard fork 5 2016-08-28 21:30:33 +01:00
moneromooo-monero 0815c72df7 core: allow v1 txes after HF 5 when sweeping unmixable outputs 2016-08-28 21:30:31 +01:00
moneromooo-monero f782d45827 tests: hard fork list must end with a 0 2016-08-28 21:30:29 +01:00
moneromooo-monero 074e602609 ringct: use Cryptonote serialization to hash non prunable data 2016-08-28 21:30:28 +01:00
moneromooo-monero c3b3260ae5 New "Halfway RingCT" outputs for coinbase transactions
When RingCT is enabled, outputs from coinbase transactions
are created as a single output, and stored as RingCT output,
with a fake mask. Their amount is not hidden on the blockchain
itself, but they are then able to be used as fake inputs in
a RingCT ring. Since the output amounts are hidden, their
"dustiness" is not an obstacle anymore to mixing, and this
makes the coinbase transactions a lot smaller, as well as
helping the TXO set to grow more slowly.

Also add a new "Null" type of rct signature, which decreases
the size required when no signatures are to be stored, as
in a coinbase tx.
2016-08-28 21:30:26 +01:00
moneromooo-monero 6f526cdff8 rct: log why verification fails
and remove some unnecessary variables in the checking code
2016-08-28 21:30:23 +01:00
moneromooo-monero d4b8991e44 rct: serialize txnFee as varint 2016-08-28 21:30:21 +01:00
moneromooo-monero d4b62a1e29 rct amount key modified as per luigi1111's recommendations
This allows the key to be not the same for two outputs sent to
the same address (eg, if you pay yourself, and also get change
back). Also remove the key amounts lists and return parameters
since we don't actually generate random ones, so we don't need
to save them as we can recalculate them when needed if we have
the correct keys.
2016-08-28 21:30:19 +01:00
moneromooo-monero 93f5c625f0 rct: rework v2 txes into prunable and non prunable data
Nothing is pruned, but this allows easier changes later.
2016-08-28 21:30:18 +01:00
moneromooo-monero d93746b6d3 rct: rework the verification preparation process
The whole rct data apart from the MLSAGs is now included in
the signed message, to avoid malleability issues.

Instead of passing the data that's not serialized as extra
parameters to the verification API, the transaction is modified
to fill all that information. This means the transaction can
not be const anymore, but it cleaner in other ways.
2016-08-28 21:30:16 +01:00
moneromooo-monero 3ab2ab3e76 rct: change the simple flag to a type
for future expansion
2016-08-28 21:30:14 +01:00
moneromooo-monero a47ceee83b wallet: do not store signatures in the wallet cache
Saves some substantial space.
Also avoid calculating tx hashes we don't need.
2016-08-28 21:30:10 +01:00
moneromooo-monero 0263dd2d23 core: add some locking around pool use 2016-08-28 21:30:08 +01:00
moneromooo-monero 2c9d9519f1 wallet2: factor m_spent changes
Makes it easier to track what is going on.
2016-08-28 21:30:04 +01:00
moneromooo-monero 1303cda646 wallet: always use new algorithm for RPC transfers
This ensures we get rct transactions when appropriate
2016-08-28 21:30:03 +01:00
moneromooo-monero b337aea6cc rct: do not serialize senderPk - it is not used anymore 2016-08-28 21:30:01 +01:00
moneromooo-monero e5a9a4755b core_tests: fix a couple pre-rct tests using rct 2016-08-28 21:29:58 +01:00
moneromooo-monero 230fca2d56 wallet: use the prefered rct case only when enough rct outs exist 2016-08-28 21:29:55 +01:00
moneromooo-monero c27194a444 wallet: do not try to use rct txes a few blocks before the fork 2016-08-28 21:29:53 +01:00
moneromooo-monero 1bf069825b tx_pool: log why a transaction was rejected for version checks 2016-08-28 21:29:51 +01:00
moneromooo-monero 37bdf6ebe3 change fork settings to allow pre-rct txes for one more fork cycle 2016-08-28 21:29:50 +01:00
moneromooo-monero cc85cc6a3f simplewallet: better check_tx_key feedback
Print number of confirmations if the tx is in the blockchain,
or a warning if it's in the pool.
2016-08-28 21:29:48 +01:00
moneromooo-monero 9b70856ccb rct: make the amount key derivable by a third party with the tx key
Scheme design from luigi1114.
2016-08-28 21:29:46 +01:00
moneromooo-monero cf33e1a52a rct: do not serialize public keys in outPk
They can be reconstructed from vout
2016-08-28 21:29:43 +01:00
moneromooo-monero 83ab3151e8 wallet2_api: zero amounts are now allowed with rct 2016-08-28 21:29:41 +01:00
moneromooo-monero 096ac06521 wallet2_api: update on_money_{received,spent} prototypes for rct changes 2016-08-28 21:29:40 +01:00
moneromooo-monero 3cb2edec66 rpc: send global indices along with blocks/transacions on refresh
This plugs a privacy leak, where the wallet tells the daemon
which transactions contain outputs for the wallet by asking
for additional information for that particular transaction.

As a nice bonus, this actually makes refresh slightly faster.
2016-08-28 21:29:38 +01:00
moneromooo-monero 414b424d32 core: always use the new simple rct variant 2016-08-28 21:29:36 +01:00
moneromooo-monero ce5de8b430 tests: add tests for wallet output selection 2016-08-28 21:29:34 +01:00
moneromooo-monero 84c82cd775 wallet: better tx input selection
We try to avoid related inputs, when possible
2016-08-28 21:29:32 +01:00
moneromooo-monero 1e21651f24 rct: use the already defined H where possible
Found by luigi1111w
2016-08-28 21:29:29 +01:00
moneromooo-monero 07d353dfc6 wallet: handle 0 change properly
With RCT, we allow 0 size outputs, to try and encourage txes
with two inputs and two outputs. Consolidation would then
have two non zero inputs, one zero output, and one larger
output.
2016-08-28 21:29:27 +01:00
moneromooo-monero e81a2b2cfa port get_tx_key/check_tx_key to rct 2016-08-28 21:29:24 +01:00
moneromooo-monero e06faefde4 tests: add basic tests for simple rct api 2016-08-28 21:29:22 +01:00
moneromooo-monero a4d4d6194b integrate simple rct api 2016-08-28 21:29:20 +01:00
moneromooo-monero 1e8d37e7d8 serialization: add override for serializing bool 2016-08-28 21:29:19 +01:00
moneromooo-monero 37c895e5e3 wallet: rct specific output selection
Before the normal selection, we attempt to find either one or two
suitable outputs to use as inputs to the rct tx. The intent is that
most rct txes will have one or two inputs, and we want all to look
the same if possible.
When two outputs are needed, we try to find a pair which are not
related (ie, by being from the same or similar block height).
2016-08-28 21:29:11 +01:00
moneromooo-monero 1181c57967 wallet: make sweep_all work with rct txes too 2016-08-28 21:29:09 +01:00
moneromooo-monero c2ec6d35b9 mixable transactions must be rct for v3 2016-08-28 21:29:07 +01:00
moneromooo-monero 1017a75460 wallet: factor transfer_rct code with transfer code
The "transfer" simplewallet command is renamed to "transfer_original".
"transfer_new" is renamed "transfer", "transfer_rct" is removed,
and the new "transfer" now selects rct or non rct transactions
based on the current block height.
2016-08-28 21:29:05 +01:00