Speed and flexibility, new IPFS for a new year!
I just saw JS IPFS 0.34 breeze out the front door in a totally disco powder blue suit πΊπ». It's fast, small, supports big dirs, is flexible with CID versions and much, much more. More deets in the release notes https://t.co/3uqFw6WDbu pic.twitter.com/ydTmq2B4zn
β Alan Shaw (@_alanshaw) January 17, 2019
# π¦ Highlights
# π Reading Protobuf DAG nodes is super fast
Reading Protobuf DAG nodes just got a serious speed boost as well as a memory reduction. Previously Protobuf DAG nodes (dag-pb nodes for short) carried a multihash property (a CIDv0 (opens new window)) with them. This used up loads of CPU time calculating the hash for a given node as it was retrieved from storage and with the advent of CIDv1 (opens new window) there was no guarantee the hashing algorithm and length were correct.
So, we removed it! π¦ ...but that had the unfortunate consequence of making the object API a whole lot less useful when writing data - the DAG nodes you got back were basically the data you put in. Hence the object API was refactored to return CIDs instead of DAG nodes for write operations...and we all lived happily ever after.
# π€ Adding content is blazingly fast
We found a bottleneck that meant the bigger the file you added to IPFS, the longer it would take - oh no π! Good news folks, we've seen the speed of adding large files increase by 50% or more in some cases! π₯
Read all about it in the pull request notes (opens new window).
# π HAMT support added to MFS
We're putting the whole of npm on IPFS! These days npm is like 5.3 terabytes of data and it's all going in MFS (opens new window). This is super rad, but we needed a good sharding strategy because 5TB is a lorra lorra files.
If you're curious about npm on IPFS, check out the project here (opens new window).
# π£ IPNS over pubsub and DHT
Get informed of IPNS (opens new window) record updates and read and publish your IPNS records to the DHT. It's all there and it's all awesome. For those of you new to IPNS, let me give you the lowdown - IPNS puts the mutable in immutable π€£ It's an age old problem, content addressing is rad and all that, but if I change something the hash changes - π boo...but wait, IPNS solves this, you get a permenant address for changeable content - hooray \o/.
IPNS over pubsub gets the word out quicker to peers that are interested when an IPNS record changes. IPNS over DHT allows peers to find and resolve your IPNS address to some content in the first place! In the next JS IPFS release (0.35) the DHT will be enabled by default and it's going to be epic.
# βΎοΈ CID handling improvements
Smoosh your CIDs into whatever version you like - you can now add data under a version 0 CID and get it back using a version 1 CID and vice versa. Now that you have this freedom you can encode them with whatever multibase encoding you like. Version 0 CIDs are all base58btc but if you convert to a version 1 CID you can encode it with base2, base32, base64url or whatever:
# base2
010111000000010010001000000100011011010100010010000001010010111001110001011010111100010100000111000011101010101010101101111100000001011101110001011110100001000100111010101101010111111001000111110001001010000101100010110000001000011110101110100100010101110110100010110100110000001110
# base32
bafybeicg2rebjoofv4kbyovkw7af3rpiitvnl6i7ckcywaq6xjcxnc2mby
# base58btc
QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o
# base64url
uAXASIEbUSBS5xa8UHDqqt8BdxehE6tX5HxKFiwIeukV2i0wO
This is all work to smooth out the eventual transition to base32 CIDv1 by default - a move to allow CIDs to be used as valid URL origins. Have a read of this for more (opens new window).
To help you craft your artisanal CIDs we've introduced a --cid-base
option to a bunch of CLI commands (and ?cid-base
option to a bunch of HTTP API endpoints). Check it out:
jsipfs add file.txt --cid-base=base32
added bafybeibns4lrebrxaymvyshgmki5biwh6cd53idxfpen6ysomzrywtsm44 file.txt
# πͺ Deps got upgrades!
We got you covered with WebUI 2.3 (opens new window) (quic support, responsive navbar, and a language selector), libp2p 0.24 (opens new window) and many other upgrades giving you a faster and smaller JS IPFS.
# π API Changes
- Object API methods that write DAG nodes now return a CID (opens new window) instead of a DAG node. Affected methods:
ipfs.object.new
ipfs.object.patch.addLink
ipfs.object.patch.appendData
ipfs.object.patch.rmLink
ipfs.object.patch.setData
ipfs.object.put
- More info (opens new window)
DAGNode
instances, which are part of the IPLD dag-pb format have been refactored. These instances no longer havemultihash
,cid
orserialized
properties. This effects the following API methods that return these types of objects:ipfs.object.get
ipfs.dag.get
- More info (opens new window)
- Files API methods
add*
,cat*
,get*
have moved fromfiles
to the root namespace. Specifically, the following changes have been made:ipfs.files.add
=>ipfs.add
ipfs.files.addPullStream
=>ipfs.addPullStream
ipfs.files.addReadableStream
=>ipfs.addReadableStream
ipfs.files.cat
=>ipfs.cat
ipfs.files.catPullStream
=>ipfs.catPullStream
ipfs.files.catReadableStream
=>ipfs.catReadableStream
ipfs.files.get
=>ipfs.get
ipfs.files.getPullStream
=>ipfs.getPullStream
ipfs.files.getReadableStream
=>ipfs.getReadableStream
- New core files API methods added:
- DHT API methods renamed and return types changed
ipfs.dht.findprovs
renamed toipfs.dht.findProvs
and returns an array of PeerInfo (opens new window)ipfs.dht.findpeer
renamed toipfs.dht.findPeer
and returns a PeerInfo (opens new window)ipfs.dht.query
now returns an array of PeerInfo (opens new window)- More info (opens new window)
- A new option is available in the CLI, HTTP API and core that will allow the multibase encoding to be specified for any CIDs that are returned as strings.
- A
--cid-base
option has been added to the following CLI commands:jsipfs bitswap stat
jsipfs bitswap unwant
jsipfs bitswap wantlist
jsipfs block put
jsipfs block stat
jsipfs add
jsipfs ls
jsipfs object get
jsipfs object links
jsipfs object new
jsipfs object patch add-link
jsipfs object patch append-data
jsipfs object patch rm-link
jsipfs object patch set-data
jsipfs object put
jsipfs object stat
jsipfs pin add
jsipfs pin ls
jsipfs pin rm
jsipfs resolve
- Note: these two MFS commands already implement the
--cid-base
option: jsipfs files ls
jsipfs files stat
- A
?cid-base=
query option has been added to the following HTTP endpoints:/api/v0/bitswap/wantlist
/api/v0/bitswap/stat
/api/v0/bitswap/unwant
/api/v0/block/put
/api/v0/block/stat
/api/v0/add
/api/v0/ls
/api/v0/object/new
/api/v0/object/get
/api/v0/object/put
/api/v0/object/stat
/api/v0/object/links
/api/v0/object/patch/append-data
/api/v0/object/patch/set-data
/api/v0/object/patch/add-link
/api/v0/object/patch/rm-link
/api/v0/pin/ls
/api/v0/pin/add
/api/v0/pin/rm
/api/v0/resolve
- A
cidBase
option has been added to the following core functions:resolve
- NOTE Using the CID base option in
bitswap
,dag
andobject
APIs WILL NOT auto upgrade your CID to v1 if it is a v0 CID and WILL NOT apply the encoding you specified. This is because these APIs return IPLD objects with links and changing the version of the links would result in a different hash for the node if you were to re-add it. Also, the CID you used to retrieve the node wouldn't actually refer to the node you got back any longer. Read this (opens new window) for further context.
- A
- All API methods that returned
big.js
(opens new window) instances now returnbignumber.js
(opens new window) instances.
# β€οΈ Huge thank you to everyone that made this release possible
By alphabetical order, here are all the humans that contributed to the release:
- Aakil Fernandes (opens new window) (1 comment)
- Alan Shaw (opens new window) (54 PRs, 12 issues, 115 reviews, 203 comments)
- Aleksey Bykhun (opens new window) (1 issue, 1 comment)
- Alex Knol (opens new window) (1 issue)
- Alex North (opens new window) (1 comment)
- Alex Potsides (opens new window) (43 PRs, 7 issues, 41 reviews, 96 comments)
- AndrΓ© Cruz (opens new window) (1 PR, 2 issues, 5 comments)
- ANUDAVIS (opens new window) (1 comment)
- Arkadiy Kukarkin (opens new window) (1 issue, 6 comments)
- Artem Smirnov (opens new window) (1 PR, 1 comment)
- Arthur Zhuk (opens new window) (1 PR)
- AT1452 (opens new window) (1 issue)
- Bazaarβ―Dog (opens new window) (1 comment)
- Beeno Tung (opens new window) (1 issue, 1 review, 2 comments)
- Billy (opens new window) (1 comment)
- birbird (opens new window) (4 issues, 1 comment)
- Blake Byrnes (opens new window) (1 PR, 1 issue, 11 comments)
- Bo (opens new window) (1 comment)
- Brian Parma (opens new window) (1 comment)
- Cam Stuart (opens new window) (1 comment)
- Camilo Rodriguez Cuaran (opens new window) (1 comment)
- Chang Liu (opens new window) (1 issue, 1 comment)
- Chris Aslanoglou (opens new window) (1 PR, 3 issues, 4 comments)
- Christian Maniewski (opens new window) (2 comments)
- Daniel Maricic (opens new window) (2 comments)
- Daniela Borges Matos de Carvalho (opens new window) (1 comment)
- David Ammouial (opens new window) (1 issue, 1 comment)
- David Dahl (opens new window) (1 issue)
- David Dias (opens new window) (9 PRs, 10 issues, 42 reviews, 113 comments)
- Dean Vaessen (opens new window) (1 issue, 1 comment)
- Diogo Silva (opens new window) (4 PRs, 15 reviews)
- dirkmc (opens new window) (2 PRs, 3 issues, 3 reviews, 11 comments)
- Dmitriy Ryajov (opens new window) (2 PRs, 3 comments)
- Donald Tsang (opens new window) (1 issue)
- dsmith3210 (opens new window) (3 comments)
- eefahy (opens new window) (1 comment)
- Enrico Fasoli (opens new window) (1 comment)
- EZ (opens new window) (1 comment)
- Francis Gulotta (opens new window) (2 PRs, 1 issue, 4 comments)
- Friedel Ziegelmayer (opens new window) (3 reviews, 1 comment)
- Fuling (opens new window) (1 comment)
- Giovanni T. Parra (opens new window) (1 comment)
- gitGksgk (opens new window) (1 issue)
- Glenn Vandeuren (opens new window) (1 comment)
- Gorka Ludlow (opens new window) (1 comment)
- Gregory Markou (opens new window) (1 comment)
- Haad (opens new window) (2 comments)
- halley801 (opens new window) (1 issue)
- Hank Stoever (opens new window) (1 comment)
- Henri S (opens new window) (1 comment)
- Henrique Dias (opens new window) (1 issue, 2 comments)
- Hugo Dias (opens new window) (30 PRs, 1 issue, 36 reviews, 41 comments)
- Hushino (opens new window) (4 comments)
- Irakli Gozalishvili (opens new window) (1 issue)
- Jaco Greeff (opens new window) (1 comment)
- Jacob Greenway (opens new window) (2 comments)
- Jacob Heun (opens new window) (24 PRs, 7 issues, 67 reviews, 114 comments)
- Jikku Jose (opens new window) (4 comments)
- John Hiesey (opens new window) (1 PR, 1 issue, 19 reviews, 5 comments)
- Jonathan Underwood (opens new window) (1 comment)
- Joseph Krug (opens new window) (1 comment)
- Juan Esteban Cepeda (opens new window) (1 issue, 2 comments)
- Juan Perez (opens new window) (2 issues, 8 comments)
- Justin Chase (opens new window) (1 comment)
- Kevin Atkinson (opens new window) (1 comment)
- klueq (opens new window) (5 issues, 8 comments)
- Koutaro Chikuba (opens new window) (1 comment)
- Kyle Drake (opens new window) (3 comments)
- Le Hong Son (opens new window) (1 comment)
- Leena (opens new window) (1 comment)
- Leon Prouger (opens new window) (1 comment)
- LiMoMoMo (opens new window) (1 issue, 3 comments)
- Lorenzo Setale (opens new window) (2 issues, 6 comments)
- lukas2005 (opens new window) (1 issue, 1 comment)
- Εukasz Magiera (opens new window) (1 review, 1 comment)
- luojia (opens new window) (1 comment)
- Maciej KrΓΌger (opens new window) (6 PRs, 3 issues, 1 review, 37 comments)
- Marcin Rataj (opens new window) (3 PRs, 2 issues, 1 review, 10 comments)
- Marcin Tojek (opens new window) (1 PR, 1 comment)
- Marcus (opens new window) (3 comments)
- Mark Robert Henderson (opens new window) (2 issues, 6 comments)
- Marten Seemann (opens new window) (1 comment)
- Matt Joiner (opens new window) (2 issues)
- Matt Ober (opens new window) (1 comment)
- Matteo Collina (opens new window) (3 PRs, 9 issues, 1 review, 22 comments)
- Mauricio Cano Giraldo (opens new window) (1 issue, 1 comment)
- Mauricio Melo (opens new window) (1 comment)
- mccoysc (opens new window) (5 issues, 11 comments)
- Mikeal Rogers (opens new window) (2 issues, 12 comments)
- Mikerah (opens new window) (2 issues, 1 comment)
- Mitra Ardron (opens new window) (1 issue, 6 comments)
- Mosin Pathan (opens new window) (1 issue)
- Mukundan Senthil (opens new window) (1 comment)
- naure (opens new window) (1 comment)
- nikor (opens new window) (3 PRs, 3 comments)
- noot (opens new window) (1 PR, 1 issue, 4 reviews, 6 comments)
- Notim Portant (opens new window) (2 issues, 6 comments)
- Oli Evans (opens new window) (7 PRs, 1 issue, 2 reviews, 12 comments)
- oneEdoubleD (opens new window) (1 comment)
- Paul Marlow (opens new window) (1 PR, 2 comments)
- pawankhadpe (opens new window) (1 issue, 3 comments)
- Pedro Santos (opens new window) (1 PR, 1 review)
- Pedro Teixeira (opens new window) (1 PR, 2 issues, 4 reviews, 13 comments)
- Pierfrancesco Soffritti (opens new window) (1 issue, 2 comments)
- popmanhe (opens new window) (1 PR)
- Portia Burton (opens new window) (2 PRs, 2 reviews, 4 comments)
- Prince Sinha (opens new window) (3 comments)
- raduiliescu83 (opens new window) (1 issue)
- Raoul Millais (opens new window) (2 PRs, 12 comments)
- Richard Schneider (opens new window) (1 issue, 5 comments)
- Rkrushanovskij (opens new window) (1 comment)
- Robert Misiorowski (opens new window) (2 issues, 7 comments)
- Robin Monjo (opens new window) (1 comment)
- ron litzenberger (opens new window) (3 comments)
- Ross Bulat (opens new window) (2 comments)
- Santiago Cammi (opens new window) (2 comments)
- Scott (opens new window) (1 PR, 2 comments)
- Seshachalam Malisetti (opens new window) (1 issue, 1 comment)
- Snorre Lothar von Gohren Edwin (opens new window) (1 issue, 1 comment)
- Sri Harsha (opens new window) (6 comments)
- Stanislaw Baranski (opens new window) (1 issue, 2 comments)
- Steven Allen (opens new window) (1 PR, 5 issues, 1 review, 13 comments)
- th3kave (opens new window) (2 issues, 2 comments)
- TIM (opens new window) (1 issue)
- Tomoaki Sato (opens new window) (1 comment)
- Trond Arne BrΓ₯then (opens new window) (1 PR)
- Vasco Santos (opens new window) (49 PRs, 4 issues, 102 reviews, 52 comments)
- Victor Bjelkholm (opens new window) (4 comments)
- Vishal Kuo (opens new window) (1 comment)
- vitriol-co (opens new window) (1 issue, 3 comments)
- Volker Mische (opens new window) (22 PRs, 6 issues, 50 reviews, 79 comments)
- waliguder (opens new window) (1 issue)
- Whyrusleeping (opens new window) (1 comment)
- Willem Wyndham (opens new window) (1 issue)
- X5 Engine (opens new window) (1 issue, 1 comment)
- xxyao123 (opens new window) (1 issue, 1 comment)
- yueleiMaster (opens new window) (1 issue)
- yuwiggin (opens new window) (1 issue)
- Zack (opens new window) (1 PR, 1 comment)
- Zane Starr (opens new window) (2 comments)
- Zhiyuan Lin (opens new window) (1 PR)
- ζε°ζ (opens new window) (1 issue)
# ππ½ Want to contribute?
Would you like to contribute to the IPFS project and don't know how? Well, there are a few places you can get started:
- Check the issues with the
help wanted
label at the Ready column in our waffle board - https://waffle.io/ipfs/js-ipfs?label=help%20wanted - Join an IPFS All Hands, introduce yourself and let us know where you would like to contribute - https://github.com/ipfs/team-mgmt/#weekly-ipfs-all-hands
- Hack with IPFS and show us what you made! The All Hands call is also the perfect venue for demos, join in and show us what you built
- Join the discussion at http://discuss.ipfs.tech/ and help users finding their answers.
- Join the β‘οΈβΏβ Core Dev Team Weekly Sync ππ½ (opens new window) and be part of the Sprint action!
# βοΈ Do you have questions?
The best place to ask your questions about IPFS, how it works and what you can do with it is at discuss.ipfs.tech (opens new window). We are also available at the #ipfs
channel on Freenode.