- 09 Jul, 2018 1 commit
-
-
Lucas Molas authored
Add a UnixFS `Directory` that hides implementation details and helps to distinguish *what* is a UnixFS directory. Replace the `unixfs.io.Directory` structure that contained the HAMT and basic directory implementations (through inner pointers) with an interface containing the same methods. Implement those methods in two clearly distinct structures for each implementation (`BasicDirectory` and `HAMTDirectory`) avoiding pointer logic and clearly differentiating which implementation does what. The potential basic to HAMT transition was being hidden behind the `AddChild` call at the UnixFS layer (changing one implementation pointer with the other one), it is now being explicitly done at the MFS layer. Rename the `dirbuilder.go` file to `directory.go` and change the `Directory` MFS attribute `dirbuilder` to `unixfsDir` to be consistent. License: MIT Signed-off-by: Lucas Molas <schomatis@gmail.com>
-
- 27 Jun, 2018 1 commit
-
-
Steven Allen authored
Updates: * go-kad-dht: Query performance improvements, DHT client fixes, validates records on *local* put. * go-libp2p-swarm/go-libp2p-transport: Timeout improvements. * go-multiaddr-net: Exposes useful Conn methods (CloseWrite, CloseRead, etc.) * go-log: fixes possible panic when enabling/disabling events. * go-multiaddr: fixes possible panic when stringifying malformed multiaddrs, adds support for consuming /p2p/ multiaddrs. fixes #5113 unblocks #4895 License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
-
- 13 Jun, 2018 1 commit
-
-
Whyrusleeping authored
unixfs: integrate `pb.Data` into `FSNode` to avoid duplicating fields
-
- 11 Jun, 2018 1 commit
-
-
Lucas Molas authored
To avoid duplicating fields and making the code easier to follow. Remove all of `FSNode` previous fields in favor on a single `pb.Data` structure that is not exported. Accessor methods are added only for the necessary internal fields. This takes up more memory, `pb.Data` is always created inside `FSNode` and it stays there instead of just being created and destroyed during the (un)marshal operations. The removed fields `Data`, `blocksizes` and `Type` had a direct counterpart in the embedded `pb.Data` structure, in contrast (only) the `subtotal` field doesn't have one, it was used as a temporary accumulator to track the `Filesize`, which is now being kept updated on every modification (to ensure the entire `FSNode` is always at a valid state), so `subtotal` could just be removed without the addition of any other field (this temporary accumulator was obscuring how `Filesize` was computed). To keep `Filesize` up to date a method was added (`UpdateFilesize()`) to adjust its value in the two places where the file size could be modified, when changing its data (in `SetData()`, accessor method added) and when adding or removing child nodes (in `AddBlockSize()` and `RemoveBlockSize()`). A constructor method was added (`NewFSNode()`) to initialize the required fields, like `Type` which is explicitly set, this deprecates the previous methodology of just calling `new(FSNode)` and relying in the default value of `pb.Data_DataType` (`Data_Raw`) to avoid an explicit assignment. Also, `Filesize` is initialized to avoid being left with a `nil` value before marshaling empty nodes, which would result in a different hash from previous versions, to be backwards compatible. Previous versions of `GetBytes()` always set the `Filesize` value, even though it is reflected as an `optional` field in the `.proto` file (this may be an inaccurate field rule). Without the duplicated fields the functions `GetBytes()` and `FSNodeFromBytes()` are now reduced to simple `Marshal()` and `Unmarshal()` operations respectively. License: MIT Signed-off-by: Lucas Molas <schomatis@gmail.com>
-
- 09 Jun, 2018 1 commit
-
-
Steven Allen authored
* go-log * sys * go-crypto License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
-
- 01 Jun, 2018 1 commit
-
-
Steven Allen authored
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
-
- 20 Apr, 2018 3 commits
-
-
Whyrusleeping authored
misc: Remove some dead code
-
Whyrusleeping authored
github: remove go-ipfs version from issue template
-
Whyrusleeping authored
misc: Fix a few typos
-
- 19 Apr, 2018 1 commit
-
-
Hector Sanjuan authored
License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
-
- 17 Apr, 2018 1 commit
-
-
Lucas Molas authored
`AddNodeLink` used to cache the linked node whereas `AddNodeLinkClean` did not, however, at some point the former was changed to do the same thing as the latter (i.e., not cache the linked node). That is, they now do the same thing so there's no reason to have both. The name `AddNodeLink` is preserved, even though it used to imply the cache functionality contrasting with the `Clean` suffix of `AddNodeLinkClean`, with this function removed the cache connotation doesn't hold anymore. License: MIT Signed-off-by: Lucas Molas <schomatis@gmail.com>
-
- 08 Apr, 2018 1 commit
-
-
Whyrusleeping authored
improve performance of HAMTs
-
- 30 Mar, 2018 6 commits
-
-
Łukasz Magiera authored
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
-
Łukasz Magiera authored
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
-
Steven Allen authored
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
-
Steven Allen authored
1. Use a custom bitfield type instead of bigints. 2. Make iterating over a hamt *significantly* faster. License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
-
Steven Allen authored
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
-
Steven Allen authored
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
-
- 27 Mar, 2018 1 commit
-
-
Steven Allen authored
We only need to get the child if it's a shard. License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
-
- 24 Mar, 2018 1 commit
-
-
Steven Allen authored
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
-
- 23 Mar, 2018 6 commits
-
-
Steven Allen authored
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
-
Steven Allen authored
makes ipfs get work on sharded directories fixes #4871 License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
-
Jakub Sztandera authored
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
-
Steven Allen authored
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
-
Steven Allen authored
The dagmodifier *only* works because we're using a bytes.Buffer. License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
-
Whyrusleeping authored
misc: spelling of retrieval
-
- 21 Mar, 2018 1 commit
-
-
Łukasz Magiera authored
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
-
- 15 Mar, 2018 1 commit
-
-
Jakub Sztandera authored
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
-
- 04 Mar, 2018 1 commit
-
-
Lucas Molas authored
Fixes #4720. License: MIT Signed-off-by: Lucas Molas <schomatis@gmail.com>
-
- 08 Feb, 2018 5 commits
-
-
Hector Sanjuan authored
License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
-
Hector Sanjuan authored
License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
-
Hector Sanjuan authored
License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
-
Hector Sanjuan authored
License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
-
Hector Sanjuan authored
License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
-
- 07 Feb, 2018 2 commits
-
-
Hector Sanjuan authored
License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
-
Hector Sanjuan authored
Per @whys suggestions License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
-
- 06 Feb, 2018 4 commits
-
-
Hector Sanjuan authored
License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
-
Hector Sanjuan authored
per @stebalien's comment License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
-
Hector Sanjuan authored
License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
-
Hector Sanjuan authored
License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
-