filecoin-project / filecoin-project/boost

refactor: use the external `dealfilter` go module

Open
#609 2 comments 0 reactions 0 assignees View on GitHub
area/cli kind/enhancement
Dominant language
Go
Stars
121
Forks
79
Avg merge
10d 14h
Merged PRs (30d)
1

Description

EDIT: see https://github.com/filecoin-project/boost/issues/609#issuecomment-1430377900 . I suggest to move the `dealfilter` component in a separate repo (only the types that generate the JSON).

## Current situation

Third-parties that want to integrate with the boost's output have to manually check deal proposals JSON structure from the Go codebase or by asking the boost team: https://github.com/filecoin-project/boost/pull/497#issue-1224278337
Then they have to write the tools to validate the JSON structure themselves. It's especially harder if the third-party doesn't use golang.

## Challenge

It would be nice to provide a [JSON Schema](https://json-schema.org/) of the possible Boost outputs for each Boost future versions, to make it easier and safer for tools integrating with boost.
It would also serve as documentation.

## Proposed changes

- [ ] Enable the generation of a JSON from the Go types that ultimately generates JSON files: https://github.com/filecoin-project/boost/blob/d4f4d3f392202ce489ee19fe7051e6d2fb6dbe16/storagemarket/dealfilter/cli.go#L18 and https://github.com/filecoin-project/boost/blob/d4f4d3f392202ce489ee19fe7051e6d2fb6dbe16/storagemarket/dealfilter/cli.go#L35
- [ ] Enable the generation of a Go library to parse and validate the boost JSON outputs
- [ ] Improve CI/build workflow to do this automatically at each bump to a new Boost release - and make the new JSON Schema/go library available at the same time as the release

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.