Commit Graph

4536 Commits

Author SHA1 Message Date
Ivan Daniluk 8623b52873 Add help command to Makefile (#370)
his PR adds some love to Makefile. It introduces a new help target, which dynamically builds usage output, with textual description of what target does. It supports ANSI colors and categories. It assumes that perl is installed in the system.
2017-10-03 14:54:19 +03:00
Adam Babik e61c39b0b2 Forward net_* rpc commands to the upstream (#377) 2017-09-29 17:09:41 +02:00
Adam Babik ede939dd9e Remove LES activation when using upstream (#373) 2017-09-29 09:40:10 +02:00
Ivan Daniluk 9cc5fd2112 Move transaction queue code into separate package (#365) 2017-09-27 02:50:41 +02:00
Adam Babik d625ddacfd Validate password in CompleteTransaction with remote node (#367) 2017-09-26 18:08:24 +02:00
Ivan Daniluk 93492cf606 Move accounts to separate package (#360) 2017-09-26 15:44:26 +02:00
Ivan Daniluk 14a04c1b20 Fix null result field bug for JSON-RPC raw response (#362) 2017-09-26 12:19:17 +02:00
Adam Babik edcb2d7933 Fix signals package to compile for ios (#363) 2017-09-26 11:23:13 +02:00
Ivan Daniluk 2acf1a1a6a Refactor/signals package (#359)
Move signals code to the separate package.
2017-09-25 20:22:57 +02:00
Adam Babik 3afcff278f add 'g' prefix before artifact SHA (#358) 2017-09-25 18:06:13 +02:00
Ivan Tomilov fc8f59e121 Fixed eth_sendTransaction routing to the local node (#351)
* Fixed eth_sendTransaction routing to the local node
* Add local RPC handlers for eth_accounts and eth_sendTransaction
2017-09-25 18:04:40 +02:00
Adam Babik 750612f2bc fix SendTransaction signature in go-ethereum (#355)
I created a separate method SendTransactionWithPassphrase which accepts passphrase as a second argument. It's an exact copy of SendTransaction except for calling wallet.SignTxWithPassphrase.
2017-09-22 18:16:22 +03:00
Adam Babik 6d9f5d2e2a Add Jenkins-manual and fix artifacts versioning (#352) 2017-09-21 20:38:25 +02:00
Ivan Tomilov 283ae3e7df Fixed geth/node and geth/params tests (#332) 2017-09-19 14:40:43 +03:00
Ivan Tomilov 477cd92585 Merge branch 'develop' of github.com:status-im/status-go into develop 2017-09-19 14:31:58 +03:00
Ivan Tomilov 27a5090ad3 Started 0.9.9-unstable 2017-09-19 14:30:02 +03:00
Adam Babik ba963cc1bd estimate gas if missing in sending tx using upstream (#346)
I added a call to eth_estimateGas in case gas param is missing when using the upstream. This is a little bit ugly because I create an anonymous struct to match eth_call params. I spotted this struct in go-ethereum but I don't see it's exported.
2017-09-19 14:19:18 +03:00
Ivan Tomilov 9d01f7aa26 fixed that shh_newMessageFilter was erroneously routed to the upstream instead of local (#345)
An issue arose that shh_newMessageFilter was routed to the upstream instead of local node. This PR fixes that. It also revisits routing logic and makes all requests go to the local node by default.
2017-09-19 12:52:38 +03:00
Adam Babik 78fb5e963f Use linux node in Jenkinsfile (#340)
In order to move some load from Jenkins master, let's build status-go on linux node.
2017-09-18 19:40:16 +03:00
Ivan Daniluk ca4bc5152f Add support for JSON-RPC batched calls (#341)
This PR introduces proper support for JSON-RPC batched requests (http://www.jsonrpc.org/specification#batch)
2017-09-18 17:24:35 +03:00
Ivan Tomilov 5f19c9cd0a Implemented sendAsync for js commands with a callback (#321)
Geth js commands coming through jail with a callback will now be executed truly asynchronously blocking jail only when an actual interaction with VM is performed.

Technically, it registers a new handler jeth.sendAsync which executes functions with callbacks asynchronously.

Changes include:

1. Send and SendAsync now use cell.VM instead of otto.Otto providing proper locking.
2. Unmarshalling in ExecuionPolicy.ExecuteWithClient is now done into var result interface{} instead of var result json.RawMessage because test case 0 of TestJailWhisper failed providing byte codes instead of 5.0.
3. Due to the asynchronous nature of web3 calls new weird timeouts in tests have been introduced. They may fail sometimes but I gave up trying to implement a more reliable and readable solution.
2017-09-18 15:13:32 +03:00
Adam Babik 79f744954c Prevent from completing tx multiple times (#330)
This commit prevents from completing (i.e. sending) the same transaction multiple times.
2017-09-18 11:53:08 +03:00
Ivan Daniluk 9eee21f1ca Add support for JSON-RPC array payload. (#335)
This PR introduces solution for #333 - it adds support for array JSON-RPC payload.

unmarshalMessage tries to unmarshal JSON paylod into *jsonrpcMessage object, and in case of failure, analyzes error and, if it's unmarshalling array error, tries to unmarshal it as an array.
2017-09-17 17:06:18 +03:00
Adam Babik bd2c3c6754 Build binaries for various platforms in CI (#301)
Provides a Jenkinsfile and enables automatic builds of status-go binaries for various platforms and deploys them to the artifacts manager.
2017-09-15 19:14:36 +03:00
Ivan Tomilov 3478bd2ed2 Added issue template (#331)
Added .github/ISSUE_TEMPLATE.md and moved CONTRIBUTING.md from the root folder into .github/
2017-09-15 19:10:06 +03:00
Ivan Daniluk cf7a9949a3 Add some docs/readmes (#329)
Updates and adds some package docs.

It also provides autogenerated README's using https://github.com/jimmyfrasche/autoreadme tool. To use it, make sure it's installed on your system, and every time you update documentation, run go generate to update the README.md file.
2017-09-15 19:00:00 +03:00
Oskar Thorén f88de68f86 Push notifications: ability to trigger notifications via public API (#327)
This PR provides a way for status-react to trigger push notifications to contacts whose FCMToken they possess. It thus solves the basic user story as outlined in #326
2017-09-15 18:57:34 +03:00
Ivan Danyliuk 704d271c64
Update README for jail. 2017-09-15 14:16:50 +02:00
Adam Babik 8153d935d2 Improve geth/api tests (#328)
The goal of this PR is to make geth/api tests to finally pass from the beginning to the end. I tried to achieve it here by:

Removing calls to common.PanicAfter so that we know which tests fail the most,
Better sync of some tests using channels,
Small test improvements.
2017-09-15 13:35:31 +03:00
Ivan Daniluk 1c9c0f08f4 Bugfix/eth accounts workaround #294 (#318)
This PR is dirty hack workaround for #294 issue. It starts LES service with sync disabled (by MaxPeers option set to 0), even if Upstream is enabled. This ensures that all RPC calls are registered in local node (they are registered during LES service initialization and do not exist if LES service is not activated).
2017-09-15 11:44:31 +03:00
Ivan Daniluk 9a5c1774c3 Refactor RPC client #304 (#311)
This PR refactors RPC subsystem for status-go:

cleans up two different RPC client implementations (RPCManager and rpc.Client)
creates new package under geth/rpc
moves routing logic into this package (rpc.(*router))
add tests for routing
cleans up NodeManager
2017-09-14 23:14:31 +03:00
Ivan Daniluk fd8c110293 Add support for 'go test -v' flag for tests (#315)
Default log level for tests is now ERROR. If tests are invoked with -v, the log level becomes INFO.
2017-09-14 14:41:50 +03:00
Roman Volosovskyi 03b868402c jail: sendSignal handler (#310) 2017-09-14 13:43:01 +03:00
Ivan Daniluk 01448d53fc Update jail docs (#313) 2017-09-13 17:27:19 +03:00
Ivan Tomilov 3109656014 Created CONTRIBUTING.md 2017-09-13 15:45:07 +03:00
Marin 4fb0faa061 Small NodeManager refactoring (#253)
Introduced `isNodeAvailable()`.
2017-09-11 17:07:35 +03:00
Ivan Tomilov c85525e139 Extended testGetDefaultConfig to support Rinkeby (#241)
This pull requests only extends testGetDefaultConfig to run against Rinkeby as well and fixes TestJailWhisper.
2017-09-08 15:32:02 +03:00
Ivan Daniluk 6a096607cf Add FetchAPI support and fix loop race [upd] #289 (#293)
This PR adds Fetch API and fixes #289 by using concurrency safe Otto VM wrapper wherever it's possible. This involves new package geth/jail/vm that is used by jail and by our forked ottoext/{fetch/timers/loop} packages.

It also adds more tests that are supposed to be run with --race flag of go test.
2017-09-08 14:55:17 +03:00
Adam Babik 39aeb3b09d vendor: clean up go-ethereum (#299) 2017-09-07 10:35:10 +02:00
Ivan Tomilov 9463d3843a Updated CHT (#279)
Syncing for Ropsten should now start from something around block 1617921 and from 839680 for Rinkeby.
2017-09-07 10:54:33 +03:00
Ewetumo Alexander 792cd1d9c5 Route geth requests to the upstream or local node correctly (#276)
Geth requests have been revised and if the upstream is enabled, only queries regarding working Ethereum protocol are routed to upstream.
Whisper, most web3 requests and various utility methods are still routed to the local node as well as requests for accounts.
2017-09-07 10:49:40 +03:00
Adam Babik 8fb2424ea5 Port the transactions queue from go-ethereum to status-go (#261)
Now all transactions in both cases are waiting for CompleteTransaction or DiscardTransaction to proceed independently from their destination: upstream of local
2017-09-04 15:56:58 +03:00
Oskar Thorén 680090bdf9 vendor: Upgrade go-stack 2017-09-03 11:15:03 +02:00
Ivan Tomilov beb552d13c Refactoring (#290), closes #247
* 3. Removed extra `jail` prefix in the jail package

* Removed sendMessage and showSuggestions handlers because they're already set in registerHandlers()

* Remove extra asserts

* Changed assertions everywhere to testify

* Exposed JailCell.Call and removed Jail.Cell duplicate method

* Fixed review comments
2017-09-02 20:04:23 +03:00
Ivan Daniluk 75398a19d5 Fix "Slow CreateAccount" #251 (#283) 2017-09-02 03:17:34 +07:00
Ivan Daniluk 0c4603d825 Add file logger support (#269) 2017-09-02 01:44:50 +07:00
Ivan Daniluk fffd60d675 Add docs for Jail package (#285) 2017-09-02 01:18:09 +07:00
Marin 97bba3d835 Feature/profiling #257 (#264) 2017-09-01 21:09:11 +07:00
Adam Babik 9f57cf422f bugfix: properly handle no LES service (#272) 2017-08-26 15:42:34 +08:00
Adam Babik a4d2fdfa4a cht: remove downloading CHT from GH but embed it (#270) 2017-08-25 10:56:54 +01:00