Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

itests: support larger sector sizes; add large deal test. #7148

Merged
merged 3 commits into from
Aug 24, 2021

Conversation

raulk
Copy link
Member

@raulk raulk commented Aug 20, 2021

Up until now, itests has been limited by the 2KiB sector size. It has been impractical to use larger sizes because we would go download the proof parameters, even if using mock proofs.

This PR:

  1. introduces the ability to specify the sector size as a Miner NodeOpt.
  2. introduces sugar to enable large sectors in the policy (concretely 512MiB sectors).
  3. adds a test that performs a 64MiB deal.
  4. allows us to specify arbitrary sector sizes on genesis (before, we would ignore the relevant NodeOpt).

Future

Now that we can perform deals with more interesting sizes, we should look into the following:

  • performing deals without writing files on disk (constructing a random DAG in memoroy, for example)
  • adjusting the test kit to introduce deal size as a first-class parameter -- right now it's not really adjustable.

@raulk raulk requested a review from a team as a code owner August 20, 2021 14:57

// EnableLargeSectors enables 512MiB sectors. This is useful in combination with
// mock proofs, for testing larger transfers.
func EnableLargeSectors() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably use t.Cleanup here to return the global policy state back to the default.

@raulk raulk requested a review from magik6k August 20, 2021 22:13

dh := kit.NewDealHarness(t, client, miner, miner)

client.WaitTillChain(ctx, kit.HeightAtLeast(5))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this? I don't think we need it anymore.

@Stebalien Stebalien merged commit b509f1f into master Aug 24, 2021
@Stebalien Stebalien deleted the raulk/test-large-deals branch August 24, 2021 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants