Commit Graph

203 Commits

Author SHA1 Message Date
wowario 805781957a
silent no incoming connections warning 2019-06-23 12:01:44 +03:00
moneromooo-monero 6755e0d7f3
p2p: propagate out peers limit to payload handler 2019-06-23 08:04:26 +03:00
moneromooo-monero d46fb70930
p2p: close the right number of connections on setting max in/out peers 2019-06-23 08:04:17 +03:00
fuwa 7af9353936
allow system libminiupnp, revert #6b8539 2019-05-17 04:20:23 +03:00
wowario a140780405
initial commit 2019-05-17 04:19:20 +03:00
moneromooo-monero 28a7d31565
p2p: do not send last_seen timestamp to peers
This can be used for fingerprinting and working out the
network topology.

Instead of sending the first N (which are sorted by last
seen time), we sent a random subset of the first N+N/5,
which ensures reasonably recent peers are used, while
preventing repeated calls from deducing new entries are
peers the target node just connected to.

The list is also randomly shuffled so the original set of
timestamps cannot be approximated.
2019-04-24 17:56:12 +00:00
Riccardo Spagni 8d16e92dcb
Merge pull request #5425
58585986 p2p: fix integer overflow in host bans (moneromooo-monero)
2019-04-16 22:38:56 +02:00
moneromooo-monero 5858598604
p2p: fix integer overflow in host bans 2019-04-11 21:59:27 +00:00
stoffu a2195b9b7f
crypto: replace rand<T>()%N idiom with unbiased rand_idx(N) 2019-04-04 22:38:19 +09:00
Riccardo Spagni 6e0242f861
Merge pull request #5334
19f8089f p2p: don't lookup seed nodes when offline (moneromooo-monero)
2019-04-01 17:37:01 +02:00
moneromooo-monero 19f8089fca
p2p: don't lookup seed nodes when offline
This will cause DNS requests, which will block and timeout
if there is really no network connectivity
2019-03-22 15:47:48 +00:00
rbrunner7 85f2f8c933 Fix daemon startup parameter '--limit-rate' processing after parameter defaults 2019-03-20 16:40:59 +01:00
Riccardo Spagni bf0f85221b
Merge pull request #5195
a54e81e5 daemon: add '--no-sync' arg to optionally disable blockchain sync (xiphon)
2019-03-19 10:57:28 +02:00
Riccardo Spagni 848591c4d8
Merge pull request #5190
551104fb daemon: add --public-node mode, RPC port propagation over P2P (xiphon)
2019-03-17 17:56:04 +02:00
binaryFate 1f2930ce0b Update 2019 copyright 2019-03-05 22:05:34 +01:00
moneromooo-monero ceb72be329
p2p: avoid busy loop when we have nothing to connect to 2019-03-05 12:00:45 +00:00
xiphon a54e81e572 daemon: add '--no-sync' arg to optionally disable blockchain sync 2019-02-25 03:22:14 +00:00
xiphon 551104fbf1 daemon: add --public-node mode, RPC port propagation over P2P 2019-02-25 02:40:23 +03:00
moneromooo-monero 2456945408
epee: add SSL support
RPC connections now have optional tranparent SSL.

An optional private key and certificate file can be passed,
using the --{rpc,daemon}-ssl-private-key and
--{rpc,daemon}-ssl-certificate options. Those have as
argument a path to a PEM format private private key and
certificate, respectively.
If not given, a temporary self signed certificate will be used.

SSL can be enabled or disabled using --{rpc}-ssl, which
accepts autodetect (default), disabled or enabled.

Access can be restricted to particular certificates using the
--rpc-ssl-allowed-certificates, which takes a list of
paths to PEM encoded certificates. This can allow a wallet to
connect to only the daemon they think they're connected to,
by forcing SSL and listing the paths to the known good
certificates.

To generate long term certificates:

