Commit Graph

632 Commits

Author SHA1 Message Date
Andrea Franz 01b18036fe
pass Salt explicitly in test 2018-03-15 00:24:26 +01:00
Andrea Franz 4fabcca216
add test to NewKeyFromString for empty and zeroed extended key 2018-03-14 13:18:13 +01:00
Andrea Franz 1b747bcbc7
add test for Mnemonic.WordList func 2018-03-14 11:21:20 +01:00
Andrea Franz eb112b89f9
test default or custom salt on NewMnemonic func 2018-03-14 11:05:37 +01:00
Andrea Franz a1da71e968
add entropyStrength type 2018-03-14 10:42:55 +01:00
Andrea Franz 3d71a3868a
use `stats[vector.language]++` to prevent lint errors when using `+= 1` 2018-03-13 12:55:59 +01:00
Andrea Franz 5e4b4c7fc6
fix test output 2018-03-13 12:51:44 +01:00
Andrea Franz 8bca30f27b
fix extkeys_tests packages to be just extkeys 2018-03-13 12:19:20 +01:00
Andrea Franz ae64d1d7d5
fix entropy strength validation in BIP39 2018-03-13 12:19:05 +01:00
Igor Mandrigin aabbcbe522 Make DiscoveryV5 follow node config. 2018-03-08 19:40:45 +02:00
Igor Mandrigin cfb3e6a080
Fix datarace when stopping a node. (#723) 2018-03-05 21:36:32 +01:00
Dmitry Shulyak a5cec358a9 Post whisper message asynchronously in tests
I am not 100% percent sure what is happening but it seems that
newMessageFilter is async operation, result of this operation is assumed
to be used in callbacks. All other tests are doing at least 1 io operation
in between creating a filter and posting a message, and it must be enough
for newMessageFilter to complete.

Setting higher GOMAXPROCS allows Otto vm to execute received io requests
immediatly. While lower number of processes may result in events re-ordering.

https://github.com/ethereum/web3.js/blob/develop/lib/web3/methods/shh.js#L39-L41

I tested this change with GOMAXPROCS=1 and it passes consistently.
2018-03-02 19:43:08 +01:00
Pedro Pombeiro 7aec65b976
Adapt unit tests with new static nodes (#722) 2018-03-02 18:44:55 +01:00
Pedro Pombeiro ec83efc26a
Add two Whisper v6 full nodes to `staticpeers.json` (#721) 2018-03-02 16:48:45 +01:00
Adrià Cidre 55d8a867c9 Fixes broken status.im link on the README (#720) 2018-03-02 16:36:58 +02:00
Pedro Pombeiro 6cdea4ef97
Update codebase to leverage Whisper v6 (#703)
* Update project to use Whisper v6. Part of #638

* Revert "Add patch to downgrade usage of Whisper v6 to v5 in some geth 1.8.1 vendor files. Part of #665" - this reverts commit 6aefb4c8fd02dbcfffac6b69e8bb22b13ef86b6b.

* Enable light mode on Whisper v6 for non-mail servers. Part of #638

* Fix race condition in whisperv6/peer.go. Part of #665 (PR already accepted upstream for 1.8.2)

* Update bootnode addresses in staticnodes.json. Part of #638

* Add `shh.lightclient` flag and tests for bloom filter setting logic. Part of #638

* Move MakeTestNodeConfig to utils. Part of #638

* Reduce PoW in `whisper_jail_test.go` to fix flaky test. Part of #638
2018-03-02 10:25:30 +01:00
Andrea Franz e5743695cc Update old `notion.so` links to point to the new wiki (#716) 2018-03-01 19:57:10 +02:00
Alex Kohler 5fbacb49e1 Remove GetObjectValue from JailCell interface #691 (#693) 2018-03-01 17:48:30 +01:00
Adrià Cidre dea43dc4ed Makefile GOBIN to use absolute path 2018-03-01 17:18:12 +01:00
Pedro Pombeiro f52a38249f
Add debugging section to README.md (#712)
- Addressed some linting issues
2018-03-01 15:29:36 +01:00
Dmitry Shulyak 988cd73217
Use newer CHT defined in go-ethereum (#711) 2018-03-01 15:23:41 +02:00
Igor Mandrigin f7baca7835 Don't hide RPC error reason. 2018-02-27 12:10:48 +01:00
Igor Mandrigin 4c0bab24b3 Add more vim files to gitignore. 2018-02-27 12:10:48 +01:00
Pedro Pombeiro e4cbce12c4
Update to go-ethereum 1.8.1 (#702)
* 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
2018-02-27 11:39:30 +01:00
Adam Babik 0a15c9ff9a
Configure mainnet nodes (#701)
Add mainnet static peers to static/config/staticpeers.json.
2018-02-26 19:36:04 +01:00
Pedro Pombeiro eca5e04cc4
Replace `ping` notification payload with `You have a new message` 2018-02-26 18:17:42 +01:00
Pedro Pombeiro 0332465952
Update `make generate` target to account for new `_assets` folder 2018-02-26 16:04:40 +01:00
Igor Mandrigin abb5df88d1
Wait for `Rollback` before closing the DB in the light client. (#696)
* Wait for `Rollback` before closing the DB in the light client.

* Unsubscribe from mux events properly, get rid of `time.Sleep`.
2018-02-23 11:49:57 +01:00
Dmitry Shulyak 741422af73
Add a test with network connection problem while syncing a chain (#677)
Test waits till synchronization is started, then interrupts network connection, wait for a failure event and restore network connection, confirming that after the connection is restored synchronization will proceed.
2018-02-23 09:03:55 +02:00
Igor Mandrigin c2521f5ad0 fix broken Gopkg.lock 2018-02-22 23:20:57 +01:00
Caner Çıdam 96dc15e167 fix exit code check (#697) 2018-02-22 23:09:09 +01:00
Pedro Pombeiro af0e165a23
Remove obsolete directive from `Gopkg.toml`. Part of #692 2018-02-22 18:50:58 +01:00
Pedro Pombeiro b8eaffb0f6
Fix nil pointer dereference in `main.startCollectingStats` 2018-02-22 17:51:19 +01:00
Pedro Pombeiro 134d01fcc1
Fix incorrect path in Makefile and run `make generate`. Part of #692 2018-02-22 12:19:31 +01:00
Igor Mandrigin c06d58addd Remove `notifications` package from go-ethereum. 2018-02-22 11:10:21 +01:00
Pedro Pombeiro d02c2f16d8
Fix `-log` option in `wnode-test-cluster/docker-compose.yml`
- Was causing `wnode_1     | flag provided but not defined: -log DEBUG` error
2018-02-21 17:57:24 +01:00
Adam Babik 04d216dcc5 Remove non-go option (#682) 2018-02-21 15:37:46 +01:00
Pedro Pombeiro 2993dcc3db
Fix a couple race conditions in tests (#689)
* Fix race condition on `LoopSuite`
* Fix race condition in the access to a Otto.Value in tests (quick fix, need to improve approach in the future)
2018-02-21 13:18:32 +01:00
Alex Kohler c5b9f00467 Adding update-geth target (#673) 2018-02-20 19:04:25 +01:00
Roman Volosovskyi 59e77571bc export ConnectionChange (#685) 2018-02-20 09:22:15 +01:00
Dmitry Shulyak b2580c79d7
Add destructive tests (#646)
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"
```
2018-02-19 17:32:58 +02:00
Alex Kohler 87b12ddced Remove DefaultMinimumPow patches in favor of using whisper config (#683) 2018-02-19 15:53:40 +01:00
Dmitry Shulyak ef0b3bb13d Disable unparam linter 2018-02-19 11:40:08 +01:00
Pedro Pombeiro 7410532879 Patcher improvement (#681)
Improve patcher tool:
* fix broken `-p` flag,
* rename it to `-b`,
* add a new `-p` flag that allows specifying the source of the patches, so that it can be used for more than just go-ethereum patches,
* make it work correctly independently of the order that options are specified in the command line.
2018-02-18 09:14:27 -07:00
Dmitry Shulyak 4a49e840e3 Remove status backend from les internal api (#670) 2018-02-16 15:40:37 +01:00
Igor Mandrigin b83666a90e Fix linter warnings for StatusBackend. (#675) 2018-02-16 15:58:13 +02:00
Ivan Danyliuk 716f1b1cb0 Fix comment 2018-02-16 13:02:41 +01:00
Ivan Danyliuk f78b79b49b Change default connection state to unknown 2018-02-16 13:02:41 +01:00
Ivan Danyliuk bc1c3e6337 Make linters happy 2018-02-16 13:02:41 +01:00
Ivan Danyliuk 4982e1b8b8 Add ConnectionChange API call to backend for handling network state changes 2018-02-16 13:02:41 +01:00