Commit graph

1060 commits

Author SHA1 Message Date
Riccardo Spagni 4d74510a4a
checkpoints update 2015-11-21 15:11:21 +02:00
moneromooo-monero 00790a8921
simplewallet: lessen display flicker confusion
Height seemed to be flying all over the place on a rescan here.
Logging to a file shows the heights are actually correct, and
this is some kind of screen refresh artifact. Flush after \r
and update less often to reduce this effect a lot.
2015-11-21 11:52:35 +00:00
Riccardo Spagni 9276233b9e
Merge pull request #493
f3724ae Fix startup crash when using a locale boost does not like (moneromooo-monero)
0c1dae3 i18n: allow language to be passed as a parameter (moneromooo-monero)
2015-11-21 13:08:42 +02:00
moneromooo-monero f3724aef88
Fix startup crash when using a locale boost does not like
There are various locale related bugs in various versions of boost,
where exceptions are thrown in boost::filesystem APIs when the
current locale is not to boost's liking. It's not clear what "not
to boost's liking" means in detail, though "en" and "en_US.UTF-8"
are not to its liking.

Fix it by running a test function that's known to throw in such
a case, and resetting LANG and LC_ALL to C if an exception is
thrown. In simplewallet, the locale is queried before that so the
correct translations will still be used.
2015-11-21 10:13:10 +00:00
moneromooo-monero 0c1dae32b4
i18n: allow language to be passed as a parameter
If empty, it will still be fetched from the environment
2015-11-21 10:11:50 +00:00
moneromooo-monero 932994c0cb
Relay transactions when they linger too long in the pool
The last relayed time of a transaction is maintained, and
transactions will be relayed again if they are still in the
pool after a certain amount of time, which increases with
the transaction's age. All such transactions are resent,
whether or not they originated on the local node.
2015-11-21 00:56:21 +00:00
Riccardo Spagni 0d09e15a1c
Merge pull request #490
baf101e More changes for 2-min blocks Use the correct block time for realtime fuzz on locktime Use the correct block time to calculate next_difficulty on alt chains (will not work as-is with voting) Lock unit tests to original block time for now (Javier Smooth)
4fea1a5 Adjust difficulty target (2 min) and full reward zone (60 kbytes) for block version 2 (Javier Smooth)
2015-11-18 10:37:27 +02:00
Riccardo Spagni 61a015d01d
Merge pull request #487
3f611bc wallet: track outgoing payments and add a show_transfers command (moneromooo-monero)
2015-11-18 10:36:34 +02:00
moneromooo-monero 3f611bc3dc
wallet: track outgoing payments and add a show_transfers command
It's a user friendly display of incoming and outgoing transfers,
listed by height, within an optional height range.
2015-11-15 21:59:40 +00:00
moneromooo-monero 1b40952754
Revert "db_bdb: record numbers for recno databases start at 1"
It looks like some of the indices passed to the DB access functions
are already bumped by 1. Moreover, the existing code was not
throwing DB errors with 0 keys, and this is unlikely if it really
was using 0 keys. Last, this patch broke sync from scratch in at
least one case. So I'm calling it bad and reverting it.

This reverts commit bfc97401ae81bb30278a318de7f048c653bf6582.
2015-11-13 09:28:17 +00:00
Javier Smooth baf101ef4a More changes for 2-min blocks
Use the correct block time for realtime fuzz on locktime
Use the correct block time to calculate next_difficulty on alt chains (will not work as-is with voting)
Lock unit tests to original block time for now
2015-11-13 00:37:35 -08:00
Javier Smooth 4fea1a5fe7 Adjust difficulty target (2 min) and full reward zone (60 kbytes) for block version 2 2015-11-13 00:30:45 -08:00
moneromooo-monero 2f254ff599
hardfork: add a get_ideal_version(uint64_t) function
It returns the ideal version for a given height, which is
based on the minimum height for a fork, disregarding votes
2015-11-10 09:45:51 +00:00
moneromooo-monero 4187e569d8
hardfork: allow per-fork voting thresholds
And setup the first fork to not vote
2015-11-08 13:04:41 +00:00
Riccardo Spagni 575af61815
Merge pull request #470
b1d0c8a blockchain_dump: fix build without berkeley db (moneromooo-monero)
2015-11-01 14:12:13 +02:00
moneromooo-monero b1d0c8a049
blockchain_dump: fix build without berkeley db 2015-10-30 22:48:04 +00:00
moneromooo-monero c7dc6ef8e8
simplewallet: add a set default-mixin command
The default default mixin is 4. It can now be changed per wallet.
2015-10-30 21:16:51 +00:00
moneromooo-monero 5f8baba26e
wallet2: fix CLANG compile error 2015-10-30 14:35:55 +00:00
Riccardo Spagni 5978fc18f7
Merge pull request #463
051ddbc rpc: fix start_mining and status RPC crashes (moneromooo-monero)
2015-10-30 09:59:22 +02:00
Riccardo Spagni 9ea58ebbae
Merge pull request #461
bc110af blockchain_utilities: properly exit on error (moneromooo-monero)
2015-10-30 09:59:00 +02:00
Riccardo Spagni 6960b1e8a9
Merge pull request #460
4f873bc Remove some old/obsolete/unused code (moneromooo-monero)
2015-10-30 09:58:41 +02:00
Riccardo Spagni 167e8512ff
Merge pull request #457
e70d2e5 common: const and init list pedantry (moneromooo-monero)
2015-10-30 09:58:18 +02:00
Riccardo Spagni 62b0984e65
Merge pull request #455
6df4e67 Fix a possibly-unused warning, and rationalize types (moneromooo-monero)
2015-10-30 09:57:41 +02:00
moneromooo-monero 051ddbc741
rpc: fix start_mining and status RPC crashes
They check whether they're running on testnet by accessing the
m_rpc_server object, which does not exist when in RPC mode.

Also, fix hard_fork_info being called with the wrong API.
2015-10-28 18:09:36 +00:00
moneromooo-monero bc110af0ee
blockchain_utilities: properly exit on error
Replace boolean values and exceptions where appropriate
2015-10-27 16:15:41 +00:00
moneromooo-monero 4f873bcbaa
Remove some old/obsolete/unused code
git history's here if needed to get any of this back
2015-10-27 10:01:20 +00:00
moneromooo-monero e70d2e5be8
common: const and init list pedantry 2015-10-27 09:36:38 +00:00
moneromooo-monero 6df4e67cd2
Fix a possibly-unused warning, and rationalize types 2015-10-27 09:05:07 +00:00
Riccardo Spagni 9292c1e7cd
Merge pull request #453
3e89df4 Build fixes for the old blockchain_storage version (moneromooo-monero)
2015-10-27 09:03:07 +02:00
moneromooo-monero 3e89df4150
Build fixes for the old blockchain_storage version 2015-10-26 22:36:06 +00:00
moneromooo-monero ecf0b83406
db_bdb: add versioning, to detect incompatible format changes 2015-10-26 18:09:55 +00:00
moneromooo-monero f7e99047e4
db_lmdb: add versioning, to detect incompatible format changes 2015-10-26 18:09:46 +00:00
Riccardo Spagni bb0c161e7d renamed folder 2015-10-26 18:00:53 +02:00
Riccardo Spagni 0640cde88f
Merge pull request #448
06c65cb rpc: fix hard_fork_info RPC (moneromooo-monero)
6f5c129 rpc: fix a few commands not working as command line (moneromooo-monero)
2015-10-26 17:59:25 +02:00
Riccardo Spagni 0821c6f6ad
Merge pull request #446
9caf52b daemon: add a status command (moneromooo-monero)
2015-10-26 17:58:58 +02:00
Riccardo Spagni e1c29c94ad
Merge pull request #444
ecbb732 Fix leak on real output when using a very recent output (moneromooo-monero)
2015-10-26 17:57:56 +02:00
Riccardo Spagni db68eca0de
Merge pull request #442
43bca0d blockchain_utilities: new blockchain_dump diagnostic tool (moneromooo-monero)
5f397e4 Add functions to iterate through blocks, txes, outputs, key images (moneromooo-monero)
0a5a5e8 db_bdb: record numbers for recno databases start at 1 (moneromooo-monero)
50dfdc0 db_bdb: DB_KEYEMPTY is also not found for non-top recon fields (moneromooo-monero)
572780e blockchain_db: use the DNE exceptions where appropriate (moneromooo-monero)
2015-10-26 17:56:55 +02:00
moneromooo-monero 06c65cb0ef
rpc: fix hard_fork_info RPC
I had never tested it, obviously
2015-10-26 10:17:48 +00:00
moneromooo-monero 6f5c129c92
rpc: fix a few commands not working as command line
The method name to the "json_rpc" commands are names, not part
of URLs.
2015-10-26 10:17:03 +00:00
moneromooo-monero 9caf52bf5a
daemon: add a status command
Displays current block height and target, net hash, hard fork
basic info, and connections.
Useful as a basic user friendly "what's going on here" command.
2015-10-25 21:36:46 +00:00
moneromooo-monero ecbb732faa
Fix leak on real output when using a very recent output
The wallet and the daemon applied different height considerations
when selecting outputs to use. This can leak information on which
input in a ring signature is the real one.

Found and originally fixed by smooth on Aeon.
2015-10-25 16:34:57 +00:00
moneromooo-monero 43bca0d2f7
blockchain_utilities: new blockchain_dump diagnostic tool
It dumps data from the blockchain to a JSON format, and is
intended to help detect differences between data held in
different database formats.
2015-10-25 12:36:16 +00:00
moneromooo-monero 5f397e4412
Add functions to iterate through blocks, txes, outputs, key images 2015-10-25 12:36:11 +00:00
moneromooo-monero 0a5a5e8597
db_bdb: record numbers for recno databases start at 1 2015-10-25 12:36:06 +00:00
moneromooo-monero 50dfdc057a
db_bdb: DB_KEYEMPTY is also not found for non-top recon fields 2015-10-25 12:35:59 +00:00
moneromooo-monero 572780e335
blockchain_db: use the DNE exceptions where appropriate 2015-10-25 12:35:52 +00:00
moneromooo-monero 6376627530
hardfork: switch voting to block minor version
Using major version would cause older daemons to reject those
blocks as they fail to deserialize blocks with a major version
which is not 1. There is no such restriction on the minor
version, so switching allows older daemons to coexist with
newer ones till the actual fork date, when most will hopefully
have updated already.

Also, for the same reason, we consider a vote for 0 to be a
vote for 1, since older daemons set minor version to 0.
2015-10-21 19:21:14 +01:00
moneromooo-monero b13e7f284b
blockchain_export can now export to a blocks.dat format
Also make the number of blocks endian independant, and add
support for testnet
2015-10-17 00:11:26 +01:00
moneromooo-monero 11db442a6c
bootstrap_file: do not try to create a directory with an empty name
This will happen if the chosen output file does not have a
path specified
2015-10-17 00:11:20 +01:00
moneromooo-monero 03bc6100de
hardfork: use DB transactions when reorganizing
It speeds up a lot, which can be significant when reorganizing
from the genesis block to create the hard fork data.
2015-10-17 00:11:13 +01:00
moneromooo-monero 439c4555e9
hardfork: simplify work done on reload
There is no need to fully recalculate and rewrite state, just
refill state from the DB.
2015-10-17 00:11:06 +01:00
Riccardo Spagni e6d2460263
Merge pull request #432
5ea2f93 wallet2: really include non canonical outputs in dust sweep (moneromooo-monero)
2015-10-15 19:36:02 +02:00
Riccardo Spagni eef5fa446e
Merge pull request #431
253ed76 core_rpc_server: add optional json decoded tx to COMMAND_RPC_GET_TRANSACTIONS (moneromooo-monero)
ca23c0e core_rpc_server: add a getblock RPC command, and fix print_block (moneromooo-monero)
2015-10-15 19:34:55 +02:00
moneromooo-monero 1ce2621a73
simplewallet: add a check_tx_key command
It allows one to check the amount of monero sent to a particular
address in a particular transaction, given that transaction's tx key
2015-10-14 17:26:22 +01:00
moneromooo-monero 5ea2f936ae
wallet2: really include non canonical outputs in dust sweep 2015-10-14 00:58:08 +01:00
moneromooo-monero 253ed76ef4
core_rpc_server: add optional json decoded tx to COMMAND_RPC_GET_TRANSACTIONS 2015-10-13 22:11:52 +01:00
moneromooo-monero ca23c0e5c8
core_rpc_server: add a getblock RPC command, and fix print_block 2015-10-13 21:37:35 +01:00
moneromooo-monero 0f6d3aa9c7
simplewallet: hide start_mining behind --trusted-daemon
because it leaks your standard address
2015-10-12 00:04:57 +01:00
Riccardo Spagni 0fdc75b054
Merge pull request #427
df8a110 simplewallet: add a --trusted-daemon flag (moneromooo-monero)
2015-10-11 21:29:25 +02:00
moneromooo-monero df8a1105e6
simplewallet: add a --trusted-daemon flag
It allows enabling the rescan_spent command only for trusted
daemon
2015-10-11 19:45:59 +01:00
moneromooo-monero 79c95c1748
simplewallet: bump default mixin from 3 to 4
As recommended in MRL-0004
2015-10-11 13:48:18 +01:00
moneromooo-monero ac90d488e7
from hard fork 2, all outputs must be decomposed
The wallet decomposes fully as of now too.
2015-10-11 13:02:55 +01:00
moneromooo-monero 90ccad1236
from hard fork 2, claim a quantized reward in coinbase
The small leftover is carried forward
2015-10-10 12:28:44 +01:00
moneromooo-monero 22b15704b6
cryptonote_format_utils: add a function to tell if an amount is canonical 2015-10-10 12:28:37 +01:00
Riccardo Spagni 5b47019cf4
Merge pull request #420
ee27559 Update to compile with latest miniupnpc (warptangent)
2015-10-06 10:51:34 +02:00
Riccardo Spagni 2ce54a0d3e
Merge pull request #415
180bcde build: default to Berkeley DB for 32 bit and ARM (moneromooo-monero)
791d8cb db_bdb: fix hard fork keys (moneromooo-monero)
2015-10-06 10:50:26 +02:00
warptangent ee27559724
Update to compile with latest miniupnpc
upnpDiscover() takes a new argument for TTL.
Use the suggested default of 2.
2015-10-05 17:07:52 -07:00
moneromooo-monero 180bcde866
build: default to Berkeley DB for 32 bit and ARM 2015-10-04 19:01:56 +01:00
moneromooo-monero 791d8cb038
db_bdb: fix hard fork keys
Berkeley DB requires RECNO keys to be 32 bits, and forbids a key
value of 0.
2015-10-04 19:00:37 +01:00
moneromooo-monero cec92c4fd3
hardfork: move an assert so it actually works
An unsigned quantity is always >= 0
2015-10-04 12:55:49 +01:00
Riccardo Spagni 1e7fc9c093
Merge pull request #410
33affd2 blockchain: on hardfork 2, require mixin 2 at least if possible (moneromooo-monero)
434e0f4 hardfork: make the voting window a week (moneromooo-monero)
0a7421b hardfork: rescan speedup (moneromooo-monero)
fec98b8 hardfork: remove use of GNU extension for initializing object (moneromooo-monero)
4bbf944 blockchain: on hardfork 2, allow miners to claim less money than allowed (moneromooo-monero)
088bc56 hardfork: change window semantics to not count the newly added block (moneromooo-monero)
198f557 blockchain: use different hard fork settings for testnet and mainnet (moneromooo-monero)
2015-09-28 10:09:28 +02:00
Riccardo Spagni 419d70eb1f
Merge pull request #409
151c32d dns_utils: fix wrong asserts (moneromooo-monero)
2015-09-28 10:09:01 +02:00
moneromooo-monero 33affd2d17
blockchain: on hardfork 2, require mixin 2 at least if possible 2015-09-27 22:46:53 +01:00
moneromooo-monero 434e0f42e7
hardfork: make the voting window a week 2015-09-27 22:46:47 +01:00
moneromooo-monero 0a7421b607
hardfork: rescan speedup
Add a block height before which version 1 is assumed
Use DB transactions
2015-09-27 22:46:41 +01:00
moneromooo-monero fec98b8952
hardfork: remove use of GNU extension for initializing object 2015-09-27 22:46:36 +01:00
moneromooo-monero 4bbf944df0
blockchain: on hardfork 2, allow miners to claim less money than allowed
So they can avoid dust if they so wish
2015-09-27 22:46:30 +01:00
moneromooo-monero 088bc56d79
hardfork: change window semantics to not count the newly added block
This allows knowing the hard fork a block must obey in order to be
added to the blockchain. The previous semantics would use that new
block's version vote to determine this hard fork, which made it
impossible to use the rules to validate transactions entering the
tx pool (and made it impossible to validate a block before adding
it to the blockchain).
2015-09-27 22:46:25 +01:00
moneromooo-monero 198f557d38
blockchain: use different hard fork settings for testnet and mainnet 2015-09-27 22:46:13 +01:00
moneromooo-monero 151c32d5c4
dns_utils: fix wrong asserts
Braino.
2015-09-27 17:42:32 +01:00
moneromooo-monero 5b11a89a76
hardfork: most state now saved to the DB
There will be a delay on first load of an existing blockchain
as it gets reparsed for this state data.
2015-09-20 18:42:52 +01:00
moneromooo-monero 0a54c3a553
hardfork: remove the "parts are copyright cryptonote" notices
I coded the whole thing from scratch.
2015-09-20 10:05:15 +01:00
moneromooo-monero e546f3724a
Add an RPC call and daemon command to get info on hard fork voting 2015-09-19 16:47:48 +01:00
moneromooo-monero d06713199e
blockchain: force a hardfork recalculation at load time
Since the state isn't actually saved anywhere, as the archive
code isn't called in the new DB version.
2015-09-19 16:47:42 +01:00
moneromooo-monero a7177610b3
core: add consts where appropriate 2015-09-19 16:47:35 +01:00
moneromooo-monero 8ffc508cef
core: moan when we think an update is needed to get latest hard fork info 2015-09-13 18:09:57 +01:00
moneromooo-monero f85498422d
blockchain: use the new hardfork class 2015-09-12 11:15:53 +01:00
moneromooo-monero 62b1f74116
New hardfork class
This keeps track of voting via block version, in order to decide
when to enable a particular fork's code.
2015-09-12 11:14:44 +01:00
moneromooo-monero bed9a44e56
blockchain: add a couple missing includes 2015-09-12 11:14:34 +01:00
Riccardo Spagni cf88e4dd24
Merge pull request #394
3c10239 unbound: use the mini event fallback implementation (moneromooo-monero)
4e138a0 dns_utils: remove unnecessary string conversion (moneromooo-monero)
f928468 dns_utils: factor the fetching code for different DNS record types (moneromooo-monero)
4ef0da1 dns_utils: simplify string handling and fix leak (moneromooo-monero)
ae5f28c dns_utils: add a const where possible (moneromooo-monero)
f43d465 dns_utils: lock access to the singleton (moneromooo-monero)
5990344 dns: make ctor private (moneromooo-monero)
2015-08-30 16:30:35 +02:00
moneromooo-monero 4e138a02df
dns_utils: remove unnecessary string conversion 2015-08-30 15:04:18 +01:00
moneromooo-monero f928468b9b
dns_utils: factor the fetching code for different DNS record types 2015-08-30 15:04:09 +01:00
moneromooo-monero 4ef0da184d
dns_utils: simplify string handling and fix leak 2015-08-30 15:03:59 +01:00
moneromooo-monero ae5f28cb51
dns_utils: add a const where possible 2015-08-27 21:08:55 +01:00
moneromooo-monero f43d465da2
dns_utils: lock access to the singleton
This avoids races which could result in two objects being created
2015-08-27 21:08:03 +01:00
moneromooo-monero 5990344cb0
dns: make ctor private
This ensures one can't instanciate a DNSResolver object by
mistake, but uses the singleton. A separate create static
function is added for cases where a new object is explicitely
needed.
2015-08-27 21:06:09 +01:00
Javier Smooth b19456dc6d Re-enable optimized slow-hash if someone is trying to compile w/MSVC (disabling it was unintentional) 2015-08-26 10:30:22 -07:00
Riccardo Spagni a1af0feb06
Merge pull request #390
5dc53c2 wallet: use mutex protected random generation api (moneromooo-monero)
2015-08-26 19:24:09 +02:00
Riccardo Spagni 41e2323ddc
Merge pull request #388
813e758 blockchain: remove obsolete call to libc srand (moneromooo-monero)
2015-08-26 19:23:42 +02:00
moneromooo-monero 5dc53c2cb0
wallet: use mutex protected random generation api 2015-08-26 08:28:58 +01:00
moneromooo-monero 813e758b62
blockchain: remove obsolete call to libc srand
crypto::rand is now used for output selection
2015-08-24 21:58:19 +01:00
moneromooo-monero e20a3ae011
simplewallet: add a store-tx-keys option to set
To enable storing tx keys in the (now encrypted) wallet cache.
2015-08-24 21:52:34 +01:00
moneromooo-monero d91eb8c7b4
wallet: only return tx keys via RPC if requested
To get the tx keys returned via RPC, set the "get_tx_key" or
"get_tx_keys" request field to true (defaults to false).
2015-08-24 17:36:44 +01:00
Riccardo Spagni 32077d3810
Merge pull request #385
0a4bc84 Added ref10 shen_ed25519_ref code, which includes code that can replace crypto-ops with a version straight from Bernstein's ref 10 (ShenNoether)
0d70fdc revert to 776b4fc91a (ShenNoether)
b01f286 Added shen_ed25519_ref to crypto ops subfolder, the point is to directly have bitmonero's crypto code come from bernstein et al's ref 10 code (ShenNoether)
2015-08-24 19:21:31 +02:00
Riccardo Spagni 6b7be9f89b
Merge pull request #383
3b5330e use correct unsigned type (roman)
59cc92b removed some gcc warnings. mainly unused variables. (roman)
2015-08-24 19:21:04 +02:00
Riccardo Spagni c24a7e8fc0
Merge pull request #381
f197599 wallet: encrypt the cache file (moneromooo-monero)
98c76a3 chacha8: add a key generation variant that take a pointer and size (moneromooo-monero)
2015-08-24 19:20:36 +02:00
ShenNoether 0a4bc84b2f Added ref10 shen_ed25519_ref code, which includes code that can replace crypto-ops with a version straight from Bernstein's ref 10 2015-08-23 14:48:50 -06:00
ShenNoether 0d70fdca8c revert to 776b4fc91a 2015-08-23 14:46:44 -06:00
ShenNoether b01f286473 Added shen_ed25519_ref to crypto ops subfolder, the point is to directly have bitmonero's crypto code come from bernstein et al's ref 10 code 2015-08-23 14:18:59 -06:00
roman 3b5330e895 use correct unsigned type 2015-08-23 21:10:24 +02:00
roman 59cc92b388 removed some gcc warnings. mainly unused variables. 2015-08-23 17:59:24 +02:00
moneromooo-monero f19759992c
wallet: encrypt the cache file
It contains private data, such as a record of transactions.
The key is derived from the view and spend secret keys.

The encryption currently is one shot, so may require a lot of
memory for large wallet caches.
2015-08-22 21:04:50 +01:00
moneromooo-monero 98c76a388c
chacha8: add a key generation variant that take a pointer and size 2015-08-22 17:41:03 +01:00
moneromooo-monero 6c995710d8
make tx keys available to the user
They are also stored in the cache file, to be retrieved using
a new get_tx_key command.
2015-08-19 21:11:48 +01:00
Riccardo Spagni 49df0e6f50
Merge pull request #378
7c4d6f1 simplewallet: Use default log file name when executable's file path is unknown (warptangent)
b5b0f08 epee: Don't set log file name when process path name isn't found (warptangent)
2015-08-17 10:21:34 +02:00
warptangent 7c4d6f1dc6
simplewallet: Use default log file name when executable's file path is unknown
Default to "simplewallet.log" in current directory when file path isn't
obtained from epee.

In this situation previously, it defaulted to the file name of ".log"
("" + ".log") in the current directory.
(Thanks to @sammy007 for reporting bug.)

An earlier version yet used "" + "/" + ".log" = "/.log", which resulted
in silently not logging in most cases, due to lack of permission.

Test:
  PATH=$PATH:</path/to/simplewallet/folder> && simplewallet --wallet-file /dev/null

This results in epee not finding the executable's file path, so
simplewallet will now use a default log filename.
2015-08-16 18:52:54 -07:00
moneromooo-monero 378d004b37
blockchain: mark two places where the new code differs from the old
And I'd like a comment from tewinget or someone else
2015-08-15 18:46:19 +01:00
moneromooo-monero 73d42a75d4
blockchain: update cumulative size after block addition
Block addition can fail, and the old code would not update the
cumulative size in that case.
2015-08-15 18:44:56 +01:00
moneromooo-monero 4a443775e8
blockchain: remove dead code 2015-08-15 18:44:31 +01:00
moneromooo-monero 3f9089a767
blockchain: do not try to add a tx the pool when it was nor taken out
This is an unintended difference from the old code. Though I don't
think it can actually happen in practice with the current take_tx
implementation.
2015-08-15 18:42:29 +01:00
moneromooo-monero 769d5ef0e6
blockchain: fix off by 1 in timestamp median calculations
The height function apparently used to return the index of
the last block, rather than the height of the chain. This now
seems to be incorrect, judging the the code, so we remove the
now wrong comment, as well as a couple +/- 1 adjustments
which now cause the median calculation to differ from the
original blockchain_storage version.
2015-08-15 12:37:23 +01:00
Riccardo Spagni f7c27f81af
Merge pull request #376
7424cfc net_node: Use DNS resolver singleton (warptangent)
2015-08-15 10:59:00 +02:00
warptangent 7424cfc7b8
net_node: Use DNS resolver singleton
Each thread can use the same resolver.
2015-08-14 21:05:43 -07:00
warptangent 471e8a3195
blockchain_import: Add --input-file option
This option specifies the input file path for importing.

The default remains <data-dir>/export/blockchain.raw
2015-08-14 15:00:34 -07:00
warptangent 3ffda6eefb
blockchain_import: Updates for naming consistency 2015-08-14 15:00:18 -07:00
Riccardo Spagni b064bad315
Merge pull request #374
97c5faa blockchain_export: Add --output-file argument (warptangent)
2015-08-14 21:59:35 +02:00
warptangent 97c5faa0b6
blockchain_export: Add --output-file argument
This option will export to the specified file path.

The default file path remains <data-dir>/export/blockchain.raw
2015-08-14 12:46:08 -07:00
moneromooo-monero dde4dbb977
doc: hammer the fact that the raw file isn't blockchain.bin 2015-08-14 09:53:57 +01:00
Riccardo Spagni 7792255968
Merge pull request #369
d87a2d2 core_rpc_server: replace vector<bool> with vector<int> in RPC (moneromooo-monero)
2015-08-13 20:04:31 +02:00
Riccardo Spagni 90fc005946
Merge pull request #368
7764cd7 net_node: skimplify rate limit code, and log as appropriate (moneromooo-monero)
2015-08-13 20:04:06 +02:00
Riccardo Spagni 9564dcab48
Merge pull request #367
e7b00ab core_rpc_server: find transactions in the pool as well as the blockchain (moneromooo-monero)
2015-08-13 20:03:34 +02:00
moneromooo-monero d87a2d2bb2
core_rpc_server: replace vector<bool> with vector<int> in RPC
vector<bool> causes issues in serialization with Boost 1.56
2015-08-13 16:33:28 +01:00
moneromooo-monero 7764cd7006
net_node: skimplify rate limit code, and log as appropriate 2015-08-11 20:32:48 +01:00
moneromooo-monero aa5bc351d4
wallet: new rescan_spent command to update outputs' spent status
This obsoletes the need for a lengthy blockchain rescan when
a transaction doesn't end up in the chain after being accepted
by the daemon, or any other reason why the wallet's idea of
spent and unspent outputs gets out of sync from the blockchain's.
2015-08-11 15:55:08 +01:00
moneromooo-monero e7b00abfaa
core_rpc_server: find transactions in the pool as well as the blockchain 2015-08-11 15:54:19 +01:00
moneromooo-monero e63b854967
blockchain_db: match tx addition semantics to original code
The original code removed key images from a tx from the blockchain
when an non to-key nor gen input was found in that tx. Additionally,
the remainder of the tx data was added to the blockchain only after
the double spend check passed.
2015-08-11 11:11:17 +01:00
moneromooo-monero 83bbea4c7f
Add a is_key_image_spent daemon command and RPC call 2015-08-11 10:52:41 +01:00
moneromooo-monero 35abef1b92
blockchain: remove dead code 2015-08-11 10:48:51 +01:00
Riccardo Spagni b210b304a3
Merge pull request #364
533acc3 blockchain_db: store key images for tx without outputs too (moneromooo-monero)
2015-08-10 20:05:12 +02:00
Riccardo Spagni 09cada45c4
Merge pull request #363
4f19e68 blockchain: factor get_num_outpouts(amount) calls (moneromooo-monero)
275894c blockchain: always select random outs using triangular distribution (moneromooo-monero)
2015-08-10 20:04:32 +02:00
Riccardo Spagni 5c87469fd1
Merge pull request #362
2634307 daemon: omit extra set of <> in error message (moneromooo-monero)
0822933 daemon: print a decoded tx in print_tx (moneromooo-monero)
1d678b1 daemon: fix print_tx not find transactions (moneromooo-monero)
2015-08-10 20:03:21 +02:00
Riccardo Spagni ef15e909f5
Merge pull request #361
a2d7a5f encrypted payment ids are now 64 bit, instead of 256 bit (moneromooo-monero)
e40cfc4 Encrypted payment IDs (moneromooo-monero)
2015-08-10 20:02:38 +02:00
moneromooo-monero 533acc30ed
blockchain_db: store key images for tx without outputs too 2015-08-09 19:26:36 +01:00
moneromooo-monero 4f19e68476
blockchain: factor get_num_outpouts(amount) calls
It has to stay constant as we get the blockchain lock for the
entire function. Avoids some unnecessary DB accesses.
2015-08-09 18:14:30 +01:00
moneromooo-monero 275894cdef
blockchain: always select random outs using triangular distribution
It was only used by the older blockchain_storage.
We also move the code to the calling blockchain level, to avoid
replicating the code in every DB implementation. This also makes
the get_random_out method obsolete, and we delete it.
2015-08-09 18:07:44 +01:00
moneromooo-monero 2634307863
daemon: omit extra set of <> in error message
The string conversion already adds them
2015-08-09 16:28:13 +01:00
moneromooo-monero 0822933524
daemon: print a decoded tx in print_tx
in addition to the raw hex representation
2015-08-09 16:25:05 +01:00
moneromooo-monero 1d678b1ee2
daemon: fix print_tx not find transactions
It was not even trying to
2015-08-09 15:48:02 +01:00
moneromooo-monero a2d7a5fb49
encrypted payment ids are now 64 bit, instead of 256 bit
Pros:
 - smaller on the blockchain
 - shorter integrated addresses

