Commit graph

935 commits

Author SHA1 Message Date
Riccardo Spagni
350e67c103
Merge pull request #499
410c6cf cn_deserialize: a new tool to decode blocks and transactions (moneromooo-monero)
2015-11-24 23:03:16 +02:00
Riccardo Spagni
1408a20be3
Merge pull request #498
3d0b3c5 add recent static checkpoint (Javier Smooth)
2015-11-24 23:02:41 +02:00
Riccardo Spagni
8ff2313f96
Merge pull request #497
9b945f5 wallet: make the refresh optimizations selectable via command line (moneromooo-monero)
d2c0313 wallet: speedup refresh from daemon (moneromooo-monero)
ea707c7 wallet2: minor cleanup (moneromooo-monero)
55a2da7 wallet2: speedup refresh a bit (moneromooo-monero)
2015-11-24 23:01:56 +02:00
moneromooo-monero
d887c18e33
hardfork: fix more major/minor issues
Also add some more tests, and rename some instances of
"version" and "add" for clarity.

NOTE: the starting height values are sometimes wrong.
I suspect this is due to the hard fork reorg code being
buggy, since they're good when syncing after the fact.
However, they're not actually used by the consensus code,
so I'm ignoring this for now, but this needs debugging.
2015-11-24 20:47:12 +00:00
moneromooo-monero
3b47ca2d7d
hardfork: fix rescan on load 2015-11-23 21:12:55 +00:00
Javier Smooth
4cea2b13b2 Add IP blocking for misbehaving nodes (adapted from Boolberry)
With minor cleanup and fixes (spelling, indent) by moneromooo
2015-11-23 18:06:20 +00:00
Javier Smooth
9c64b12320 quiet down p2p logging a bit 2015-11-23 17:20:47 +00:00
moneromooo-monero
53c75ab4a0
blockchain: log versions as numbers, not characters 2015-11-23 15:53:59 +00:00
moneromooo-monero
edade8dc81
hardfork: fix actual/voting confusion 2015-11-23 14:04:33 +00:00
moneromooo-monero
06c8b94925
daemon: fix blockchain height display not updating after sync 2015-11-23 13:16:05 +00:00
moneromooo-monero
410c6cf3bd
cn_deserialize: a new tool to decode blocks and transactions 2015-11-22 21:52:14 +00:00
Javier Smooth
3d0b3c5018 add recent static checkpoint 2015-11-22 13:32:19 -08:00
moneromooo-monero
9b945f5211
wallet: make the refresh optimizations selectable via command line
Take the opportunity to add a no-coinbase case too, for even faster
sync when an address is known to never have mined to.
2015-11-22 19:03:10 +00:00
Riccardo Spagni
263cc48c48
Merge pull request #495
328636c fixed testnet fork point, added comment data back in (Riccardo Spagni)
aed3038 disable time-stats by default, tweak fast-block-sync description (Riccardo Spagni)
8fe1111 update v2 testnet fork height (Riccardo Spagni)
4d74510 checkpoints update (Riccardo Spagni)
2015-11-22 20:43:35 +02:00
moneromooo-monero
d2c031332e
wallet: speedup refresh from daemon
Assume the whole of a coinbase goes to the same address (so that
if the first output isn't for us, none of it is), and only look
for payment id when we received something in the transaction.
2015-11-22 18:07:19 +00:00
moneromooo-monero
ea707c779c
wallet2: minor cleanup
- use std::vector::std::deque to not leak when exceptions happen
- use std::unique_ptr instead of the deprecated std::auto_ptr
2015-11-22 18:07:14 +00:00
moneromooo-monero
55a2da7475
wallet2: speedup refresh a bit
Use the NoodleDoodle threading technique to speedup a couple
code blocks on the main path when refreshing blocks without
any transactions for us.
2015-11-22 18:07:07 +00:00
Riccardo Spagni
328636cdb3
fixed testnet fork point, added comment data back in 2015-11-22 19:40:38 +02:00
Riccardo Spagni
72a348e734
Merge pull request #496
db1fb66 wallet: storing outgoing tx info now defaults to enabled (moneromooo-monero)
9156ba3 wallet: rename store-tx-keys to store-tx-info (moneromooo-monero)
b3d4d41 wallet: improve show_transfers (moneromooo-monero)
725ae4e wallet: use incoming blocks to keep track of payments too (moneromooo-monero)
00790a8 simplewallet: lessen display flicker confusion (moneromooo-monero)
2015-11-22 16:47:14 +02:00
moneromooo-monero
db1fb66e66
wallet: storing outgoing tx info now defaults to enabled
The info is stored encrypted, and is pretty useful, often after
the fact.
2015-11-22 12:40:03 +00:00
moneromooo-monero
9156ba3a3c
wallet: rename store-tx-keys to store-tx-info
With backward compatibility
2015-11-22 12:26:27 +00:00
moneromooo-monero
b3d4d41e29
wallet: improve show_transfers
More information is now saved and displayed
2015-11-22 12:13:59 +00:00
moneromooo-monero
725ae4e710
wallet: use incoming blocks to keep track of payments too 2015-11-21 23:22:15 +00:00
Riccardo Spagni
aed3038b75
disable time-stats by default, tweak fast-block-sync description 2015-11-21 15:57:23 +02:00
Riccardo Spagni
8fe1111b5b
update v2 testnet fork height 2015-11-21 15:36:13 +02:00
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