Commit Graph

38 Commits

Author SHA1 Message Date
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
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
Adrià Cidre aa0f2ede6d
[#795] : Remove geth/common package (#796) 2018-04-04 19:39:38 +02:00
Adam Babik 37f19d813c fix megacheck errors 2018-03-29 18:02:06 +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 18fbebc942
[#issue-403] Account package cleanup 2018-03-23 08:21:40 +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 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
Roman Volosovskyi 59e77571bc export ConnectionChange (#685) 2018-02-20 09:22:15 +01:00
Ivan Danyliuk 4982e1b8b8 Add ConnectionChange API call to backend for handling network state changes 2018-02-16 13:02:41 +01:00
Dmitry Shulyak 2d964bfe9f Remove async operations from node manager (#584)
The main goal of this change is to remove async operations from node manager.
Additionally all of the signals from node manager are moved to status backend.

All of the async operation now will have the following behaviour:
- If node in the correct state exit immediatly without error
- If node not in the correct state exit immediatly with error
- In all other cases spawn a goroutine with wanted operation
- All the progress regarding that operation will be reported
  by using signals
- Signals should be handled in once place, which is StatusBackend

There are 2 potentially breaking changes:
- Empty event field will be ommited when Envelope is sent to a client
- All errors will be delivered to a client as an Envelope, previously
  some errors (NodeExists, NoRunningNode) were delivered synchronously

Signed-off-by: Dmitry Shulyak <yashulyak@gmail.com>
2018-02-09 14:37:56 +01:00
Sebastian Klier 70912ab8f6 Group tests in a dedicated testing package (#629) 2018-02-08 13:52:47 +01:00
Adrià Cidre 00df3ff9f8 [#618] Jail.Call to return valid JSON string based results (#619) 2018-02-08 12:25:01 +01:00
Igor Mandrigin 2d55ed23af Remove unused `helpers` package with single subpackage. 2018-02-02 16:55:42 +01:00
Dmitry Shulyak 653da5bcd0 Result of tx processing returned as QueuedTxResult
Currently it is quite easy to introduce concurrency issues while working
with transaction object. For example, race issue will exist every time
while transaction is processed in a separate goroutine and caller will
try to check for an error before event to Done channel is sent.

This change removes all the data that is updated on transaction and leaves
it with ID, Args and Context (which is not used at the moment).

Signed-off-by: Dmitry Shulyak <yashulyak@gmail.com>
2018-02-02 09:47:56 +02:00
Dmitry Shulyak 680d0513b7 Refactoring of TxQueue and Manager (#530) 2018-01-25 21:59:21 -08:00
Igor Mandrigin 21132a441f Remove creating global `_status_catalog` variable 2018-01-09 17:53:33 +01:00
Adam Babik b7fb51d92a
Refactor shh_requestMessages method (#513) 2017-12-21 11:26:01 +01:00
Caner Çıdam 34df7e8abb CreateAndInitCell should allow reinitializing a cell #497 (#500)
Changes Jail.createCell to Jail.obtainCell, which alters the error-throwing behaviour for better Jail.CreateAndInitCell

This PR allows cells to be reinitialized without being recreated.

Important changes:
- Calling with same cell ID won't cause any errors.
- Consecutive calls with same cell ID only reinitialize existing cell.
- Parse in library.go uses StatusAPI.CreateAndInitCell.
2017-12-08 22:32:30 +07:00
Evgeny Danilenko 6c2ddc4455 expose AddPeer binding (#493)
AddPeer binding is required to support peers with special roles like Whisper node with MailServer.
2017-12-04 17:21:02 +01:00
Adam Babik a22638f421 be consistent with comments 2017-11-23 13:51:52 +01:00
Adam Babik 98b3f330af bring back Parse binding 2017-11-23 13:37:59 +01:00
Adam Babik 74d3e5e625 Add workaround for testing/cgo issue (#469)
Test code in `lib` package requires cgo, but cgo is not allowed in `*_test.go` files, so we import a lot of testing-related code into a library which also has a lot of side-effects. This fix adds a build tag `e2e_test` as a workaround.
2017-11-22 15:06:14 +02:00
perissology f0beeb3829 fix failing tests in PRs from other repos, fixes #459 (#461)
Fix failing tests for users w/o access to the ACCOUNT_PASSWORD env variable. Disable e2e public network tests in Travis pull requests. Exclude lib dir from unit tests.
2017-11-20 10:21:30 -08:00
Evgeny Danilenko 209d5fed74 Issue/fix public testnet tests #424 (#438)
* Accounts are now encrypted with a strong passphrase.
* The encrypted passphrase is stored in .travis.yml
* Public testnet tests are now run after tests on a private net
2017-11-07 12:46:11 -05:00
Adam Babik 086747a695 Refactor jail part 2 (#401)
Refactor jail so that it's more self-descriptive and easier to understand by newcomers. Also, the test coverage has been improved.

Changes requiring status-react team actions:
* Replace Parse calls with new CreateAndInitCell and ExecuteJS bindings,
* Make sure web3.isConnected is ok as its response change to boolean value.
2017-11-07 12:36:42 -05:00
Ivan Daniluk 4536e99275 Improve statusd CLI usage (#441)
This PR refactors CLI API, removes obsolete commands and splits status code into smaller pieces:

* get rid of subcommands API (no ./status <command>)
* get rid of custom cli app package
* use stdlib flag package for handling command line flags
* move cross-compilation / mobile related code to lib/ package
* move wnode command into separate binary (cmd/node-status, name is subject to discuss)
* remove faucet command as obsolete
* update/add docs/READMES/wikis for new command line flags

It makes statusd code much simpler and smaller, separates concerns (lib, wnode and statusd are different things).
2017-11-03 18:07:13 -04:00