Skip to content

Disable legacy deal proposal protocol in boost #1522

@dirkmc

Description

@dirkmc

Description

Disable the legacy deal proposal protocol so that boost no longer accepts incoming requests for storage deals on the legacy protocol.
Add an option in config to re-enable the protocol for those SPs who upgrade but don't realize that some of their clients are still making deals over the legacy protocol.

Implementation

Legacy markets sets up the protocols to listen to when the markets network is created with NewFromLibp2pHost

We can add a config flag to the DealMaking section of config called EnableLegacyDealProtocols that is set to false by default. If config indicates that we should

  • support legacy deal protocols
    we don't pass any options to NewFromLibp2pHost
  • not support legacy deal protocols
    pass an option to NewFromLibp2pHost with an empty list of deal protocols
// node/modules/legacy_markets.go

net := smnet.NewFromLibp2pHost(h, smnet.SupportedDealProtocols([]protocol.ID{}))

Tests

For the itests we can set EnableLegacyDealProtocols to true.
We should also add a test that sets EnableLegacyDealProtocols to false and tries to make a storage deal. It should receive an error response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions