fix: dag|block put: do not allow blocks over BS limit #8696
Labels
effort/hours
Estimated to take one or several hours
exp/novice
Someone with a little familiarity can pick up
help wanted
Seeking public contribution on this issue
kind/bug
A bug in existing code (including security flaws)
P1
High: Likely tackled by core team if no one steps up
topic/bootcamp
Issues that could be useful in bootcamp process
topic/commands
Topic commands
Milestone
Update 2/23 (@schomatis): working on this.
Summary
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 are ok with that.
We've introduced soft-limit in
ipfs object
API (#8414) but are missing the same behavior in modernipfs dag|block put
🙈Problem (go-ipfs 0.11)
With both
dag|block put
, I am able to create a block (eg. 10MB) that is too big to be exchanged over bitswap:dag put
block put
Solution
softBlockLimit
,allowBigBlock
from fix(cli): object add-link: do not allow blocks over BS limit #8414 (extract them to be public consts?)--allow-big-block
behavior toipfs dag put
--allow-big-block
behavior toipfs block put
dag
andput
return informative error, eg:The text was updated successfully, but these errors were encountered: