Commit Graph

11286 Commits

Author SHA1 Message Date
Anton Evangelatov
bb55b0fb53 swarm/storage: add comparison towards leveldb.ErrNotFound (#19243)
* swarm/storage: add comparison towards leveldb.ErrNotFound

* swarm/storage: wrap leveldb ErrNotFound
2019-03-08 17:28:57 +01:00
Anton Evangelatov
2cfe0bed9f swarm: fix relationship between spans in open tracing (#19236)
* swarm/network: propagate span with ctx

* swarm/network: try to stop stream.send.request spans on time

* swarm/storage: add chunk ref as a log to netstore.fetcher span
2019-03-08 08:52:25 +01:00
Anton Evangelatov
ceeb047e69 cmd/swarm/swarm-smoke: better logs when debug mode triggers (#19237)
* cmd/swarm/swarm-smoke: better logs for debug functionality;

* cmd/swarm/swarm-smoke: fixup
2019-03-08 08:52:05 +01:00
Janoš Guljaš
a6e5c6a2cc swarm/storage/localstore: fix synchronization in TestDB_gcSize (#19235) 2019-03-08 05:59:59 +01:00
Elad
4687391213 cmd/swarm: do not ignore cache size=0 (#19231) 2019-03-07 12:44:00 +01:00
Martin Holst Swende
316b63daf0
clef: fix erroneous api version (#19234) 2019-03-07 12:09:25 +01:00
Péter Szilágyi
2eed46dadf
Merge pull request #19232 from karalabe/dl-fix-local-drop-sync
eth/downloader: fix nil droppeer in state sync
2019-03-07 13:06:36 +02:00
Péter Szilágyi
1612267a4b
eth/downloader: fix nil droppeer in state sync 2019-03-07 12:37:03 +02:00
Corey Lin
2fa9e99fc1 usbwallet: check error returned by driver close (#18057)
Although current two implementations(ledgerDriver, trezorDriver) of interface driver.Close do not actually return any error. Instead, they only return nil.
But since the declaration of Close function returns error, it is better to check the returned error in case in future some new implementation of Close function returns error and we may forget to modify the function which invokes Close function at that time.
2019-03-07 12:13:06 +02:00
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