filecoin-project / notary-governance

115 stars 58 forks source link

Modification: Datacap Application Flow Tooling Update #988

Closed ghost closed 5 months ago

ghost commented 1 year ago

Over the past few months, the Fil+ team has been refining our approach to monitoring datacap applications. We're thrilled to introduce a comprehensive update to our Fil+ tooling, designed to enhance and streamline the datacap application process. This article provides an in-depth look at the modifications we've implemented in this latest tooling upgrade and outlines the ways stakeholders can interact with the updated system. For a succinct summary of these advancements, watch this demo video.

Launch Timeline

This is the estimated launch schedule for the JSON tooling update:

Components

The tooling upgrade introduces several key enhancements:

JSON format

The main component of the new application flow is the switch from storing datacap application flow information from github issues to JSON files. submits a datacap application. Information about the application will be stored in a JSON file with the following structure. This JSON file will be stored in the LDN folder of the filplus-json-tooling repo and updated by way of pull requests if updates need to be made. To learn about motivations for this update read issue 839.

{
  "applicationVersion": 1,
  "dataCapApplicationType": "da | ldn-v3 | e-fil",
  "projectId": 1,
  "datacapApplicant": "",
  "applicationInfo": {
    "coreInformation": {
      "Data Owner Name": "",
      "Data Owner Country/Region": "",
      "Data Owner Industry": "",
      "Website": 0,
      "Social Media": {
        "handle": "",
        "type": "Slack | Twitter | Facebook"
      },
      "What is your role related to the dataset": "",
      "Total amount of DataCap being requested": {
        "amount": 0,
        "unit": "GiB | TiB | PiB"
      },
      "Expected size of single dataset (one copy)": {
        "amount": "",
        "unit": "GiB | TiB | PiB"
      },
      "Number of replicas to store (minimum 4)": 0,
      "Weekly allocation of DataCap requested": {
        "amount": "",
        "unit": "GiB | TiB | PiB"
      },
      ""On-chain address (Note that you will not be able to change this in the future and that you should have a unique address for each LDN application)": "",
      "Data Type of Application": "Slingshot | Public, Open Dataset (Research/Non-Profit) | Public, Open Commercial/Enterprise | Private Commercial/Enterprise | Private Non-Profit / Social impact",
      "Custom multisig": ""
    },
    "projectDetails": {
      "Share a brief history of your project and organization": "",
      "Is this project associated with other projects/ecosystem stakeholders?": true,
      "If answered yes, what are the other projects/ecosystem stakeholders": ""
    },
    "useCaseDetails": {
      "Describe the data being stored onto Filecoin": "",
      "Where was the data currently stored in this dataset sourced from": "AWS Cloud | Google Cloud | Azure Cloud | My Own Storage Infra | other",
      "If you answered 'Other' in the previous question, enter the details here": "",
      "How do you plan to prepare the dataset": "IPFS | Lotus | Singularity | Graphsplit | other/custom tool",
      "If you answered 'other/custom tool' in the previous question, enter the details here": "",
      "Please share a sample of the data (a link to a file, an image, a table, etc., are good ways to do this.)": "",
      "Confirm that this is a public dataset that can be retrieved by anyone on the network (i.e., no specific permissions or access rights are required to view the data)": true,
      "If you chose not to confirm, what was the reason": "",
      "What is the expected retrieval frequency for this data": "Daily | Weekly | Monthly | Yearly | Sporadic | Never",
      "For how long do you plan to keep this dataset stored on Filecoin": "Less than a year | 1 to 1.5 years | 1.5 to 2 years | 2 to 3 years | More than 3 years | Permanently"
    },
    "datacapAllocationPlan": {
      "In which geographies do you plan on making storage deals": [

      ],
      "How will you be distributing your data to storage providers": "",
      "How do you plan to choose storage providers": "",
      "If you answered 'Other' in the previous question, what is the tool or platform you plan to use": "",
      "Please list the provider IDs and location of the storage providers you will be working with. Note that it is a requirement to list a minimum of 5 unique provider IDs, and that your client address will be verified against this list in the future": [{"providerID": "", "location": "",  "SPOrg",""}],
      "How do you plan to make deals to your storage providers": "",
      "If you answered 'Others/custom tool' in the previous question, enter the details here": "",
      "Can you confirm that you will follow the Fil+ guideline (Data owner should engage at least 4 SPs and no single SP ID should receive >30% of a client's allocated DataCap)": ""
    }
  },
  "applicationLifecycle": {
    "state": "submitted | ready to sign | start sign datacap | granted | total datacap reached | governance review needed | error", 
    "validatedTime": 0,
    "firstAllocationTime": 0,
    "isTrigered": false,
    "isActive": true,
    "timeOfNewState": 0
  },
  "dataCapAllocations": [
    {
      "dataCapTranche": {
        "trancheID": 0,
        "clientAddress": "f1...",
        "timeOfRequest": 0,
        "timeOfAllocation": 0,
        "notaryAddress": "",
        "allocationAmount": 0,
        "signers": [
          {
            "githubUsername:" "",
            "signingAddress": "",
            "timeOfSignature": 0,
            "messageCID": ""
          },
          {
            "githubUsername:" "",
            "signingAddress": "",
            "timeOfSignature": 0,
            "messageCID": ""
          }
        ],
        "pr": 0,
      }
    }
  ]
}

The JSON file structure has a few different parts

Application flow

The "happy flow" of an application proceeds as follows:

Github Actions for Validation

Screen Shot 2023-11-10 at 12.43.59 AM

During each commit to a PR the following validation scripts are run by github action to check the "correctness" of the changes being made. These are meant to catch the edgecases for when the datacap application does not proceed regularly.

New Github registry (frontend)

The tooling update includes a new version of Fil+ registry with:

Backend service

The backend service is core to this tooling update as it connects all the components together to ensure that everything works seemlessly. There are two main purposes to the backend:

SA Bot update

The subsequent allocation (SA) bot is updated to integrate with the new JSON structure. Previously, it runs twice in one day, detects when a client has onboarded >75% of data from their last allocation, then it posts a comment to request more datacap. In this updated version, the SA bot will make a PR instead to add a dataCapTranche object to the dataCapAllocations array.

Integration for Allocators

By the end of this year, this JSON tooling will be updated to work with the new Meta Pathways structure of the Fil+ program. If you plan to be an allocator and want to use this tooling to keep track of client accounts, please reach out to anyone in the Fil+ team.

spaceT9 commented 1 year ago

Just like the previous one but Json file