Commit Graph

13727 Commits

Author SHA1 Message Date
Martin Holst Swende 5f94f8c7e7 signer: change the stdio jsonrpc to use legacy namespace conventions (#19047)
This PR will will break existing UIs, since it changes all calls like ApproveSignTransaction to be on the form ui_approveSignTransaction.

This is to make it possible for the UI to reuse the json-rpc library from go-ethereum, which uses this convention.

Also, this PR removes some unused structs, after import/export were removed from the external api (so no longer needs internal methods for approval)

One more breaking change is introduced, removing passwords from the ApproveSignTxResponse and the likes. This makes the manual interface more like the rulebased interface, and integrates nicely with the credential storage. Thus, the way it worked before, it would be tempting for the UI to implement 'remember password' functionality. The way it is now, it will be easy instead to tell clef to store passwords and use them.

If a pw is not found in the credential store, the user is prompted to provide the password.
2019-03-07 11:56:08 +02:00
Janoš Guljaš eb199f1fc2 swarm: localstore hasser (#19230) 2019-03-07 10:07:54 +01:00
Ferenc Szabo d45f8d1880 swarm/network: remove *WithServer tests from stream package (#19223)
These tests never run as the build tag excluded them from the CI
execution. As a results the (dead) code got out of sync with other
parts of Swarm and now they would not even compile. => Removed.

resolves ethersphere/go-ethereum#1238
2019-03-07 09:27:56 +01:00
holisticode a87776a5fe swarm/network/stream: Fix flaky tests in GetSubscriptionsRPC test (#19227)
* swarm/network/stream: fixed timing issues

* swarm/network/stream: only count first iteration of subscriptions

* swarm/network/stream/: fix linter errors
2019-03-07 09:24:28 +01:00
Péter Szilágyi 72b21db2d3
Merge pull request #19021 from karalabe/database-cleanup
all: clean up and properly abstract database accesses
2019-03-07 10:21:40 +02:00
holisticode f2d6310354 p2p/protocols: fix race condition in TestAccountingSimulation (#19228)
p2p/protocols: Fix race condition in TestAccountingSimulation
2019-03-07 08:13:11 +01:00
Péter Szilágyi ce3ea8c9b1
Merge pull request #19222 from karalabe/clique-fix-test
consensus/clique: fix test copy paste error, test what's documented
2019-03-06 13:41:00 +02:00
Péter Szilágyi 054412e335
all: clean up and proerly abstract database access 2019-03-06 13:35:03 +02:00
Péter Szilágyi 2f24e254a9
consensus/clique: fix test copy paste error, test what's documented 2019-03-06 12:42:08 +02:00
Matthew Halpern 15eee47ebf accounts: prefer nil slices over zero-length slices (#19079) 2019-03-06 12:30:39 +02:00
Elad 34c85def3e cmd/swarm/swarm-smoke: sliding window test should not time out (#19152) 2019-03-05 17:43:05 +01:00
holisticode 81ed700157 Enable longrunning tests to run (#19208)
* p2p/simulations: increased snapshot load timeout for debugging

* swarm/network/stream: less nodes for snapshot longrunning tests

* swarm/network: fixed longrunning tests

* swarm/network/stream: store kademlia in bucket

* swarm/network/stream: disabled healthy check in delivery tests

* swarm/network/stream: longer SyncUpdateDelay for longrunning tests

* swarm/network/stream: more debug output

* swarm/network/stream: reduced longrunning snapshot tests to 64 nodes

* swarm/network/stream: don't WaitTillHealthy in SyncerSimulation

* swarm/network/stream: cleanup for PR
2019-03-05 12:54:46 +01:00
Janoš Guljaš 216bd2ceba swarm/storage/localstore: fix testDB_collectGarbageWorker data race (#19206) 2019-03-04 22:19:57 +01:00
Péter Szilágyi a1099bb7e9
Merge pull request #19205 from holiman/alltools_clef
build: add clef to alltools and deb
2019-03-04 15:46:20 +02:00
gary rong 603a85218b vendor: update leveldb (#19201) 2019-03-04 15:43:45 +02:00
Martin Holst Swende e2d322b25a
build: add clef to alltools and deb 2019-03-04 12:02:58 +01:00
Anton Evangelatov f9aa1cd21f Revert "swarm/network: Use actual remote peer ip in underlay (#19137)" (#19193)
This reverts commit 460d206f30.
2019-03-02 08:45:07 +01:00
Janoš Guljaš b797dd07d2 swarm/shed, swarm/storage/localstore: add LastPullSubscriptionChunk (#19190)
* swarm/shed, swarm/storage/localstore: add LastPullSubscriptionChunk

* swarm/shed: fix comments

* swarm/shed: fix TestIncByteSlice test

* swarm/storage/localstore: fix TestDB_LastPullSubscriptionChunk
2019-03-02 08:44:22 +01:00
Guillaume Ballet 729bf365b5
whisper: Remove v5 (#18432) 2019-03-01 12:36:41 +01:00
Anton Evangelatov 4e9230ea7a
swarm: enable p2p/discovery and disable dynamic dialling (#19189) 2019-03-01 12:20:37 +01:00
Péter Szilágyi 94eca08ad8
build: enable Ubuntu Disco Dingo PPA builds 2019-03-01 11:31:10 +02:00
Péter Szilágyi 0594deb652
Merge pull request #19187 from karalabe/fix-ppa-go1.11-cache-2
build/deb: fix PPA env var setting
2019-03-01 10:51:36 +02:00
Péter Szilágyi 696a65b016
build/deb: fix PPA env var setting 2019-03-01 10:50:21 +02:00
Péter Szilágyi 5c03baaf6f
Merge pull request #19184 from karalabe/fix-ppa-go1.11-cache
build/deb: use custom cache for PPA builder
2019-03-01 10:43:11 +02:00
holisticode 994326ba00 swarm: new snapshot files (#19185) 2019-02-28 22:30:36 +01:00
Péter Szilágyi 509ea3ef9b
build/deb: use custom cache for PPA builder 2019-02-28 16:34:37 +02:00
Péter Szilágyi 313576530f
Merge pull request #19183 from karalabe/bn256-arm64-go1.12-fix
crypto/bn256/cloudflare: pull in upstream fix for Go 1.12 R18
2019-02-28 14:59:41 +02:00
Péter Szilágyi 0f41356b95
Merge pull request #19182 from karalabe/fix-legacy-receipt-decoding
core/types: fix receipt legacy decoding
2019-02-28 14:59:26 +02:00
Péter Szilágyi 39bd2609ca
crypto/bn256/cloudflare: pull in upstream fix for Go 1.12 R18 2019-02-28 14:53:44 +02:00
Péter Szilágyi 1bc7f3f906
core/types: fix receipt legacy decoding 2019-02-28 14:16:36 +02:00
Péter Szilágyi dac7cbcf21
p2p/enode: use localItemKey for local sequence number (#19131)
* p2p/discover: remove unused function

* p2p/enode: use localItemKey for local sequence number

I added localItemKey for this purpose in #18963, but then
forgot to actually use it. This changes the database layout
yet again and requires bumping the version number.
2019-02-28 13:14:45 +02:00
Felix Lange dd28ba378a node: require LocalAppData variable (#19132)
* node: require LocalAppData variable

This avoids path inconsistencies on Windows XP.
Hat tip to @MicahZoltu for catching this so quickly.

* node: fix typo
2019-02-28 13:11:52 +02:00
lash 62d9d63858 swarm/network: WIP consider all nodes for healthy iteration (#19155)
* swarm/network: WIP consider all nodes for healthy iteration

* swarm/network/simulation: extend TestWaitTillHealthy to really check kads are healthy

* cmd/swarm/swarm-snapshot: fixed bugs in snapshot creation binary

* swarm/network/simulation: addressed PR comments

* swarm/network/simulation: defer sim.Clsoe()

* swarm/network/simulation: fixed wrong sim.Close()

* swarm/network/simulation: addressed PR comments

* cmd/swarm/swarm-snapshot: reducing default to 8 nodes, more to 4

* cmd/swarm/swarm-snapshot: extended timeout to 3 mins, or 256 nodes snapshot times out

* swarm/network/simulation: More PR comments
2019-02-28 08:12:50 +01:00
Péter Szilágyi 505a49e689
Merge pull request #19166 from SamuelMarks/go-1.12
Upgrade to Go 1.12
2019-02-27 15:09:59 +02:00
Péter Szilágyi 2b6158a51e
common/fdlimit: fix macos file descriptors for Go 1.12 2019-02-27 14:21:02 +02:00
Samuel Marks e43bc36226
travis, appveyor, Dockerfile: upgrade to Go 1.12 2019-02-27 14:21:02 +02:00
gary rong 7ebd2fa5db vendor: update leveldb upstream which include a compaction fix (#19163) 2019-02-27 14:10:10 +02:00
Janoš Guljaš f0233948d2 swarm/chunk: move chunk related declarations to chunk package (#19170) 2019-02-26 16:09:32 +01:00
Péter Szilágyi b7e0dec6bd
travis, build: switch to NDK 19b, fix gomobile builds (#19171)
* travis, build: switch to NDK 19b, fix gomobile builds

* travis, build: move NDK into its final bundle location

* travis: disable Android build on PRs once again
2019-02-26 16:56:12 +02:00
Péter Szilágyi 6d652ce1b7
Merge pull request #19164 from karalabe/nuke-old-containers
containers/docker: nuke per the 1.8.0 deprecation note
2019-02-26 13:51:09 +02:00
Felföldi Zsolt c2003ed63b les, les/flowcontrol: improved request serving and flow control (#18230)
This change

- implements concurrent LES request serving even for a single peer.
- replaces the request cost estimation method with a cost table based on
  benchmarks which gives much more consistent results. Until now the
  allowed number of light peers was just a guess which probably contributed
  a lot to the fluctuating quality of available service. Everything related
  to request cost is implemented in a single object, the 'cost tracker'. It
  uses a fixed cost table with a global 'correction factor'. Benchmark code
  is included and can be run at any time to adapt costs to low-level
  implementation changes.
- reimplements flowcontrol.ClientManager in a cleaner and more efficient
  way, with added capabilities: There is now control over bandwidth, which
  allows using the flow control parameters for client prioritization.
  Target utilization over 100 percent is now supported to model concurrent
  request processing. Total serving bandwidth is reduced during block
  processing to prevent database contention.
- implements an RPC API for the LES servers allowing server operators to
  assign priority bandwidth to certain clients and change prioritized
  status even while the client is connected. The new API is meant for
  cases where server operators charge for LES using an off-protocol mechanism.
- adds a unit test for the new client manager.
- adds an end-to-end test using the network simulator that tests bandwidth
  control functions through the new API.
2019-02-26 12:32:48 +01:00
Roc Yu c2b33a117f graphql: fix typos in comments (#19041) 2019-02-26 12:19:43 +01:00
Péter Szilágyi a42afa766c
Merge pull request #19169 from karalabe/ppa-bump
build: bump PPA builders to Go 1.11
2019-02-26 12:30:55 +02:00
Péter Szilágyi 647692fbfe
build: bump PPA builders to Go 1.11 2019-02-26 11:30:56 +02:00
Janoš Guljaš c83ba9e794 swarm/storage/localstore: fix tests for windows os (#19161) 2019-02-26 10:02:05 +01:00
Janoš Guljaš 340a53a98b swarm/pss: fix data race on HandshakeController.symKeyIndex (#19162)
* swarm/pss: fix data race on HandshakeController.symKeyIndex

The HandshakeController.symKeyIndex map was accessed concurrently.
Since insufficient test coverage the race is not detected every time.
However, running TestClientHandshake a 100 times seems to be enough to
reproduce the race.

Note: I've chosen HandshakeController.lock to protect
HandshakeController.symKeyIndex as that was already protected in a few
functions by that lock.

Additionally:
- removed unused testStore
- enabled tests in handshake_test.go as they pass
- removed code duplication by adding getSymKey()

* swarm/pss: fix a data race on HandshakeController.keyC

* swarm/pss: fix data races with on Pss.symKeyPool
2019-02-26 08:17:20 +01:00
Matthew Halpern badaf43019 les: remove redundant type specifiers (#19091) 2019-02-25 12:49:49 +02:00
Péter Szilágyi f5f742d1ac
containers/docker: nuke per the 1.8.0 deprecation note 2019-02-25 12:40:33 +02:00
Marius van der Wijden 7d881e45bd rlp: added pooling of streams using sync (#19044)
Prevents reallocation, improves performance
2019-02-25 12:34:08 +02:00
Janoš Guljaš 872370e3bc swarm/network/simulation: do not copy node mutex in UploadSnapshot (#19160) 2019-02-25 10:03:31 +01:00