Commit graph

941 commits

Author SHA1 Message Date
Riccardo Spagni
a95461e76d
Merge pull request #3609
08343aba tx_pool: fix loading with colliding key images (moneromooo-monero)
2018-04-12 13:48:44 +02:00
Riccardo Spagni
226de8e928
Merge pull request #3530
eb59f7c5 cryptonote_tx_util: make destinations properly shuffled (stoffu)
2018-04-12 13:46:34 +02:00
Riccardo Spagni
5053f8f40b
Merge pull request #3502
11c933e1 fix lambda compile error on openbsd (moneromooo-monero)
2018-04-12 11:14:43 +02:00
moneromooo-monero
08343abaf4
tx_pool: fix loading with colliding key images
A key image may be present more than once if all but one of the
txes spending that key image are coming from blocks. When loading
a txpool from storage, we must load the one that's not from a
block first to avoid rejection
2018-04-11 15:27:56 +01:00
stoffu
eb59f7c563
cryptonote_tx_util: make destinations properly shuffled 2018-03-31 18:37:46 +09:00
moneromooo-monero
11c933e137
fix lambda compile error on openbsd 2018-03-27 14:48:36 +01:00
Riccardo Spagni
dac3895ac1
update block hashes for checkpoints.dat 2018-03-24 08:36:10 +02:00
moneromooo-monero
b1398fff40
core: fix use of uninitialised data 2018-03-18 23:37:00 +00:00
moneromooo-monero
bb20f104ba
Move v7 fork to 1546000 to give more update time 2018-03-18 09:29:31 +00:00
Riccardo Spagni
83651630bc
Merge pull request #3418
20a00266 blockchain: forbid bulletproof types before v8 (moneromooo-monero)
2018-03-17 16:51:47 +02:00
moneromooo-monero
20a002667c
blockchain: forbid bulletproof types before v8
They were already forbidden implicitely, but let's make that
explicit for robustness
2018-03-16 18:18:34 +00:00
Riccardo Spagni
432480fa42
Merge pull request #3414
524cbdc1 blockchain: fix log message about per-kB fee (stoffu)
2018-03-16 18:09:34 +02:00
Riccardo Spagni
0f27fc57ac
Merge pull request #3336
57c0b1ed Fix typos in various files (Dimitris Apostolou)
2018-03-16 18:08:07 +02:00
moneromooo-monero
41f727ce42
add RPC to get a histogram of outputs of a given amount 2018-03-16 10:32:26 +00:00
stoffu
524cbdc1e2
blockchain: fix log message about per-kB fee 2018-03-16 10:43:19 +09:00
Dimitris Apostolou
57c0b1ed9f Fix typos in various files 2018-03-15 18:25:38 +02:00
Jean Pierre Dudey
e1b526b371 Remove the Blockchain::get_all_known_block_ids function.
This function isn't used in the codebase.

Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-03-14 21:56:19 -04:00
stoffu
8705beaf51
keypair::generate: always require hw::device to avoid possible mistake 2018-03-14 21:00:16 +09:00
stoffu
27a196b126
device: untangle cyclic depenency
When #3303 was merged, a cyclic dependency chain was generated:

    libdevice <- libcncrypto <- libringct <- libdevice

This was because libdevice needs access to a set of basic crypto operations
implemented in libringct such as scalarmultBase(), while libringct also needs
access to abstracted crypto operations implemented in libdevice such as
ecdhEncode(). To untangle this cyclic dependency chain, this patch splits libringct
into libringct_basic and libringct, where the basic crypto ops previously in
libringct are moved into libringct_basic. The cyclic dependency is now resolved
thanks to this separation:

    libcncrypto <- libringct_basic <- libdevice <- libcryptonote_basic <- libringct

This eliminates the need for crypto_device.cpp and rctOps_device.cpp.

