Commit graph

3975 commits

Author SHA1 Message Date
stoffu
450306a01c
command line: allow has_arg to handle arg_descriptor<bool,false,true> #3318 2018-03-05 11:19:04 +09:00
Jean Pierre Dudey
9f9e095a8c
Use genesis_tx parameter in generate_genesis_block. #3261
* src/cryptnote_config.h: The constant `config::testnet::GENESIS_TX` was
changed to be the same as `config::GENESIS_TX` (the mainnet's transaction)
because the mainnet's transaction was being used for both networks.

* src/cryptonote_core/cryptonote_tx_utils.cpp: The `generate_genesis_block` function
was ignoring the  `genesis_tx` parameter, and instead it was using the `config::GENESIS_TX`
constant. That's why the testnet genesis transaction was changed. Also five lines of unused
code were removed.

Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-03-05 11:19:01 +09:00
MoroccanMalinois
25ea307d67
Fix invalid device unique_ptr cast 2018-03-04 18:56:48 +00:00
moneromooo-monero
e0cda74ace
wallet2_api: add info/error/warning entry points 2018-03-04 18:07:30 +00:00
cslashm
e745c1e38d Code modifications to integrate Ledger HW device into monero-wallet-cli.
The basic approach it to delegate all sensitive data (master key, secret
ephemeral key, key derivation, ....) and related operations to the device.
As device has low memory, it does not keep itself the values
(except for view/spend keys) but once computed there are encrypted (with AES
are equivalent) and return back to monero-wallet-cli. When they need to be
manipulated by the device, they are decrypted on receive.

Moreover, using the client for storing the value in encrypted form limits
the modification in the client code. Those values are transfered from one
C-structure to another one as previously.

The code modification has been done with the wishes to be open to any
other hardware wallet. To achieve that a C++ class hw::Device has been
introduced. Two initial implementations are provided: the "default", which
remaps all calls to initial Monero code, and  the "Ledger", which delegates
all calls to Ledger device.
2018-03-04 12:54:53 +01:00
moneromooo-monero
51219457b1
core: fix sending to the source address with a short payment id
It would fail to send, thinking it needs a destination address,
since the destination matches the change address in this case.
2018-03-02 23:27:57 +00:00
moneromooo-monero
6b40ea937a
simplewallet: fix print_ring_members printing wrong heights
And also use uint64_t instead of int for heights where appropriate
2018-03-02 00:25:16 +00:00
stoffu
71bff546d3
wallet api: when restoring from EnglishOld, set language to English 2018-02-25 22:04:36 +09:00
rbrunner7
430268224d Wallet2 + CLI wallet: UTF-8 support for filenames and paths under Windows 2018-02-25 12:57:58 +01:00
stoffu
399120ddad
simplewallet: set seed language when restoring from english-old seed 2018-02-25 12:44:10 +09:00
ston1th
496055d128 monerod: do not log to tmpdir in daemon mode
The logging to /tmp/bitmonero.daemon.stdout.stderr caused segfaults
if the /tmp mount was full (#2851).
Now the daemon is only logging to /tmp/bitmonero.daemon.stdout.stderr
in the debug builds.
2018-02-23 21:27:14 +01:00
moneromooo-monero
6f8779d282
blockchain: fix random sync failures
When a block is added as part of a chunk (when syncing historical
blocks), a block may end up already in the blockchain if it was
added to the queue before being added to the chain (though it's
not clear how that could happen, but it's an implementation detail)
and thus may not be added to the chain when add_block is called.
This would cause m_blocks_txs_check to not be cleared, causing it
to get out of sync at next call, and thus wrongfully reject the
next block.
2018-02-23 19:47:17 +00:00
moneromooo-monero
223d7d0c7a
db_lmdb: fix free space reporting
reported by Brad Richards
2018-02-23 09:06:10 +00:00
Dusan Klinec
34a2a08530 rctSigs - loop invariant code removed from the loop 2018-02-21 16:35:06 +01:00
Riccardo Spagni
2ac3da1251
Merge pull request #3256
df5273de wallet2: fix auto_low_priority field name typo on load (moneromooo-monero)
2018-02-20 17:53:38 +02:00
Riccardo Spagni
0d530bd04e
Merge pull request #3295
6514f0ed db_lmdb: fix return code mixup in for_all_* (moneromooo-monero)
2018-02-20 17:49:16 +02:00
Riccardo Spagni
46903ec26a
Merge pull request #3294
fd57e13a simplewallet: typo in generate-from-multisig-keys (stoffu)
2018-02-20 17:49:05 +02:00
Riccardo Spagni
21335e5c6b
Merge pull request #3293
4a78a99f cryptonote_core: change wording of fork warning message (moneromooo-monero)
2018-02-20 17:48:54 +02:00
Riccardo Spagni
299af8e43e
Merge pull request #3290
1d28c0d8 p2p: restore m_testnet assignment lost during rebase (whythat)
2018-02-20 17:48:29 +02:00
Riccardo Spagni
ea9ddcac7f
Merge pull request #3288
10f78f63 p2p: need libcryptonote_core due to arg_testnet_on being used (stoffu)
2018-02-20 17:48:05 +02:00
Riccardo Spagni
fc57e0ef2d
Merge pull request #3263
d4e728c9 simplewallet: reword donate command message for clarity (Serhack)
2018-02-20 17:47:42 +02:00
Riccardo Spagni
c9aa9370f9
Merge pull request #3260
b2d4bb9b Remove `voting_version` parameter documentation. (Jean Pierre Dudey)
2018-02-20 17:47:31 +02:00
Riccardo Spagni
4e9de94565
Merge pull request #3257
da25757b simplewallet: do nothing in on_skip_transaction (wallet2 already logs warnings) (stoffu)
2018-02-20 17:47:20 +02:00
Riccardo Spagni
ff36fd93fd
Merge pull request #3255
3962bcb2 Closes #2886: really ignore battery checking (Timothy D. Prime)
2018-02-20 17:47:03 +02:00
Riccardo Spagni
cfa3af4078
Merge pull request #3247
89ad162a wallet2: remove unused m_subaddresses_inv (moneromooo-monero)
f2c4c399 wallet2: speed up subaddress generation (by about a third) (moneromooo-monero)
2018-02-20 17:46:40 +02:00
Riccardo Spagni
6920fdaf4f
Merge pull request #3246
3c33e131 wallet2: don't store invalid key image when watch-only (stoffu)
0133b348 wallet2: don't throw when spent amount is inconsistent (stoffu)
2018-02-20 17:46:29 +02:00
Riccardo Spagni
0fc5eec9cd
Merge pull request #3235
6866ed46 Add default value to max_height, otherwise it's 0 (Michał Sałaban)
2018-02-20 17:46:00 +02:00
Howard Chu
f2bb8085ec
Fix #3297 use the password_prompter helper 2018-02-20 02:25:20 +00:00
moneromooo-monero
6514f0ed7b
db_lmdb: fix return code mixup in for_all_* 2018-02-19 14:55:58 +00:00
stoffu
fd57e13a84
simplewallet: typo in generate-from-multisig-keys 2018-02-19 09:51:30 +09:00
moneromooo-monero
4a78a99f96
cryptonote_core: change wording of fork warning message
An udpate may or may not be available now, but should be soon if not.
This will prevent too many people freaking out.
2018-02-18 23:44:59 +00:00
whythat
1d28c0d8a9 p2p: restore m_testnet assignment lost during rebase 2018-02-18 17:09:39 +02:00
stoffu
10f78f63f1
p2p: need libcryptonote_core due to arg_testnet_on being used 2018-02-18 16:40:43 +09:00
Riccardo Spagni
8154df778a
Merge pull request #3276
ed6c68db crypto: add missing include (WIN32) (iDunk5400)
2018-02-17 21:48:59 +01:00
Riccardo Spagni
5a8e7fd0e5
Merge pull request #3249
a4b50a6f handle ^D and ^C while password prompting (Jethro Grassie)
2018-02-17 21:48:30 +01:00
Riccardo Spagni
6198c816b1
Merge pull request #3170
b3b2d4d2 options: add testnet option dependencies (whythat)
c5f55bb4 common: implement dynamic option dependencies mechanism (whythat)
05a12ccc options: remove testnet-* options (whythat)
c33cb60e common: implement dependent option descriptor (whythat)
2018-02-17 11:51:57 +01:00
Riccardo Spagni
a2cbedd29f
Merge pull request #3191
3607d467 core: add --no-fluffy-blocks, and enable fluffy blocks by default (moneromooo-monero)
2018-02-17 11:48:31 +01:00
whythat
b3b2d4d20c options: add testnet option dependencies 2018-02-16 22:32:01 +02:00
whythat
c5f55bb4c0 common: implement dynamic option dependencies mechanism 2018-02-16 22:32:01 +02:00
whythat
05a12ccc2d options: remove testnet-* options 2018-02-16 22:32:01 +02:00
iDunk5400
ed6c68db1b
crypto: add missing include (WIN32) 2018-02-16 19:35:31 +01:00
moneromooo-monero
89ad162a3f
wallet2: remove unused m_subaddresses_inv 2018-02-16 17:13:09 +00:00
moneromooo-monero
f2c4c39971
wallet2: speed up subaddress generation (by about a third) 2018-02-16 17:13:06 +00:00
Leon Klingele
7c1a607c40
txpool: Don't bail out when blob_size == tx_size_limit
Previously, when blob_size == tx_size_limit, the "m_too_big" property was set
and the transaction was rejected. This should not have been the case.
2018-02-16 16:27:08 +01:00
whythat
c33cb60eb6 common: implement dependent option descriptor 2018-02-16 16:44:40 +02:00
Howard Chu
f3b74e75b0
Fix refresh height estimation
Since commit b0426d4c refresh height for a newly created wallet
connected to a sync'd daemon was off by a month. Now we only use
the 1 month safety margin if we're unable to talk to a daemon.
2018-02-16 14:17:36 +00:00
moneromooo-monero
3607d467f3
core: add --no-fluffy-blocks, and enable fluffy blocks by default 2018-02-16 13:46:46 +00:00
Riccardo Spagni
ef91d6e61e
Merge pull request #3196
eda9fb5b p2p: fix testnet/mainnet port mixup (moneromooo-monero)
2018-02-16 14:31:16 +01:00
Riccardo Spagni
6b1382b6b6
Merge pull request #3199
30ce8c59 cn_deserialize: check for raw tx_extra (moneromooo-monero)
2018-02-16 14:29:51 +01:00
Riccardo Spagni
f4a6bc79d9
Merge pull request #3226
e4646379 keccak: fix mdlen bounds sanity checking (moneromooo-monero)
2e3e90ac pass large parameters by const ref, not value (moneromooo-monero)
61defd89 blockchain: sanity check number of precomputed hash of hash blocks (moneromooo-monero)
9af6b2d1 ringct: fix infinite loop in unused h2b function (moneromooo-monero)
8cea8d0c simplewallet: double check a new multisig wallet is multisig (moneromooo-monero)
9b98a6ac threadpool: catch exceptions in dtor, to avoid terminate (moneromooo-monero)
24803ed9 blockchain_export: fix buffer overflow in exporter (moneromooo-monero)
f3f7da62 perf_timer: rewrite to make it clear there is no division by zero (moneromooo-monero)
c6ea3df0 performance_tests: remove add_arg call stray extra param (moneromooo-monero)
fa6b4566 fuzz_tests: fix an uninitialized var in setup (moneromooo-monero)
03887f11 keccak: fix sanity check bounds test (moneromooo-monero)
ad11db91 blockchain_db: initialize m_open in base class ctor (moneromooo-monero)
bece67f9 miner: restore std::cout precision after modification (moneromooo-monero)
1aabd14c db_lmdb: check hard fork info drop succeeded (moneromooo-monero)
2018-02-16 14:26:58 +01:00
Riccardo Spagni
24d8f9237f
Merge pull request #3248
d6a0ae96 blockchain: don't try to use hash check array after it's freed (moneromooo-monero)
2018-02-16 14:24:22 +01:00
Riccardo Spagni
853dd2d4f7
Merge pull request #3232
b81e276c connection_context: initialize m_last_request_time to current time (moneromooo-monero)
2018-02-16 14:24:12 +01:00
Riccardo Spagni
260d666cf4
Merge pull request #3231
84a8b2da Don't create readtxn until after txn_safe gate check (Howard Chu)
2018-02-16 14:24:01 +01:00
Riccardo Spagni
ef47ba95c8
Merge pull request #3229
928c1825 cryptonote_protocol: guard against all threads in standby (moneromooo-monero)
2018-02-16 14:23:53 +01:00
Riccardo Spagni
b5b88c2747
Merge pull request #3225
71806327 dns: change default DNS to a worldwide selection (moneromooo-monero)
2018-02-16 14:23:34 +01:00
Riccardo Spagni
a54247b993
Merge pull request #3221
2e584dcb p2p: do not try to connect to peers in offline mode (moneromooo-monero)
2018-02-16 14:23:22 +01:00
Riccardo Spagni
0c71197892
Merge pull request #3217
fde4489e wipeable_string: call memwipe directly (moneromooo-monero)
2018-02-16 14:23:08 +01:00
Riccardo Spagni
9c4428e583
Merge pull request #3214
214d251c wallet: suggest the use of sweep_unmixable when not_enough_outs_to_mix is thrown (stoffu)
2018-02-16 14:22:41 +01:00
Riccardo Spagni
bfddb2283b
Merge pull request #3210
39992134 txpool: Properly bail out when outputs_amount == inputs_amount (Leon Klingele)
2018-02-16 14:22:10 +01:00
Riccardo Spagni
9681a885d1
Merge pull request #3207
a99ef176 wallet-rpc: take subaddress account as arg for get_transfer_by_txid (stoffu)
77125096 wallet-rpc: rename *_INDEX_OUTOFBOUND into *_INDEX_OUT_OF_BOUNDS (stoffu)
2018-02-16 14:21:59 +01:00
Riccardo Spagni
079eea7b70
Merge pull request #3205
bc61ae69 tx_pool: add a max pool size, settable with --max-txpool-size (moneromooo-monero)
3b4e6b35 txpool: increase unmined tx expiry to three days (moneromooo-monero)
2018-02-16 14:21:50 +01:00
Riccardo Spagni
b23578e473
Merge pull request #3197
f90c76be Return appropriate error code when there's no connection to daemon (Michał Sałaban)
3cb65b3f Return appropriate error code when not enough money for tx (Michał Sałaban)
2018-02-16 14:21:00 +01:00
Riccardo Spagni
666a76652b
Merge pull request #3187
851bd057 call _exit instead of abort in release mode (moneromooo-monero)
2018-02-16 14:20:31 +01:00
Riccardo Spagni
bdf0339dda
Merge pull request #3181
e3f0980a daemon: don't drop RPC with busy error when running offline (moneromooo-monero)
2018-02-16 14:19:54 +01:00
Riccardo Spagni
ba22928d4b
Merge pull request #3180
1dfed567 Fixed #if instead of #ifdef (Matt Little)
7c442453 Support building cncrypto lib with msvc (Matt Little)
2018-02-16 14:19:42 +01:00
Riccardo Spagni
82599ef0e3
Merge pull request #3175
3be98036 wallet-cli: Do not ask for scan_from_height if it explicitly is set to zero. (Maximilian Lupke)
2018-02-16 14:19:24 +01:00
Riccardo Spagni
a43be404c7
Merge pull request #3171
402c9eef cryptonote_tx_utils: fixed logic bug in get_destination_view_key_pub (stoffu)
2018-02-16 14:19:10 +01:00
Riccardo Spagni
04a676397f
Merge pull request #3165
7539603f Bootstrap daemon (stoffu)
2018-02-16 14:18:50 +01:00
Riccardo Spagni
381faf06c7
Merge pull request #3163
628b78ae Fix in_peers/out_peers RPC operations (Erik de Castro Lopo)
ece9bcf5 rpc_client: Fix error handling (Erik de Castro Lopo)
8f30350d Fix method name in invoke_http_json_rpc (Erik de Castro Lopo)
32c0f908 Allow the number of incoming connections to be limited (Erik de Castro Lopo)
d609a2c1 Rename delete_connections to delete_out_connections (Erik de Castro Lopo)
b927c0fc Rename connections_count to max_out_connection_count (Erik de Castro Lopo)
2018-02-16 14:18:38 +01:00
Riccardo Spagni
0bffd2ec64
Merge pull request #3161
78a2e15b daemon: exit with 0 when successful (moneromooo-monero)
2018-02-16 14:18:29 +01:00
Riccardo Spagni
5d36ed6613
Merge pull request #3094
a85dbb3f Fixed typos and wording tweaks (Maxithi)
2018-02-16 14:17:46 +01:00
stoffu
da25757b42
simplewallet: do nothing in on_skip_transaction (wallet2 already logs warnings) 2018-02-15 17:20:39 +09:00
Serhack
d4e728c995 simplewallet: reword donate command message for clarity 2018-02-14 08:28:22 -05:00
Riccardo Spagni
370b43d12b
Merge pull request #3138
19ff243f wallets: reorg 61 more days on testnet (moneromooo-monero)
c70f03ca blockchain: move bulletproofs to v8 (moneromooo-monero)
2018-02-14 12:49:57 +01:00
Riccardo Spagni
589a53f479
Merge pull request #2959
3f1a3fac bulletproofs: more robust challenge computation (moneromooo-monero)
2018-02-14 12:08:52 +01:00
Jean Pierre Dudey
b2d4bb9b64 Remove voting_version parameter documentation.
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-02-13 15:04:12 -04:00
moneromooo-monero
df5273def5
wallet2: fix auto_low_priority field name typo on load 2018-02-13 00:33:55 +00:00
Timothy D. Prime
3962bcb2a2 Closes #2886: really ignore battery checking
Move option test first.
2018-02-12 10:29:22 -08:00
stoffu
3c33e1317b
wallet2: don't store invalid key image when watch-only 2018-02-12 20:36:15 +09:00
Jethro Grassie
a4b50a6f51
handle ^D and ^C while password prompting 2018-02-10 18:29:49 -05:00
moneromooo-monero
d6a0ae96c6
blockchain: don't try to use hash check array after it's freed
It's freed when we've synced past its end, but we might still
find an old chain somewhere
2018-02-10 11:26:06 +00:00
stoffu
0133b3481a
wallet2: don't throw when spent amount is inconsistent 2018-02-10 12:59:25 +09:00
moneromooo-monero
71806327f5
dns: change default DNS to a worldwide selection
DNSSEC aware servers picked from https://wiki.ipfire.org/dns/public-servers
2018-02-08 09:46:16 +00:00
stoffu
214d251c48
wallet: suggest the use of sweep_unmixable when not_enough_outs_to_mix is thrown 2018-02-08 08:02:12 +09:00
moneromooo-monero
bc61ae69bf
tx_pool: add a max pool size, settable with --max-txpool-size 2018-02-07 13:42:12 +00:00
moneromooo-monero
e4646379a6
keccak: fix mdlen bounds sanity checking
found by h908714124
2018-02-07 13:39:32 +00:00
Michał Sałaban
6866ed469a Add default value to max_height, otherwise it's 0 2018-02-05 23:39:37 +01:00
moneromooo-monero
b81e276cab
connection_context: initialize m_last_request_time to current time
This prevents spurious early peer drops
2018-02-04 13:13:08 +00:00
moneromooo-monero
928c1825f0
cryptonote_protocol: guard against all threads in standby 2018-02-02 22:33:53 +00:00
moneromooo-monero
2e3e90acbe
pass large parameters by const ref, not value
Coverity 136394 136397 136409 136526 136529 136533 175302
2018-02-02 19:36:09 +00:00
moneromooo-monero
61defd89e3
blockchain: sanity check number of precomputed hash of hash blocks
Coverity 142951
2018-02-02 17:10:13 +00:00
moneromooo-monero
9af6b2d1b8
ringct: fix infinite loop in unused h2b function
Coverity 146775
2018-02-02 16:44:28 +00:00
moneromooo-monero
8cea8d0cef
simplewallet: double check a new multisig wallet is multisig
Coverity 182493
2018-02-02 16:41:16 +00:00
moneromooo-monero
9b98a6ac8f
threadpool: catch exceptions in dtor, to avoid terminate
If an exception is thrown, it is ignored. While this may hide
a bug, this should only be system exceptions in boost, which
is pretty unlikely. Morever, wait should be called manually
before the dtor anyway. Add an error message if the dtor has
to wait in case some such cases creep in so they get fixed.

Coverity 182538
2018-02-02 16:27:39 +00:00
moneromooo-monero
24803ed91f
blockchain_export: fix buffer overflow in exporter
Coverity 182550
2018-02-02 16:11:15 +00:00
moneromooo-monero
f3f7da624d
perf_timer: rewrite to make it clear there is no division by zero
It could have happened if epee::misc_utils::get_ns_count
is buggy, at a push

Coverity 182561
2018-02-02 16:06:36 +00:00
moneromooo-monero
03887f1140
keccak: fix sanity check bounds test
Nothing calls this with those inputs
2018-02-02 15:48:06 +00:00
moneromooo-monero
ad11db9144
blockchain_db: initialize m_open in base class ctor
It's cleaner this way, since it's a base class field

Coverity 136568
2018-02-02 15:21:39 +00:00
moneromooo-monero
bece67f9e8
miner: restore std::cout precision after modification
Coverity 136462
2018-02-02 15:15:21 +00:00
moneromooo-monero
1aabd14c21
db_lmdb: check hard fork info drop succeeded
Coverity 136364
2018-02-02 15:08:22 +00:00