aboutsummaryrefslogtreecommitdiffstats
path: root/swarm
Commit message (Collapse)AuthorAgeFilesLines
* params, swarm/version: Geth 1.8.22-stable, Swarm 0.3.10-stableFelix Lange2019-01-311-1/+1
|
* params, swarm: release Geth v1.8.21 and Swarm v0.3.9Péter Szilágyi2019-01-161-4/+4
|
* swarm/pot: each() functions refactored (#18452)gluk2562019-01-153-82/+58
|
* swarm/pot: pot.remove fixed (#18431)gluk2562019-01-123-20/+86
| | | | | | * swarm/pot: refactored pot.remove(), updated comments * swarm/pot: comments updated
* Stream subscriptions (#18355)holisticode2019-01-115-320/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | * swarm/network: eachBin now starts at kaddepth for nn * swarm/network: fix Kademlia.EachBin * swarm/network: fix kademlia.EachBin * swarm/network: correct EachBin implementation according to requirements * swarm/network: less addresses simplified tests * swarm: calc kad depth outside loop in EachBin test * swarm/network: removed printResults * swarm/network: cleanup imports * swarm/network: remove kademlia.EachBin; fix RequestSubscriptions and add unit test * swarm/network/stream: address PR comments * swarm/network/stream: package-wide subscriptionFunc * swarm/network/stream: refactor to kad.EachConn
* p2p/simulations: eliminate concept of pivot (#18426)Ferenc Szabo2019-01-113-60/+1
|
* swarm/network: Rename minproxbinsize, add as member of simulation (#18408)lash2019-01-1019-84/+93
| | | | | | * swarm/network: Rename minproxbinsize, add as member of simulation * swarm/network: Deactivate WaitTillHealthy, unreliable pending suggestpeer
* swarm/network: remove isproxbin bool from kad.Each* iterfunc (#18239)Viktor Trón2019-01-1010-35/+25
| | | | | | * swarm/network, swarm/pss: remove isproxbin bool from kad.Each* iterfunc * swarm/network: restore comment and unskip snapshot sync tests
* swarm: Fix T.Fatal inside a goroutine in tests (#18409)Janoš Guljaš2019-01-097-68/+167
| | | | | | | | | | | | * swarm/storage: fix T.Fatal inside a goroutine * swarm/network/simulation: fix T.Fatal inside a goroutine * swarm/network/stream: fix T.Fatal inside a goroutine * swarm/network/simulation: consistent failures in TestPeerEventsTimeout * swarm/network/simulation: rename sendRunSignal to triggerSimulationRun
* swarm, p2p/protocols: Stream accounting (#18337)holisticode2019-01-082-30/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * swarm: completed 1st phase of swap accounting * swarm, p2p/protocols: added stream pricing * swarm/network/stream: gofmt simplify stream.go * swarm: fixed review comments * swarm: used snapshots for swap tests * swarm: custom retrieve for swap (less cascaded requests at any one time) * swarm: addressed PR comments * swarm: log output formatting * swarm: removed parallelism in swap tests * swarm: swap tests simplification * swarm: removed swap_test.go * swarm/network/stream: added prefix space for comments * swarm/network/stream: unit test for prices * swarm/network/stream: don't hardcode price * swarm/network/stream: fixed invalid price check
* swarm/storage/mock/test: fix T.Fatal inside a goroutine (#18399)Janoš Guljaš2019-01-071-3/+8
|
* swarm: Shed Index and Uint64Field additions (#18398)Janoš Guljaš2019-01-076-130/+671
|
* A few minor code inspection fixes (#18393)Ferenc Szabo2019-01-068-27/+27
| | | | | | | | | | | | | | | | * swarm/network: fix code inspection problems - typos - redundant import alias * p2p/simulations: fix code inspection problems - typos - unused function parameters - redundant import alias - code style issue: snake case * swarm/network: fix unused method parameters inspections
* vendor, crypto, swarm: switch over to upstream sha3 packageDave McGregor2019-01-0410-38/+38
|
* swarm/docker: Dockerfile for swarm:edge docker image (#18386)Anton Evangelatov2019-01-034-1/+57
|
* swarm/storage: change Proximity function and add TestProximity test (#18379)Janoš Guljaš2019-01-032-3/+186
|
* swarm: remove unused/dead code (#18351)Anton Evangelatov2018-12-2424-396/+19
|
* swarm/network: Revised depth and health for Kademlia (#18354)lash2018-12-2215-273/+413
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * swarm/network: Revised depth calculation with tests * swarm/network: WIP remove redundant "full" function * swarm/network: WIP peerpot refactor * swarm/network: Make test methods submethod of peerpot and embed kad * swarm/network: Remove commented out code * swarm/network: Rename health test functions * swarm/network: Too many n's * swarm/network: Change hive Healthy func to accept addresses * swarm/network: Add Healthy proxy method for api in hive * swarm/network: Skip failing test out of scope for PR * swarm/network: Skip all tests dependent on SuggestPeers * swarm/network: Remove commented code and useless kad Pof member * swarm/network: Remove more unused code, add counter on depth test errors * swarm/network: WIP Create Healthy assertion tests * swarm/network: Roll back health related methods receiver change * swarm/network: Hardwire network minproxbinsize in swarm sim * swarm/network: Rework Health test to strict Pending add test for saturation And add test for as many as possible up to saturation * swarm/network: Skip discovery tests (dependent on SuggestPeer) * swarm/network: Remove useless minProxBinSize in stream * swarm/network: Remove unnecessary testing.T param to assert health * swarm/network: Implement t.Helper() in checkHealth * swarm/network: Rename check back to assert now that we have helper magic * swarm/network: Revert WaitTillHealthy change (deferred to nxt PR) * swarm/network: Kademlia tests GotNN => ConnectNN * swarm/network: Renames and comments * swarm/network: Add comments
* p2p/protocols: accounting metrics rpc (#18336)Jerzy Lasyk2018-12-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | * p2p/protocols: accounting metrics rpc added (#847) * p2p/protocols: accounting api documentation added (#847) * p2p/protocols: accounting api doc updated (#847) * p2p/protocols: accounting api doc update (#847) * p2p/protocols: accounting api doc update (#847) * p2p/protocols: fix file is not gofmted * fix lint error * updated comments after review * add account balance to rpc * naming changed after review
* swarm/pss: forwarding function refactoring (#18353)gluk2562018-12-222-51/+436
|
* p2p/simulation: Test snapshot correctness and minimal benchmark (#18287)lash2018-12-211-26/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * p2p/simulation: WIP minimal snapshot test * p2p/simulation: Add snapshot create, load and verify to snapshot test * build: add test tag for tests * p2p/simulations, build: Revert travis change, build test sym always * p2p/simulations: Add comments, timeout check on additional events * p2p/simulation: Add benchmark template for minimal peer protocol init * p2p/simulations: Remove unused code * p2p/simulation: Correct timer reset * p2p/simulations: Put snapshot check events in buffer and call blocking * p2p/simulations: TestSnapshot fail if Load function returns early * p2p/simulations: TestSnapshot wait for all connections before returning * p2p/simulation: Revert to before wait for snap load (5e75594) * p2p/simulations: add "conns after load" subtest to TestSnapshot and nudge
* swarm/storage: remove unused methods from Chunk interface (#18283)Javier Peletier2018-12-183-21/+4
|
* swarm/pss: Reduce input vulnerabilities (#18304)lash2018-12-186-60/+116
|
* swarm/network/simulation:commented out unreachable code-avoid vet errors ↵Javier Peletier2018-12-181-7/+4
| | | | (#18263)
* Update visualized snapshot test (#18286)holisticode2018-12-181-53/+214
| | | | | | | | | | | | * swarm/network/stream: fix visualized_snapshot_sync_sim_test * swarm/network/stream: updated visualized snapshot-test;data in p2p event * swarm/network/stream: cleanup visualized snapshot sync test * swarm/network/stream: re-enable t.Skip for visualized test * swarm/network/stream: addressed PR comments
* p2p/simulation: move connection methods from swarm/network/simulation (#18323)Elad2018-12-1711-535/+37
|
* swarm/storage/feed: remove unused code (#18324)Anton Evangelatov2018-12-173-30/+4
|
* swarm/storage: simplify ChunkValidator interface (#18285)Javier Peletier2018-12-127-18/+20
|
* swarm/shed: add metrics to each shed db (#18277)Anton Evangelatov2018-12-123-7/+206
| | | | | | | | | | * swarm/shed: add metrics to each shed db * swarm/shed: push metrics prefix up * swarm/shed: rename prefix to metricsPrefix * swarm/shed: unexport Meter, remove Mutex for quit channel
* params, swarm: begin Geth v1.9.0 family, Swarm v0.3.9 cyclePéter Szilágyi2018-12-111-4/+4
|
* params, swarm: release Geth v1.8.20 and Swarm v0.3.8Péter Szilágyi2018-12-111-4/+4
|
* cmd/swarm, metrics, swarm/api/client, swarm/storage, swarm/metrics, ↵Elad2018-12-114-20/+107
| | | | swarm/api/http: add instrumentation (#18274)
* swarm/network: Correct ambiguity in compared addresses (#18251)lash2018-12-101-2/+1
|
* swarm: snapshot load improvement (#18220)Janoš Guljaš2018-12-072-2/+1
| | | | | | | | | | | | | | | | | | * swarm/network: Hive - do not notify peer if discovery is disabled * p2p/simulations: validate all connections on loading a snapshot * p2p/simulations: track all connections in on snapshot loading * p2p/simulations: add snapshotLoadTimeout variable * p2p/simulations: ignore control events in snapshot load * p2p/simulations: simplify event loop synchronization * p2p/simulations: return already connected error from Load function * p2p/simulations: log warning on snapshot loading disconnection
* swarm/api/http: add resetting timer metrics to requests (#18249)Elad2018-12-051-0/+5
|
* swarm/network/stream: Debug log instead of Warn for retrieval failure (#18246)holisticode2018-12-051-1/+3
|
* swarm/pss: Add same api interface for all Send* methods (#18218)lash2018-12-012-2/+6
|
* cmd/swarm: add flag for application name (swarm or swarm-private) (#18189)Anton Evangelatov2018-11-302-5476/+0
| | | | | | | | | | * cmd/swarm: add flag for application name (swarm or swarm-private) * cmd/swarm/swarm-smoke: return correct exit code * cmd/swarm/swarm-smoke: remove colorable * remove swarm/grafana_dashboards
* params, swarm: start Geth v1.8.20 and Swarm v0.3.8 release cyclePéter Szilágyi2018-11-281-4/+4
|
* params, swarm: release Geth v1.8.19 and Swarm v0.3.7Péter Szilágyi2018-11-281-4/+4
|
* Increase bzz version (#18184)holisticode2018-11-273-3/+170
| | | | | | | | * swarm/network/stream/: added stream protocol version match tests * Increase BZZ version due to streamer version change; version tests * swarm/network: increased hive and test protocol version
* swarm: add database abstractions (shed package) (#18183)Janoš Guljaš2018-11-2718-0/+2287
|
* swarm/network: Correct neighborhood depth (#18066)lash2018-11-2712-37/+209
|
* Accounting metrics reporter (#18136)holisticode2018-11-272-20/+38
|
* Remove multihash from Swarm bzz:// for Feeds (#18175)Javier Peletier2018-11-266-222/+165
|
* swarm/pss: Message handler refactor (#18169)lash2018-11-2610-109/+644
|
* swarm/api: improve not found error msg (#18171)Elad2018-11-261-1/+1
|
* swarm/network/simulation: fix New function for-loop scope (#18161)Janoš Guljaš2018-11-264-1/+56
|
* swarm/network/stream: use swarm/mock/mem as mock global store (#18157)Janoš Guljaš2018-11-223-53/+11
|
* swarm/state: refactor InmemoryStore (#18143)Anton Evangelatov2018-11-215-123/+24
|
* swarm/storage: move 'running migrations for' log line (#18120)Ferenc Szabo2018-11-201-3/+4
| | | So that we only see the log message when we actually have to migrate.
* swarm/storage: speed up garbage collection and rpc tests (#18128)Anton Evangelatov2018-11-192-5/+6
|
* swarm/api/http: change request served msg log level (#18127)Elad2018-11-181-1/+1
|
* Swarm accounting (#18050)holisticode2018-11-1610-38/+353
| | | | | | | | | | | | | | | | * swarm: completed 1st phase of swap accounting * swarm: swap accounting for swarm with p2p accounting * swarm/swap: addressed PR comments * swarm/swap: ignore ErrNotFound on stateStore.Get() * swarm/swap: GetPeerBalance test; add TODO for chequebook API check * swarm/network/stream: fix NewRegistry calls with new arguments * swarm/swap: address @justelad's PR comments
* swarm/network/simulation: use simulations.Event instead p2p.PeerEvent (#18098)Janoš Guljaš2018-11-166-55/+101
|
* swarm/storage: Batched database migration (#18113)lash2018-11-152-28/+127
|
* params, swarm: begin Geth v1.8.19 and Swarm v0.3.7 cyclePéter Szilágyi2018-11-141-4/+4
|
* params, swarm: release Geth v1.8.18 and Swarm v0.3.6Péter Szilágyi2018-11-141-4/+4
|
* cmd/swarm, swarm/api/http, swarm/bmt, swarm/fuse, swarm/network/stream, ↵Alexey Sharov2018-11-1418-283/+173
| | | | | | swarm/storage, swarm/storage/encryption, swarm/testutil: use pseudo-random instead of crypto-random for test files content generation (#18083) - Replace "crypto/rand" to "math/rand" for files content generation - Remove swarm/network_test.go.Shuffle and swarm/btm/btm_test.go.Shuffle - because go1.9 support dropped (see https://github.com/ethereum/go-ethereum/pull/17807 and comments to swarm/network_test.go.Shuffle)
* swarm/storage: fix garbage collector index skew (#18080)Ferenc Szabo2018-11-134-54/+268
| | | | | | | | | | | | | On file access LDBStore's tryAccessIdx() function created a faulty GC Index Data entry, because not indexing the ikey correctly. That caused the chunk addresses/hashes to start with '00' and the last two digits were dropped. => Incorrect chunk address. Besides the fix, the commit also contains a schema change which will run the CleanGCIndex() function to clean the GC index from erroneous entries. Note: CleanGCIndex() rebuilds the index from scratch which can take a really-really long time with a huge DB (possibly an hour).
* swarm/storage: fix access count on dbstore after cache hit (#17978)Ferenc Szabo2018-11-134-17/+138
| | | | | | | Access count was not incremented when chunk was retrieved from cache. So the garbage collector might have deleted the most frequently accessed chunk from disk. Co-authored-by: Ferenc Szabo <ferenc.szabo@ethereum.org>
* p2p/simulations, swarm/network: Custom services in snapshot (#17991)lash2018-11-121-6/+25
| | | | | | | | | | | | | | | | | | | | * p2p/simulations: Add custom services to simnodes + remove sim down conn objs * p2p/simulation, swarm/network: Add selective services to discovery sim * p2p/simulations, swarm/network: Remove useless comments * p2p/simulations, swarm/network: Clean up mess from rebase * p2p/simulation: Add sleep to prevent connect flakiness in http test * p2p/simulations: added concurrent goroutines to prevent sleeps on simulation connect/disconnect * p2p/simulations, swarm/network/simulations: address pr comments * reinstated dummy service * fixed http snapshot test
* swarm, cmd/swarm: address ineffectual assignments (#18048)Anton Evangelatov2018-11-0817-22/+51
| | | | | | | | * swarm, cmd/swarm: address ineffectual assignments * swarm/network: remove unused vars from testHandshake * swarm/storage/feed: revert cursor changes
* swarm/network: light nodes are not dialed, saved and requested from (#17975)Mark Vujevits2018-11-084-13/+153
| | | | | | | | | | | | | | | | * RequestFromPeers does not use peers marked as lightnode * fix warning about variable name * write tests for RequestFromPeers * lightnodes should be omitted from the addressbook * resolve pr comments regarding logging, formatting and comments * resolve pr comments regarding comments and added a missing newline * add assertions to check peers in live connections
* swarm/api: Fix #18007, missing signature should return HTTP 400 (#18008)Javier Peletier2018-11-072-6/+38
|
* swarm: Better syncing and retrieval option definition (#17986)holisticode2018-11-079-58/+147
| | | | | | | | * swarm: Better syncing and retrieval option definition * swarm/network/stream: better comments * swarm/network/stream: addressed PR comments
* swarm/api: unexport Respond methods (#18037)Anton Evangelatov2018-11-063-52/+51
|
* swarm: modify context key (#17925)KimMachineGun2018-11-062-16/+10
| | | | | | * swarm: modify context key * gofmt sctx.go
* swarm: clean up unused private types and functions (#17989)Ferenc Szabo2018-10-2710-108/+13
| | | | | | | | | | | * swarm: clean up unused private types and functions Those that were identified by code inspection tool. * swarm/storage: move/add Proximity GoDoc from deleted private function The mentioned proximity() private function was deleted in: 1ca8fc1e6fa0ab4ab1aaca06d6fb32e173cd5f2f
* swarm/network/stream: disambiguate chunk delivery messages (retrieval… ↵holisticode2018-10-214-12/+47
| | | | | | | | | | (#17920) * swarm/network/stream: disambiguate chunk delivery messages (retrieval vs syncing) * swarm/network/stream: addressed PR comments * swarm/network/stream: stream protocol version change due to new message types in this PR
* swarm/api/http: remove ModTime=now for direct and multipart uploads (#17945)Elad2018-10-191-2/+0
|
* swarm/network: disallow historical retrieval requests (#17936)Elad2018-10-195-7/+11
|
* swarm: Lightnode mode: disable sync, retrieve, subscription (#17899)Attila Gazso2018-10-187-15/+260
| | | | | | | | | | | | * swarm: Lightnode mode: disable sync, retrieve, subscription * swarm/network/stream: assign error and check in one line * swarm: restructured RegistryOption initializing * swarm: empty commit to retrigger CI build * swarm/network/stream: Added comments explaining RegistryOptions
* swarm/tracing: disable stdout logging for opentracing (#17931)Anton Evangelatov2018-10-171-3/+2
|
* swarm/network/stream: generalise setting of next batch (#17818)Viktor Trón2018-10-127-77/+89
| | | | | | | | * swarm/network/stream: generalize SetNextBatch and add Server SessionIndex * swarm/network/stream: fix a typo in comment * swarm/network/stream: remove live argument from NewSwarmSyncerServer
* swarm/storage: Add accessCnt for GC (#17845)lash2018-10-122-143/+358
|
* p2p/simulations: fix a deadlock and clean up adapters (#17891)Felix Lange2018-10-121-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a rare deadlock with the inproc adapter: - A node is stopped, which acquires Network.lock. - The protocol code being simulated (swarm/network in my case) waits for its goroutines to shut down. - One of those goroutines calls into the simulation to add a peer, which waits for Network.lock. The fix for the deadlock is really simple, just release the lock before stopping the simulation node. Other changes in this PR clean up the exec adapter so it reports node startup errors better and remove the docker adapter because it just adds overhead. In the exec adapter, node information is now posted to a one-shot server. This avoids log parsing and allows reporting startup errors to the simulation host. A small change in package node was needed because simulation nodes use port zero. Node.{HTTP,WS}Endpoint now return the live endpoints after startup by checking the TCP listener.
* swarm, swarm/storage: lower constants for faster tests (#17876)Anton Evangelatov2018-10-096-21/+18
| | | | | | | | * swarm/storage: lower constants for faster tests * swarm: reduce test size for TestLocalStoreAndRetrieve * swarm: reduce nodes for dec_inc_node_count
* params, swarm: begin Geth v1.8.18, Swarm v0.3.6 cyclePéter Szilágyi2018-10-091-4/+4
|
* params, swarm: release Geth v1.8.17 and Swar v0.3.5Péter Szilágyi2018-10-091-4/+4
|
* Fix retrieval tests and simulation backends (#17723)holisticode2018-10-094-221/+388
| | | | | | | | | | | | | | | | | | | | * swarm/network/stream: introduced visualized snapshot sync test * swarm/network/stream: non-existing hash visualization sim * swarm/network/stream: fixed retrieval tests; new backend for visualization * swarm/network/stream: cleanup of visualized_snapshot_sync_sim_test.go * swarm/network/stream: rebased PR on master * swarm/network/stream: fixed loop logic in retrieval tests * swarm/network/stream: fixed iterations for snapshot tests * swarm/network/stream: address PR comments * swarm/network/stream: addressed PR comments
* swarm/storage/feed: Expose MaxUpdateDataLength constant (#17858)Javier Peletier2018-10-082-4/+6
|
* swarm/storage: extract isValid. correctly remove invalid chunks from store ↵Anton Evangelatov2018-10-041-21/+21
| | | | on migration (#17835)
* Merge pull request #17796 from epiclabs-io/mru-feedsViktor Trón2018-10-0340-720/+648
|\ | | | | swarm/storage/feeds: Renamed MRU to Swarm Feeds
| * swarm/storage/feed: Renamed packageJavier Peletier2018-10-0336-110/+110
| |
| * swarm/storage/feeds: renamed vars that can conflict with package nameJavier Peletier2018-10-033-15/+15
| |
| * swarm/storage/feeds: removed capital Feed throughoutJavier Peletier2018-10-0317-54/+54
| |
| * swarm: Changed owners.Javier Peletier2018-10-031-1/+1
| |
| * swarm/storage/feeds: Final package rename and moved filesJavier Peletier2018-10-0336-114/+115
| |
| * swarm/storage/mru: Renamed rest of MRU referencesJavier Peletier2018-10-0316-306/+239
| |
| * swarm/storage/mru: Renamed all comments to FeedsJavier Peletier2018-10-0314-102/+96
| |
| * swarm/storage/mru: Renamed all identifiers to FeedsJavier Peletier2018-10-0322-231/+231
| |
* | swarm: schemas and migrations (#17813)Anton Evangelatov2018-10-035-11/+81
|/
* cmd/swarm, swarm: cross-platform Content-Type detection (#17782)Alexey Sharov2018-10-018-67/+1419
| | | | | | | - Mime types generator (Standard "mime" package rely on system-settings, see mime.osInitMime) - Changed swarm/api.Upload: - simplify I/O throttling by semaphore primitive and use file name where possible - f.Close() must be called in Defer - otherwise panic or future added early return will cause leak of file descriptors - one error was suppressed
* swarm/storage: ensure 64bit hasherStore struct alignment (#17766)Janoš Guljaš2018-09-291-1/+4
|
* swarm/storage: make linter happyAnton Evangelatov2018-09-283-7/+5
|
* Swarm MRUs: Adaptive frequency / Predictable lookups / API simplification ↵Javier Peletier2018-09-2840-2910/+3006
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#17559) * swarm/storage/mru: Adaptive Frequency swarm/storage/mru/lookup: fixed getBaseTime Added NewEpoch constructor swarm/api/client: better error handling in GetResource() swarm/storage/mru: Renamed structures. Renamed ResourceMetadata to ResourceID. Renamed ResourceID.Name to ResourceID.Topic swarm/storage/mru: Added binarySerializer interface and test tools swarm/storage/mru/lookup: Changed base time to time and + marshallers swarm/storage/mru: Added ResourceID (former resourceMetadata) swarm/storage/mru: Added ResourceViewId and serialization tests swarm/storage/mru/lookup: fixed epoch unmarshaller. Added Epoch Equals swarm/storage/mru: Fixes as per review comments cmd/swarm: reworded resource create/update help text regarding topic swarm/storage/mru: Added UpdateLookup and serializer tests swarm/storage/mru: Added UpdateHeader, serializers and tests swarm/storage/mru: changed UpdateAddr / epoch to Base() swarm/storage/mru: Added resourceUpdate serializer and tests swarm/storage/mru: Added SignedResourceUpdate tests and serializers swarm/storage/mru/lookup: fixed GetFirstEpoch bug swarm/storage/mru: refactor, comments, cleanup Also added tests for Topic swarm/storage/mru: handler tests pass swarm/storage/mru: all resource package tests pass swarm/storage/mru: resource test pass after adding timestamp checking support swarm/storage/mru: Added JSON serializers to ResourceIDView structures swarm/storage/mru: Sever, client, API test pass swarm/storage/mru: server test pass swarm/storage/mru: Added topic length check swarm/storage/mru: removed some literals, improved "previous lookup" test case swarm/storage/mru: some fixes and comments as per review swarm/storage/mru: first working version without metadata chunk swarm/storage/mru: Various fixes as per review swarm/storage/mru: client test pass swarm/storage/mru: resource query strings and manifest-less queries swarm/storage/mru: simplify naming swarm/storage/mru: first autofreq working version swarm/storage/mru: renamed ToValues to AppendValues swarm/resource/mru: Added ToValues / FromValues for URL query strings swarm/storage/mru: Changed POST resource to work with query strings. No more JSON. swarm/storage/mru: removed resourceid swarm/storage/mru: Opened up structures swarm/storage/mru: Merged Request and SignedResourceUpdate swarm/storage/mru: removed initial data from CLI resource create swarm/storage/mru: Refactor Topic as a direct fixed-length array swarm/storage/mru/lookup: Comprehensive GetNextLevel tests swarm/storage/mru: Added comments Added length checks in Topic swarm/storage/mru: fixes in tests and some code comments swarm/storage/mru/lookup: new optimized lookup algorithm swarm/api: moved getResourceView to api out of server swarm/storage/mru: Lookup algorithm working swarm/storage/mru: comments and renamed NewLookupParams Deleted commented code swarm/storage/mru/lookup: renamed Epoch.LaterThan to After swarm/storage/mru/lookup: Comments and tidying naming swarm/storage/mru: fix lookup algorithm swarm/storage/mru: exposed lookup hint removed updateheader swarm/storage/mru/lookup: changed GetNextEpoch for initial values swarm/storage/mru: resource tests pass swarm/storage/mru: valueSerializer interface and tests swarm/storage/mru/lookup: Comments, improvements, fixes, more tests swarm/storage/mru: renamed UpdateLookup to ID, LookupParams to Query swarm/storage/mru: renamed query receiver var swarm/cmd: MRU CLI tests * cmd/swarm: remove rogue fmt * swarm/storage/mru: Add version / header for future use * swarm/storage/mru: Fixes/comments as per review cmd/swarm: remove rogue fmt swarm/storage/mru: Add version / header for future use- * swarm/storage/mru: fix linter errors * cmd/swarm: Speeded up TestCLIResourceUpdate
* Merge branch 'master' into max-stream-peer-serversJanos Guljas2018-09-2710-36/+161
|\
| * Merge pull request #17757 from ethersphere/retrieve-request-ttl-prViktor Trón2018-09-277-27/+79
| |\ | | | | | | swarm: prevent forever running retrieve request loops
| | * swarm: prevent forever running retrieve request loopsBalint Gabor2018-09-267-27/+79
| | |
| * | Merge pull request #17734 from frncmx/fix-dos-attack-invalid-hash-lengthViktor Trón2018-09-262-9/+82
| |\ \ | | | | | | | | swarm/network/stream: fix DoS invalid offered hashes length
| | * | swarm/network/stream: fix DoS invalid hash length (#927)Ferenc Szabo2018-09-212-9/+82
| | | |
| * | | [ImgBot] optimizes images (#17741)Alpay Yildirim2018-09-261-0/+0
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | *Total -- 171.97kb -> 127.26kb (26%) /swarm/api/testdata/test0/img/logo.png -- 17.71kb -> 4.02kb (77.29%) /cmd/clef/sign_flow.png -- 35.54kb -> 20.27kb (42.98%) /cmd/clef/docs/qubes/qrexec-example.png -- 18.66kb -> 15.79kb (15.4%) /cmd/clef/docs/qubes/clef_qubes_http.png -- 13.97kb -> 11.95kb (14.44%) /cmd/clef/docs/qubes/clef_qubes_qrexec.png -- 19.79kb -> 17.03kb (13.91%) /cmd/clef/docs/qubes/qubes_newaccount-2.png -- 41.75kb -> 36.38kb (12.86%) /cmd/clef/docs/qubes/qubes_newaccount-1.png -- 24.55kb -> 21.82kb (11.11%)
* | | swarm/network/stream: fix a typo in test commentJanos Guljas2018-09-261-1/+1
| | |
* | | Merge branch 'master' into max-stream-peer-serversJanos Guljas2018-09-2566-814/+486
|\| |
| * | all: new p2p node representation (#17643)Felix Lange2018-09-2563-799/+469
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Package p2p/enode provides a generalized representation of p2p nodes which can contain arbitrary information in key/value pairs. It is also the new home for the node database. The "v4" identity scheme is also moved here from p2p/enr to remove the dependency on Ethereum crypto from that package. Record signature handling is changed significantly. The identity scheme registry is removed and acceptable schemes must be passed to any method that needs identity. This means records must now be validated explicitly after decoding. The enode API is designed to make signature handling easy and safe: most APIs around the codebase work with enode.Node, which is a wrapper around a valid record. Going from enr.Record to enode.Node requires a valid signature. * p2p/discover: port to p2p/enode This ports the discovery code to the new node representation in p2p/enode. The wire protocol is unchanged, this can be considered a refactoring change. The Kademlia table can now deal with nodes using an arbitrary identity scheme. This requires a few incompatible API changes: - Table.Lookup is not available anymore. It used to take a public key as argument because v4 protocol requires one. Its replacement is LookupRandom. - Table.Resolve takes *enode.Node instead of NodeID. This is also for v4 protocol compatibility because nodes cannot be looked up by ID alone. - Types Node and NodeID are gone. Further commits in the series will be fixes all over the the codebase to deal with those removals. * p2p: port to p2p/enode and discovery changes This adapts package p2p to the changes in p2p/discover. All uses of discover.Node and discover.NodeID are replaced by their equivalents from p2p/enode. New API is added to retrieve the enode.Node instance of a peer. The behavior of Server.Self with discovery disabled is improved. It now tries much harder to report a working IP address, falling back to 127.0.0.1 if no suitable address can be determined through other means. These changes were needed for tests of other packages later in the series. * p2p/simulations, p2p/testing: port to p2p/enode No surprises here, mostly replacements of discover.Node, discover.NodeID with their new equivalents. The 'interesting' API changes are: - testing.ProtocolSession tracks complete nodes, not just their IDs. - adapters.NodeConfig has a new method to create a complete node. These changes were needed to make swarm tests work. Note that the NodeID change makes the code incompatible with old simulation snapshots. * whisper/whisperv5, whisper/whisperv6: port to p2p/enode This port was easy because whisper uses []byte for node IDs and URL strings in the API. * eth: port to p2p/enode Again, easy to port because eth uses strings for node IDs and doesn't care about node information in any way. * les: port to p2p/enode Apart from replacing discover.NodeID with enode.ID, most changes are in the server pool code. It now deals with complete nodes instead of (Pubkey, IP, Port) triples. The database format is unchanged for now, but we should probably change it to use the node database later. * node: port to p2p/enode This change simply replaces discover.Node and discover.NodeID with their new equivalents. * swarm/network: port to p2p/enode Swarm has its own node address representation, BzzAddr, containing both an overlay address (the hash of a secp256k1 public key) and an underlay address (enode:// URL). There are no changes to the BzzAddr format in this commit, but certain operations such as creating a BzzAddr from a node ID are now impossible because node IDs aren't public keys anymore. Most swarm-related changes in the series remove uses of NewAddrFromNodeID, replacing it with NewAddr which takes a complete node as argument. ToOverlayAddr is removed because we can just use the node ID directly.
| * | params, swarm: begin Geth v1.8.17, Swarm v0.3.5 cyclePéter Szilágyi2018-09-241-4/+4
| | |
| * | params, swarm: release Geth v1.8.16, Swarm v0.3.4Péter Szilágyi2018-09-241-4/+4
| |/
| * all: fix various comment typos (#17591)HackyMiner2018-09-203-4/+4
| | | | | | | | | | | | * swarm: fixed comment typo * eth: fixed comment typo * cmd/puppeth: fixed comment typo
| * swarm/storage: Implement global timeout for fetcher (#17702)Balint Gabor2018-09-191-1/+3
| |
* | swarm/api: fix TestDumpConfigJanos Guljas2018-09-251-14/+15
| |
* | cmd/swarm, swarm: add stream peer servers limitJanos Guljas2018-09-248-39/+220
|/
* swarm/network: downgrade fetcher unable to request log message severity (#17692)Janoš Guljaš2018-09-181-1/+1
|
* swarm: Chunk refactor improvements (#17683)Balint Gabor2018-09-183-6/+6
| | | | | | | | * swarm/network: Protocol bump (for chunk refactor) * swarm/network: Increase discovery and stream protocol version too * swarm/network: Increase priority queue cap
* all: simplify s[:] to s where s is a slice (#17673)Emil2018-09-155-15/+15
|
* swarm: Chunk refactor (#17659)Balint Gabor2018-09-1352-1868/+3136
| | | | | | Co-authored-by: Janos Guljas <janos@resenje.org> Co-authored-by: Balint Gabor <balint.g@gmail.com> Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com> Co-authored-by: Viktor Trón <viktor.tron@gmail.com>
* swarm/storage: remove redundant increments for dataIdx and entryCnt (#17484)Anton Evangelatov2018-09-122-31/+35
| | | | | | | | * swarm/storage: remove redundant increments for dataIdx and entryCnt * swarm/storage: add Delete to LDBStore * swarm/storage: wait for garbage collection
* Kademlia refactor (#17641)Viktor Trón2018-09-1216-421/+260
| | | | | | | | * swarm/network: simplify kademlia/hive; rid interfaces * swarm, swarm/network/stream, swarm/netork/simulations,, swarm/pss: adapt to new Kad API * swarm/network: minor changes re review; add missing lock to NeighbourhoodDepthC
* Encryption async api (#17603)Viktor Trón2018-09-114-125/+170
| | | | | | | | | | * swarm/storage/encryption: async segmentwise encryption/decryption * swarm/storage: adapt hasherstore to encryption API change * swarm/api: adapt RefEncryption for AC to new Encryption API * swarm/storage/encryption: address review comments
* swarm/api/http: bzz-immutable wrong handler bug (#17602)Elad2018-09-072-2/+2
|
* cmd/swarm: added password to ACT (#17598)Elad2018-09-072-41/+152
|
* swarm/storage: added metrics for db entry count (#17589)Elad2018-09-062-20/+25
|
* swarm/api/http: added a regression test for resolver bug from #17483 (#17502)Elad2018-09-064-23/+148
|
* params, swarm: begin geth v1.8.16 and swarm v0.3.4 cyclePéter Szilágyi2018-08-291-4/+4
|
* params, swarm: release geth v1.8.15 and swarm 0.3.3Péter Szilágyi2018-08-291-4/+4
|
* swarm/api: fix typo (#17500)Geon Kim2018-08-271-1/+1
|
* all: remove the duplicate 'the' in annotations (#17509)Wenbiao Zheng2018-08-274-4/+4
|
* swarm/api/http: fixed resolver bug (#17483)Elad2018-08-221-1/+1
|
* params, swarm: begin geth v1.8.15 and swarm v0.3.3 cyclePéter Szilágyi2018-08-221-4/+4
|
* params, swarm: release Geth v1.8.14 and Swarm v0.3.2Péter Szilágyi2018-08-221-4/+4
|
* swarm: fix typos (#17473)Geon Kim2018-08-221-3/+3
|
* swarm/network: bump bzz protocol version (#17449)Anton Evangelatov2018-08-212-2/+2
|
* swarm, swarm/network, swarm/pss: log error and fix logs (#17410)Anton Evangelatov2018-08-213-22/+21
| | | | | | * swarm, swarm/network, swarm/pss: log error and fix logs * swarm/pss: log compressed publickey
* swarm/storage: cleanup task - remove bigger chunks (#17424)Anton Evangelatov2018-08-201-22/+45
|
* cmd/swarm: added swarm bootnodes (#17414)Elad2018-08-201-2/+0
|
* cmd/swarm, swarm: added access control functionality (#17404)Elad2018-08-1520-150/+897
| | | | | Co-authored-by: Janos Guljas <janos@resenje.org> Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com> Co-authored-by: Balint Gabor <balint.g@gmail.com>
* swarm/network, swarm/storage: validate chunk size (#17397)Anton Evangelatov2018-08-1416-76/+79
| | | | | | | | | | | | | | | | | | * swarm/network, swarm/storage: validate default chunk size * swarm/bmt, swarm/network, swarm/storage: update BMT hash initialisation * swarm/bmt: move segmentCount to tests * swarm/chunk: change chunk.DefaultSize to be untyped const * swarm/storage: add size validator * swarm/storage: add chunk size validation to localstore * swarm/storage: move validation from localstore to validator * swarm/storage: global chunk rules in MRU
* Manifest cli fix and upload defaultpath only once (#17375)Janoš Guljaš2018-08-105-23/+53
| | | | | | | | | | | | | | | | * cmd/swarm: fix manifest subcommands and add tests * cmd/swarm: manifest update: update default entry for non-encrypted uploads * swarm/api: upload defaultpath file only once * swarm/api/client: improve UploadDirectory default path handling * cmd/swarm: support absolute and relative default path values * cmd/swarm: fix a typo in test * cmd/swarm: check encrypted uploads in manifest update tests
* swarm/api/http: added logging to denote request ended (#17371)Elad2018-08-102-3/+4
|
* swarm/api: close tar writer in GetDirectoryTar to flush and clean (#17339)Janoš Guljaš2018-08-091-0/+4
|
* swarm/api/http: fixed list leaf links (#17342)Giulio M2018-08-082-6/+15
|
* swarm/bmt: ignore data longer then 4096 bytes in Hasher.Write (#17338)Janoš Guljaš2018-08-071-1/+1
|
* swarm: Added lightnode flag (#17291)Attila Gazso2018-08-074-17/+78
| | | | | | | | | | | | | | | | | | | | | | | | | * swarm: Added lightnode flag Added --lightnode command line parameter Added LightNode to Handshake message * swarm/config: Fixed variable naming * cmd/swarm: Changed BoolTFlag to BoolFlag for SwarmLightNodeEnabled * swarm/network: Changed logging * swarm/network: Changed protocol version testing * swarm/network: Renamed DefaultNetworkID variable to TestProtocolNetworkID * swarm/network: Bumped protocol version * swarm/network: Changed LightNode handhsake test to table driven * swarm/network: Changed back TestProtocolVersion to 5 for now * swarm/network: Moved the test configuration inside the test function scope
* swarm/api/http: test fixes (#17334)Elad2018-08-072-49/+21
|
* p2p, swarm, trie: avoid copying slices in loops (#17265)Oleg Kovalov2018-08-071-3/+3
|
* swarm/README: add more sections to easily onboard developers (#17333)Anton Evangelatov2018-08-071-1/+190
|
* swarm/api/http: GET/PUT/PATCH/DELETE/POST multipart form unit tests. (#17277)Andrew Chiw2018-08-071-0/+268
| | | httpDo has a verbose option that dumps the HTTP request
* swarm/api/http: refactored http package (#17309)Elad2018-08-0711-1281/+833
|
* swarm/storage/mru: HOTFIX - fix panic in Handler.update (#17313)Javier Peletier2018-08-071-1/+1
|
* cmd/swarm, swarm: various test fixes (#17299)Janoš Guljaš2018-08-064-10/+29
| | | | | | | | | | | | * swarm/network/simulation: increase the sleep duration for TestRun * cmd/swarm, swarm: fix failing tests on mac * cmd/swarm: update TestCLISwarmFs skip comment * swarm/network/simulation: adjust disconnections on simulation close * swarm/network/simulation: call cleanups after net shutdown
* params, swarm/version: begin Geth v1.8.14, Swarm v0.3.2 cyclePéter Szilágyi2018-07-311-4/+4
|
* params, swarm/version: release Geth v1.8.13, Swarm 0.3.1Péter Szilágyi2018-07-311-4/+4
|
* Merge netsim mig to master (#17241)holisticode2018-07-3114-2433/+1365
| | | | | | | | | | | | | | | | | | | | | | | | * swarm: merged stream-tests migration to develop * swarm/network: expose simulation RandomUpNode to use in stream tests * swarm/network: wait for subs in PeerEvents and fix stream.runSyncTest * swarm: enforce waitkademlia for snapshot tests * swarm: fixed syncer tests and snapshot_sync_test * swarm: linting of simulation package * swarm: address review comments * swarm/network/stream: fix delivery_test bugs and refactor * swarm/network/stream: addressed PR comments @janos * swarm/network/stream: enforce waitKademlia, improve TestIntervals * swarm/network/stream: TestIntervals not waiting for chunk to be stored
* swarm/api: remove ioutil.ReadAll for HandleGetFiles (#17276)Anton Evangelatov2018-07-301-19/+2
|
* build: rename swarm deb package to ethereum-swarm; change swarm deb version ↵Anton Evangelatov2018-07-301-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | from 1.8.x to 0.3.x (#16988) * build: add support for different package and binary names * build: bump up copyright date * build: change default PackageName to empty string * build, internal, swarm: enhance build/release process * build: hack ethereum-swarm as a "depends" in deb package * build/ci: remove redundant variables * build, cmd, mobile, params, swarm: remove VERSION file; rename Version to VersionMeta; * internal: remove VERSION() method which reads VERSION file * build: fix VersionFilePath to Version * Makefile: remove clean_go_build_cache.sh until it works * Makefile: revert removal of clean_go_build_cache.sh
* Merge pull request #17233 from ethersphere/swarm-readmeViktor Trón2018-07-251-0/+55
|\ | | | | swarm: README.md
| * gitter: change ethereum/swarm to ethersphere/orange-loungeAnton Evangelatov2018-07-211-2/+2
| |
| * swarm/readme: add link to code review guidelinesAnton Evangelatov2018-07-191-0/+1
| |
| * swarm: readme.mdAnton Evangelatov2018-07-191-0/+54
| |
* | swarm/testutil: remove EnableMetricsAnton Evangelatov2018-07-241-11/+0
| |
* | swarm/storage/mru: Client-side MRU signatures (#784)Javier Peletier2018-07-2326-1550/+3282
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * swarm/storage/mru: Add embedded publickey and remove ENS dep This commit breaks swarm, swarm/api... but tests in swarm/storage/mru pass * swarm: Refactor swarm, swarm/api to mru changes, make tests pass * swarm/storage/mru: Remove self from recv, remove test ens vldtr * swarm/storage/mru: Remove redundant test, expose ResourceHash mthd * swarm/storage/mru: Make HeaderGetter mandatory + godoc fixes * swarm/storage: Remove validator prefix for metadata chunk * swarm/storage/mru: Use Address instead of PublicKey * swarm/storage/mru: Change index from name to metadata chunk addr * swarm/storage/mru: Refactor swarm/api/... to MRU index changes * swarm/storage/mru: Refactor cleanup * swarm/storage/mru: Rebase cleanup * swarm: Use constructor for GenericSigner MRU in swarm.go * swarm/storage: Change to BMTHash for MRU hashing * swarm/storage: Reduce loglevel on chunk validator logs * swarm/storage/mru: Delint * swarm: MRU Rebase cleanup * swarm/storage/mru: client-side mru signatures Rebase to PR #668 and fix all conflicts * swarm/storage/mru: refactor and documentation * swarm/resource/mru: error-checking tests for parseUpdate/newUpdateChunk * swarm/storage/mru: Added resourcemetadata tests * swarm/storage/mru: Added tests for UpdateRequest * swarm/storage/mru: more test coverage for UpdateRequest and comments * swarm/storage/mru: Avoid fake chunks in parseUpdate() * swarm/storage/mru: Documented resource.go extensively moved some functions where they make most sense * swarm/storage/mru: increase test coverage for UpdateRequest and variable name changes throughout to increase consistency * swarm/storage/mru: moved default timestamp to NewCreateRequest- * swarm/storage/mru: lookup refactor * swarm/storage/mru: added comments and renamed raw flag to rawmru * swarm/storage/mru: fix receiver typo * swarm/storage/mru: refactored update chunk new/create * swarm/storage/mru: refactored signature digest to avoid malleability * swarm/storage/mru: optimize update data serialization * swarm/storage/mru: refactor and cleanup * swarm/storage/mru: add timestamp struct and serialization * swarm/storage/mru: fix lint error and mark some old code for deletion * swarm/storage/mru: remove unnecessary variable * swarm/storage/mru: Added more comments throughout * swarm/storage/mru: Refactored metadata chunk layout + extensive error... * swarm/storage/mru: refactor cli parser Changed resource info output to JSON * swarm/storage/mru: refactor serialization for extensibility refactored error messages to NewErrorf * swarm/storage/mru: Moved Signature to resource_sign. Check Sign errors in server tests * swarm/storage/mru: Remove isSafeName() checks * swarm/storage/mru: scrubbed off all references to "block" for time * swarm/storage/mru: removed superfluous isSynced() call. * swarm/storage/mru: remove isMultihash() and ToSafeName functions * swarm/storage/mru: various fixes and comments * swarm/storage/mru: decoupled cli for independent create/update * Made resource name optional * Removed unused LookupPrevious * swarm/storage/mru: Decoupled resource create / update & refactor * swarm/storage/mru: Fixed some comments as per issues raised in PR #743 * swarm/storage/mru: Cosmetic changes as per #743 comments * swarm/storage/mru: refct request encoder/decoder > marshal/unmarshal * swarm/storage/mru: Cosmetic changes as per review in #748 * swarm/storage/mru: removed timestamp proof placeholder * swarm/storage/mru: cosmetic/doc/fixes changes as per comments in #704 * swarm/storage/mru: removed unnecessary check in Handler.update * swarm/storage/mru: Implemented Marshaler/Unmarshaler iface in Request * swarm/storage/mru: Fixed linter error * swarm/storage/mru: removed redundant address in signature digest * swarm/storage/mru: fixed bug: LookupLatestVersionInPeriod not working * swarm/storage/mru: Unfold Request creation API for create or update+create set common time source for mru package * swarm/api/http: fix HandleGetResource error variable shadowed when requesting a resource that does not exist * swarm/storage/mru: Add simple check to detect duplicate updates * swarm/storage/mru: moved Multihash() to the right place. * cmd/swarm: remove unneeded clientaccountmanager.go * swarm/storage/mru: Changed some comments as per reviews in #784 * swarm/storage/mru: Made SignedResourceUpdate.GetDigest() public * swarm/storage/mru: cosmetic changes as per comments in #784 * cmd/swarm: Inverted --multihash flag default * swarm/storage/mru: removed Verify from SignedResourceUpdate.fromChunk * swarm/storage/mru: Moved validation code out of serializer Cosmetic / comment changes * swarm/storage/mru: Added unit tests for UpdateLookup * swarm/storage/mru: Increased coverage of metadata serialization * swarm/storage/mru: Increased test coverage of updateHeader serializers * swarm/storage/mru: Add resourceUpdate serializer test
* | swarm/api/http: http package refactoring 1/5 and 2/5Elad2018-07-231-17/+13
| |
* | swarm: network simulation for swarm tests (#769)Janoš Guljaš2018-07-2318-188/+2831
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cmd/swarm: minor cli flag text adjustments * cmd/swarm, swarm/storage, swarm: fix mingw on windows test issues * cmd/swarm: support for smoke tests on the production swarm cluster * cmd/swarm/swarm-smoke: simplify cluster logic as per suggestion * changed colour of landing page * landing page reacts to enter keypress * swarm/api/http: sticky footer for swarm landing page using flex * swarm/api/http: sticky footer for error pages and fix for multiple choices * swarm: propagate ctx to internal apis (#754) * swarm/simnet: add basic node/service functions * swarm/netsim: add buckets for global state and kademlia health check * swarm/netsim: Use sync.Map as bucket and provide cleanup function for... * swarm, swarm/netsim: adjust SwarmNetworkTest * swarm/netsim: fix tests * swarm: added visualization option to sim net redesign * swarm/netsim: support multiple services per node * swarm/netsim: remove redundant return statement * swarm/netsim: add comments * swarm: shutdown HTTP in Simulation.Close * swarm: sim HTTP server timeout * swarm/netsim: add more simulation methods and peer events examples * swarm/netsim: add WaitKademlia example * swarm/netsim: fix comments * swarm/netsim: terminate peer events goroutines on simulation done * swarm, swarm/netsim: naming updates * swarm/netsim: return not healthy kademlias on WaitTillHealthy * swarm: fix WaitTillHealthy call in testSwarmNetwork * swarm/netsim: allow bucket to have any type for a key * swarm: Added snapshots to new netsim * swarm/netsim: add more tests for bucket * swarm/netsim: move http related things into separate files * swarm/netsim: add AddNodeWithService option * swarm/netsim: add more tests and Start* methods * swarm/netsim: add peer events and kademlia tests * swarm/netsim: fix some tests flakiness * swarm/netsim: improve random nodes selection, fix TestStartStop* tests * swarm/netsim: remove time measurement from TestClose to avoid flakiness * swarm/netsim: builder pattern for netsim HTTP server (#773) * swarm/netsim: add connect related tests * swarm/netsim: add comment for TestPeerEvents * swarm: rename netsim package to network/simulation
* | swarm/fuse: Hotfix missing parantheses in statementlash2018-07-231-0/+4
| |
* | swarm/bmt: async section writer interface to BMT (#778)Viktor Trón2018-07-232-188/+467
|/ | | | | | | | | | | | - AsyncHasher implements AsyncWriter interface - add extra level for zerohashes in pool to lookup empty data hash - remove unused segment, hash and depth fields from Tree - Hash pkg function -> syncHash moved to test - add asyncHash helper func to tests using shuffle - add TestAsyncCorrectness to tests - add BenchmarkBMTAsync to tests - refactor benchmarks using subbenchmarks - improved comments - preinitialise base hashers on the nodes
* swarm/network: bump up protocol versions due to wrapped message intro (#17170)Anton Evangelatov2018-07-133-7/+7
|
* swarm: integrate OpenTracing; propagate ctx to internal APIs (#17169)Anton Evangelatov2018-07-1345-234/+617
| | | | | | * swarm: propagate ctx, enable opentracing * swarm/tracing: log error when tracing is misconfigured
* swarm/api/http: http package refactoring 1/5 and 2/5 (#17164)Anton Evangelatov2018-07-126-381/+579
|
* swarm: ctx propagation; bmt fixes; pss generic notification framework (#17150)Anton Evangelatov2018-07-0944-485/+1612
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cmd/swarm: minor cli flag text adjustments * swarm/api/http: sticky footer for swarm landing page using flex * swarm/api/http: sticky footer for error pages and fix for multiple choices * cmd/swarm, swarm/storage, swarm: fix mingw on windows test issues * cmd/swarm: update description of swarm cmd * swarm: added network ID test * cmd/swarm: support for smoke tests on the production swarm cluster * cmd/swarm/swarm-smoke: simplify cluster logic as per suggestion * swarm: propagate ctx to internal apis (#754) * swarm/metrics: collect disk measurements * swarm/bmt: fix io.Writer interface * Write now tolerates arbitrary variable buffers * added variable buffer tests * Write loop and finalise optimisation * refactor / rename * add tests for empty input * swarm/pss: (UPDATE) Generic notifications package (#744) swarm/pss: Generic package for creating pss notification svcs * swarm: Adding context to more functions * swarm/api: change colour of landing page in templates * swarm/api: change landing page to react to enter keypress
* swarm/pss: Hide big network tests under longrunning flag (#17074)lash2018-06-251-0/+14
|
* swarm/fuse: Disable fuse tests, they are flaky (#17072)Balint Gabor2018-06-251-0/+1
|
* swarm: network rewrite mergeethersphere2018-06-22176-8211/+37768
|
* crypto: replace ToECDSAPub with error-checking func UnmarshalPubkey (#16932)Felix Lange2018-06-121-1/+7
| | | | | | ToECDSAPub was unsafe because it returned a non-nil key with nil X, Y in case of invalid input. This change replaces ToECDSAPub with UnmarshalPubkey across the codebase.
* all: fix various typos (#16533)Wuxiang2018-04-191-1/+1
| | | | | | | | * fix typo * fix typo * fix typo
* build: enable goimports and varcheck linters (#16446)thomasmodeneis2018-04-184-10/+6
|
* compression/rle: delete RLE compression (#16468)Felix Lange2018-04-091-13/+2
|
* swarm/storage: disable treechunker test while it is flaky (#16254)Anton Evangelatov2018-03-061-1/+1
|
* swarm: give correct error on 0x hash prefix (#16195)Elad Nachmias2018-02-274-21/+95
| | | | | | - added a case error struct that contains information about certain error cases in which we would like to output more information to the client - added a validation method that iterates and adds the information that is stored in the error cases
* swarm: creates Swarm landing page for browser 'localhost:xxxx/' GET request ↵cooganb2018-02-262-0/+152
| | | | | | | | | | | | | | | | | | | | when running Swarm (#15926) * swarm: began work on GetHandleFile method re: issue #155 * swarm: now able to serve landing page template * swarm: added landing page template * swarm: landing page has working input * swarm: fixed CSS issue in template * swarm: deleted extra lines * swarm: deleted time header and made redirect a relative path * swarm: removed code mistakenly left
* swarm/metrics: introduce metrics export flag (#16177)Anton Evangelatov2018-02-231-13/+22
|
* swarm: initial instrumentation (#15969)Anton Evangelatov2018-02-2314-8/+374
| | | | | | | | | | | | | | | | | | * swarm: initial instrumentation with go-metrics * swarm: initialise metrics collection and add ResettingTimer to HTTP requests * swarm: update metrics flags names. remove redundant Timer. * swarm: rename method for periodically updating gauges * swarm: finalise metrics after feedback * swarm/network: always init kad metrics containers * swarm/network: off-by-one index in metrics containers * swarm, metrics: resolved conflicts
* swarm/api/http: Fix using deprecated bzzr scheme (#16152)Lewis Marshall2018-02-231-1/+1
| | | | | Without this, deprecated bzzr requests just return an empty response. Signed-off-by: Lewis Marshall <lewis@lmars.net>
* swarm, cmd/swarm: Merge branch 'master' into multiple-ens-endpointsJanos Guljas2018-02-234-15/+16
|\
| * swarm: add favicon for Swarm templates served by browser (#15958)cooganb2018-02-153-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * swarm: added script to HTML header to create favicon addresses #153 * swarm: moved data blob direclty into link tag, removed script * swarm: added favicon info to other html templates * swarm: fixing test errors * swarm: fixing favicon test * swarm: fixing travis tests * swarm: added script to HTML header to create favicon addresses #153 * swarm: moved data blob direclty into link tag, removed script * swarm: added favicon info to other html templates * swarm: fixing test errors * swarm: fixing favicon test * swarm: fixing travis tests
| * all: update license information (#16089)Felix Lange2018-02-141-1/+1
| |
* | swarm, cmd/swarm: Merge branch 'master' into multiple-ens-endpointsJanos Guljas2018-02-2212-65/+283
|\|
| * various: remove redundant parentheses (#15793)Furkan KAMACI2018-01-032-5/+5
| |
| * swarm/api: url scheme bzz-hash to get hashes of swarm content (#15238) (#15715)Janoš Guljaš2017-12-214-16/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * swarm/api: url scheme bzz-hash to get hashes of swarm content (#15238) Update URI to support bzz-hash scheme and handle such HTTP requests by responding with hash of the content as a text/plain response. * swarm/api: return hash of the content for bzz-hash:// requests * swarm/api: revert "return hash of the content for bzz-hash:// requests" Return hashes of the content that would be returned by bzz-raw request. * swarm/api/http: handle error in TestBzzGetPath * swarm/api: remove extra blank line in comment
| * swarm: bzz-list, bzz-raw and bzz-immutable schemes (#15667)Janoš Guljaš2017-12-1910-48/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * swarm/api: url scheme bzz-list for getting list of files from manifest Replace query parameter list=true for listing all files contained in a swarm manifest with a new URL scheme bzz-list. * swarm: replaace bzzr and bzzi schemes with bzz-raw and bzz-immutable New URI Shemes are added and old ones are deprecated, but not removed. Old Schemes bzzr and bzzi are functional for backward compatibility. * swarm/api: completely remove bzzr and bzzi schemes Remove old schemes in favour of bzz-raw and bzz-immutable. * swarm/api: revert "completely remove bzzr and bzzi schemes" Keep bzzr and bzzi schemes for backward compatibility. At least until 0.3 swarm release.
* | swarm/api: implement NoResolverError with information about TLDJanos Guljas2017-12-192-7/+29
| | | | | | | | | | MultiResolver needs to provide information about TLD that has no resolver configured for.
* | cmd/swarm, swarm: disable ENS API by defaultJanos Guljas2017-12-182-18/+7
| | | | | | | | | | | | Specifying ENS API CLI flag, env variable or configuration field is required for ENS resolving. Backward compatibility is preserved with --ens-api="" CLI flag value.
* | cmd/swarm: Merge branch 'master' into multiple-ens-endpointsJanos Guljas2017-12-144-17/+15
|\| | | | | | | Fix a conflict in cmd/swarm envVarsOverride function.
| * all: use gometalinter.v2, fix new gosimple issues (#15650)Zach2017-12-134-17/+15
| |
* | swarm, cmd/swarm: Merge branch 'master' into multiple-ens-endpointsJanos Guljas2017-12-1313-252/+365
|\| | | | | | | | | | | | | | | | | | | | | | | Merge with changes that implement config file PR #15548. Field *EnsApi string* in swarm/api.Config is replaced with *EnsAPIs []string*. A new field *EnsDisabled bool* is added to swarm/api.Config for easy way to disable ENS resolving with config file. Signature of function swarm.NewSwarm is changed and simplified.
| * cmd/swarm: add config file (#15548)holisticode2017-12-129-198/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a TOML configuration option to swarm. It reuses the TOML configuration structure used in geth with swarm customized items. The commit: * Adds a "dumpconfig" command to the swarm executable which allows printing the (default) configuration to stdout, which then can be redirected to a file in order to customize it. * Adds a "--config <file>" option to the swarm executable which will allow to load a configuration file in TOML format from the specified location in order to initialize the Swarm node The override priorities are like follows: environment variables override command line arguments override config file override default config.
| * p2p, swarm/network/kademlia: use IsZero to check for zero time (#15603)ferhat elmas2017-12-041-1/+1
| |
| * Merge pull request #15329 from holisticode/exact-match-fixPéter Szilágyi2017-11-242-27/+61
| |\ | | | | | | swarm/api: bug fix exact match for manifest
| | * swarm/api: bug fix exact match for manifestFabio Barone2017-11-092-27/+61
| | |
* | | swarm/api: use path.Ext instead strings.LastIndex in MultiResolver.ResolveJanos Guljas2017-12-051-2/+3
| | |
* | | swarm/api: remove unneeded blank assignementJanos Guljas2017-12-051-1/+1
| | |
* | | swarm/api: initialize map with make to comply with the conventionJanos Guljas2017-12-051-1/+1
| | |
* | | swarm/api: remove unneeded assignment in MultiResolverOptionWithResolverJanos Guljas2017-12-051-3/+0
| | |
* | | swarm: add CLI --ens-endpoint flag (#14386)Janos Guljas2017-12-013-9/+269
|/ / | | | | | | | | Implement a CLI flag that can be repeated to allow multiple ENS resolvers for different TLDs.
* / build: enable unconvert linter (#15456)ferhat elmas2017-11-1110-20/+21
|/ | | | | | | | | * build: enable unconvert linter - fixes #15453 - update code base for failing cases * cmd/puppeth: replace syscall.Stdin with os.Stdin.Fd() for unconvert linter
* all: gofmt -w -s (#15419)ferhat elmas2017-11-083-30/+27
|
* core, swarm: typo fixesferhat elmas2017-10-303-4/+4
|
* swarm/fuse: return amount of data written if the file exists (#15261)Darrel Herbst2017-10-091-1/+1
| | | | | | | If the file already existed, the WriteResponse.Size was being set as the length of the entire file, not just the amount that was written to the existing file. Fixes #15216
* swarm/api: fixed 404 handling on missing default entry (#15139)holisticode2017-10-066-39/+311
|
* swarm/storage: pyramid chunker re-write (#14382)Zahoor Mohamed2017-09-2211-235/+1007
|
* swarm/api/http: add error pages (#14967)holisticode2017-09-096-20/+662
|
* swarm/fuse: use Equal instead of Compare (#15097)Fiisio2017-09-081-1/+1
|
* bmt: Binary Merkle Tree Hash (#14334)Viktor Trón2017-09-052-1/+3
| | | | | | bmt is a new package that provides hashers for binary merkle tree hashes on size-limited chunks. the main motivation is that using BMT hash as the chunk hash of the swarm hash offers logsize inclusion proofs for arbitrary files on a 32-byte resolution completely viable to use in challenges on the blockchain.
* swarm: fix megacheck warningsEgon Elbre2017-08-1418-108/+39
|
* swarm/api: make api.NewManifest synchronous (#14880)Lewis Marshall2017-07-311-1/+1
| | | | | Previously, NewManifest was asynchronous so subsequent code which tried to use the returned manifest could error as the manifest was not yet persisted.
* cmd/swarm: support exporting, importing chunk db (#14868)Lewis Marshall2017-07-311-0/+82
|
* swarm/api/http: redirect root manifest requests to include trailing slash ↵Lewis Marshall2017-07-252-0/+68
| | | | (#14806)
* cmd/swarm: Exit if --ethapi is setLewis Marshall2017-06-301-1/+1
| | | | | | | | The previous attempt to use --ethapi as a fallback if --ens-api is not set does not work because --ens-api has a default value, and also setting --ens-api to "" is the suggested way to disable ENS lookups. Signed-off-by: Lewis Marshall <lewis@lmars.net>
* cmd/swarm: Support using Mainnet for resolving ENS namesLewis Marshall2017-06-262-10/+7
| | | | Signed-off-by: Lewis Marshall <lewis@lmars.net>
* swarm/storage: remove panic on invalid chunkaron2017-06-251-1/+1
|
* swarm/fuse: use subtestsFelix Lange2017-06-211-171/+112
|
* swarm/fuse: simplify externalUnmountFelix Lange2017-06-212-35/+20
| | | | | | The code looked for /usr/bin/diskutil on darwin, but it's actually located in /usr/sbin. Fix that by not specifying the absolute path. Also remove weird timeout construction and extra whitespace.
* swarm/dev: add development environment (#14332)Lewis Marshall2017-06-0111-0/+726
| | | | | This PR adds a Swarm development environment which can be run in a Docker container and provides scripts for building binaries and running Swarm clusters.
* accounts/keystore, crypto: enforce 256 bit keys on importPéter Szilágyi2017-05-231-1/+4
|
* swarm/api: Fix adding paths which exist as manifests (#14482)Lewis Marshall2017-05-222-2/+35
| | | Signed-off-by: Lewis Marshall <lewis@lmars.net>
* cmd/swarm: Add --httpaddr flag (#14475)Lewis Marshall2017-05-224-19/+22
| | | | | Fixes #14474. Signed-off-by: Lewis Marshall <lewis@lmars.net>
* swarm/api: fix error reporting in api.Resolve (#14464)Lewis Marshall2017-05-133-21/+148
| | | | | | | Previously, resolve errors were being swallowed and the returned error was a generic "not a content hash" which isn't helpful. This updates the Resolve function to fail fast rather than only returning an error at the end, and also adds test coverage.
* all: update license informationFelix Lange2017-04-146-19/+35
|
* swarm/api: better name resolver handling (#3754)holisticode2017-04-133-16/+51
| | | Fixes #3608
* swarm/api: FUSE read-write support (#13872)Zahoor Mohamed2017-04-1215-362/+1693
| | | | | | | | - Moved fuse related code in a new package, swarm/fuse - Added write support - Create new files - Delete existing files - Append to files (with limitations) - More test coverage
* swarm/api: refactor and improve HTTP API (#3773)Lewis Marshall2017-04-0717-592/+1702
| | | | | | | This PR deprecates the file related RPC calls in favour of an improved HTTP API. The main aim is to expose a simple to use API which can be consumed by thin clients (e.g. curl and HTML forms) without the need for complex logic (e.g. manipulating prefix trie manifests).
* cmd/swarm: allow uploading from stdin (#3744)Louis Holbrook2017-04-061-1/+25
| | | | | | - intended to be a swarm alternative to termbin.com - added --stdin flag to swarm executable. if set, swarm will read data from stdin and postRaw it.
* cmd/swarm, swarm/api/client: add HTTP API client and 'swarm ls' command (#3742)Lewis Marshall2017-04-056-63/+495
| | | | | | | | This adds a swarm ls command which lists files and directories stored in a manifest. Rather than listing all files, it uses "directory prefixes" in case there are a lot of files in a manifest but you just want to traverse it. This also includes some refactoring to the tests and the introduction of a swarm/api/client package to make things easier to test.
* swarm/api: improve FUSE build constraints, logging and APIs (#3818)Felix Lange2017-03-315-144/+105
| | | | | | | | | | | | | | | | | | | | * swarm/api: fix build/tests on unsupported platforms Skip FUSE tests if FUSE is unavailable and change build constraints so the 'lesser' platforms aren't mentioned explicitly. The test are compiled on all platforms to prevent regressions in _fallback.go Also gofmt -w -s because why not. * internal/web3ext: fix swarmfs wrappers Remove inputFormatter specifications so users get an error when passing the wrong number of arguments. * swarm/api: improve FUSE-related logging and APIs The API now returns JSON objects instead of strings. Log messages for invalid arguments are removed.
* swarm/api: support mounting manifests via FUSE (#3690)Zahoor Mohamed2017-03-236-2/+636
|
* all: import "context" instead of "golang.org/x/net/context"Felix Lange2017-03-232-2/+2
| | | | | | | | | | There is no need to depend on the old context package now that the minimum Go version is 1.7. The move to "context" eliminates our weird vendoring setup. Some vendored code still uses golang.org/x/net/context and it is now vendored in the normal way. This change triggered new vet checks around context.WithTimeout which didn't fire with golang.org/x/net/context.
* swarm/network/kademlia: set kademlia log output to debug instead of warn (#3787)holisticode2017-03-181-1/+1
|
* rpc: add support for extended headers in CORS requests (#3783)Micah Zoltu2017-03-161-0/+1
| | | | Fixes #3762. Details about parameter: https://github.com/rs/cors/blob/a62a804a8a009876ca59105f7899938a1349f4b3/cors.go#L50-L54
* errs: kill it with firePéter Szilágyi2017-03-011-70/+33
|
* all: unify big.Int zero checks, use common/math in more places (#3716)Felix Lange2017-02-281-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/math: optimize PaddedBigBytes, use it more name old time/op new time/op delta PaddedBigBytes-8 71.1ns ± 5% 46.1ns ± 1% -35.15% (p=0.000 n=20+19) name old alloc/op new alloc/op delta PaddedBigBytes-8 48.0B ± 0% 32.0B ± 0% -33.33% (p=0.000 n=20+20) * all: unify big.Int zero checks Various checks were in use. This commit replaces them all with Int.Sign, which is cheaper and less code. eg templates: func before(x *big.Int) bool { return x.BitLen() == 0 } func after(x *big.Int) bool { return x.Sign() == 0 } func before(x *big.Int) bool { return x.BitLen() > 0 } func after(x *big.Int) bool { return x.Sign() != 0 } func before(x *big.Int) int { return x.Cmp(common.Big0) } func after(x *big.Int) int { return x.Sign() } * common/math, crypto/secp256k1: make ReadBits public in package math
* all: disable log message colors outside of gethFelix Lange2017-02-271-1/+1
| | | | Also tweak behaviour so colors are only enabled when stderr is a terminal.
* eth, les, swarm: fix go vet issues sufraced by log15Péter Szilágyi2017-02-236-8/+8
|
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-2323-317/+295
|
* swarm: remove superfluous line break in log statementsPéter Szilágyi2017-02-232-9/+5
|
* swarm/api/http: fix go vet issue on Go 1.8Péter Szilágyi2017-02-171-0/+3
|
* swarm/network: fix chunk integrity checks (#3665)Viktor Trón2017-02-134-21/+77
| | | | | | | | | | * swarm/network: integrity on incoming known chunks * swarm/network: fix integrity check for incoming chunks * swarm/storage: imrpoved integrity checking on chunks * dbstore panics on corrupt chunk entry an prompts user to run cleandb * memstore adds logging for garbage collection * dbstore refactor item delete. correct partial deletes in Get * cmd/swarm: added cleandb subcommand
* swarm/storage: release chunk storage after stop swarm (#3651)Maksim2017-02-098-9/+36
| | | closes #3650
* swarm/api/http: add missing copyright headerPéter Szilágyi2017-01-301-0/+16
|
* cmd/swarm, swarm/api: bzzr improve + networkid prionolash2017-01-275-13/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes #3444 fixes #3494 networkid override Added comments to explain why test against 0 appears twice * Command line overrides saved config, saved config overrides system default --- fixes #3476 bzzr get with path Finally a hopefully clean commit for this PR Added check for empty path to avoid SIGSEGV in path parser and resolver Added requested tests for empty path and non-existing manifest. However signature for StartHTTPServer had changed. Now it's hacked as so: StartHttpServer(api.API, &Server{Addr: "127.0.0.1:8504", CorsString: ""}) * Parse url before resolve when path and ENS is supplied, example * swarm/api/http proxy server test for retrieval of subpath through get * Removed nil entry assignment on subtrie leaf in recursive key retrieval * Cleaned up path-or-no-path condition in proxy server get handler * swarm: processed with gofmt refers to lash/go-ethereum@90daa7a * swarm: Added public access method Parse alias to parse * swarm: processed with gofmt References nolash/go-ethereum@2ec3fd7 * Rename parse to Parse, removed alias
* cmd,eth,les,internal: remove natspec supportBas van Kervel2017-01-171-3/+1
|
* all: fix ineffectual assignments and remove uses of crypto.Sha3Felix Lange2017-01-099-33/+42
| | | | | go get github.com/gordonklaus/ineffassign ineffassign .