Also, many abstracted interfaces of hw::device such as encrypt_payment_id() and
get_subaddress_secret_key() were previously implemented in libcryptonote_basic
(cryptonote_format_utils.cpp) and were then called from hw::core::device_default,
which is odd because libdevice is supposed to be independent of libcryptonote_basic.
Therefore, those functions were moved to device_default.cpp.
2018-03-14 21:00:15 +09:00
Riccardo Spagni
9a63fbcf83
Merge pull request #3371
84decbea core: add v7 for 1539500 on mainnet (moneromooo-monero)
2018-03-14 13:37:25 +02:00
Riccardo Spagni
2e074e2ae7
Merge pull request #3358
978663d4 Stagenet: successive forks up to v7 (stoffu)
2018-03-14 13:36:47 +02:00
Cédric
73dd883d51 Ledger HW Bug fixes
Fix the way the REAL mode is handle:
  Let create_transactions_2 and create_transactions_from construct the vector of transactions.
  Then iterate on it and resign.
  We just need to add 'outs' list in the TX struct for that.

Fix default secret keys value when DEBUG_HWDEVICE mode is off
  The magic value (00...00 for view key and FF..FF for spend key) was not correctly set
  when DEBUG_HWDEVICE was off. Both was set to 00...00.

Add sub-address info in ABP map in order to correctly display destination sub-address on device

Fix DEBUG_HWDEVICE mode:
   - Fix compilation errors.
   - Fix control device init in ledger device.
   - Add more log.

Fix sub addr control

Fix debug Info
2018-03-12 10:43:06 +01:00
stoffu
978663d461
Stagenet: successive forks up to v7 2018-03-09 13:59:11 +09:00
moneromooo-monero
84decbea48
core: add v7 for 1539500 on mainnet 2018-03-07 17:19:50 +00:00
moneromooo-monero
38657fd0e9
Bump min ring size from 5 to 7 from v7 2018-03-07 13:19:04 +00:00
Riccardo Spagni
9841a452e5
Merge pull request #3338
51219457 core: fix sending to the source address with a short payment id (moneromooo-monero)
2018-03-05 19:13:28 +02:00
Riccardo Spagni
abcdb7b5c4
Merge pull request #3308
6f8779d2 blockchain: fix random sync failures (moneromooo-monero)
2018-03-05 19:12:05 +02:00
Riccardo Spagni
4f93f74528
Merge pull request #3277
0e7ad2e2 Wallet API: generalize 'bool testnet' to 'NetworkType nettype' (stoffu)
af773211 Stagenet (stoffu)
cc9a0bee command_line: allow args to depend on more than one args (stoffu)
55f8d917 command_line::get_arg: remove 'required' for dependent args as they're always optional (stoffu)
450306a0 command line: allow has_arg to handle arg_descriptor<bool,false,true> #3318 (stoffu)
9f9e095a Use `genesis_tx` parameter in `generate_genesis_block`. #3261 (Jean Pierre Dudey)
2018-03-05 19:11:20 +02:00
Edward Betts
fbcc91c2a4 Correct spelling mistakes. 2018-03-05 17:00:40 +00:00
stoffu
af773211cb
Stagenet 2018-03-05 11:55:05 +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
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
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
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
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
05a12ccc2d options: remove testnet-* options 2018-02-16 22:32:01 +02: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
moneromooo-monero
3607d467f3
core: add --no-fluffy-blocks, and enable fluffy blocks by default 2018-02-16 13:46:46 +00: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
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
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
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
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
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
61defd89e3
blockchain: sanity check number of precomputed hash of hash blocks
Coverity 142951
2018-02-02 17:10:13 +00:00
Leon Klingele
399921347f
txpool: Properly bail out when outputs_amount == inputs_amount
Previously, when outputs_amount == inputs_amount, the "m_overspend" property
was set, whereas "m_fee_too_low" would have been the correct property to set.

This is unlikely to ever occur and just something I've noticed while reading
through the code.
2018-02-01 00:48:45 +01:00