rvagg
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
--- fip: "XXXX" title: Unlock sector content notifications to arbitrary actors author: "Rod Vagg (@rvagg)" discussions-to: "<create a discussion link and add it here>" status: Draft type: Technical category: Core created: 2025-02-05 requires: "FIP-0076" --- # FIP-XXXX: Unlock sector content notifications to arbitrary actors ## Simple Summary Remove the restriction that limits _sector content change_ notifications to only the storage market actor (f05), allowing any actor designed to handle the [FRC-42](../FRCs/frc-0042.md) `SectorContentChanged` method to receive notifications when data is onboarded to sectors. ## Abstract [FIP-0076](./fip-0076.md) introduced Direct Data Onboarding (DDO) with a notification system that allows actors to be notified when data is committed to sectors. However, these notifications are currently restricted to only the built-in storage market actor (f05). This FIP proposes removing this restriction, enabling any actor designed to handle the FRC-42 `SectorContentChanged` method to receive notifications, thereby enabling new data-driven applications on Filecoin, such as custom marketplaces, data DAOs, and data verification services. ## Change Motivation The current restriction of notifications to only the storage market actor limits the potential applications that can be built on top of Filecoin's data onboarding system. By unlocking notifications to arbitrary actors: 1. Smart contracts can directly track when their data is committed to sectors 2. Custom marketplaces can implement their own deal activation logic 3. Data DAOs can monitor and react to data commitments in real-time 4. Applications can implement complex data availability and verification schemes 5. New types of data-driven DeFi applications become possible This change continues the evolution of Filecoin toward being a more dynamic and programmable storage network. ## Specification ### Storage Miner Actor Changes Remove [the check](https://github.com/filecoin-project/builtin-actors/blob/5aad41bfa29d8eab78f91eb5c82a03466c6062d2/actors/miner/src/notifications.rs#L62-L69) in the `notify_data_consumers` function in the miner actor that restricts notifications to only the storage market actor. Specifically, remove this code block: ```rust // Reject notifications to any actor other than the built-in market. if notifee != STORAGE_MARKET_ACTOR_ADDR { if require_success { return Err( actor_error!(illegal_argument; "disallowed notification receiver: {}", notifee), ); } continue; } ``` The notification system will continue to operate as before, but without this restriction. ### Notification Success Control Storage providers have control over whether notification failures should abort the sector commitment process through the `require_notification_success` boolean field in parameters for both: * `ProveCommitSectors3`: For new sector commitments * `ProveReplicaUpdates3`: For sector data updates When set to `true`, any notification failure will cause the entire operation to fail. When `false`, failure will be silent and the remainder of the operation will proceed. This allows storage providers to decide how strictly they want to enforce notification delivery for different use-cases. ### Example Solidity Contract Interface Smart contracts wishing to receive sector content notifications must implement this interface: ```solidity // SPDX-License-Identifier: MIT interface ISectorContentReceiver { struct PieceChange { bytes data; // CID of the piece uint size; // Size of the piece bytes payload; // Custom payload sent with notification } struct SectorChange { uint64 sector; // Sector number int64 minimumCommitmentEpoch; // Minimum epoch until which data is committed PieceChange[] added; // Pieces added to the sector } struct SectorReturn { bool[] added; // Success/failure for each piece } // Function selector: 0x868e10c4 function handle_filecoin_method( uint64 method, uint64 codec, bytes calldata params ) external returns (uint32 exitCode, uint64 codec, bytes memory returnData); } ``` When data is committed to a sector and this contract is specified as a notification receiver, the `handle_filecoin_method` function will be called with: - `method`: The FRC-42 method number for `SectorContentChanged` (2034386435) - `codec`: 0x51 (CBOR codec) - `params`: CBOR-encoded `SectorContentChangedParams` The contract must decode the parameters and respond with: - `exitCode`: 0 for success - `codec`: 0x51 (CBOR codec) - `returnData`: CBOR-encoded `SectorContentChangedReturn` See [FIP-0076.md](./fip-0076.md) for the full specification of the `SectorContentChanged` method. ## Design Rationale The original restriction was put in place as a security precaution to prevent potential issues with untrusted code, particularly: 1. Out-of-gas conditions in notification receivers that could cause entire sector commitment operations to fail 2. The lack of recovery mechanisms when notifications fail 3. The potential for malicious actors to deliberately cause sector activation failures However, this FIP proposes that these risks can be managed because: 1. Storage providers have full control over which actors receive notifications 2. The `require_notification_success` flag allows storage providers to choose whether notification failures should abort operations 3. Gas limits and other FVM protections provide basic safety boundaries 4. The notification system is already designed to be "untrusted" - the miner actor does not rely on notification results for critical operations 5. Smart contracts receiving notifications can only read the data, not modify sector state ## Backwards Compatibility This change is backwards compatible: - Existing sector commitments continue working as before - The storage market actor continues receiving notifications unchanged - No state migration is required ## Test Cases To be provided with implementation. ## Security Considerations 1. **Out-of-gas Protection**: When `require_notification_success=true`, any notification failure, including out-of-gas conditions, will cause the entire sector activation process to fail (including the case of batching sectors, where all sectors will fail to activate). Storage providers must carefully consider this when: - Choosing notification receivers - Setting gas limits - Deciding whether to use `require_notification_success=true` 2. **Notification Failure Handling**: - With `require_notification_success=true`: No retry mechanism exists - any failure will abort message processing - With `require_notification_success=false`: Failures are ignored and message processing continues 3. **Storage Provider Controls**: - Only storage providers can specify notification receivers - Storage providers can test notification receivers before deployment - The `require_notification_success` flag provides some flexibility in handling failures 4. **Other Considerations**: - Malicious notification receivers cannot affect sector commitment when `require_notification_success=false` - Gas limits protect against infinite loops or excessive computation - The read-only nature of notifications prevents state manipulation ## Incentive Considerations This change creates new opportunities for economic models around data onboarding while preserving existing incentives: - Marketplaces can implement custom deal activation logic - Data DAOs can create incentive systems for specific data types - Applications can implement proofs of data availability ## Product Considerations This change enables several new product categories: 1. Custom Storage Markets - Implement specialised deal matching and activation - Create niche markets for specific data types 2. Data Verification Services - Track and verify data availability - Implement custom data quality metrics 3. Data DAOs - Coordinate decentralised data storage - Implement governance around data storage 4. DeFi Applications - Create financial products based on data storage - Implement data-backed tokens ## Implementation To be completed. ## Copyright Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully