Skip to content

refactor: use the external dealfilter go module #609

@nicobao

Description

@nicobao

EDIT: see #609 (comment) . 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: #497 (comment)
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 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:
    func CliStorageDealFilter(cmd string) dtypes.StorageDealFilter {
    and
    func CliRetrievalDealFilter(cmd string) dtypes.RetrievalDealFilter {
  • 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions