Making this deterministic keeps us from creating an exponential amount
of objects as the number of pins in the set increases.
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
Also change existing 'Node' type to 'ProtoNode' and use that most
everywhere for now. As we move forward with the integration we will try
and use the Node interface in more places that we're currently using
ProtoNode.
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
This change adds the /ipfs/bitswap/1.1.0 protocol. The new protocol
adds a 'payload' field to the protobuf message and deprecates the
existing 'blocks' field. The 'payload' field is an array of pairs of cid
prefixes and block data. The cid prefixes are used to ensure the correct
codecs and hash functions are used to handle the block on the receiving
end.
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
Switched from using a map to an array since the bounds are
small and fixed. This should save us some significant time and on
accesses
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
WARNING: No migration performed! That needs to come in a separate
commit, perhaps amended into this one.
This is the minimal rewrite, only changing the storage from
JSON(+extra keys) in Datastore to IPFS objects. All of the pinning
state is still loaded in memory, and written from scratch on Flush. To
do more would require API changes, e.g. adding error returns.
Set/Multiset is not cleanly separated into a library, yet, as it's API
is expected to change radically.
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>