filecoin-project / lotus

Reference implementation of the Filecoin protocol, written in Go

Home Page:https://lotus.filecoin.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow 512Mib sectors be used with mocked sectorbuilder

jsign opened this issue · comments

This issue is mostly a formalization of some confirmed problem. The raw link of the convo can be found here.

Since ntwk-calibration-8.13.0, building a local devnet with a mocked sectorbuilder doesn't work for bigger files than ~1600 bytes. The error is similar to Provider message: deal rejected: proposed provider collateral below minimum: 0 < 1668. The Slack discussion above provides a way to reproduce this in a test.

It looks like the error was fixed for the real network setup, quoting @arajasek:

basically, trying to calculate deal collateral when the circulating supply is zero is really weird (which is why it’s being estimated as zero the first time).

Why is this a significant problem? We use this setup for textileio/local-devnet, which is the TestAPIDealFlow setup but also supports configuring using 512Mib sectors. This was working fine for a long time, but now it isn't working anymore. local-devnet is used by many app developers to have a fast way to test app workflows under a local ephemeral containerized filecoin network.

In the meantime, they could use 2Kib sectors but that puts a cap on some realistic tests with more normal file sizes. That was the reason to include 512Kib support.

Thanks to @arajasek which has helped in confirming the problem and having some thoughts about the necessary steps to solve it. It would be great to have this tackled for app devs!

cc @magik6k, just might know the right spot to configure this in a test setup?

Superseded by #3297