Skylink Unpin API

MERGE REQUEST

MR Guidelines

Overview

This MR adds the long overdue /skynet/unpin/:skylink endpoint along with a new skylinkManager subsystem. Current the skylinkManager subsystem is only used for unpinning but could be extended to be used in other contexts as well.

Since the SiaPath is not stored in any of the Layout or Metadata information for the skyfile, this endpoint will use the skylinkManager to managed the unpin requests. The skylinkManager relies on the health loop and bubble to iterate over the filesystem and delete any filenodes that reference the skylink.

This also ensures that unpinning will remove any duplicate, extended, or renamed files that contain the skylink.

In the event that the siapath of the skyfile is known, the user can provided it to the API under the optional siapath query parameter.

A follow up MR will introduce a skylink method for determining the siapath based on a salt. Once that is in place, a salt can be provided to the endpoint instead of the siapath. This will be helpful for portals.

Example for Visual Changes

Checklist

Review and complete the checklist to ensure that the MR is complete before assigned to an approver.

  • All new methods or updated methods have clear docstrings
  • Testing added or updated for new methods
  • Any new packages are added to Makefile and .gitlab-ci.yml
  • API documentation updated for API updates
  • Module README.md updated for changes to workflow
  • Issue added to Sia-UI repo for new supporting features
  • Changelog File Created

Issues Closed

Edited by Matthew Sevey

Merge request reports

Loading
Loading