Commit Graph
100 Commits
Author SHA1 Message Date
moneromooo-monero 3b8b4be5cb tx_pool: drop invalid txes from the pool on startup
instead of just failing

This is a workaround for bad tx blobs being inserted in the
pool for unknown reasons
2017-09-20 18:55:16 +01:00
moneromooo-monero e457aa51f4 blockchain: fix crash checking pre-validated txids 2017-09-20 10:46:13 +01:00
moneromooo-monero 9aeae7a224 db_lmdb: fix use of uninitialized key in for_blocks_range 2017-09-19 14:11:24 +01:00
moneromooo-monero 9443eec10f core: guard against exceptions in tx verification worker threads 2017-09-12 12:07:10 +01:00
moneromooo-monero 55b91d8605 wallet: fix --help and --version erroring out 2017-09-10 14:12:32 +01:00
moneromooo-monero a9845cc344 rpc: get_txpool_backlog is now unrestricted 2017-09-08 23:47:11 +01:00
moneromooo-monero 2b363e104f README.md: add instructions to fix core pattern 2017-09-08 18:41:27 +01:00
moneromooo-monero dbfef643ed tx_pool: catch exceptions in LockedTXN dtor
This might prevent some calls to terminate when the LockedTXN
dtor is called as part of stack unwinding caused by another
exception in the first place.
2017-09-04 10:18:38 +01:00
moneromooo-monero 6ac61100a1 Add a --fluffy-blocks option to relay blocks as fluffy blocks
Defaults to off, but fluffy blocks are forced enabled on testnet
2017-09-03 11:11:11 +01:00
moneromooo-monero 4e0e4e9942 blockchain_import: warn for chunks over 500000, not 100000
We have a lot of 350000 byte blocks now.
2017-09-01 22:48:33 +01:00
moneromooo-monero 5b29e87f85 blockchain_import: properly cleanup core/db on exit 2017-09-01 11:59:24 +01:00
moneromooo-monero e167c4d9a1 blockchain_import: do not error out on truncated files
This will happen often when downloading from a live file
2017-09-01 11:58:51 +01:00
moneromooo-monero e72e625eb1 tx_pool: wrap tx meta updates in a LockedTXN 2017-08-29 16:35:19 +01:00
moneromooo-monero adce8ae466 simplewallet: new "fee" command to display fee information
including expected transaction backlog at different priorities
2017-08-29 16:28:18 +01:00
moneromooo-monero c867357adc cryptonote_protocol: error handling on cleanup_handle_incoming_blocks 2017-08-29 16:11:39 +01:00
moneromooo-monero ce901fcb31 Fix blockchain_import wedge on exception in cleanup_handle_incoming_blocks 2017-08-29 15:43:32 +01:00
moneromooo-monero 84fa015e77 core: guard against exceptions in handle_incoming_{block,tx}
When one happens, cleanup must be called or the incoming tx
lock will stay locked
2017-08-29 13:01:45 +01:00
moneromooo-monero a95e460c71 move db specific options to BlockchainDB
Avoids common depending on blockchain_db, which can cause
link errors.
2017-08-29 11:43:34 +01:00
moneromooo-monero 63d8dddc0a cryptonote_protocol: remove old spans when received as old blocks
fixes getting those in a loop
2017-08-28 00:42:58 +01:00
moneromooo-monero 5807529e69 blockchain: cap memory size of retrieved blocks
It helps keep memory usage down when a wallet refreshes through
a string of large blocks
2017-08-26 20:53:58 +01:00
moneromooo-monero c1b10381fc rpc: decrease memory usage a bit in getblocks.bin 2017-08-26 20:53:54 +01:00
moneromooo-monero f906d87e66 wallet: new option to check/confirm txpool backlog when sending 2017-08-26 17:16:30 +01:00
moneromooo-monero 19393115dc daemon: fix backlog estimating at max block size
Block size will pretty much never be fully used, unless all txes
are using max fee.
2017-08-26 17:11:40 +01:00
moneromooo-monero 55bec1f03d rpc: add a new RPC to get current txpool backlog (sizes and fees) 2017-08-26 16:23:31 +01:00
moneromooo-monero 2e338ca574 wallet2: account for huge testnet reorgs for estimating height 2017-08-25 11:03:51 +01:00
moneromooo-monero df0cffede0 cryptonote_protocol: warn if we see a higher top version we expect 2017-08-23 13:38:18 +01:00
moneromooo-monero 317ab21a03 cryptonote_protocol: less strict check on top version on connect
This allows peers who synced past a fork on the wrong height
to reorg to the right chain after they updated their software
to include the new version.
2017-08-23 13:38:15 +01:00
moneromooo-monero cc81a37155 cryptonote_protocol: update target height when syncing too 2017-08-23 13:38:13 +01:00
moneromooo-monero e2ad372b87 cryptonote_protocol: simplify and remove unnecessary casts 2017-08-23 13:38:10 +01:00
moneromooo-monero 727e67cada cryptonote_protocol: print peer top height along with its version 2017-08-23 13:38:06 +01:00
moneromooo-monero b5345ef4f0 crypto: use malloc instead of alloca 2017-08-23 13:38:03 +01:00
moneromooo-monero 80794b3114 thread_group: set thread size to THREAD_STACK_SIZE 2017-08-23 13:38:00 +01:00
moneromooo-monero 5524bc3151 print peer id in 0 padded hex for consistency 2017-08-23 13:37:56 +01:00
moneromooo-monero e3c4395ab7 p2p: init hashes after deserializing a network address
Fixes multiple connections to the same address
2017-08-23 13:32:02 +01:00
moneromooo-monero 679a5ab85b daemon: print estimated tx backlog in print_pool_stats 2017-08-23 12:12:06 +01:00
moneromooo-monero 64ab88446a rpc_client: print destination host/port when failing to connect 2017-08-22 12:00:37 +01:00
moneromooo-monero 333f70120c http_client: add getters for host and port 2017-08-22 12:00:21 +01:00
moneromooo-monero 8f8cc09ba1 contrib: add sync_info to rlwrap command set 2017-08-22 11:40:41 +01:00
moneromooo-monero 70b8c6d77a cryptonote_protocol: misc fixes to the new sync algorithm
Fix sync wedge corner case:
It could happen if a connection went into standby mode, while
it was the one which had requested the next span, and that span
was still waiting for the data, and that peer is not on the
main chain. Other peers can then start asking for that data
again and again, but never get it as only that forked peer does.

And various other fixes
2017-08-21 21:57:19 +01:00
moneromooo-monero 5d989b661a core: add mainnet v6 fork height at 1400000 2017-08-18 10:03:49 +01:00
moneromooo-monero 5a283078ec cryptonote_protocol: large block sync size before v4 2017-08-17 13:11:52 +01:00
moneromooo-monero 7b74760756 cryptonote_protocol: kick idle synchronizing peers
In case they dropped off downloading for any reason, they'll get
sent to download again.
2017-08-16 22:24:50 +01:00
moneromooo-monero ef005f5e72 p2p: add a couple early outs when the stop signal is received
This avoids quicker exit
2017-08-16 15:44:52 +01:00
moneromooo-monero 80d361c795 abstract_tcp_server2: improve tracking/cancelling of early connections
We don't actually need to keep them past the call to start, as this
adds them to the config object list, and so they'll then be cancelled
already when the stop signal arrives. This allows removing the periodic
call to cleanup connections.
2017-08-16 15:41:34 +01:00
moneromooo-monero 42b34b3545 Consistently print peer id in hex and on 16 chars 2017-08-16 10:56:55 +01:00
moneromooo-monero 827afcb7ea protocol: pass blockchain cumulative difficulty when syncing
Not used yet.
2017-08-15 21:03:37 +01:00
moneromooo-monero cb2d5110ff Tweak net logs so we get more info on why networking can't start
This should prevent "silent" failures to start
2017-08-15 19:49:25 +01:00
moneromooo-monero 35e01a6e50 cryptonote_protocol: fix "holes" in block download schedule 2017-08-15 17:49:06 +01:00
moneromooo-monero 3da1edfde5 cryptonote_protocol: fix out of order addition
This was broken by the reorg fix, since we now have to add blocks
regardless of their starting height. We now check whether we know
the parent for the first block in the next span, or whether it was
requested. If neither, it's an orphan. If it is not known, but was
requested, we wait to get that block.
2017-08-15 16:54:08 +01:00
moneromooo-monero 6edb1b3e46 block_queue: do not add empty spans 2017-08-15 11:38:59 +01:00
moneromooo-monero cb2d5ac788 mnemonics: new Esperanto word list
Word list authored by: Engelberg, ProkhorZ
Sources:
  Baza Radikaro Oficiala
  Reta Vortaro (http://www.reta-vortaro.de/revo/)
  Esperanto Panorama - Esperanto-English Dictionary (http://www.esperanto-panorama.net/vortaro/eoen.htm)
  ESPDIC - Paul Denisowski (http://www.denisowski.org/Esperanto/ESPDIC/espdic.txt)
2017-08-14 17:46:46 +01:00
moneromooo-monero 2ec15a6931 daemon: print peers' top height in sync_info 2017-08-12 20:36:31 +01:00
moneromooo-monero c6e200a8ab core: add --db-salvage command line flag
Use to load the database when the primary meta page is corrupted
2017-08-12 19:04:44 +01:00
moneromooo-monero 8655ba04ba wallet_rpc_server: adjust small ring sizes to 5 for v6 2017-08-12 12:59:06 +01:00
moneromooo-monero 88e83f9427 cryptonote_protocol_handler: log versions as unsigned ints
They're interpreted as characters otherwise
2017-08-12 11:57:05 +01:00
moneromooo-monero 08abb670e1 protocol: fix reorgs while syncing 2017-08-12 11:22:42 +01:00
moneromooo-monero d1f204d640 miner: set thread name before logging 2017-08-12 09:07:40 +01:00
moneromooo-monero 7fdc178abb p2p: fix random peer index being too large 2017-08-11 14:29:55 +01:00
moneromooo-monero e499ff3322 simplewallet: factor out message_writer 2017-08-11 13:38:42 +01:00
moneromooo-monero 7ed5ab47ea scoped_message_writer: pause readline to match simplewallet 2017-08-11 13:38:18 +01:00
moneromooo-monero 6ce769c123 p2p: get net log spam down a bit 2017-08-10 14:30:42 +01:00
moneromooo-monero a1891ebea9 tests: fix tests build
Add get_fork_version and add_ideal_fork_version to core so
cryptonote_protocol does not have to need the Blockchain
class directly, as it's not in its dependencies, and add
those to the fake core classes in tests too.
2017-08-10 11:12:56 +01:00
moneromooo-monero 7591c528d0 p2p: fallback on seed nodes if we can't make a connection
This avoids failing to connect to the network in case all
known peers are unavailable (which can happen if the peer
list is small).
2017-08-09 22:55:25 +01:00
moneromooo-monero 0e8d60c06c cryptonote_protocol: fix recv/send idle time before handshake 2017-08-09 21:22:05 +01:00
moneromooo-monero f90bbe2a5c cryptonote_protocol: keep target in sync with dropped connections
When a node is dropped, we stop considering its claimed blockchain
height as a factor in the target height calculation. This prevents
a runaway chain from being still thought to be the target even if
the nodes carrying it are dropped.
2017-08-09 20:49:24 +01:00
moneromooo-monero 3ff5ce63c5 connection_context: initialize state
Why this was initialized properly before I have no idea, but
it is not anymore. Fix it, which fixes syncing in release mode.
2017-08-09 19:01:27 +01:00
moneromooo-monero 635929eaca protocol: add checks for top block hard fork version
We won't even talk to a peer which claims a wrong version
for its top block. This will avoid syncing to known bad
peers in the first place.
Also add IP fails when failing to verify a block.
2017-08-09 10:28:41 +01:00
moneromooo-monero 7482253a6d epee: fixup KV_SERIALIZE_OPT to work in more cases 2017-08-09 09:30:22 +01:00
moneromooo-monero e49f6d439d net_node: fix m_in_timedsync initialization
This fixes nodes not being able to connect to nodes which use
recent code. While there, init peer_id too.
2017-08-08 17:23:02 +01:00
moneromooo-monero 7007bd1489 Change default block sync size from 200 to 20
With the new sync algorithm, the network overhead will be masked
as the thread adding blocks isn't interrupted by network calls
anymore. This should reduce memory usage a lot during sync.
2017-08-08 11:05:11 +01:00
moneromooo-monero 980e476c89 cryptonote_basic: fix silly CLANG warning about not emitting function 2017-08-08 00:33:52 +01:00
moneromooo-monero 49ffb156f0 cmake: do not use GREATER_EQUAL, it's too new 2017-08-07 21:37:13 +01:00
moneromooo-monero 61770ec2da change mixin to ring size in user visible places 2017-08-07 21:12:27 +01:00
moneromooo-monero 7f7d42f890 core: fix invalid memory access creating tx 2017-08-07 21:09:19 +01:00
moneromooo-monero 569b9b2b50 updates: add "misc_log_ex.h" for logs 2017-08-07 14:42:08 +01:00
moneromooo-monero 74628941d5 dns_utils: add <functional> for std::function 2017-08-07 14:35:41 +01:00
moneromooo-monero c93b7692b4 blockchain_import: much faster when verifying with cryptonote::core
Quick test with the first 56569 blocks from mainnet

version verify  batch   time
old     0       200     1:16
new     0       200     0:57
old     0       5000    0:53
new     0       5000    0:51
old     1       200     est > 1h
new     1       200     10:21
old     1       5000    est > 1h
new     1       5000    8:27
2017-08-07 14:32:49 +01:00
moneromooo-monero 38756d00ff core: new API to disable DNS checkpoint lookups 2017-08-07 14:31:06 +01:00
moneromooo-monero 4d87304683 blockchain: add testnet v6 fork height at 971400 2017-08-07 11:34:59 +01:00
moneromooo-monero 158c3ecff3 core: thread most of handle_incoming_tx 2017-08-07 09:33:20 +01:00
moneromooo-monero f57ee382b8 cryptonote_protocol: retry stale spans early
Connections can be dropped by the net_node layer,
unbeknownst to cryptonote_protocol, which would then
not flush any spans scheduled to that connection,
which would cause it to be only downloaded again
once it becomes the next span (possibly after a small
delay if it had been requested less than 5 seconds
ago).
2017-08-07 09:33:17 +01:00
moneromooo-monero 90df52e12f cryptonote_protocol: light cleanup 2017-08-07 09:33:14 +01:00
moneromooo-monero 84e23156ac cryptonote_protocol: avoid spurious SYNCHRONIZED OK messages 2017-08-07 09:33:09 +01:00
moneromooo-monero 5be43fcdba cryptonote_protocol_handler: sync speedup
A block queue is now placed between block download and
block processing. Blocks are now requested only from one
peer (unless starved).

Includes a new sync_info coommand.
2017-08-07 09:33:04 +01:00
moneromooo-monero 74597bd15a wallet2: improve refresh height determination
As reported by jaquee, the calculation could underflow for very
low heights.
Additionally, we now use the target height too.
2017-08-06 16:56:51 +01:00
moneromooo-monero 042b86c473 simplewallet: do not ask wallet filename twice when restoring
It's annoying and pointless (especially as it's the only thing
where the user is asked twice)
2017-08-06 12:28:00 +01:00
moneromooo-monero 51ebedb803 epee: remove a couple unused locals 2017-08-05 18:42:53 +01:00
moneromooo-monero 9707998a08 wallet2: clear some missing containers in clear() 2017-08-05 18:09:31 +01:00
moneromooo-monero 0c57df9770 wallet2: fix temporarily missing incoming tx when being mined
When scanning the txpool without having first updated the
blockchain, the tx would be seen as neither in the txpool
nor the chain, and removed, so it'd only reappear once the
chain is refreshed, and the tx seen in a block.
2017-08-05 12:36:03 +01:00
moneromooo-monero f4f7eeba80 blockchain: log more info when we reject an orphan
We want to know what happened when a block is wrongly rejected
2017-08-04 23:26:55 +01:00
moneromooo-monero 16a5534704 simplewallet: show payment ids on sign_transfer
Integrated addresses are shown when an encrypted payment id is used
2017-08-04 19:36:02 +01:00
moneromooo-monero 71e2876033 debug_utilities: only build for debug builds 2017-08-04 14:45:43 +01:00
moneromooo-monero 55e150ff8a debug_utilities: new object-sizes debug tool
It prints the size of various interesting types, to make it
easier to match leaks to possible leaked object types
2017-08-04 14:45:38 +01:00
moneromooo-monero fbaf5375c3 cn_deserialize: move to new debug_utilities subdirectory 2017-08-03 16:20:40 +01:00
moneromooo-monero d732c73e71 blockchain: remove a few unused variables 2017-08-03 11:26:55 +01:00
moneromooo-monero 328bebbe4b daemon: some more include cleanup 2017-08-02 22:43:38 +01:00
moneromooo-monero 1c9196b0c5 cryptonote_protocol: fix days behind calc on testnet 2017-08-02 22:34:02 +01:00
moneromooo-monero b7d6ec8364 simplewallet: add (out of sync) or (no daemon) markers in the prompt
Should help people who don't realize why they haven't seen their
monero yet.
2017-08-02 14:44:42 +01:00
moneromooo-monero fa23a5006d wallet2: add a is_synced function 2017-08-02 14:44:19 +01:00
moneromooo-monero f1307bbd7b node_rpc_proxy: add a proxy for target height 2017-08-02 14:43:47 +01:00