openssl genrsa -out /tmp/KEY 4096
openssl req -new -key /tmp/KEY -out /tmp/REQ
openssl x509 -req -days 999999 -sha256 -in /tmp/REQ -signkey /tmp/KEY -out /tmp/CERT

/tmp/KEY is the private key, and /tmp/CERT is the certificate,
both in PEM format. /tmp/REQ can be removed. Adjust the last
command to set expiration date, etc, as needed. It doesn't
make a whole lot of sense for monero anyway, since most servers
will run with one time temporary self signed certificates anyway.

SSL support is transparent, so all communication is done on the
existing ports, with SSL autodetection. This means you can start
using an SSL daemon now, but you should not enforce SSL yet or
nothing will talk to you.
2019-02-02 20:05:33 +00:00
Lee Clagett 973403bc9f Adding initial support for broadcasting transactions over Tor
- Support for ".onion" in --add-exclusive-node and --add-peer
  - Add --anonymizing-proxy for outbound Tor connections
  - Add --anonymous-inbounds for inbound Tor connections
  - Support for sharing ".onion" addresses over Tor connections
  - Support for broadcasting transactions received over RPC exclusively
    over Tor (else broadcast over public IP when Tor not enabled).
2019-01-28 23:56:33 +00:00
moneromooo-monero b750fb27b0
Pruning
The blockchain prunes seven eighths of prunable tx data.
This saves about two thirds of the blockchain size, while
keeping the node useful as a sync source for an eighth
of the blockchain.

No other data is currently pruned.

There are three ways to prune a blockchain:

- run monerod with --prune-blockchain
- run "prune_blockchain" in the monerod console
- run the monero-blockchain-prune utility

The first two will prune in place. Due to how LMDB works, this
will not reduce the blockchain size on disk. Instead, it will
mark parts of the file as free, so that future data will use
that free space, causing the file to not grow until free space
grows scarce.

The third way will create a second database, a pruned copy of
the original one. Since this is a new file, this one will be
smaller than the original one.

Once the database is pruned, it will stay pruned as it syncs.
That is, there is no need to use --prune-blockchain again, etc.
2019-01-22 20:30:51 +00:00
Riccardo Spagni e59813c3d7
Merge pull request #5029
d1b3990d p2p: don't stop the idle thread when no gray peers are found (moneromooo-monero)
2019-01-16 21:39:19 +02:00
Riccardo Spagni 3e9bb9626a
Merge pull request #5001
a5ffc2d5 Remove boost::lexical_cast for uuid and unused uuid function (Lee Clagett)
2019-01-16 19:27:13 +02:00
Riccardo Spagni 846362842c
Merge pull request #4976
85665003 epee: better network buffer data structure (moneromooo-monero)
2019-01-16 19:04:22 +02:00
moneromooo-monero d1b3990d40
p2p: don't stop the idle thread when no gray peers are found 2018-12-30 19:32:38 +00:00
moneromooo-monero 85665003a7
epee: better network buffer data structure
avoids pointless allocs and memcpy
2018-12-23 16:46:07 +00:00
Lee Clagett a5ffc2d5ad Remove boost::lexical_cast for uuid and unused uuid function 2018-12-23 11:11:30 +00:00
moneromooo-monero 570dd3690e
p2p: use vector instead of list for peer lists 2018-12-07 13:20:34 +00:00
moneromooo-monero 14a5c2068f
p2p: tone down "no incoming connections" warning to info if in peers is 0
Also add an info if not offline, since it weakens the network
2018-11-01 16:43:06 +00:00
Riccardo Spagni ecc690a613
Merge pull request #4612
2d48861d p2p: only deinitialize what's been initialized in offline mode (moneromooo-monero)
2018-10-26 22:38:03 +02:00
moneromooo-monero 2d48861db7
p2p: only deinitialize what's been initialized in offline mode 2018-10-16 09:20:05 +00:00
moneromooo-monero 0fbbb065d4
p2p: a negative result from UPNP_GetValidIGD is an error
as per the source documentation
2018-10-15 22:41:00 +00:00
moneromooo-monero 76d6d832d2
Revert "p2p: connect via the bound ip, if any"
This reverts commit 909398efc7.

