Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude well-known empty entities #24

Closed
lidel opened this issue Oct 19, 2023 · 1 comment · Fixed by #27
Closed

Exclude well-known empty entities #24

lidel opened this issue Oct 19, 2023 · 1 comment · Fixed by #27

Comments

@lidel
Copy link
Member

lidel commented Oct 19, 2023

Adding /ipfs/QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn (empty unixfs dir) bricks Kubo, daemon is unable to start:

2023-10-19T19:51:49.062+0200	WARN	nopfs	[email protected]/denylist.go:169	Opening /home/lidel/tmp/ttl-ipns-repo/denylists/text.deny: empty header
2023-10-19T19:51:49.063+0200	INFO	nopfs	[email protected]/denylist.go:170	Processing /home/lidel/tmp/ttl-ipns-repo/denylists/text.deny: text.deny (No header found) by unknown
2023-10-19T19:51:49.063+0200	DEBUG	nopfs	[email protected]/denylist.go:431	text.deny:1: IPFS rule. Key: QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn. Entry: Path: (empty). Prefix: false. AllowRule: false.
2023-10-19T19:51:49.063+0200	DEBUG	nopfs	[email protected]/denylist.go:783	IsCidBlocked load: QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn
2023-10-19T19:51:49.063+0200	DEBUG	nopfs	[email protected]/entry.go:38	check-path:  matches
2023-10-19T19:51:49.063+0200	ERROR	core	core/builder.go:158	constructing the node: could not build arguments for function "reflect".makeFuncStub (reflect/asm_amd64.s:28): failed to build *mfs.Root: received non-nil error from function "github.com/ipfs/kubo/core/node".Files (github.com/ipfs/kubo/core/node/core.go:136): failure writing to dagstore: QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn is blocked and cannot be provided

Error: constructing the node (see log for full detail): failure writing to dagstore: QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn is blocked and cannot be provided

In practice, there is a short set of well-known empty CIDs that should never be blocked:

  • empty unixfs directory
    • QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn
    • bafyaabakaieac (inlined)
  • empty block
    • raw: bafkreihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku
    • inlined raw: bafkqaaa
    • dag-pb: QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH
    • dag-cbor: bafyreigbtj4x7ip5legnfznufuopl4sg4knzc2cof6duas4b3q2fy6swua
    • dag-json: baguqeeraiqjw7i2vwntyuekgvulpp2det2kpwt6cd7tx5ayqybqpmhfk76fa

@hsanjuan thoughts? would it be feasible to keep a safelist that overrides denylists, or are we ok with the footgun? (feature, not a bug)

@hsanjuan
Copy link
Collaborator

I think it should be ok to ignore these if they appear when parsing the denylist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants