Skip to content

Use getPDPConfig() instead of individual PDP config getters #520

@rvagg

Description

@rvagg

WarmStorageService.getMaxProvingPeriod() and WarmStorageService.getChallengeWindow() should call getPDPConfig() on the view contract instead of the individual getter functions.

  • getPDPConfig() is defined by IPDPProvingSchedule interface - the canonical way to retrieve these values
  • Individual getters (getMaxProvingPeriod(), challengeWindow(), getChallengesPerProof()) are redundant and may be removed from the view contract (Deprecate challengeWindow() function filecoin-services#336)
  • Single call is more efficient than two separate calls

In src/warm-storage/service.ts we have getMaxProvingPeriod() and getChallengeWindow(), I think we should just remove those and add a getPDPConfig(). Then they are used in src/storage/context.ts:1378 in a Promise.all and that can be replaced with a single getPDPConfig() call.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

⌚️ Issue awaiting PR merge

Relationships

None yet

Development

No branches or pull requests

Issue actions