ipfs / go-bitswap

The golang implementation of the bitswap protocol
MIT License
216 stars 112 forks source link

feat: add peer block filter option #549

Closed laurentsenta closed 2 years ago

laurentsenta commented 2 years ago

This feature lets a user configure a filter to allow / deny request according to the request's peer ID and the content id.

For example, a user may use this option to implement a dynamic peer-based authorization.

welcome[bot] commented 2 years ago

Thank you for submitting this PR! A maintainer will be here shortly to review it. We are super grateful, but we are also overloaded! Help us by making sure that:

Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment. Next steps:

We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution. We are very grateful for your contribution!

laurentsenta commented 2 years ago

@aschmahmann we talked about this feature during ip stewart colo, according to my shallow knowledge of the go stack, it is complete, but I might be missing an iceberg of side-effects & implementation details.

May I ask for your guidance on how to finish this?

laurentsenta commented 2 years ago

Thanks for running the workflow,

I just rebased on master, but the previous run is here.

Everything passed, except the TestSessionFailingToGetFirstBlock. I don't think this is related to this branch, master has a similar error around TestSessionFailingToGetFirstBlock, and another older branch too.

edit: Maybe that workflow never went green, this was introduced here: https://github.com/ipfs/go-bitswap/commits/master?after=dbfc6a1d986e18402d8301c7535a0c39b2461cb7+69&branch=master (logs unavailable sadly)

BigLep commented 2 years ago

2022-03-03 verbal: lets create an issue that explains what a user will get when this is all done. I assume there will be a checklist for the go-bitswap side and plumbing it through to go-ipfs.

Great work!

laurentsenta commented 2 years ago

Created issue here: https://github.com/ipfs/go-ipfs/issues/8763