Commit Graph

803 Commits

Author SHA1 Message Date
Pedro Pombeiro 2b193de5c1 Add new bootnodes (DO and Ukr) 2018-06-05 17:18:01 +02:00
Sebastian Delgado 7581766470
Remove shh and shhext from APIModules and update tests (#993) 2018-06-04 13:13:02 -04:00
Andrea Maria Piana cd5782b3bc
Ignore malformed enodes in ClusterConfig (#1003)
We now allow the user to override bootnodes.
Only light validation is made in the app (no public key for example).
At the moment status-go panics if an enode is malformed, preventing the
user to login into their account.
This commit changes the behaviour to ignore malformed enodes.
2018-06-04 15:47:13 +02:00
Andrea Franz 4b938be856
add metrics to mailserver (#999)
* add metrics to mailserver

* sentEnvelopesSize existing sentEnvelopesSize
2018-05-30 14:31:47 +02:00
Dmitry Shulyak 5323af7da2 Fill new bootnode dht using already running bootnodes 2018-05-30 10:45:19 +03:00
Adam Babik 717d0fbadb
Fix another round of flaky tests (#996) 2018-05-29 13:24:23 +02:00
Frank Mueller c41ae530c3
Add parameter for API modules (#997) 2018-05-28 18:37:09 +02:00
Andrea Franz 098053f605
update enodes for ropsten and main clusters (#994)
* update enodes for ropsten and main clusters

* leave only 2 static nodes for ropsten and mainnet

* use different static nodes for mainnet

* specify static nodes from different hosts
2018-05-28 13:16:58 +02:00
Adam Babik b5f05b1ab5
Fix flaky TestSingleTopicDiscoveryWithFailover and others (#992)
Other changes:
* needed to patch that loop implementation in Discover V5 implementation in go-ethereum,
* fixed TestStatusNodeReconnectStaticPeers,
* fixed TestBackendAccountsConcurrently.
2018-05-26 09:37:13 +02:00
Dmitry Shulyak bc14e6faee Tolerate only one error during ntp sync
Previously we were doing 5 concurrent requests, thus it was
safe to tolerate 2 errors. With 4 it doesn't make sense to use
only 2 responses, because even if 1 of them is skewed - we will set
incorrect time.
2018-05-24 13:14:02 +03:00
Andrea Maria Piana b775261f4e Allow overriding BootNodes
We need to allow the user to specify custom BootNodes, the code has been
changed so that it will use the provided ones if passed through config
(or if they are empty). Othewise fallback on default ones.
2018-05-23 14:38:11 +02:00
Adrià Cidre 4e33dfe7bc
Fix for mail server not limiting certain messages (#981) 2018-05-22 17:51:05 +02:00
Adrià Cidre 888ad10b26
[#969] Decrease NTP sync period after first success (#977) 2018-05-22 17:38:38 +02:00
Dmitry Shulyak 345b152a8b
Heap queue stores only peers that were not added to p2p server (#979)
* Heap queue stores only peers that were not added to p2p server

The primary goal of this change is to keep whitelist of peers
that are managed by topic pool while also preventing same peer
from being selected from heap queue multiple times.
2018-05-22 16:11:21 +03:00
Adam Babik 4dfbef3867
Fix p2p/Peers metric (#975)
Do not use server.PeerCount() when getting peers right after receiving add/remove peer event as it does not contain updated info.
2018-05-22 12:26:03 +02:00
Adrià Cidre ace175ba69 Fix flaky test TestPeerPoolSimulationSuite/TestSingleTopicDiscoveryWithFailover 2018-05-22 12:34:32 +03:00
Adrià Cidre 06e64cdde2
Refactor mailserver tests (#970) 2018-05-21 13:30:37 +02:00
Adrià Cidre e9da21cf87 Rollback mailserver DataDir to previous leveldb data directory 2018-05-20 08:34:47 +03:00
Frank Mueller 7325b38ef9
Quick fix of non-responding nodes by adding 51.15.68.93 to Rinkeby static nodes (#974)
* Add 51.15.68.93 to Rinkeby static nodes

* Add 51.15.75.244 for Rinkeby too
2018-05-18 17:35:36 +02:00
Dmitry Shulyak ed1cdf0418
Custom status bootnodes (#968)
This change makes invalidation mechanism more aggressive. With a primary goal to invalidate short living nodes faster. In current setup any node that became known in terms of discovery will stay in this state until it will fail to respond to 5 queries. Removing them earlier from a table allows to reduce latency for finding required nodes.

The second change, one adds a version for discovery, separates status dht from ethereum dht.
After we rolled out discovery it became obvious that our boot nodes became spammed with irrelevant nodes. And this made discovery process very long, for example with separate dht discovery takes ~2s, with mutual dht - it can take 1m-10m and there is still no guarantee to find a max amount of peers, cause status nodes is a very small part of whole ethereum infra.

In my understanding, we don't need to be a part of ethereum dht, and lower latency is way more important for us.

Closes: #941
Partially closes: #960 (960 requires futher investigations on devices)
2018-05-18 16:43:07 +03:00
Andrea Franz 4317b8f687
add cmd/statusd-prune (#957)
add mailserver cleaner

use memstorage for leveldb in tests

avoid write if batch size is 0

add comments

add cmd/statusd-prune

rmeove batch size var in prune method

validate range values

pass only flag name to missingFlag

refactor Cleaner.prune method

update batch not to be a pointer

removed extra batch counter increment

don't increment counter if batch returns errors

add README
2018-05-17 19:24:00 +02:00
Ivan Daniluk 4b17ea1ced
Exit when extra/errorneous flags are set (#965) 2018-05-17 16:03:23 +03:00
Adrià Cidre cf8ad7e002
[#ISSUE-947/ISSUE-946] Rate limit and batch limit on any mail server query (#949) 2018-05-17 13:21:04 +02:00
Adam Babik 6da469140f
Refactor in-app metrics (#963)
Remove Prometheus and other metric types and use metrics package from go-ethereum.
2018-05-16 17:36:59 +02:00
Dmitry Shulyak ca962ddaa3 Whisper broadcast loop spams way too hard with debug level 2018-05-16 17:54:40 +03:00
Dmitry Shulyak 5aae87aba8
Prevent sending messages to flaky peers (#917) 2018-05-15 20:08:31 +03:00
Dmitry Shulyak ee60b7e727 Fix mid computation in timesource
Additionally improved test suite
2018-05-15 19:34:37 +03:00
Dmitry Shulyak f5a8be08de
Use cache in topic pool (#955)
It must have slipped when i moved significant chunk of logic
from peer pool to topic pool and because of the != nil protection
this bug was missed
2018-05-15 18:05:57 +03:00
Ivan Daniluk bd68fa15c9 Use different pool hostnames for NTP timesource (#939) (#952)
* Use different pool hostnames for NTP timesource

* Make govet happy

* Add check for empty servers list
2018-05-15 17:10:51 +03:00
Dmitry Shulyak 9e65b5a6ae Dump peer infos as discovery summary 2018-05-15 13:11:28 +03:00
Adam Babik 9268f55d7d
Prevent Discovery from timeout when registering topics (#944)
When the node registers topics, Discovery V5 should never be stopped as otherwise, no peer will be able to find the node.
2018-05-15 11:16:25 +02:00
Andrea Franz 52cdcf8f0f
wallet compatibility (#858)
* update master key generations using "Bitcoin seed" as hmac key following BIP32

* use `"mnemonic" + passphrase` as salt for pbkdf2 following BIP39

* test generated addresses and compatibility with BIP44

* check generated public keys

* test children private keys

* update MasterKey to be a constant

* don't export salt and masterKey constants

* use `crypto.FromECDSA` to get the hex representation of the priv key

* use empty pwd for the generation of the BIP39 seed, keeping pwd to encrypt keys

* add comment before the seed generation with empty passphrase
2018-05-14 19:13:56 +02:00
Adam Babik 80be64a1ec
Fix flaky TestStatusNodeReconnectStaticPeers test (#945) 2018-05-14 15:16:45 +02:00
Dmitry Shulyak 938113882a
Add cluster for ropsten/mainnet (#929) 2018-05-14 08:24:49 +03:00
Adrià Cidre 08b4d515c6
[#ISSUE-937] : Move mail server implementation to status-go repo (#942)
* [#ISSUE-937] : Move mail server implementation to status-go repo

* Applying dep-ensure
2018-05-11 21:43:07 +02:00
Igor Mandrigin d7653beedd Fix deduplicator being created with nil db. 2018-05-11 09:58:21 +02:00
Andrea Franz 6c469299b6
fix default range value for shhext_requestMessages (#934)
* fix default range value for shhext_requestMessages

* use t.Run to run scenarions

* fix case when To - 24 hours is negative
2018-05-10 16:47:54 +02:00
Igor Mandrigin a933885806 Deduplicator: add API to confirm received messages. 2018-05-10 15:28:48 +02:00
Adrià Cidre 37a58a513d [#930] : False positive e2e test fix 2018-05-10 15:18:37 +02:00
Dmitry Shulyak 375d5ec8c3
Explicitly disable discovery (#886)
* Make it possible to explicitly disable discovery

Discovery will be disabled in following cases:
- if there are not bootnodes - v5 server will be disabled
because there is no point in running it
- if user defined in config NoDiscovery=true this value will be preserved
even if we have bootnodes

So, basically discovery will be always enabled by default on mobile, unless
it is explicitly specified otherwise.

When statusd is used current behavior is that discovery is disabled by default.
I kept it in this change, but it would be better to change it.

* Fix leftovers

* Add wait group to peer pool to protect from races with p2p.Server

* Change fields only when all goroutines finished

* Turn off discovery after topic searches are stopped

* Don't set period to nil to avoid race with SearchTopic

* Close period chan only when all writers are finished
2018-05-10 14:45:51 +03:00
Andrea Franz f7dac0bcc4
add ipcfile flag to specify IPC file path (#896) 2018-05-10 01:59:05 +02:00
Igor Mandrigin 0241f95d6a Support chain diverges in block filters. 2018-05-09 18:07:26 +02:00
Ivan Danyliuk 6fec9fa653 Bump up Go version to 1.10 2018-05-09 16:13:34 +02:00
Igor Mandrigin 397bf83924 Add testcases for contract mining to the jail RPC tests. 2018-05-09 14:34:10 +02:00
Dmitry Shulyak 6c2a8ef1f9
Define shorter timeout for ntp calls (2s) and tolerate failures (#911)
* Define shorter timeout for ntp calls (2s) and tolerate failures

* Use allowed failures instead of tolerated errorss
2018-05-09 08:10:48 +03:00
Andrea Franz c673148bf4
add `-status` flag to enable the Status service (#902)
* add `-status` flag to enable the Status service

* remove status from default APIModules and add it only from statusd if specified

* remove AddAPIModule method

* allow -status flag values to be http or ipc
2018-05-08 23:57:29 +02:00
Igor Mandrigin 31cf2297d2 Implement block filters API for the RPC mode.
Some operations (like deploying contracts) require filter APIs to work.
Since these operations aren't supported on Infura anymore, and we don't
run LES, a separate implemenation of filters is required.

Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
2018-05-08 19:46:25 +02:00
Adrià Cidre 6e1fc99365
Notifier package to interact with gorush notifications (#910) 2018-05-08 16:30:03 +02:00
Dmitry Shulyak 7aa508765e Set timesource from config (#915) 2018-05-08 13:38:54 +03:00
Adam Babik b6851d8186 Run tests with race and coverage flags (#909) 2018-05-07 18:08:00 +03:00