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.
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.
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).
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
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.
Now all transactions in both cases are waiting for CompleteTransaction or DiscardTransaction to proceed independently from their destination: upstream of local
* 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
IMPORTANT: The known issue is that in case of configured UpstreamRPCServer transactions are sent immediately not waiting for CompleteTransaction or DiscardTransaction which brings inconsistency in behaviour and acts as a security breach.
* new UpstreamRPConfig in geth/params to provide upstream configuration
* conditional start of ethereum blockchain sequence based on NodeConfig.UpstreamConfig.Enabled flag state
Added a lightweight logger wrapper around go-ethereum/log which adds StatusIM prefix to all messages and allows to clearly distinguish between status-go and go-ethereum logs.
Logs under vendor/go-ethereum left unchanged because those pieces of code might undergo huge refactoring in the near term.
* Fixed tests (only when they run one by one; they can still fail if run together)
* Fixed TestJailSendQueuedTransaction: the second command in case 4 was altering status.message_id and thus the test was failing. Earlier it had been working because cells were cloned during every Call
* Added a check into TestJailVMPersistence: now its concurrent-resiliency is asserted
* Fixed CallRPC: shh_version now return "5.0" instead of "0x5"
* Fixed TestWhisperFilterRace: there was changed Whisper API which should just be adhered to
* Fixed geth1.6.7 rebase consequences: primarily genesis blocks which now contain metropolishash
* static: updates Whisper test (to work with Geth 1.6.1)
* jail: VM persistence implemented
* jail: sendMessage/showSuggestions minor fixes (to be squashed)
* node: CHT and boot nodes auto-load implemented
* Replaced CHT data file from farazdagi's to tiabc's
* Rewrote config_test.go using testify having reduced it twice in size
* Increased SyncTime and panic timeout in tests
* Fixed test - remove go default test to testify/suite (#207)
* Add flag setup for RPCEnabled and add comment (#225)
* jail: register method handlers before running initial js in jail (#226)
* Console Jail Mod #179 (#228)
* Added ./statusd-data into .gitignore
* Increased log level for the test node from INFO to ERROR
* Add call to loop.Run to evaluate all setTimeout/setIntervals methods. (#208)
* Rebase onto geth1.6.7 (#232)
* Got back sync duration from 60s to 30s, updated bindata.go
Changed all typos on bootstrap spelling from "bootstap" to "bootstrap".
For example in function makeBootstrapNodes, line 326 now reads:
var bootstrapNodes []*discover.Node
* Add http enable flag for Node
* Fix errors with json test data
* Refactor changes with regards to review comments
* Return appropriate errors for novalue set
* Update changes with regard to config
* Update tests timeout value for makefile ci
* Add RPCEnabled for json config in api test
* Resolve test with RPCEnabled changes
* Remove RPCEnabled flag from unconcerned tests
- API is async
- Node manager, backend and API modules have more that 90% coverage
- For each level (node manager, backend, public API) random testing
was used to ensure that we don't have race conditions
- node: signals and node reset, fixes#152
- tests update (testify is used)
- node manager refactored, race conditions fixed
- node wrapper has been removed, we rely on go-ethereum node now
- tx queue refactored
- jail refactored
- backend and API introduced