Commit Graph

243 Commits

Author SHA1 Message Date
Pedro Pombeiro 6537cae606 Nimbus node support 2020-01-20 13:15:17 +01:00
Andrea Maria Piana 25d46c6d82
Fix waku tests & contact ens (#1802) 2020-01-17 13:39:09 +01:00
Pedro Pombeiro 7f45c43196 make lint-fix 2020-01-16 13:18:36 +01:00
Adam Babik 44aa313981
Make shhext and protocol work with Waku (#1777)
This change makes shhext and protocol submodule work with Waku and Whisper.
2020-01-13 20:17:30 +01:00
Pedro Pombeiro 86dcbcd90e Rename gofmt to lint-fix 2020-01-07 17:07:56 +01:00
Pedro Pombeiro c8a911ebd1 Use goimports instead of gofmt 2020-01-06 10:17:23 +01:00
Pedro Pombeiro 608de7fa2d Add `gofmt` Makefile target 2020-01-06 10:17:23 +01:00
André Medeiros 0571f561f0
APIs to Get and Create custom Tokens (#1717) 2019-12-10 12:31:08 -05:00
Jakub Sokołowski e249f35a8d fix missing genkey task in systemd bootnode makefile
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-12-10 13:46:32 +01:00
Jakub Sokołowski e139af9a16 rewrite mailserver systemd setup to a Makefile
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-12-04 13:44:05 +01:00
Roman Volosovskyi 5f6c7008e1
Add KeyUID to IdentifiedAccountInfo
This field will be used as a deterministic id of multiaccount on
status-react side instead of master key address. The reason why
it is calculated as sha256 of public key is that this way is
already used on keycard side and it will simplify integration.

Rename keycardKeyUid to keyUid

As long as this field will be present in all multiaccounts from now on it
shouldn't be named as keycard specific.
2019-11-22 17:50:24 +02:00
Adam Babik e1a8ba1ba5
Fix modvendor (#1690) 2019-11-22 13:24:20 +01:00
Pedro Pombeiro 6ce437255e Remove FCM implementation 2019-11-17 17:54:55 +01:00
Jakub Sokołowski 4c313c7032 add tcp-pinger for measuring rtt of mailservers
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-11-15 13:18:08 +01:00
Jakub Sokołowski 92d6b1c439 add systemd service leanup, fix config generation
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-11-15 11:30:23 +01:00
Andrea Maria Piana 9d7c570593
Add PrepareContent and upgrade status-go (#1674) 2019-11-15 09:52:28 +01:00
Jakub Sokołowski 294399916e add script for easier setup of mailserver
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-10-10 11:27:32 +02:00
Adam Babik e164cbe421
Upgrade Go to 1.13 in our Docker images (#1629) 2019-10-05 16:27:48 +02:00
Adam Babik 94228bce2e
Remove xgo builds (#1628) 2019-10-05 11:13:53 +02:00
Adam Babik 26880b83d7
Upgrade geth to 1.9.5 and Whisper (#1617) 2019-10-04 17:21:24 +02:00
Andrea Maria Piana b27779aa4e
Add Mailserver Request Gaps service (#1596)
This commits add some endpoints to store mailserver request gaps,
and provides 4 endpoints:

```
AddMailserverRequestGaps(gaps []MailserverRequestGap) error
GetMailserverRequestGaps(chatID string) []MailserverRequestGap
DeleteMailserverRequestGaps(ids []string) error
DeleteMailserverRequestGapsByChatID(id string) error
```
2019-09-04 12:04:17 +02:00
Adam Babik 4ef35fa1bc
fix check-existing-release 2019-09-03 08:17:52 +02:00
Adam Babik 3dbcb6a19e
Initialize keystore in statusd (#1592)
This reverts commit 0b403ce25b because otherwise the CI fails.
2019-08-31 16:55:05 +02:00
dmitry 0b403ce25b Pin gomobile to latest working commit 2019-08-28 17:38:58 +03:00
Dmitry Shulyak be9c55bc16
Accounts data management (#1530)
* WIP accounts implementation

* Accounts datasore and changes to status mobile API

* Add library changes and method to update config

* Handle error after account selection

* Add two methods to start account to backend

* Use encrypted database for settings and add a service for them

* Resolve linter warning

* Bring back StartNode StopNode for tests

* Add sub accounts and get/save api

* Changes to accounts structure

* Login use root address and fetch necessary info from database

* Cover accounts store with tests

* Refactor in progress

* Initialize status keystore instance before starting ethereum node

* Rework library tests

* Resolve failures in private api test and send transaction test

* Pass pointer to initialized config to unmarshal

* Use multiaccounts/accounts naming consistently

Multiaccount is used as a login identifier
Account references an address and a key, if account is not watch-only.

* Add login timestamp stored in the database to accounts.Account object

* Add photo-path field for multiaccount struct

* Add multiaccoutns rpc with updateAccount method

Update to any other account that wasn't used for login will return an error

* Fix linter in services/accounts

* Select account before starting a node

* Save list of accounts on first login

* Pass account manager to accounts service to avoid selecting account before starting a node

* Add logs to login with save and regualr login
2019-08-20 18:38:40 +03:00
Jakub Sokołowski 652d8a67b6 use out for output, use CGO_ENABLED=1 and GO111MODULE=off for Android and iOS (#1574) 2019-08-20 09:05:15 +02:00
Andrea Maria Piana cb769ccca9 Revert "Initialize status keystore instance before starting ethereum node"
This reverts commit 476240fbd1.
2019-08-05 16:03:18 +02:00
Dmitry 476240fbd1 Initialize status keystore instance before starting ethereum node 2019-08-01 11:01:02 +03:00
Jakub Sokołowski 5f763439cb add a check for already existing release tag
also run cleanup in post-always Jenkinsfile block

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-07-30 09:26:34 -04:00
Adam Babik e93d994460 integrate status-protocol-go 2019-07-24 18:46:43 +02:00
Adam Babik e28d4ef1a3
Create messaging package and move some packages into it (#1505) 2019-06-26 20:17:41 +02:00
Andrea Maria Piana 1aa3e2812a Add support for partitioned topic 2019-06-19 17:38:45 +02:00
Andrea Maria Piana cef7f367ab Add topic negotiation
This commit add topic negotiation to the protocol.

On receiving a message from a client with version >= 1, we will generate
a shared key using Diffie-Hellman. We will record also which
installationID has sent us a message.

This key will be passed back to the above layer, which will then use to
start listening to a whisper topic (the `chat` namespace has no
knowledge of whisper).

When sending a message to a set of InstallationIDs, we check whether we
have agreed on a topic with all of them, and if so, we will send on this
separate topic, otherwise we fallback on discovery.

This change is backward compatible, as long as there is no downgrade of
the app on the other side.

A few changes:

* Factored out the DB in a separate namespace as now it is
being used by multiple services (TopicService and EncryptionService).

* Factored out multidevice management in a separate namespace

* Moved all the test to test the whole protoocl rather than just the encryption service

* Moved all the filter management in status-go
2019-06-19 17:38:45 +02:00
Dmitry Shulyak 804a109b26
Set BINARY variable for golangci-lint.sh (#1493)
* Set BINARY variable for golangci-lint.sh

* Set higher deadline for linter
2019-06-13 13:24:28 +03:00
Adam Babik 1c33220834 update linter 2019-06-12 13:12:00 +02:00
Adam Babik c9e99c432d migrate to go 1.12 and go modules 2019-06-12 13:12:00 +02:00
Andrea Maria Piana 4ab08629f6 Add postgres
This commits adds support for postgres database.
Currently two fields are stored: the bloom filter and the topic.
Only the bloom filter is actually used to query, but potentially we will
use also the topic in the future, so easier to separate it now in order
to avoid a migration.
2019-05-15 11:01:34 +02:00
Igor Mandrigin 4c1f96d255
Implement subscription for eth and shh filters using signals. (#1455) 2019-05-07 09:05:38 +02:00
Dmitry Shulyak 442a12e996
Removing discovery-proxy from sources (#1445)
It was going to be used as proxy from discv5 to rendezvous for les nodes.
We are not using it at the moment, and not clear when we will be using it
and if we are going to use it all.

Additionally it has some memory leaks that need to be fixed, so it is better
to remove it for now and restore once/if we will need it again.
2019-04-18 10:39:55 +03:00
Jakub 2c0c0fff24 fix release builds (#1440)
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-04-15 11:57:06 +02:00
Jakub Sokołowski 2af27dc6b3 build regular linux binary with xgo for uploading to GitHub
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-04-14 18:14:02 +02:00
Jakub Sokołowski d38a07f679 add Jenkinsfile.docker for pushing new images
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-03-26 09:14:56 +01:00
Jakub Sokołowski a4453a2471 forgot to update main README with link to instructions
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-03-25 09:47:16 +01:00
Adam Babik c3b0644bbc
prefix git tag with 'v' (#1418) 2019-03-18 09:14:21 +01:00
Dmitry 9441f798bb Remove mock step from ci pipeline 2019-03-15 08:14:53 +02:00
Igor Mandrigin 0282f481bf
Fix `admin_nodeInfo` to provide the correct version again (#1394) 2019-02-25 17:23:30 +01:00
Jakub 0238d84924 declare all parameters, fix names of files on release (#1392)
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-02-25 15:59:12 +01:00
Jakub Sokołowski 51ff6395b8 fix env variables pointing at android ndk for gomobile
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-02-25 12:45:06 +01:00
Jakub Sokołowski c26cfb0468 add a docker-compose.yml and Makefile for running a mailserver
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-02-13 18:05:39 +01:00
Jakub Sokołowski de269e5830 add build status notifications like in status-react
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-02-11 17:16:21 +01:00
Ivan Daniluk 4f3f5ee574 Gomobile support (#1164) 2019-02-01 18:02:52 +01:00
Adam Babik 74cb16c456
add SyncMessages method to shhext api (#1309) 2018-12-14 12:21:34 +01:00
Adam Babik 2f65dd58f9
Enable metrics by default and pass build flags to statusgo-library (#1320) 2018-12-14 12:16:45 +01:00
Jakub Sokołowski 7d651afaae add desktop build step
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2018-12-11 09:30:35 +01:00
Adam Babik db691fd763
fix golang/mock (#1310) 2018-12-10 13:53:27 +01:00
Rob Culliton 3657b8b057
change echo message for linux compilation (#1307) 2018-12-07 08:35:05 -05:00
Adam Babik e658366d1e
Improve Makefile (#1275)
* change docker image tag to RELEASE_TAG
* use changelog in release
2018-11-20 11:13:42 +01:00
Pedro Pombeiro 92748f1334 Add `canary-test` make target to test beta fleet mailservers. Closes #1274 2018-11-19 19:02:32 +01:00
Adam Babik 52a1bdfed6
Upgrade geth 1.8.17 plus add metrics during compilation time (#1273)
This commit updates geth to 1.8.17 and adds a possibility to enable metrics during compilation time.

The cascade of issues forced us to upgrade geth to 1.8.17 in order to allow enabling metrics during compilation time. 1.8.17 introduced `NodeID` refactoring and `enode` package which affected our peers pool and integration with Discovery V5.
2018-11-14 08:03:58 +01:00
Andrea Maria Piana 58bd36e79e
Automate github releases (#1263) 2018-11-05 15:02:16 +01:00
Adam Babik b71058d73f
update golangci to 1.10.2 (#1246) 2018-10-17 12:17:58 +02:00
Adam Babik ac8da3c0f0
Use patched go-ethereum from our fork instead of patching it on-the-fly (#1184)
* update to 1.8.16
2018-09-27 21:16:15 +02:00
Pedro Pombeiro 6a1cd7f2b0
Fix xgo creating files as `root` (#1210) 2018-09-24 22:21:13 +02:00
Andrea Maria Piana dcaf8caed0
Add x3dh key exchange (#1127)
* Add x3dh key exchange

* Encrypt using the double ratchet

* Multi device with auto-pairing

* Add pfs enabled flag
2018-09-24 20:07:34 +02:00
Pedro Pombeiro 518234803a
Add support for testing static nodes to node-canary. Closes #1202 (#1203) 2018-09-20 13:25:32 +02:00
Pedro Pombeiro 4e7ae20eae
Add script to update fleets static JSON. Closes #1188 (#1189) 2018-09-14 10:46:34 +02:00
Pedro Pombeiro 3d00af7fa3
Streamline configuration in status-go. Part of #1180 (#1183)
- Replace command line flags with `-c` config flag. Part of #1180
- Convert node config private keys to hex-encoded string versions.
- Remove `GenerateConfig` from library.
- Remove unused `FirebaseConfig` from library.
- Fix loading of `config/status-chain-genesis.json` in non-dev machines.
2018-09-13 18:31:29 +02:00
Adam Babik e8c6841f30
fix getting git commit in Makefile (#1181) 2018-09-04 17:19:16 +02:00
Adam Babik 5664a24b10
remove 'v' from version from git tag in Makefile (#1178) 2018-08-31 07:28:12 +02:00
Adam Babik 16c7b94eb5
Add labels to docker images and add Jenkinsfile to build docker images (#1160)
* fixed generating `params.Version`
* added labels to all Docker images including git_commit and the author of the build (using `$USER` env variable)
2018-08-24 12:25:07 +02:00
Dmitry Shulyak 6858662d59
Proxy records found in ethereum discovery v5 (#1165) 2018-08-24 06:17:32 +03:00
Kishan Sagathiya 0f5ad2545d Issue #765 Read configuration without go-bindata (#1158)
In the current codebase if you want to use different keys (or any
other configuration) for tests it is required to place them at a
certain path in static folder, bundle them with go-bindata and only
then run tests. This is simply unnecessary.

This commit instead directs loads configurations from file without
relying on go-bindata
2018-08-21 14:46:10 +02:00
Pedro Pombeiro ebc77374b2 Remove unused `test.sol` file
- File is no longer used after jail code was removed
- Ensure that `go-bindata` is set up on `make setup`
2018-08-15 14:52:40 +02:00
Adam Babik f26e849fb2
Revert "Add build tags to signal package (#1119)" (#1148)
This reverts commit 27e432a5b1.
2018-08-10 13:23:28 +02:00
Pedro Pombeiro 840b5b64d2 Implement mailserver canary service. Closes #1086 2018-08-07 17:17:59 +02:00
Ivan Daniluk 27e432a5b1
Add build tags to signal package (#1119) 2018-08-07 11:10:20 +03:00
Ivan Daniluk 4b8c669154
Speedup Makefile (#1123) 2018-08-02 19:16:39 +02: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
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
Adam Babik f33c803614
make calculating GIT_REMOTE in Makefile more explicit (#1092) 2018-07-12 11:45:31 +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 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
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
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
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
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
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
Ivan Danyliuk 6fec9fa653 Bump up Go version to 1.10 2018-05-09 16:13:34 +02:00
Igor Mandrigin 153d4160e1 Fix `make ci` if `dep` wasn't pre-installed. 2018-05-04 14:17:17 +02:00
Adrià Cidre 8c9db81bec
Expose status specific methods (login/signup/joinpublicchannel) through the RPC api (#877) 2018-05-03 12:36:56 +02:00
Pedro Pombeiro 4438d116b1 Ensure that Travis CI fails the build if the patches are incorrect 2018-05-02 13:28:39 +02:00
Igor Mandrigin f4cd8d27b5 Add `shhext_getNewFilterMessages` function to RPC APIs.
This function returns only the new messages from the filter, never
returns the same message for the same user twice.
2018-04-27 15:24:37 +02:00
Igor Mandrigin 4cc6028d59 Implement `personal_sign`.
This commit implements `personal_sign` RPC or web3 personal.sign
methods.

NB! Contains breaking API changes.
2018-04-17 11:18:58 +02:00
Adrià Cidre e277ae8b2d
Mockgen import cycle not allowed && recover missing mockgens (#824) 2018-04-13 15:10:37 +02:00