Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move from Filecoin State Market deals to Filecoin Deals #68

Open
davidgasquez opened this issue Aug 10, 2024 · 6 comments
Open

Move from Filecoin State Market deals to Filecoin Deals #68

davidgasquez opened this issue Aug 10, 2024 · 6 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@davidgasquez
Copy link
Owner

davidgasquez commented Aug 10, 2024

The Portal is only ingesting State Market Deals (deals notifying the f05 actor). In the last few months, there are other kinds of deals that don't appear in the sources I'm using (State Market Deals).

Need to figure out a way to ingest all the deals and surface which addresses are notifying (or not) and in which sectors they appear.

@davidgasquez davidgasquez added the enhancement New feature or request label Aug 10, 2024
@davidgasquez davidgasquez self-assigned this Aug 10, 2024
@davidgasquez davidgasquez changed the title Move from Filecoin State Market deals to _Filecoin Deals_ Move from Filecoin State Market deals to Filecoin Deals Aug 10, 2024
@davidgasquez davidgasquez added the bug Something isn't working label Oct 18, 2024
@davidgasquez
Copy link
Owner Author

There are two potential sources for deals data.

  1. Read and parse all the successful messages with ProveCommitSectors3 and ProveReplicaUpdates3 methods.
  2. Look at the events of built-in actors and parse the different deal related ones.

The built-in actors route seems easier, but I'm not sure events are 100% reliable. Going the message's way might be more accurate, but is harder and needs the business logic to be replicated downstream.

@davidgasquez
Copy link
Owner Author

BigQuery SQL to get the data from ProveCommitSectors3.

  SELECT 
    height, 
    cid,
    `from` AS from_address,
    `to` AS to_address,
    value,
    method,
    params,
    JSON_EXTRACT(params, "$.SectorProofs") AS sector_proofs,
    JSON_EXTRACT(params, "$.AggregateProof") AS sector_aggregate_proof,
    JSON_EXTRACT(params, "$.SectorActivations") AS sector_activations,
    JSON_EXTRACT(params, "$.AggregateProofType") AS sector_aggregate_proof_type,
    JSON_EXTRACT(params, "$.RequireActivationSuccess") AS sector_require_activation_success,
    JSON_EXTRACT(params, "$.RequireNotificationSuccess") AS sector_require_notification_success,
  FROM `lily-data.lily.parsed_messages`
  WHERE method = 'ProveCommitSectors3'

@davidgasquez
Copy link
Owner Author

The folks at Meridian will work on this (space-meridian/roadmap#115). Will be great to reach out and learn more about their approach!

@davidgasquez
Copy link
Owner Author

We should get at least all verified f06 deals, which should include DDO deals / data.

@davidgasquez
Copy link
Owner Author

We can get the DDO onboarded data from Spacescope APIs. Sample URL:

https://api.spacescope.io/v2/deals/direct_data_onboarding?start_date=2024-04-26&end_date=2024-05-02

@davidgasquez
Copy link
Owner Author

There is a new API that might serve DDO deals.

https://api.tools.d.interplanetary.one/docs/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant