77 Commits

Author SHA1 Message Date
Andrea Maria Piana
f6fba1d3d6 Publish contact code periodically 2019-06-19 17:38:45 +02:00
Andrea Maria Piana
1aa3e2812a Add support for partitioned topic 2019-06-19 17:38:45 +02:00
Andrea Franz
28ec255d77
fix HashMessage to decode hex only if needed (#1450)
* hash message expects a string and not a hex string

* refactor HashMessage

* swap returned values
2019-04-30 01:26:41 +02:00
Igor Mandrigin
056bf367a7
Expose vanilla ECDSA signing (#1444) 2019-04-18 15:52:08 +02:00
Andrea Maria Piana
8baae97e2e Add GetNodesFromContract endpoint
We added an endpoint that given an RPC url and a contract will fetch a
list of nodes and return them to the client.
2019-03-29 12:55:54 +01:00
Adam Babik
4c1b6c12e4 [Chaos Unicorn] Expose ChaosModeUpdate (#1422) 2019-03-29 12:55:54 +01:00
Andrea Franz
8fe14e8f23
hash typed data (#1426)
* add HashTypedData to backend

* add HashTypedData to backand, lib, and mobile

* rename typeddata.Hash to typeddata.ValidateAndHash
2019-03-28 15:56:21 +01:00
Andrea Franz
a61c0368bc
add HashMessage to backend, lib, and mobile. (#1421)
* add HashMessage to backend, lib, and mobile.

* move HashMessage out of the backend struct

* fix comment typo
2019-03-21 11:48:47 +01:00
Dmitry Shulyak
3da1c54848
Add a method to mobile bindings that allows to dump content of the logs files (#1402) 2019-03-04 16:33:48 +02:00
Dmitry Shulyak
cf8f20b23c Use lumberjack library to rotate logs and add config that enables it (#1399) 2019-03-01 14:37:13 +01:00
Andrea Franz
c869160ee7
add HashTransaction (#1379)
* add HashTransaction

* add buildTransaction

* test HashTransaction

* add HashTransaction to backend, lib, and mobile

* refactor buildTransaction

* add getTransactionNonce

* add log funtions
2019-02-21 10:53:39 +01:00
Andrea Franz
72906ac655
send tx with signature (#1374)
* add SendTransactionWithSignature to Transactor

* add comment to SendTransactionWithSignature

* add SendTransactionWithSignature to StatusBackend

*  add SendTransactionWithSignature to lib

* add SendTransactionWithSignature to mobile pkg

* increment nonce if needed

* add TestSendTransactionWithSignature_IncrementingNonce

* add NoError assertion

* validate tx args

* debug CI adding `env`

* CI debug

* remove debug

* return error if tx nonce is not the expected one

* fix lint warning
2019-02-15 12:31:20 +01:00
Andrea Maria Piana
2a4382369a
Add GetContactCode call, add DH flag (#1367)
This PR does a few things:

1) Add a call GetContactCode to check whether we have a bundle for a
given user.

2) Add a DH flag to the API (non-breaking change), for those messages
that we want to target all devices (contact-requests for example).

3) Fixes a few small issues with installations, namely if for example a
messages is sent without a bundle (currently not done by any client),
we still infer installation info, so that we can communicate securely
and making it truly optional.
2019-02-12 12:07:13 +01:00
Andrea Franz
929a5de757
Login with keycard (#1358)
* add InjectChatAccount to account manager

* add InjectChatAccount to Backend

* add comments to LoginWithKeycard

* add LoginWithKeycard test to lib

* fix export comment to avoid lint errors

* ensure wallet and chat keys are empty before injecting chat key

* rename InjectChatAccount to SetChatAccount

* add TestBackendInjectChatAccount

* stop node in TestBackendInjectChatAccount

* SetChatAccount doesn't return error

* add comment to InjectChatAccount

* fix account test
2019-01-24 16:44:46 +01:00
Dmitry
1a365a5140 Require BackupDisabledDataDir only if PFSEnabled is true 2019-01-22 16:56:35 +02:00
Pedro Pombeiro
55b3f31318 Add SendDataNotification method (#1352) 2019-01-18 14:03:32 +01:00
Andrea Franz
4939268edf
Unlock wallet and chat keys (#1346)
* select account decrypting wallet and chat keys

* adapt account tests to use chat and wallet account/keys

* fix tests using chat address

* changes after review

* fix status service e2e tests

* add account.Info struct returned when creating and recovering an account

* use s.EqualValues to compare recovered accounts

* return Info instead of *Info

* add both address and walletAddress to responses

* Update lib/types.go

Co-Authored-By: gravityblast <andrea@gravityblast.com>

* Update lib/types.go

Co-Authored-By: gravityblast <andrea@gravityblast.com>

* update comment to fix lint
2019-01-18 10:01:14 +01:00
Dmitry Shulyak
863d07f798 Accept status service config directly from json input (#1337) 2019-01-17 13:56:22 +01:00
Andrea Maria Piana
61bbbdde58
Revert "Change NotifyUsers to allow only data JSON element. Part of status-im/status-react#6772" (#1347)
This reverts commit cddf2e1c6cdbdea77307eadac9f25af874e3d723.
2019-01-14 13:09:51 +01:00
Adam Babik
08931fb761
Handle gracefully RPC calls when node is stopped (#1329) 2018-12-20 09:31:17 +01:00
Pedro Pombeiro
cddf2e1c6c Change NotifyUsers to allow only data JSON element. Part of status-im/status-react#6772 2018-11-30 13:26:27 +01:00
Dmitry
e60dbe3c1b Update selected mail servers that are used in envelope tracker 2018-11-28 11:16:37 +02:00
Andrea Maria Piana
1f6cccd0fc
Add enabling/disabling of installations (#1264)
This commit adds a list new table, installations, which is used to keep
track of which installation are active for a given identity key.

In general, we limit the number of installation that we keep
synchronized to 5, to avoid excessive usage of resources.

Any installation coming from our own identity, will have to be manually
enabled, otherwise we trust the other peer has correctly paired their
devices.

We use a timestamp to decide which installations to keep synchronized as
a logical clock would have make the creation of the bundle more
complicated, but this can always be converted to a logical clock at
later stages without breaking compatibility.
2018-11-06 09:05:32 +01:00
Dmitry Shulyak
db786ef1d2
Sign typed data implementation (#1250)
* Implement EIP 712

* Cover majority of cases with tests

* Add solidity and signer tests and cover integer edges case

* Add thin api to sign type data using selected status account

* All integers are extended to int256 and marshalled into big.Int

* Document how deps works

* Fix linter

* Fix errors test

* Add validation tests

* Unmarshal every atomic type in separate functions
2018-11-06 07:26:12 +01:00
Andrea Maria Piana
9f8f0089a3
Add extract group membership signatures (#1226) 2018-10-04 18:53:48 +02:00
Andrea Maria Piana
f3880f8fe1 Return always json struct (#1220) 2018-09-28 13:53:36 +02:00
Andrea Maria Piana
b309718fdc
Add sign & verify api calls (#1218) 2018-09-27 15:07:32 +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
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
19b53030fc
add fleet param to GenerateConfig binding (#1162) 2018-08-21 15:48:58 +02:00
Sebastian Delgado
4afd9e6c6c Remove transactions queue 1027 (#1125)
Remove `PendingSignRequests` queue from the sign module.

This closes #1027 by removing the pending sign requests queue dependency from the SendTransaction, SignMessage and Recover.
2018-08-16 13:37:53 +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
Ivan Daniluk
801053a17d
Remove jail package (#1106) 2018-07-24 12:05:21 +02:00
Max Risuhin
327299ddec
Desktop platform jail signal callback support 2018-06-28 02:16:27 +03:00
Adrià Cidre
56cc3d20da
First step to remove StatusAPI (#1034) 2018-06-19 09:49:24 +02:00
Adrià Cidre
d5be8c525d
[#856] move geth subpackages to root level (#1007) 2018-06-08 13:29:50 +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
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
Adam Babik
717d0fbadb
Fix another round of flaky tests (#996) 2018-05-29 13:24:23 +02:00
Ivan Danyliuk
953c26e8cf
Move signal logic into signal package 2018-05-03 09:35:58 +02:00
Frank Mueller
c85e0802eb
Remove mention of DevMode (#869)
* Remove mention of DevMode

* Remove prodMode
2018-04-26 19:59:57 +02:00
Andrea Franz
5f45f6498d
Add LogEnabled attribute to NodeConfig to, used in the call from status-react (#866)
* add LogEnabled attribute to NodeConfig, used in the call from status-react

* fix use of OverrideRootLogin in tests

* enable logger in tests based on LogLevel

* move LogEnabled before LogFile
2018-04-26 18:28:42 +02:00
Adam Babik
0473f29a8a
Fix race conditions in tests (#857) 2018-04-23 15:35:48 +02:00
Adam Babik
b85e50cbc9
Remove any logic from api.go [breaking-change] (#851)
Deprecated `Notify` binding got removed.
2018-04-23 15:34:49 +02:00
Adam Babik
5f075eeaba
Enable logs in tests (#852)
Pass `-log` option to `go test` in order to change the log level. By default, it's `INFO`.
2018-04-22 18:50:34 +02:00
Andrea Franz
c32a82b88d
add file/stream log handlers to StatusNode (#833)
* add file/stream log handlers to StatusNode

* move log initialisation to the lib pkg used by react

* remove error check in log initialisation
2018-04-18 16:13:43 +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
Adam Babik
ef160e8720
Add CallPrivateRPC binding (#825)
This PR provides CallPrivateRPC binding, which can call both public and private bindings but should not be used in web3.js provider implementations.
2018-04-16 10:01:37 +02:00
Igor Mandrigin
a9eb5a7d2b Generalize signing requests.
We need to be able to sign more than just transactions to make DApps
work properly. This change separates signing requests from the
transactions and make it more general to prepare to intoduce different
types of signing requests.

This change is designed to preserve status APIs, so it is
backward-comparible with the current API bindings.
2018-04-09 20:48:00 +02:00
Adrià Cidre
df35ad6dbe
[#797] Unify EnsureSync on t/utils/utils.go and StatusManager (#806) 2018-04-09 09:16:43 +02:00