aboutsummaryrefslogtreecommitdiffstats
path: root/swarm
Commit message (Collapse)AuthorAgeFilesLines
* 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 .
* all: fix spelling errorsPéter Szilágyi2017-01-072-2/+2
|
* logger, pow/dagger, pow/ezp: delete dead codeFelix Lange2017-01-071-7/+0
|
* all: fix issues reported by honnef.co/go/simple/cmd/gosimpleFelix Lange2017-01-072-2/+2
|
* all: gofmt -w -sFelix Lange2017-01-061-2/+2
|
* swarm/api/http: add support for CORS headers (#3388)Maran2017-01-052-5/+33
|
* swarm/http: check error returned by reader.Size (#3470)Aron Fischer2016-12-221-1/+13
|
* swarm/storage: call size before seek-from-end (#3469)Aron Fischer2016-12-221-2/+5
|
* swarm/api: check for zero length manifest error (#3468)Aron Fischer2016-12-221-0/+5
|
* swarm/network, cmd/swarm: swarm default network id is 3 (to match Ropsten)zelig2016-12-131-1/+1
|
* swarm/api: Update ENS root address for Ropsten & prod (#3391)Nick Johnson2016-12-022-5/+4
|
* cmd/bzzd: swarm daemon fixes (#3359)Viktor Trón2016-11-284-13/+20
| | | | | | | | | | | | * 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
* Merge pull request #3325 from fjl/p2p-netrestrictFelix Lange2016-11-251-0/+5
|\ | | | | Prevent relay of invalid IPs, add --netrestrict
| * swarm/network: prevent relay of invalid IPsFelix Lange2016-11-231-0/+5
| |
* | common/httpclient, les: removed httpclientJeffrey Wilcke2016-11-251-6/+4
|/
* swarm/api/http: reject requests without content-lengthFelix Lange2016-11-111-1/+5
|
* swarm/network: skip TestSyncDbFelix Lange2016-11-111-0/+2
|
* swarm/api: add bzz prefix to swarm directoryFelix Lange2016-11-112-12/+7
|
* all: update license informationFelix Lange2016-11-091-1/+1
|
* internal/debug, internal/ethapi, rpc, swarm/storage: Ran "go fmt"Kenji Siu2016-11-011-1/+0
|
* Merge pull request #3111 from obscuren/gas-price-forkPéter Szilágyi2016-10-151-1/+1
|\ | | | | core, core/vm: added gas price variance table (EIP #150)
| * core, core/vm: added gas price variance tableJeffrey Wilcke2016-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This implements 1b & 1c of EIP150 by adding a new GasTable which must be returned from the RuleSet config method. This table is used to determine the gas prices for the current epoch. Please note that when the CreateBySuicide gas price is set it is assumed that we're in the new epoch phase. In addition this PR will serve as temporary basis while refactorisation in being done in the EVM64 PR, which will substentially overhaul the gas price code.
* | swarm/storage: Allow EOF at the end of the reader in the chunker. Handle the ↵Daniel A. Nagy2016-10-141-5/+8
| | | | | | | | case when Read returns less than length of target slice
* | swarm/storage: fix chunker when reader is brokenaron2016-10-114-101/+89
|/ | | | | | | | * brokenLimitedReader gives error after half size * TestRandomBrokenData tests chunker with broken reader * add blocking quitC (instead of errC) and use errC only for errors * don't close chunkC in tester Split, * use quitC to quit chunk storage loop
* swarm: plan bee for content storage and distribution on web3ΞTHΞЯSPHΞЯΞ2016-08-3149-0/+10651
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