This change makes invalidation mechanism more aggressive. With a primary goal to invalidate short living nodes faster. In current setup any node that became known in terms of discovery will stay in this state until it will fail to respond to 5 queries. Removing them earlier from a table allows to reduce latency for finding required nodes.
The second change, one adds a version for discovery, separates status dht from ethereum dht.
After we rolled out discovery it became obvious that our boot nodes became spammed with irrelevant nodes. And this made discovery process very long, for example with separate dht discovery takes ~2s, with mutual dht - it can take 1m-10m and there is still no guarantee to find a max amount of peers, cause status nodes is a very small part of whole ethereum infra.
In my understanding, we don't need to be a part of ethereum dht, and lower latency is way more important for us.
Closes: #941
Partially closes: #960 (960 requires futher investigations on devices)
* 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
* 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
Network disconnect is introduced by removing default gateway, easily reversible condition.
On my local machine it takes 30 seconds for peers to reconnect after connectivity is restored. As you guess this is not an accident, and there is 30 seconds timeout for dial expiration. This dial expiration is used in p2p.Server to guarantee that peers are not dialed too often.
Additionally I added small script to Makefile to run such tests in docker environment, usage example:
```
make docker-test ARGS="./t/destructive/ -v -network=4"
```
* Fix string printed after compilation is done
On GNU coreutils 8.27, echo prints the \n occurrences as literals. This
commit changes the calls to echo containing such character to calls to
printf, and appends another \n in the end of the line.
* Fix indent
- new EthereumTransactor that provides higher level API for working with ethereum network, and it is fully conformant with ethclient
- new test rpc service that improves flexibility and coverage of txqueue manager tests
- run complete transaction sequantially for each address
- go-ethereum: Get pending nonce from transaction pool
- add a patch with getting nonce from transaction pool
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.
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.
* 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
We have a test called TestJailWhisper that checks various Whisper communication scenarios (like sending a message signed with a symmetric key, asymmetric keys etc.). However, it was written in a bit cryptic way, so I also refactored it.
Important changes:
* Cleaner way of importing keys using AddKeyPair() method in the test suite,
* Removed TestEncryptedAnonymousMessage because it is not needed anymore as "test 4" in TestJailWhisper was fixed,
* Bumped PoW to 2.0. 0.01 used by status-react makes this test flaky.
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).
PR adds test flag -network to e2e pacakge, for the selection of the desired blockchain network for running tests. It updates readme to demonstrates usage of flag.
Refactor and little bit clean up Notify api:
Created interface and package "notification" and extracted related code into it
Set dependencies into constructor notificatotion.Manager
Mocks for notificatotion.Manager and FCMClient
Bacis unit tests for Notify and Send
Notify func is now deprecated
Notify users uses new API: message, Payload and a list of tokens
Solves #387 linters was integrated into ci
Added inergration linters to CI
Important changes:
- new linter warnings was fixed
- extracted linters targets into separated mk file
During CI tests non-deterministic failures with "no suitable peers available" happened. Reason is a not finished synchronisation after starting of node.
Added and integrated an EnsureSychronization() almost solved it, but overlapped with new added EnsureNodeSync() in merged develop. Failure stayed, so exchange new algorithm in EsureNodeSync() with former one.
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.
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.
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.
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.
Now all transactions in both cases are waiting for CompleteTransaction or DiscardTransaction to proceed independently from their destination: upstream of local
* 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
- 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