Commit Graph

209 Commits

Author SHA1 Message Date
Jeromy
76e4dcf757 appease codeclimate
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-12-04 10:59:57 -08:00
Jeromy
f8eaae329f fix hamt delete issue
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-11-18 08:39:38 -08:00
Jeromy Johnson
005d243cd3 Merge pull request #4320 from ipfs/fix/gateway-seeker
gateway: fix seeker can't seek on specific files
2017-10-20 13:15:32 +01:00
Kevin Atkinson
0182e5977c Documentation.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-10-19 14:14:49 -04:00
Kevin Atkinson
f2fbfdf291 mfs: inherit CID prefix from from parent directory
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-10-19 14:14:49 -04:00
Kevin Atkinson
77e9b8ddf9 Test for alternative hash function in Dag Modifier.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-10-19 14:14:42 -04:00
Kevin Atkinson
2e15dcb647 Enable CidV1 (and other prefixes) in the Dag Modifier.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-10-19 13:30:53 -04:00
Kevin Atkinson
7302c3ab66 Provide support for raw leaves in DAG modifier.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-10-19 12:59:40 -04:00
Kevin Atkinson
189cf0cb03 Test raw leaves in trickle dag tests.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-10-19 12:59:40 -04:00
Łukasz Magiera
3fbb77153b gateway: custom seeker for files
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-10-18 22:25:36 +02:00
Łukasz Magiera
e71dce5dfb gateway: fix seeker can't seek on specific files
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-10-18 20:10:22 +02:00
Steven Allen
70d6629940 gx: update go-cid, go-multibase, base32
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-09-01 17:46:49 -07:00
Jeromy
cccc6a94a3 update go-multihash and bubble up changes
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-07-11 19:27:43 -07:00
Łukasz Magiera
8ab93aaeb2 Update go-datastore to 1.2.2, go-cid to 0.7.16
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-07-04 20:18:57 +02:00
Steven Allen
13636bef50 blocks: gx import go-block-format
And updated related dependencies.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-06-29 22:12:14 +02:00
Kevin Atkinson
3f6a7b7b81 dagmodifer: refactor appendData method
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-06-26 19:12:20 -04:00
Kevin Atkinson
47001548e1 Finish basic support for raw nodes in dag modifier.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-06-26 19:12:07 -04:00
Jeromy
c75ac6a7fa Allow dagmodifier to be created (but not used) with raw nodes
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-06-26 19:12:07 -04:00
zramsay
b77d5aa13d hamt: reinstate a useful debug function
License: MIT
Signed-off-by: Zach Ramsay <zach.ramsay@gmail.com>
2017-06-01 14:04:30 -04:00
zramsay
096b3232d5 address PR comments; remove commented/dead code
License: MIT
Signed-off-by: Zach Ramsay <zach.ramsay@gmail.com>
2017-06-01 12:13:04 -04:00
zramsay
c5df8f0796 apply the megacheck tool to improve code quality
License: MIT
Signed-off-by: Zach Ramsay <zach.ramsay@gmail.com>
2017-05-31 16:56:11 -04:00
Jeromy
a22cae1bce fix coreapi unixfs resolving
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-04-30 21:20:48 -07:00
Jeromy
0597a04924 Fix sharding memory growth, and fix resolver for unixfs paths
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-04-30 13:48:28 -07:00
Jeromy
b71ef8354e Fix gateway handling of sharded directories
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-04-29 13:01:22 -07:00
Kevin Atkinson
9350c513f1 Documentation
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-04-25 23:47:48 -04:00
Kevin Atkinson
8a47786c67 hamt: support using CIDv1 by allowing the prefix to be set
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-04-25 23:41:25 -04:00
Kevin Atkinson
076d0bd9b1 merkeldag: change SetPrefix param to a pointer and reset the prefix on nil
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-04-25 23:36:39 -04:00
Kevin Atkinson
518adec022 adder: add support for using CidV1
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-04-25 23:36:39 -04:00
Jeromy
b15470d548
bubble up updates from go-multihash changes
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-04-20 20:28:04 +02:00
Jeromy Johnson
ff997c1f7a Merge pull request #3824 from ipfs/fix/govet/some-error
fix: multiple govet warnings
2017-03-23 20:56:10 -07:00
Jeromy
65b9716989 fix go vet issues in hamt sharding PR
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-03-23 18:01:57 -07:00
Jakub Sztandera
6546aeade7
fix: multiple govet warnings
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-03-24 01:02:50 +01:00
Jeromy
c4c665395a add global config switch for sharding
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-03-23 16:42:31 -07:00
Jeromy
62bb7c966d chekc that size input to newHamtShard is a power of two
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2017-03-21 20:19:22 -07:00
Jeromy
8d4791c9bb add more docs on hamt
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2017-03-21 20:19:22 -07:00
Jeromy
c8af993a8c iterator technique for unixfs dir listing
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2017-03-21 20:19:22 -07:00
Jeromy
bb09ffd756 implement an HAMT for unixfs directory sharding
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2017-03-21 20:19:22 -07:00
Jeromy
b1588c7162 make raw leaves work with 'ipfs get'
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-03-06 20:12:05 -08:00
Jeromy
b4eeff2d84 update go-multihash and bubble up deps
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-02-12 12:25:41 -08:00
Jakub Sztandera
f630222580
make: rework makefiles for non-recursive make and add sharness coverage
This commit introduces non-recursive Makefile infrastructure that replaces current Makefile infrastructure.
It also generally cleanups the Makefiles, separates them into nicer sub-modules and centralizes common operations into single definitions.

It allows to depend on any target that is defined in the makefile, this means that for example `gx install` is called once when `make build test_expensive_sharness` is called instead of 4 or 5 times.

It also makes the dependencies much cleaner and allows for reuse of modules. For example sharness coverage collection (WIP) uses sharness target with amended PATH, previously it might have been possible but not without wiring in the coverage collection into sharness make runner code.

Yes, it is more complex but not much more. There are few rules that have to be followed and few complexities added but IMHO it is worth it.

How to NR-make:
1. If make is to generate some file via a target, it MUST be defined in Rules.mk file in the directory of the target.
2. `Rules.mk` file MUST have `include mk/header.mk` statement as the first line and `include mk/footer.mk` statement as the last line (apart from project root `Rules.mk`).
3. It then MUST be included by the closest `Rules.mk` file up the directory tree.
4. Inside a `Rules.mk` special variable accessed as `$(d)` is defined. Its value is current directory, use it so if the `Rules.mk` file is moved in the tree it still works without a problem. Caution: this variable is not available in the recipe part and MUST NOT be used. Use name of the target or prerequisite to extract it if you need it.
5. Make has only one global scope, this means that name conflicts are a thing. Names SHOULD  follow `VAR_NAME_$(d)` convention. There are exceptions from this rule in form of well defined global variables. Examples: General lists `TGT_BIN`, `CLEAN`; General targets: `TEST`, `COVERAGE`; General variables: `GOFLAGS`, `DEPS_GO`.
3. Any rules, definitions or variables that fit some family SHOULD be defined in `mk/$family.mk` file and included from project root `Rules.mk`

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-02-12 01:18:40 +01:00
Kevin Atkinson
78ff01757f Fix typo and formatting issues.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-01-04 17:26:08 -05:00
Zander Mackie
6622fd0a28 Add Some Comments to unixfs/format
License: MIT
Signed-off-by: Zander Mackie <zmackie@gmail.com>
2016-12-09 08:30:51 -05:00
Zander Mackie
7b16a8daa8 Add test for unixfs/format to reach 87% coverage.
License: MIT
Signed-off-by: Zander Mackie <zmackie@gmail.com>
2016-12-09 08:30:46 -05:00
Mib Kd743naq
8ee4280f7b Switch unixfs.Metadata.MimeType to optional
*** THIS IS A BREAKING CHANGE *** as per [1]: "Required is forever"

Nevertheless this seems like a good idea at this time: there are no known
producers ( nor consumers ) of MetaData nodes, and the current requirement
of MimeType has an extremely narrow application scope.

This change could very well be rejected in lieu of implementing a new type
of node ( e.g. TheRealMetadata ) in the DataType enum.

Based on https://github.com/ipfs/go-ipfs/issues/3451#issuecomment-264246718

License: MIT
Signed-off-by: Mib Kd743naq <mib.kd743naq@gmail.com>

[1] https://developers.google.com/protocol-buffers/docs/proto#specifying-field-rules
2016-12-02 06:43:15 +01:00
Jeromy
53d47669da bubble up go-datastore deps
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-11-28 22:29:38 -08:00
Jakub Sztandera
1d67c93c3a
Remove trailing new-line from pbdagreader.go
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-11-24 20:05:01 +01:00
Jakub Sztandera
1fd99dae50
Remove NewRSNCFromBytes and use NewDagReader for recursive reading
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-11-22 19:10:35 +01:00
Jakub Sztandera
1817d10cfd
Create bufDagReader
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-11-21 18:10:21 +01:00
Jakub Sztandera
09854c0645
Move proto-dag reader to separate file and change name
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-11-21 18:10:21 +01:00
Jakub Sztandera
724515104e
Make unixio.DagReader an interface
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-11-21 18:10:21 +01:00