hostd icon indicating copy to clipboard operation
hostd copied to clipboard

Add Sector blocklist

Open n8mgr opened this issue 2 years ago • 2 comments

Add the ability for hosts to block sectors by root, preventing them from being stored.

This change would add a new table, 4 new methods on the volume manager, and 4 new endpoints.

persist/sqlite changes

  • Add a new table to init.sql
  • Add a migration to create the table on existing hosts to migrations.go
  • Add methods for add, list, and remove to Store

host/storage changes

  • Add methods from the sqlite store to the Store interface in persist.go
  • Add methods for add, list, and remove to VolumeManager.
  • Keep the blocklist in memory for speed. Load it at startup.
  • Check if the sector root is blocked in VolumeManager.Write and return an error.

api changes

  • Add endpoints to the API for add, list, and remove. Maybe under /sectors/blocklist

n8mgr avatar Mar 20 '23 14:03 n8mgr

@n8maninger I'd like to try to get this feature implemented. Looks a little involved so I may be asking some questions!

JonWirtzfeld avatar Oct 19 '23 02:10 JonWirtzfeld

@n8maninger I'd like to try to get this feature implemented. Looks a little involved so I may be asking some questions!

Great! I'll assign it to you. Feel free to ping me here or on Discord if you need anything

n8mgr avatar Oct 19 '23 03:10 n8mgr