It looks like it's causing trouble with tor on some setups
2018-10-13 10:20:04 +00:00
luigi1111 b586ae1310
Merge pull request #4089
909398e p2p: connect via the bound ip, if any (moneromooo-monero)
2018-08-15 17:06:17 -05:00
luigi1111 025187e6c9
Merge pull request #3854
149da42 db_lmdb: enable batch transactions by default (stoffu)
34cb6b4 add --regtest and --fixed-difficulty for regression testing (vicsn)
9e1403e update get_info RPC and bump RPC version (vicsn)
207b66e first new functional tests (vicsn)
2018-07-19 13:35:25 -05:00
moneromooo-monero 909398efc7
p2p: connect via the bound ip, if any 2018-07-02 18:06:04 +01:00
victorsintnicolaas 34cb6b4b70 add --regtest and --fixed-difficulty for regression testing
on_generateblocks RPC call combines functionality from the on_getblocktemplate and on_submitblock RPC calls to allow rapid block creation. Difficulty is set permanently to 1 for regtest.
Makes use of FAKECHAIN network type, but takes hard fork heights from mainchain
Default reserve_size in generate_blocks RPC call is now 1. If it is 0, the following error occurs 'Failed to calculate offset for'.
Queries hard fork heights info of other network types
2018-06-29 10:06:11 +02:00
luigi1111 3ad4ecd4ff
Merge pull request #3982
08b85a8 cryptonote_config: add get_config to refactor x = testnet ? config::testnet::X : stagenet ? config::stagenet::X : config::X (stoffu)
0cf80ba net_node: resolve host for node addresses given via command line flags (stoffu)
2018-06-27 15:38:23 -05:00
luigi1111 cb130c7590
Merge pull request #3861
de1ffe0 p2p: warn when no incoming connections are seen for a while (moneromooo-monero)
2018-06-19 12:56:31 -05:00
stoffu 0cf80baea4
net_node: resolve host for node addresses given via command line flags 2018-06-11 20:17:13 +09:00
stoffu 08b85a8e00
cryptonote_config: add get_config to refactor x = testnet ? config::testnet::X : stagenet ? config::stagenet::X : config::X 2018-06-11 20:17:02 +09:00
moneromooo-monero de1ffe07b1
p2p: warn when no incoming connections are seen for a while 2018-05-26 14:37:07 +01:00
moneromooo-monero 1590183965
p2p: fix fallback seed node usage
Those were added to the seed nodes list even when they had already
been added. Moreover, the current index was not reset after they
were added, typically causing previous seeds to be used, and some
of those fallback seeds to not be tried.
2018-04-29 14:58:42 +01:00
anonimal 6b85398031
Build: update CMake and p2p for in-tree miniupnp
(cherry picked from commit a7366b5feeffaeb65b217b2d6f138e0ab1c90192)
2018-04-21 09:43:23 +00:00
anonimal 859db52fda
CMake: update new location of in-tree miniupnpc
(cherry picked from commit b16a282f97d8f6c967e8a0b1ecfd75110f095182)
2018-04-19 10:56:09 +00:00
stoffu 5f6647934b
p2p: correct port number for seed nodes 2018-03-22 14:56:35 +09:00
moneromooo-monero 523371c042
p2p: fix network ID being uninitialised when using exclusive peers 2018-03-13 11:20:49 +00:00
stoffu af773211cb
Stagenet 2018-03-05 11:55:05 +09:00
whythat 1d28c0d8a9 p2p: restore m_testnet assignment lost during rebase 2018-02-18 17:09:39 +02:00
whythat 05a12ccc2d options: remove testnet-* options 2018-02-16 22:32:01 +02:00