Commit Graph

348 Commits

Author SHA1 Message Date
Ewetumo Alexander 2159711fa3 Refactoring/blockchain sync#246 (#271)
PR adds a new API changes to the NodeManager to provide simple methods to validate the completed synchonization of the blockchain.
2017-10-17 01:36:36 +03:00
screwyprof 26fcfda87c Introduced a private Ethereum network for testing purposes (#397)
1. A new private testing network (StatusChain) is introduced.
2. An example test case implemented (TestSendEtherOnStatusChainTx)
3. Genesis file added static/config/status-chain-genesis.json
2017-10-17 00:54:56 +03:00
Oleg Raev 240149786f Jail.RemoveCells before logout and switching account (#382)
Called jail.Stop upon SwitchAccount and Logout to ensure all jail cells have been terminated.
2017-10-17 00:07:42 +03:00
Ivan Tomilov 16741f9517 Fixed jail.cells nil assignment (#398)
jail.cells is now re-created upon Jail.Stop, not assigned to nil. Assigning it to nil led to runtime panic when a node was stopped and started again.
2017-10-13 15:13:20 +03:00
Adam Babik 12412b3f58 Put int64 as the first word in Loop (#396)
Fix a bug with ARM and x86-32 and use of atomic operations on 64-bit values. More https://golang.org/pkg/sync/atomic/#pkg-note-BUG
2017-10-12 17:01:04 +02:00
Ivan Tomilov 88294b29be Removed homestead bootnodes (#394)
Remove homestead bootnodes from cht.json. Their existence reflected the reality incorrectly as we don't have any homestead bootnodes in our cluster.
2017-10-12 12:46:41 +03:00
Ivan Daniluk d4496332f9 Check for callback in makeAsyncHandler (#395)
This PR fixes regression from 3540972 and adds check for callback validity before putting it into event loop for sendAsync calls.
2017-10-12 12:15:07 +03:00
Adam Babik e6b426e094 fix Jenkinsfile-manual to build both platforms (#393)
Build both platforms as in 99% both are needed.

This PR also fixes a bug when it was possible to build a binary for one platform but both were uploaded -- new one and cached one for the second platform.
2017-10-11 20:24:48 +03:00
Adam Babik 281b304edb Extract e2e tests to a separate package (#375)
This change moves our e2e tests into a separate package to make room for proper unit and integration tests.

This is Phase 1 described in #371.

Changes:

Makefile has separate directives to run unit/integration tests and e2e tests,
CI runs unit/integration tests first and then e2e tests,
E2e tests are in reliability order, i.e. the least reliable tests are run in the end to be sure that nothing else is broken,
Some tests are fixed or quarantined.
2017-10-11 17:20:51 +03:00
Adam Babik 90acfedf7a Rebase geth 1.7.0 (#353) 2017-10-10 12:38:49 +03:00
Ivan Daniluk e4cb6b060a Update README (#380)
Added basic info on build and testing to README
2017-10-09 17:11:12 +03:00
Ivan Daniluk 3540972f0e Refactor and cleanup Jail (#368)
Refactor and clean up Jail package:

 Removes account.Manager and txqueue.Manager from Jail as they are not used anymore
 Removes messageID related code from Jail.Send
 Simplifies Jail.Send to be a wrapper around RPC client's CallRaw
 Renames jail_cell* to cell*
 Related cleanups
2017-10-06 19:52:26 +03:00
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