Cons:
 - less sparseness
 - less ability to embed actual information

The boolean argument to encrypt payment ids is now gone from the
RPC calls, since the decision is made based on the length of the
payment id passed.
2015-08-09 10:13:51 +01:00
moneromooo-monero e40cfc4e29
Encrypted payment IDs
A payment ID may be encrypted using the tx secret key and the
receiver's public view key. The receiver can decrypt it with
the tx public key and the receiver's secret view key.

Using integrated addresses now cause the payment IDs to be
encrypted. Payment IDs used manually are not encrypted by default,
but can be encrypted using the new 'encrypt_payment_id' field
in the transfer and transfer_split RPC calls. It is not possible
to use an encrypted payment ID by specifying a manual simplewallet
transfer/transfer_new command, though this is just a limitation
due to input parsing.
2015-08-09 10:13:41 +01:00
warptangent 525bf5811f
Fix estimation of batch storage size when no blocks exist
If there's no blocks in database (m_height == 0):
  Don't assign incorrect block range to check.
  Skip average block size check.

Test:

Run blockchain_converter with an existing source blockchain.bin and
a non-existent LMDB destination database.

The converter creates a BlockchainLMDB instance with zero height, due to
not being initialized with a genesis block, normally done by
Blockchain::init(). While different than the behavior of bitmonerod,
blockchain_import, and blockchain_export, the initialization hasn't been
strictly necessary.

