Commit Graph

2653 Commits

Author SHA1 Message Date
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
Andrea Franz fa390a52ae
RequestHistoricMessages response (#1009)
* refactor TestRequestMessageFromMailboxAsync to use s.requestHistoricMessages helper

* send p2pRequestResponseCode from mailserver

* send p2p message response to after sending all historic messages

* mailserver sends `whisper.NewSentMessage` as response

* add mailserver Client and p2pRequestAckCode watchers

* send event with envelopeFeed when p2pRequestAckCode is received

* test request completed event in tracker

* rename mailserver response events and code to RequestCompleteCode

* wait for mailserver response in e2e test

* use SendHistoricMessageResponse method name for mailserver response

* fix lint warnings

* add mailserver request expiration

* send mailserver response without envelope

* add `ttl` to Request struct in shhext_requestMessages

* test that tracker calls handler.MailServerRequestExpired

* add geth patch

* rename TTL to Timeout

* split tracker.handleEvent in multiple methods
2018-06-15 17:12:31 +02:00
Adam Babik b3a8991eb1
Update mailserver metrics for archived envelopes (#1035) 2018-06-15 11:19:17 +02:00
Pedro Pombeiro 354e23aaf5 Fix issues reported by lint. Part of #1017 2018-06-14 13:52:51 +02:00
Pedro Pombeiro 3abfe3ffda Replace gometalinter with golangci-lint (4.5x faster). Closes #1017 2018-06-14 13:52:51 +02:00
Ivan Daniluk 5f0768472f
Add GOPATH check to Makefile (#995) 2018-06-14 13:28:09 +02:00
Pedro Pombeiro e81ef9e9d5 Assert that no error is returned in `TestConcurrentComplete()` (#1028) 2018-06-14 11:00:15 +02:00
Adrià Cidre 765fb69d89
Add option to disable ntp sync to statusd (#1031) 2018-06-14 10:56:01 +02:00
Adrià Cidre 6173d3ee06
[#1022] Make ntp synchronization configuratble (#1026) 2018-06-13 13:24:04 +02:00
Jakub Sokołowski a339d7ed33
drop the extra ukranian host 2018-06-13 11:06:59 +02:00
Adrià Cidre 8141657ad7
[#1018] Add a flag to disable shell colors and move verbose logs to debug level (#1020) 2018-06-12 09:49:38 +02:00
Pedro Pombeiro 3f1b2fa57f Update go-duktape.v3 revision to include submitted patch
- Gets rid of noisy build warnings
2018-06-11 15:53:56 +02:00
Jakub Sokołowski 737a964a50 update static nodes and gc bootnodes too 2018-06-11 14:06:12 +02:00
Jakub Sokołowski c718ea025f replace with new bootnodes and their gloating IPs 2018-06-11 14:06:12 +02:00
Adam Babik bbe7fba0c9
Benchmark tests (#986)
A set of tests used to benchmark Whisper and MailServer nodes.
2018-06-11 12:48:42 +02:00
Dmitry ae7faece88 Sanity validate ntp response 2018-06-08 19:10:29 +03:00
Pedro Pombeiro 291ad8fa35 Fail tests if `ACCOUNT_PASSWORD` env var is not defined 2018-06-08 16:40:17 +02:00
Adrià Cidre d5be8c525d
[#856] move geth subpackages to root level (#1007) 2018-06-08 13:29:50 +02:00
Adam Babik 8ce6efc749
Make statusd distinct from StatusIM client (#1008) 2018-06-08 11:20:30 +02:00
Pedro Pombeiro feed9158bd Temporarily revert "Remove shh and shhext from APIModules and update tests (#993)"
This reverts commit 7581766470.
2018-06-07 18:18:40 +02:00
Dmitry 68966af049 Allow to set key hex as a flag 2018-06-07 13:53:04 +03:00
Andrea Franz 5d0120ee28
add Dockerfile and Makefile tasks to build statusd-prune docker image (#1005)
* add Dockerfile and Makefile tasks to build statusd-prune docker image

* add image ENTRYPOINT

* set default CMD to statusd-prune
2018-06-07 12:30:18 +02:00
Adrià Cidre cfa5e2b6e3
Expose gas and gasInfo on ApproveSignRequestWithArgs as long not int (#1010) 2018-06-06 18:32:55 +02:00
Adrià Cidre 893b464597
Pre-cache more peers than those defined on max limit (#989)
Peers between maxPeers and maxCachedPeers added as server Peers instead of queued peers
2018-06-06 15:39:27 +02:00
Adrià Cidre c82d5635b6
Allow gas and gas input as argument on signing TTXX (#1000)
* Allow gas and gas input as argument on signing TTXX

* Two different bindings ApproveSignRequest and ApproveSignRequestWithArgs
2018-06-06 09:35:32 +02:00