aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/swarm.go
Commit message (Collapse)AuthorAgeFilesLines
* swarm: Chunk refactor (#17659)Balint Gabor2018-09-131-31/+19
| | | | | | 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>
* Kademlia refactor (#17641)Viktor Trón2018-09-121-1/+1
| | | | | | | | * 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
* swarm, swarm/network, swarm/pss: log error and fix logs (#17410)Anton Evangelatov2018-08-211-18/+16
| | | | | | * swarm, swarm/network, swarm/pss: log error and fix logs * swarm/pss: log compressed publickey
* cmd/swarm, swarm: added access control functionality (#17404)Elad2018-08-151-3/+1
| | | | | 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-141-9/+4
| | | | | | | | | | | | | | | | | | * 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
* swarm: Added lightnode flag (#17291)Attila Gazso2018-08-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * 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/storage/mru: Client-side MRU signatures (#784)Javier Peletier2018-07-231-19/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: integrate OpenTracing; propagate ctx to internal APIs (#17169)Anton Evangelatov2018-07-131-0/+13
| | | | | | * 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-121-4/+3
|
* swarm: network rewrite mergeethersphere2018-06-221-133/+207
|
* swarm: initial instrumentation (#15969)Anton Evangelatov2018-02-231-0/+32
| | | | | | | | | | | | | | | | | | * 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
* cmd/swarm, swarm: disable ENS API by defaultJanos Guljas2017-12-181-16/+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.
* swarm, cmd/swarm: Merge branch 'master' into multiple-ens-endpointsJanos Guljas2017-12-131-33/+55
|\ | | | | | | | | | | | | | | | | | | | | | | 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-121-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | swarm: add CLI --ens-endpoint flag (#14386)Janos Guljas2017-12-011-9/+88
|/ | | | | Implement a CLI flag that can be repeated to allow multiple ENS resolvers for different TLDs.
* swarm: fix megacheck warningsEgon Elbre2017-08-141-3/+3
|
* cmd/swarm: Support using Mainnet for resolving ENS namesLewis Marshall2017-06-261-4/+4
| | | | Signed-off-by: Lewis Marshall <lewis@lmars.net>
* cmd/swarm: Add --httpaddr flag (#14475)Lewis Marshall2017-05-221-10/+10
| | | | | Fixes #14474. Signed-off-by: Lewis Marshall <lewis@lmars.net>
* swarm/api: better name resolver handling (#3754)holisticode2017-04-131-3/+8
| | | Fixes #3608
* swarm/api: FUSE read-write support (#13872)Zahoor Mohamed2017-04-121-3/+4
| | | | | | | | - 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-071-14/+16
| | | | | | | 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, swarm/api/client: add HTTP API client and 'swarm ls' command (#3742)Lewis Marshall2017-04-051-1/+4
| | | | | | | | 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: support mounting manifests via FUSE (#3690)Zahoor Mohamed2017-03-231-2/+13
|
* all: import "context" instead of "golang.org/x/net/context"Felix Lange2017-03-231-1/+1
| | | | | | | | | | 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.
* eth, les, swarm: fix go vet issues sufraced by log15Péter Szilágyi2017-02-231-1/+1
|
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-231-21/+20
|
* swarm/storage: release chunk storage after stop swarm (#3651)Maksim2017-02-091-5/+11
| | | closes #3650
* swarm/api/http: add support for CORS headers (#3388)Maran2017-01-051-2/+10
|
* cmd/bzzd: swarm daemon fixes (#3359)Viktor Trón2016-11-281-2/+2
| | | | | | | | | | | | * cmd/bzzd: add missing p2p/discovery flags * cmd/bzzd: fix two bugs crashing bzzd if bootnodes flag given * cmd/bzzd: make no swap default, renamed flag bzznoswap->bzzswap * internal/web3ext: correct methods for bzz IPC module * cmd/bzzd: ethapi param not mandatory. Warning if no blockchain * cmd/bzzd: correct default IPC modules in help string * cmd/utils: fix help description for networkId - add Ropsten * cmd/bzz, swarm/api, swarm/network: add swarm networkId flag * cmd/bzzd: change nosync flag to sync and BootTFlag
* swarm: plan bee for content storage and distribution on web3ΞTHΞЯSPHΞЯΞ2016-08-311-0/+309
This change imports the Swarm protocol codebase. Compared to the 'swarm' branch, a few mostly cosmetic changes had to be made: * The various redundant log message prefixes are gone. * All files now have LGPLv3 license headers. * Minor code changes were needed to please go vet and make the tests pass on Windows. * Further changes were required to adapt to the go-ethereum develop branch and its new Go APIs. Some code has not (yet) been brought over: * swarm/cmd/bzzhash: will reappear as cmd/bzzhash later * swarm/cmd/bzzup.sh: will be reimplemented in cmd/bzzup * swarm/cmd/makegenesis: will reappear somehow * swarm/examples/album: will move to a separate repository * swarm/examples/filemanager: ditto * swarm/examples/files: will not be merged * swarm/test/*: will not be merged * swarm/services/swear: will reappear as contracts/swear when needed