The db batch size estimation normally uses an average block size, or a
default minimum block size, whichever is greater. In this case, as
there's no existing blocks to check for an average block size, the
default should be used.
2015-08-04 17:11:30 -07:00
moneromooo-monero 1e23b7a11d
wallet: set watch-only flag to false when creating a new wallet 2015-08-04 09:34:10 +01:00
Riccardo Spagni 1d1a77bf9c
slight modification to wordlist contributor tagline (as these contributors haven't used git to submit a PR, so we're creating the wordlist on their behalf 2015-07-24 07:55:16 +02:00
Riccardo Spagni ef7671a807 added Russian wordlist 2015-07-24 07:54:03 +02:00
Riccardo Spagni ee94ecb721
Merge pull request #348
988fe1f wallet: new transaction construction algorithm (moneromooo-monero)
2015-07-24 07:44:39 +02:00
David Vorick a49d917b26 change unique_prefix_length=4 for japanese.h
I ran some tests, and all prefixes seem to be unique for len(3)
2015-07-23 20:11:05 -04:00
Riccardo Spagni 6d6a985c92
add Germany and Italian wordlists 2015-07-22 22:00:06 +02:00
moneromooo-monero 988fe1f843
wallet: new transaction construction algorithm
It should avoid a lot of the issues sending more than half the
wallet's contents due to change.

Actual output selection is still random. Changing this would
improve the matching of transaction amounts to output sizes,
but may have non obvious effects on blockchain analysis.

Mapped to the new transfer_new command in simplewallet, and
transfer uses the existing algorithm.

To use in RPC, add "new_algorithm: true" in the transfer_split
JSON command. It is not used in the transfer command.
2015-07-22 19:24:30 +01:00
Riccardo Spagni 514047dc7b
fix portuguese wordlist 2015-07-22 20:08:13 +02:00
Riccardo Spagni b5c0308cd0
fix license on English wordlist 2015-07-22 20:03:03 +02:00
moneromooo-monero 35378f1995
simplewallet: fix context/string order mismatch 2015-07-19 12:05:42 +01:00
moneromooo-monero e62692f589
simplewallet: use unsigned long long instead of size_t in message
boost doesn't support %zu for size_t, and the previous change
to %u could technically lose bits (though it would require splitting
a transfer into 4 billion transactions, which seems unlikely).
2015-07-19 11:55:36 +01:00
moneromooo-monero 8fe180ab80
wallet: add boolean to always confirm transactions with the user
This can be useful if you want to be given a veto over the tx fee,
or if you want to see what a tx fee would be without actually sending.
2015-07-18 22:11:53 +01:00
Riccardo Spagni 7ef8e5c033
Merge pull request #345
3c13da5 boost doesn't like %zu for size_t, replace with %u (moneromooo-monero)
2015-07-18 23:02:52 +02:00
Riccardo Spagni 5a26676932
Merge pull request #343
e20a4dd blockchain: fix testnet syncing (to not use blocks.dat) (moneromooo-monero)
2015-07-18 22:59:02 +02:00
moneromooo-monero 3c13da568d
boost doesn't like %zu for size_t, replace with %u 2015-07-18 21:52:35 +01:00
moneromooo-monero e20a4ddc76
blockchain: fix testnet syncing (to not use blocks.dat)
These are mainnet blocks, and would cause syncing on testnet to
reject all incoming blocks.
2015-07-18 10:25:22 +01:00
NoodleDoodleNoodleDoodleNoodleDoodleNoo 70ae2ee711 Fixed threadpool bug when running on single core systems.
*Thanks to freshman for reporting bug.
2015-07-17 20:02:29 -07:00
warptangent 71793ef43f Add batch support to BlockchainLMDB::get_output_key
This allows blockchain_import to work with batch and verify modes enabled
(the default).
2015-07-16 00:36:26 -07:00
NoodleDoodleNoodleDoodleNoodleDoodleNoo 94ea3e8ed2 Removed on_idle() calls to Blockchain::store_blockchain() for lmdb.
Added option to cache tx-input verification results.
2015-07-15 23:20:25 -07:00
NoodleDoodleNoodleDoodleNoodleDoodleNoo 2e293a563e Fixed binary size issue due to embedded checkpoint data.
Fixed OSX compilation issues due to random lmdb resize points.
Fixed infinite loop bug when calling core::get_block_template(..).
2015-07-15 23:20:20 -07:00
NoodleDoodleNoodleDoodleNoodleDoodleNoo 2b2ae36724 Pause miner before preparing for incoming blocks 2015-07-15 23:20:18 -07:00
NoodleDoodleNoodleDoodleNoodleDoodleNoo e5d2680094 ** CHANGES ARE EXPERIMENTAL (FOR TESTING ONLY)
Bockchain:
1. Optim: Multi-thread long-hash computation when encountering groups of blocks.
2. Optim: Cache verified txs and return result from cache instead of re-checking whenever possible.
3. Optim: Preload output-keys when encoutering groups of blocks. Sort by amount and global-index before bulk querying database and multi-thread when possible.
4. Optim: Disable double spend check on block verification, double spend is already detected when trying to add blocks.
5. Optim: Multi-thread signature computation whenever possible.
6. Patch: Disable locking (recursive mutex) on called functions from check_tx_inputs which causes slowdowns (only seems to happen on ubuntu/VMs??? Reason: TBD)
7. Optim: Removed looped full-tx hash computation when retrieving transactions from pool (???).
8. Optim: Cache difficulty/timestamps (735 blocks) for next-difficulty calculations so that only 2 db reads per new block is needed when a new block arrives (instead of 1470 reads).

Berkeley-DB:
1. Fix: 32-bit data errors causing wrong output global indices and failure to send blocks to peers (etc).
2. Fix: Unable to pop blocks on reorganize due to transaction errors.
3. Patch: Large number of transaction aborts when running multi-threaded bulk queries.
4. Patch: Insufficient locks error when running full sync.
5. Patch: Incorrect db stats when returning from an immediate exit from "pop block" operation.
6. Optim: Add bulk queries to get output global indices.
7. Optim: Modified output_keys table to store public_key+unlock_time+height for single transaction lookup (vs 3)
8. Optim: Used output_keys table retrieve public_keys instead of going through output_amounts->output_txs+output_indices->txs->output:public_key
9. Optim: Added thread-safe buffers used when multi-threading bulk queries.
10. Optim: Added support for nosync/write_nosync options for improved performance (*see --db-sync-mode option for details)
11. Mod: Added checkpoint thread and auto-remove-logs option.
12. *Now usable on 32-bit systems like RPI2.

LMDB:
1. Optim: Added custom comparison for 256-bit key tables (minor speed-up, TBD: get actual effect)
2. Optim: Modified output_keys table to store public_key+unlock_time+height for single transaction lookup (vs 3)
3. Optim: Used output_keys table retrieve public_keys instead of going through output_amounts->output_txs+output_indices->txs->output:public_key
4. Optim: Added support for sync/writemap options for improved performance (*see --db-sync-mode option for details)
5. Mod: Auto resize to +1GB instead of multiplier x1.5

ETC:
1. Minor optimizations for slow-hash for ARM (RPI2). Incomplete.
2. Fix: 32-bit saturation bug when computing next difficulty on large blocks.

[PENDING ISSUES]
1. Berkely db has a very slow "pop-block" operation. This is very noticeable on the RPI2 as it sometimes takes > 10 MINUTES to pop a block during reorganization.
   This does not happen very often however, most reorgs seem to take a few seconds but it possibly depends on the number of outputs present. TBD.
2. Berkeley db, possible bug "unable to allocate memory". TBD.

[NEW OPTIONS] (*Currently all enabled for testing purposes)
1. --fast-block-sync arg=[0:1] (default: 1)
	a. 0 = Compute long hash per block (may take a while depending on CPU)
	b. 1 = Skip long-hash and verify blocks based on embedded known good block hashes (faster, minimal CPU dependence)
2. --db-sync-mode arg=[[safe|fast|fastest]:[sync|async]:[nblocks_per_sync]] (default: fastest:async:1000)
	a. safe = fdatasync/fsync (or equivalent) per stored block. Very slow, but safest option to protect against power-out/crash conditions.
	b. fast/fastest = Enables asynchronous fdatasync/fsync (or equivalent). Useful for battery operated devices or STABLE systems with UPS and/or systems with battery backed write cache/solid state cache.
	Fast    - Write meta-data but defer data flush.
	Fastest - Defer meta-data and data flush.
	Sync    - Flush data after nblocks_per_sync and wait.
	Async   - Flush data after nblocks_per_sync but do not wait for the operation to finish.
3. --prep-blocks-threads arg=[n] (default: 4 or system max threads, whichever is lower)
        Max number of threads to use when computing long-hash in groups.
4. --show-time-stats arg=[0:1] (default: 1)
	Show benchmark related time stats.
5. --db-auto-remove-logs arg=[0:1] (default: 1)
	For berkeley-db only. Auto remove logs if enabled.

**Note: lmdb and berkeley-db have changes to the tables and are not compatible with official git head version.
	At the moment, you need a full resync to use this optimized version.

[PERFORMANCE COMPARISON]
**Some figures are approximations only.
Using a baseline machine of an i7-2600K+SSD+(with full pow computation):
1. The optimized lmdb/blockhain core can process blocks up to 585K for ~1.25 hours + download time, so it usually takes 2.5 hours to sync the full chain.
2. The current head with memory can process blocks up to 585K for ~4.2 hours + download time, so it usually takes 5.5 hours to sync the full chain.
3. The current head with lmdb can process blocks up to 585K for ~32 hours + download time and usually takes 36 hours to sync the full chain.

Averate procesing times (with full pow computation):
lmdb-optimized:
1. tx_ave = 2.5 ms / tx
2. block_ave = 5.87 ms / block
memory-official-repo:
1. tx_ave = 8.85 ms / tx
2. block_ave = 19.68 ms / block
lmdb-official-repo (0f4a036437)
1. tx_ave = 47.8 ms / tx
2. block_ave = 64.2 ms / block

**Note: The following data denotes processing times only (does not include p2p download time)
lmdb-optimized processing times (with full pow computation):
1. Desktop,  Quad-core / 8-threads 2600k  (8Mb) - 1.25 hours processing time (--db-sync-mode=fastest:async:1000).
2. Laptop,   Dual-core / 4-threads U4200  (3Mb) - 4.90 hours processing time (--db-sync-mode=fastest:async:1000).
3. Embedded, Quad-core / 4-threads Z3735F (2x1Mb) - 12.0 hours processing time (--db-sync-mode=fastest:async:1000).

lmdb-optimized processing times (with per-block-checkpoint)
1. Desktop,  Quad-core / 8-threads 2600k  (8Mb) - 10 minutes processing time (--db-sync-mode=fastest:async:1000).

berkeley-db optimized processing times (with full pow computation)
1. Desktop, Quad-core / 8-threads 2600k  (8Mb) - 1.8 hours processing time (--db-sync-mode=fastest:async:1000).
2. RPI2. Improved from estimated 3 months(???) into 2.5 days (*Need 2AMP supply + Clock:1Ghz + [usb+ssd] to achieve this speed) (--db-sync-mode=fastest:async:1000).

berkeley-db optimized processing times (with per-block-checkpoint)
1. RPI2. 12-15 hours (*Need 2AMP supply + Clock:1Ghz + [usb+ssd] to achieve this speed) (--db-sync-mode=fastest:async:1000).
2015-07-15 23:20:16 -07:00
NoodleDoodleNoodleDoodleNoodleDoodleNoo 1f83444d3d Update blockchain.cpp
Fix compilation error
2015-07-15 23:20:15 -07:00
NoodleDoodleNoodleDoodleNoodleDoodleNoo 3381fd69a8 Update db_bdb.cpp
- bugfix: prevent re-entering db->get when current buffer contains all possible index values.
2015-07-15 23:20:13 -07:00
NoodleDoodleNoodleDoodleNoodleDoodleNoo dbbc457836 Update db_bdb.cpp 2015-07-15 23:20:12 -07:00
NoodleDoodleNoodleDoodleNoodleDoodleNoo 4b7ad2b0a7 Update db_bdb.cpp 2015-07-15 23:20:10 -07:00
NoodleDoodleNoodleDoodleNoodleDoodleNoo da1d3c01de
Experimental BDB workaround optimizations 2015-07-15 21:13:42 -07:00
Riccardo Spagni b4849310dc
Merge pull request #336
ea58576 Add missing file - i18n.cpp (moneromooo-monero)
2015-07-15 01:08:07 +02:00
moneromooo-monero ea58576cf6
Add missing file - i18n.cpp 2015-07-15 00:01:05 +01:00
Riccardo Spagni ad841cb1b9
Merge pull request #335
78b2eab Translatable strings for simplewallet (moneromooo-monero)
2015-07-15 00:54:21 +02:00
Riccardo Spagni 9688e6fdd8
Merge pull request #334
fd73d9c Check and resize if needed at batch transaction start (warptangent)
f9e4afd blockchain_utilities: Increase debug statement's log level (warptangent)
699e4b3 blockchain_utilities: Pass expected number of blocks when starting batch (warptangent)
6e170c8 Optionally allow DB to know expected number of blocks at batch transaction start (warptangent)
2015-07-15 00:53:45 +02:00
moneromooo-monero 78b2eabc87 Translatable strings for simplewallet
The system is mostly the Qt system, but we don't use Qt to avoid
the dependencies.

See README.i18n for details.
2015-07-14 20:28:25 +01:00
warptangent fd73d9cc3a
Check and resize if needed at batch transaction start
This currently only affects blockchain_import and blockchain_converter.

When the number of blocks expected for the batch transaction is
provided, make an estimate of the DB space needed. If not enough free
space remains, resize the DB.

The estimate is made based on:
- the average size of the last 500 blocks, or if larger, a min. block
  size of 4k
- a factor for the expanded size a block occupies in the DB across the
  sub-dbs/tables
- a safety factor (1.7) to allow for a "reasonable" average block size
  increase over the batch

Increase the DB size by whichever is greater: the estimated size needed
or a minimum increase size, currently 128 MB.

The conservative factors in the estimate help in testing that the resize
occurs when needed, and without gratuitous size increases. For common
use, the safety factor and minimum increase size could reasonably be
increased.

For testing, setting DEFAULT_MAPSIZE (blockchain_db/lmdb/db_lmdb.h) to 1
<< 27 (128 MB) and recompiling will ensure DB resizes take place sooner
and more frequently.
2015-07-12 00:51:39 -07:00
warptangent f9e4afd52a
blockchain_utilities: Increase debug statement's log level 2015-07-11 23:54:16 -07:00
warptangent 699e4b3f65
blockchain_utilities: Pass expected number of blocks when starting batch 2015-07-11 23:54:14 -07:00
warptangent 6e170c8b78
Optionally allow DB to know expected number of blocks at batch transaction start
This will assist in a DB resize check.
2015-07-11 23:54:12 -07:00
NoodleDoodleNoodleDoodleNoodleDoodleNoo 5d304cabfd Fix loop bug when calling core::get_block_template, causing calling thread to lock up. 2015-07-10 22:09:21 -07:00
moneromooo-monero 369c7b32f8
blockchain_utilities/README.md: add workaround for resizing in batch mode 2015-07-07 19:06:34 +01:00
moneromooo-monero 26970c7e27 blockchain_utilities/README.md: add high level "what is this about" 2015-07-07 18:50:43 +01:00
Wladimir J. van der Laan 204759f111
mnemonics: fix duplicate symbol error 2015-06-23 09:28:52 +02:00
moneromooo-monero ea33cadebf
mnemonics: fix prefix extraction with non ASCII text 2015-06-21 11:28:45 +01:00
Riccardo Spagni 1720affbd6
Merge pull request #325
3ade396 Set dnssec_valid value correctly in dns_utils; fix address_from_url test (Rostislav)
2015-06-20 22:41:30 +02:00
Riccardo Spagni 4790db9d04
Merge pull request #324
dc4dbc1 simplewallet: allow creating a wallet from a public address and view secret key (moneromooo-monero)
6a0f61d account: allow creating an account from a public address and view secret key (moneromooo-monero)
e05a58a wallet2: fix write_watch_only_wallet comment description (moneromooo-monero)
4bf6f0d simplewallet: forbid seed commands for watch only wallets (moneromooo-monero)
2015-06-20 22:40:47 +02:00
Rostislav 3ade396406 Set dnssec_valid value correctly in dns_utils; fix address_from_url test 2015-06-20 20:02:13 +00:00
moneromooo-monero dc4dbc1ceb
simplewallet: allow creating a wallet from a public address and view secret key
The needed information is supplied via a triple:

--generate-from-view-key address:viewkey:filename
2015-06-20 17:33:14 +01:00
moneromooo-monero 6a0f61d800
account: allow creating an account from a public address and view secret key 2015-06-20 17:33:06 +01:00
moneromooo-monero e05a58aead
wallet2: fix write_watch_only_wallet comment description 2015-06-20 12:30:31 +01:00
moneromooo-monero 4bf6f0d57a
simplewallet: forbid seed commands for watch only wallets
They do not make sense
2015-06-20 12:27:23 +01:00
moneromooo-monero 2952ffd80f
wallet2: use the same exponential splitting for normal txes 2015-06-17 22:00:04 +01:00
moneromooo-monero 7c8d3be656
wallet2: try to split dust sweep txs exponentially
This ensures even massive wallets full of dust can sweep.
2015-06-17 21:31:16 +01:00
moneromooo-monero f6da25a32e
Fix standard address deserialization 2015-06-16 15:36:20 +01:00
Riccardo Spagni 2d9d6c7621
Merge pull request #321
bbc5475 Fix DNS checkpoint consensus code (moneromooo-monero)
2015-06-14 13:10:18 +02:00
Riccardo Spagni 1595187ae2
Merge pull request #320
f9b361b daemon: fix an exit crash (moneromooo-monero)
2015-06-14 13:09:53 +02:00
Riccardo Spagni 66a5c9e50f
Merge pull request #318
fb20071 simplewallet: allow a different password for the watch-only wallet (moneromooo-monero)
2015-06-14 13:09:16 +02:00
moneromooo-monero bbc5475418
Fix DNS checkpoint consensus code
It's supposed to load all records and pick one that it finds twice.
2015-06-14 11:05:57 +01:00
moneromooo-monero f9b361be8a
daemon: fix an exit crash 2015-06-14 00:31:09 +01:00
moneromooo-monero 6f8a6dcb6c Add RPC commands to manipulate integrated addresses 2015-06-13 16:08:00 +01:00
moneromooo-monero 67be2e4b3a
simplewallet: allow integrated_address to generate a random payment id 2015-06-12 16:49:01 +01:00
moneromooo-monero 7bd6efe313
account: add a couple consts 2015-06-12 16:48:52 +01:00
moneromooo-monero 63741d8264
Integrated addresses (standard address plus payment id) 2015-06-12 16:48:41 +01:00
moneromooo-monero fb2007181e
simplewallet: allow a different password for the watch-only wallet 2015-06-12 16:45:29 +01:00
Riccardo Spagni d6ba5ef8c5
Merge pull request #312
a9b1f7e dns_utils: simpify smart pointer use, and use for url strings too (moneromooo-monero)
2015-06-11 10:28:22 +02:00
Riccardo Spagni 1b25e8dfc5
Merge pull request #311
d7df08d properly decrement p2p socket count (Thomas Winget)
2015-06-11 10:27:58 +02:00
Riccardo Spagni f89cf1df87
Merge pull request #308
35b160e fix ^D exit for bitmonerod (moneromooo-monero)
2015-06-11 10:27:36 +02:00
Riccardo Spagni 5bee2d2edf
Merge pull request #303
c882af6 wallet: add watch only wallet support (moneromooo-monero)
f7767c6 account: add a forget_spend_key method (moneromooo-monero)
2015-06-11 10:27:00 +02:00
moneromooo-monero a9b1f7eb05
dns_utils: simpify smart pointer use, and use for url strings too
OK, I admit I wanted to template this struct for fun too.
2015-06-07 16:58:49 +01:00
Thomas Winget d7df08d6ec
properly decrement p2p socket count 2015-06-06 13:24:33 -04:00
moneromooo-monero 35b160edea
fix ^D exit for bitmonerod
It uses the async console handler differently than simplewallet,
and wasn't running the same exit code, causing it to never actually
exit after breaking out of the console entry loop.
2015-06-03 22:43:35 +01:00
moneromooo-monero c882af63c1
wallet: add watch only wallet support
The new save_watch_only saves a copy of the keys file without the
spend key. It can then be given away to be used as a normal keys
file, but with no spend ability.
2015-05-31 15:34:55 +01:00
moneromooo-monero f7767c6508
account: add a forget_spend_key method 2015-05-31 15:32:54 +01:00
Riccardo Spagni e01d32e52d
cleaning up, removing redundant files, renaming, fixing incorrect licenses 2015-05-31 13:40:18 +02:00
moneromooo-monero a62daebba5
wallet_rpc_server: add a sweep_dust RPC command as well 2015-05-30 21:48:05 +01:00
moneromooo-monero 3204f0d536
wallet: add a sweep_dust command
Sends all the dust to your own wallet. May fail (if the fee required
is more than the dust total). May end up paying most of the dust in fees.
Unlocked dust total is now also displayed in "balance".
2015-05-30 21:47:56 +01:00
Riccardo Spagni 6aee052001
Merge pull request #297
5680604 Replace hardcoded value with existing constant of same value (warptangent)
f37ee2f Update database resize behavior (warptangent)
f85cd8e Include database error in more error messages (warptangent)
2015-05-30 22:32:23 +02:00
Riccardo Spagni 26fac96c5d
Merge pull request #294
693a8bf rpc_command_executor: fix mining in testnet mode (moneromooo-monero)
d09be11 core_rpc_server: add a getter for the testnet flag (moneromooo-monero)
754f863 core_rpc_server: log some error messages to the console (moneromooo-monero)
4f0e8cf daemon: remove obsolete daemon_commands_handler.h (moneromooo-monero)
bac366e core_rpc_server: reenable print_pl (moneromooo-monero)
39a9508 net_peerlist: fix grayt/white naming mismatch (moneromooo-monero)
8069b3b blockchain_db: add a few const (moneromooo-monero)
0932476 wallet: add consts where appropriate (moneromooo-monero)
2015-05-30 22:31:31 +02:00
warptangent 5680604437
Replace hardcoded value with existing constant of same value
This was likely the intent.
2015-05-30 09:27:54 -07:00
warptangent f37ee2f304
Update database resize behavior
On an existing database, don't set LMDB map size to be the initial size
for a new database.

Check if resize is needed at startup.
2015-05-30 09:27:49 -07:00
warptangent f85cd8e10b
Include database error in more error messages 2015-05-30 09:27:44 -07:00
moneromooo-monero 693a8bf7b1
rpc_command_executor: fix mining in testnet mode 2015-05-28 23:14:58 +01:00
moneromooo-monero d09be116c6
core_rpc_server: add a getter for the testnet flag 2015-05-28 23:14:37 +01:00
moneromooo-monero 754f863a7e
core_rpc_server: log some error messages to the console
It's helpful when you don't know something failed (especially as
everything ends up returning true, so caller thinks all's fine)
2015-05-28 23:13:32 +01:00
moneromooo-monero 4f0e8cfa92
daemon: remove obsolete daemon_commands_handler.h 2015-05-28 14:10:46 +01:00
moneromooo-monero bac366e173
core_rpc_server: reenable print_pl 2015-05-28 14:10:39 +01:00
moneromooo-monero 39a9508a20
net_peerlist: fix grayt/white naming mismatch
Looking at how these are called confirms this must have been a mistake
2015-05-28 14:10:26 +01:00
warptangent 10ff75e92e
daemon: Set log file default to use data dir
The log file previously used the default data dir even if --data-dir was
set to something else.

Document data dir and log file path.
2015-05-28 03:52:19 -07:00
warptangent deacecc15e
simplewallet: Update and add log options
Replace --set_log with --log-level for consistency.

Show default log level in usage.

Add --log-file for specifying log file path.

Document log file path.

Display log file path at startup.
2015-05-28 03:52:08 -07:00
warptangent f24bcd5199
simplewallet: Don't log view key and spend key
As with display of seed, don't log view key and spend key.
Includes:
- display of viewkey at wallet creation
- "viewkey" command output
- "spendkey" command output
2015-05-28 01:32:49 -07:00
moneromooo-monero 8069b3ba7f
blockchain_db: add a few const 2015-05-27 19:16:37 +01:00
moneromooo-monero 09324764c0
wallet: add consts where appropriate
because const is always appropriate
2015-05-27 19:16:22 +01:00
Riccardo Spagni 8cd6072090
Merge pull request #292
c44755a Build seed node list without duplicates (warptangent)
2015-05-26 10:45:20 +02:00
Riccardo Spagni e042fad317
Merge pull request #291
6962253 Fix compile for GCC 5.1.0 (warptangent)
2015-05-26 10:45:01 +02:00
Riccardo Spagni 634e367ff5
Merge pull request #289
01076ae Check if LMDB needs resize every 1000 blocks (Thomas Winget)
b0d849e null out batch txn pointer as needed (BlockchainLMDB) (Thomas Winget)
7b7ef73 LMDB should now dynamically resize the mapsize (Thomas Winget)
ac79502 Move mdb_txn_safe implementation to cpp file (Thomas Winget)
2015-05-26 10:44:48 +02:00
warptangent 696225321f
Fix compile for GCC 5.1.0
Add fix for compile error with multiple uses of peerid_type (uint64_t)
variable in lambda expression.
- known GCC issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65843

epee: replace return value of nullptr for expected boolean with false.

Fixes #231.
2015-05-25 22:18:36 -07:00
warptangent c44755a5e2
Build seed node list without duplicates
The random selection of a node shouldn't favor repeats that occur in the
hardcoded and DNS seed node lists.

Remove hardcoded ":18080" address which gives parse error.

Test: bitmonerod --log-level 2

The seed node list displayed at startup shouldn't show duplicate
addresses (includes port).
2015-05-25 22:11:44 -07:00
Riccardo Spagni 6f15194049
Merge pull request #290
fee8424 Allow name@domain.tld for OpenAlias lookups (warptangent)
a0fe18f Revert "Allow name@domain.tld for OpenAlias lookups" (warptangent)
2015-05-20 14:36:38 +02:00
Riccardo Spagni 38068d07ca
Merge pull request #288
f278fe3 s/terget/target/ (moneromooo-monero)
d8ee0a9 print limits when running limit commands with no arguments (moneromooo-monero)
2015-05-20 14:36:07 +02:00
Riccardo Spagni 2939361d72
Merge pull request #287
d1eac1b Support debugging command --pop-blocks on in-memory blockchain (warptangent)
2015-05-20 14:35:50 +02:00
Riccardo Spagni 53ac50733a
Merge pull request #285
087d7f3 Add spendkey dump to simplewallet (luigi1111)
2015-05-20 14:34:29 +02:00
luigi1111 087d7f33e7 Add spendkey dump to simplewallet 2015-05-19 19:08:37 -05:00