js-ipfs
js-ipfs copied to clipboard
Implement `--allow-big-block` behavior from go-ipfs
This is JS tracking issue to match
--allow-big-blockbehavior from go-ipfs (https://github.com/ipfs/go-ipfs/pull/8414 and https://github.com/ipfs/go-ipfs/issues/8696)
TLDR: bigger blocks can't be exchanged over libp2p, so we want to make a loud error if that happens, but allow people to override it if they know what they are doing.
ipfs object patch, ipfs dag put and ipfs block put should detect when produced block is over the soft limit of 1MB, and return an error:
produced block is over 1MB: big blocks can't be exchanged with other peers. consider using
dag-pbfor automatic chunking of bigger files, or pass --allow-big-block to override.
TODO
- [ ]
object patch– based on https://github.com/ipfs/go-ipfs/pull/8414 - [ ]
dag put– based on https://github.com/ipfs/go-ipfs/issues/8696 - [ ]
block put– based on https://github.com/ipfs/go-ipfs/issues/8696
(This is waiting for go-ipfs 0.11)
js-ipfs is being deprecated in favor of Helia. You can follow the migration plan here https://github.com/ipfs/js-ipfs/issues/4336 and read the migration guide.
Please feel to reopen with any comments before 2023-06-05. We will do a final pass on reopened issues afterward (see https://github.com/ipfs/js-ipfs/issues/4336).