Commit Graph

308 Commits

Author SHA1 Message Date
Dmitry Shulyak 0b123ed407 Send an expiration signal when envelope wasn't delivered to any peer 2018-04-15 10:44:49 +03:00
Adrià Cidre e277ae8b2d
Mockgen import cycle not allowed && recover missing mockgens (#824) 2018-04-13 15:10:37 +02:00
Dmitry Shulyak 5014e4e3b0
Fix two race conditions in peerpool tests (#827)
Multiple concurrent topic pool stops could result in the close of the closed
quit channel. Fixed by using atomic compare and swap and closing only if swap
happened.

Added events feed to peer pool for tests purpose. Otherwise it is impossible to run
simulation with -race flag enabled. In the essence it happens because we are managing global
object , which is server.Discv5, but unfortunately there is no way around it.
2018-04-13 11:34:30 +03:00
Adam Babik 0d652c3851
Expose only public APIs in inproc RPC client [breaking-change] (#815)
`CallRPC` binding, which is used as a provider for web3.js, exposes only public or whitelisted APIs.
2018-04-12 18:17:10 +02:00
Dmitry Shulyak a7a2e01b4a
Peerpool failover (#801) 2018-04-12 16:08:49 +03:00
Andrea Franz ecd9762648
remove redundant "if" before "return" statement (#823) 2018-04-12 12:26:25 +02:00
Dmitry Shulyak ba9a25e284
Implement shh api extension that allows to confirm that message is sent (#814)
* Implement shh api extension that allows to confirm that message is sent

* Add a patch

* Fix linter

* Add readme

* Add tests for tracker

* Address review
2018-04-11 18:41:51 +03:00
Adrià Cidre e6610f3b15
Fix lint on unused method (#816) 2018-04-10 16:00:01 +02:00
Daniel Regeci e34af8d6eb Create status-go API to return a current revision (#804)
Change `BUILD_FLAGS` in Makefile and update `github.com/status-im/status-go/geth/params.VersionMeta` value with the current Git SHA.
2018-04-10 12:36:11 +02:00
Dmitry Shulyak 02309e81e9
Peer pool to manage v5 peers (#736) 2018-04-10 09:44:09 +03: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
Dmitry Shulyak b71b7eeadb Use web3code from separate repo and remove static 2018-04-09 15:42:36 +02:00
Dmitry Shulyak 4d00fa80b0 Ensure that To field is nil when contract is created 2018-04-09 14:41:50 +03:00
Dmitry Shulyak ced8335600 Remove admin,debug,db api from exposed modules 2018-04-09 12:32:39 +03:00
Adrià Cidre df35ad6dbe
[#797] Unify EnsureSync on t/utils/utils.go and StatusManager (#806) 2018-04-09 09:16:43 +02:00
Adrià Cidre 359b3621e9 [#797] Simplify node.Manager public api and rename it to StatusNode
- [x] [#797] : Remove unused methods PopulateStaticPeers, ReconnectStaticPeers, removeStaticPeers, removePeer
- [x] [#797] : Rename node.Manager to node. StatusNode and simplify its public api
- [x] [#797] : Rename all references to nodeManager to statusNode
2018-04-05 16:47:27 +02:00
Adam Babik e9c2292776
Switch mockgen to reflect mode (#800)
Switch mockgen to use reflect mode as source mode does not support vendored packages.
2018-04-05 15:14:47 +02:00
Adrià Cidre aa0f2ede6d
[#795] : Remove geth/common package (#796) 2018-04-04 19:39:38 +02:00
Adrià Cidre f59ec4022c Move RPCCall from common to geth/rpc (#788) 2018-03-29 17:37:10 +02:00
Adrià Cidre f3dca6fad8
[#785] /lib specific code living on common moved to /lib 2018-03-29 15:12:46 +02:00
Adrià Cidre 518148cab9
Merge pull request #780 from status-im/improvement/issue-779/common-NodeManager-removal
[#779] common.NodeManager removal
2018-03-29 09:57:18 +02:00
Igor Mandrigin 3b32ab8426 Support both "input" and "data" fields when creating a transaction. 2018-03-28 20:28:35 +02:00
Adrià Cidre 1b724a81a5
[#779] common.NodeManager removal 2018-03-28 17:39:09 +02:00
Adrià Cidre e646001578
Merge pull request #773 from status-im/transactions-and-accountmanager
[#772] txQueueManager to not depend on AccountManager and nodeManager
2018-03-28 11:06:33 +02:00
Adrià Cidre 13cb2daaa2
[#772] txQueueManager to not depend on AccountManager 2018-03-28 09:58:05 +02:00
Pedro Pombeiro c4d7a6167e
Add `race-check` target to Makefile. Closes #710 (#769)
* Add `race-check` and `test-unit-race` target to Makefile. Closes #710
2018-03-27 14:38:41 +02:00
Dmitry Shulyak 88f881c83e
Rewrite config as a native golang structure and remove it from static (#762) 2018-03-26 15:52:20 +03:00
Adrià Cidre 60d8ba5e62
Merge pull request #753 from status-im/feature/issue-403/account-package-cleanup
Account package cleanup
2018-03-23 14:16:27 +01:00
Adrià Cidre e22fa36111
[#755] Restructure notifier interfaces 2018-03-23 09:55:05 +01:00
Adrià Cidre 18fbebc942
[#issue-403] Account package cleanup 2018-03-23 08:21:40 +01:00
Adam Babik 8b94ac00bb
Update mainnet dev cluster config (#745) 2018-03-22 15:58:28 +01:00
Alex Kohler 4a01a395b4 Move status-go over to go-ethereum/log #717 (#727) 2018-03-20 19:35:28 +01:00
Frank Mueller dc4a0a98ed Fix setting of bootstrap nodes (#744)
Fix dropped bootstrap nodes setting and rename of cluster config and separation of nodes
2018-03-20 16:05:21 +02:00
Igor Mandrigin 804fe949f7 Fix state names and log messages for status changes API. 2018-03-19 19:52:55 +02:00
Frank Mueller 8e42014671
Static peers are now also optionally configurable (#738)
* Rename bootnode to static peers

Also add some groupings between types.

* Remove not needed genesisHash

* More cleanup of bootnodes with static peers

* Add option of cluster configuration file

* New generated bindata.go

* Changes after npm install

* Add argument for cluster configuration file

* Add test for dynamic cluster loading

Not yet sure with name "cluster config".

* Solved conflicts

* Renaming of static peers

* Remove static peers population

* Missing argument for config

* Renaming of static peers to boot nodes for consistency

* Fix of name change

* Cluster config is now cluster data

* Load static nodes from configuration

* Final renaming of var for file content
2018-03-19 17:22:09 +01:00
Igor Mandrigin 3b92b61ef1 Add API to listen to app state changes. 2018-03-15 12:48:22 +01:00
Frank Mueller 81c8669518
Code review for Mainnet (#706)
* Add debug log to test package t

* Add comments for test restrictions

* Add explicit errors for mainnet

* Panic instead of error in case of mainnet during tests

* Now panic with illegal network

* Validate the compiler flag for mainnet

* Made test for unset mainnet explicit

* Forgot to use my flag

* Linter has troubles with unused field

* Add default network id

In e2e tests there's no default anymore in go code. So ensure in Makefile.

* Fix dumb syntax error

* CI needs build with Mainnet

* Explicit rebuild only for tests

* No more separation of mainnet and testnet builds

* Build flags now set in Makefile
2018-03-15 12:36:28 +01:00
Andrea Franz a1da71e968
add entropyStrength type 2018-03-14 10:42:55 +01:00
Igor Mandrigin aabbcbe522 Make DiscoveryV5 follow node config. 2018-03-08 19:40:45 +02:00
Pedro Pombeiro 7aec65b976
Adapt unit tests with new static nodes (#722) 2018-03-02 18:44:55 +01:00
Pedro Pombeiro ec83efc26a
Add two Whisper v6 full nodes to `staticpeers.json` (#721) 2018-03-02 16:48:45 +01:00
Pedro Pombeiro 6cdea4ef97
Update codebase to leverage Whisper v6 (#703)
* Update project to use Whisper v6. Part of #638

* Revert "Add patch to downgrade usage of Whisper v6 to v5 in some geth 1.8.1 vendor files. Part of #665" - this reverts commit 6aefb4c8fd02dbcfffac6b69e8bb22b13ef86b6b.

* Enable light mode on Whisper v6 for non-mail servers. Part of #638

* Fix race condition in whisperv6/peer.go. Part of #665 (PR already accepted upstream for 1.8.2)

* Update bootnode addresses in staticnodes.json. Part of #638

* Add `shh.lightclient` flag and tests for bloom filter setting logic. Part of #638

* Move MakeTestNodeConfig to utils. Part of #638

* Reduce PoW in `whisper_jail_test.go` to fix flaky test. Part of #638
2018-03-02 10:25:30 +01:00
Alex Kohler 5fbacb49e1 Remove GetObjectValue from JailCell interface #691 (#693) 2018-03-01 17:48:30 +01:00
Igor Mandrigin f7baca7835 Don't hide RPC error reason. 2018-02-27 12:10:48 +01:00
Pedro Pombeiro e4cbce12c4
Update to go-ethereum 1.8.1 (#702)
* Update `github.com/ethereum/go-ethereum` package to 1.8.1 branch. Part of #638
* Fix code due to some signature changes. Part of #638
* use upstream for whisper backend
* Add patch to downgrade usage of Whisper v6 to v5 in some geth 1.8.1 vendor files. Part of #638
* Take into account the DNS rebinding protection introduced in 1.8.0 by adding exception for localhost. Part of #638
* Add patches required for cross-compiled builds starting with geth 1.8.0. Only applied during build. Part of #638
* Update expected JSON result in `TestRegressionGetTransactionReceipt()` and `TestCallRawResultGetTransactionReceipt()`. Part of #665
* Fix some failing e2e tests. Part of #638
* Address comments in PR #702. Part of #638
2018-02-27 11:39:30 +01:00
Adam Babik 0a15c9ff9a
Configure mainnet nodes (#701)
Add mainnet static peers to static/config/staticpeers.json.
2018-02-26 19:36:04 +01:00
Pedro Pombeiro eca5e04cc4
Replace `ping` notification payload with `You have a new message` 2018-02-26 18:17:42 +01:00
Pedro Pombeiro 134d01fcc1
Fix incorrect path in Makefile and run `make generate`. Part of #692 2018-02-22 12:19:31 +01:00
Igor Mandrigin c06d58addd Remove `notifications` package from go-ethereum. 2018-02-22 11:10:21 +01:00
Pedro Pombeiro 2993dcc3db
Fix a couple race conditions in tests (#689)
* Fix race condition on `LoopSuite`
* Fix race condition in the access to a Otto.Value in tests (quick fix, need to improve approach in the future)
2018-02-21 13:18:32 +01:00