Commit Graph

1227 Commits

Author SHA1 Message Date
Ivan Daniluk 60249e4682
Fix memleak in signal package (#1114) 2018-07-26 13:04:52 +02:00
Adam Babik f0f1b8d783
fix MailServer addresses in cluster config (#1118) 2018-07-26 11:36:04 +02:00
Adam Babik 3b8c6c8260
Add interface to verify trusted MailServers (#1112)
The goal of this PR is to add an interface to verify MailServers. In this PR, MailServers are hardcoded in status-go. The next iteration will use a smart contract.
2018-07-25 16:48:02 +02:00
Adam Babik 408ba5a7e6
Configure eth.staging fleet (#1111)
Provide a way to run a status node with a different fleet.
2018-07-25 16:03:35 +02:00
Dmitry eeca435064 Add rendezvous implementation for discovery interface
Update vendor

Integrate rendezvous into status node

Add a test with failover using rendezvous

Use multiple servers in client

Use discovery V5 by default and test that node can be started with rendezvous discovet

Fix linter

Update rendezvous client to one with instrumented stream

Address feedback

Fix test with updated topic limits

Apply several suggestions

Change log to debug for request errors because we continue execution

Remove web3js after rebase

Update rendezvous package
2018-07-25 15:10:57 +03:00
Ivan Daniluk 801053a17d
Remove jail package (#1106) 2018-07-24 12:05:21 +02:00
Adam Babik 03bf6e37a3
silence error when calculating GIT_REMOTE without develop branch (#1107) 2018-07-20 13:32:26 +02:00
Adam Babik 384567213c
fix flaky TestRequestMessageFromMailboxAsync test (#1105) 2018-07-20 08:34:38 +02:00
Andrea Maria Piana e9c3b779b9 Fix android/ios compilation (#1103) 2018-07-19 14:37:21 +02:00
Adrià Cidre 343809a36c
Mailserver discovery topic should be whispermail (#1099) 2018-07-17 14:39:30 +02:00
Adrià Cidre 9ce96baf5d
[#1093] Mailserver compatible with sync AND async keys (#1096) 2018-07-16 11:07:17 +02:00
Adrià Cidre bfbb02019f
Discover mail servers on demand. (#1082)
* [#1076] Discover mail servers on start up.

* [#1076] On-demand mail-server discovery
2018-07-16 09:40:40 +02:00
Jakub 5abc68b11d fix enode IPs for DigitalOcean static whisper nodes (#1095) 2018-07-12 14:58:12 +02:00
Adam Babik f33c803614
make calculating GIT_REMOTE in Makefile more explicit (#1092) 2018-07-12 11:45:31 +02:00
Dmitry 985c0a1659 Enforce isolation between different buckets and topics
Without a limit leveldb will continue looping over
records from different topics and eventually from other buckets as well.
2018-07-12 10:03:37 +03:00
Adrià Cidre d61c39bbd8
Fix timeout issues with TestRequestMessagesSuccess (#1091) 2018-07-11 16:42:51 +02:00
Jakub Sokołowski ef7da275d4
fix ENTRYPOINT syntax and add CMD for easier use by new people; 2018-07-11 13:45:27 +02:00
Adrià Cidre edc9790782
Fix vendor check as dep is updated (#1089) 2018-07-11 12:07:22 +02:00
Jakub 6d4f657106 Add ENTRYPOINT for status-go image (#1084) 2018-07-10 11:29:40 +02:00
Dmitry 40fa97ef33 Do not pass discovery option to p2p server as we are managing it now 2018-07-06 11:30:16 +03:00
Dmitry 737f966dbe Decouple discovery from p2p server 2018-07-05 16:45:28 +03:00
Andrea Franz 8ce522f430
remove old methods addPeerSync from tests (#1080) 2018-07-04 17:53:02 +02:00
Andrea Franz 6d1bcff446
use envelopeFeed to wait for envelopes to be available in tests (#1079)
* remove sleeps in WhisperMailboxSuite

* use envelopeFeed to wait for envelopes to be available in group chat test

* remove unsed envelopeTracer in whisper e2e tests

* unsubscribe from envelopeFeed

* use s.addPeerSync instead of WaitForPeerAsync
2018-07-04 13:07:40 +02:00
Adam Babik 38a60135b2 Add asymmetric key support for MailServer requests (#1075)
* add Asymmetric Key support for MailServer requests

* remove deprecated notice

* fix linter

* refactoring Whisper config related to MailServer

* fix race condition
2018-07-04 11:30:57 +02:00
Ivan Daniluk 93210061ad
Add goroutines count to geth metrics (#1077) 2018-07-03 20:15:16 +02:00
Adrià Cidre f19e3eae8e
Move TestSentEnvelope to status-scale repo (#1071) 2018-07-02 22:29:03 +02:00
Pedro Pombeiro 7c51f9a382 Update to golangci-lint 1.9.1. Get rid of standalone misspell linter. 2018-07-02 18:41:10 +02:00
Jakub 4f9a7a908e Make sure all new docker images are also tagged with commit (#1062)
This change also defines new makefile targets which prevent from pushing `latest` image tags by accident.
2018-07-02 18:27:59 +02:00
Adrià Cidre 237aeea7b2
Centralize leveldb.OpenFile allowing Recover corrupted db everywhere (#1072) 2018-07-02 10:42:16 +02:00
Andrea Franz 8aa046e893
update mailserver tests to write to a temporary directory instead of using /tmp (#1066) 2018-07-02 09:44:02 +02:00
Andrea Franz 809db97e54
mailserver pagination (#1039)
* mailserver sends envelopes in descending order

* add limit value in mailserver request payload

* mailserver sends messages up to the limit specified in the request

* update Archive method to return key and error

* processRequest returns the next page cursor

* add cursor to mailserver request

* add limit and cursor to request payload

* fix request limit encoding

* wait for request completed event in TrackerSuite/TestRequestCompleted

* add cursor to mailserver response

* fix cursor position in payload

* add e2e test for mail server pagination

* validate mail server response size

* remove old limitReached var

* fix lint warnings

* add whisper patch

* fix tests after rebase

* check all return values to avoid lint warnings

* check that all messages have been retrieved after 2 paginated requests

* fix lint warnings

* rename geth patch

* merge mailserver patches into one

* add last envelope hash to mailserver response and EventEnvelopeAvailable event

* update whisper patch

* add docs to MailServerResponse

* update whisper patch

* fix tests and lint warnings

* send mailserver response data on EventMailServerRequestCompleted signal

* update tracker tests

* optimise pagination test waiting for mailserver to archive only before requesting

* rollback mailserver interface changes

* refactoring and docs changes

* fix payload size check to determine if a limit is specified

* add more docs to the processRequest method

* add constants for request payload field lengths

* add const noLimits to specify that limit=0 means no limits
2018-07-02 09:38:10 +02:00
Max Risuhin 327299ddec
Desktop platform jail signal callback support 2018-06-28 02:16:27 +03:00
Andrea Franz 29d90b651d
test leveldb panics on mailserver (#1065)
* test leveldb panics on mailserver

* refactoring

* rename DB interface to dbImpl and add documentation
2018-06-27 14:22:09 +02:00
Andrea Franz b913c98573
remove formatting from metrics.ResettingTimer when requested in raw format (#1052) 2018-06-27 11:46:50 +02:00
Adrià Cidre afb3ce159e
Clean api package (#1055) 2018-06-27 10:11:45 +02:00
Adrià Cidre 3ca120c2aa
[#1054] : Introducing t/helpers and WaitForPeer (#1064)
* [#1054] : Introducing t/helpers and WaitForPeer

* waitForPeer to receive a p2p.Server
2018-06-27 09:55:25 +02:00
Pedro Pombeiro ab7b9b914c Recover from panics which can get sent from goleveldb due to bad arguments. Closes #1059 2018-06-26 16:49:13 +02:00
Andrea Franz 1bc63df5f2
validate query range on requestMessages API (#1060) 2018-06-26 10:41:03 +02:00
Ivan Daniluk b003400b4b Validate lower/upper limit in mailserver request (#1058) 2018-06-26 09:33:05 +02:00
Andrea Franz 385f3b3377
collect process metrics (#1051)
*  collect process metrics

* collect process metrics in a different goroutine
2018-06-25 17:21:04 +02:00
Adrià Cidre 5bbfabde94
New debug_postSync endpoint (#1046)
* [#ISSUE-1041] New debug_postconfirm endpoint

* move debug service api inside shhext service
2018-06-25 15:27:17 +02:00
Pedro Pombeiro 3b052098fe Update to geth 1.8.11. Closes #1033
- Replace deprecated common.Hex with hexutil.Encode.
- Remove upstreamed 0010-geth-17-fix-npe-in-filter-system.patch.
- Remove upstreamed 0020-discv5-metrics.patch.
- Remove upstreamed 0026-ethdb-error-deadlock.patch.
- Update goleveldb to same version used by geth 1.8.11.
- Update PublicTransactionPoolAPI.GasPrice return type to match type in internal geth interface.
2018-06-22 18:04:13 +02:00
Andrea Franz 1974f39e0c extkeys: extended key can derive a child only if its depth is less than 255 (#1032) 2018-06-22 14:21:49 +02:00
Adrià Cidre 51ab9053ab
[#1040] Patch go-ethereum reducing from Warn to Info "message loop" logs (#1048) 2018-06-22 11:57:52 +02:00
Pedro Pombeiro bbd7706b11 Fix incorrect log call format 2018-06-21 11:23:07 +02:00
Pedro Pombeiro 878373ab30 Enable `typecheck` to catch syntax errors on files which are not normally compiled
https://travis-ci.org/status-im/status-go/jobs/393987750#L544
2018-06-20 19:35:53 +02:00
Pedro Pombeiro 58a8135a87 Fix return type of RequestMessages (hash instead of bool) 2018-06-20 18:17:12 +02:00
Adrià Cidre 56cc3d20da
First step to remove StatusAPI (#1034) 2018-06-19 09:49:24 +02:00
Pedro Pombeiro 2b290d1a76 Address PR review comments 2018-06-18 15:24:27 +02:00
Pedro Pombeiro fac5576988 Use `EnvelopeTracer` as an event source to avoid relying on timeouts in tests. Fixes #1021
Fix bug in mailserver implementation which was using upper bound `to` parameter as an exclusive, rather than inclusive parameter, as stated in the documentation: https://github.com/status-im/status-go/wiki/Additional-JSON-RPC-API
2018-06-18 15:24:27 +02:00