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

feat: deflake paych_api_test #10843

Merged
merged 1 commit into from
May 8, 2023
Merged

feat: deflake paych_api_test #10843

merged 1 commit into from
May 8, 2023

Conversation

arajasek
Copy link
Contributor

@arajasek arajasek commented May 8, 2023

Related Issues

This test has been observed to flake a lot, example https://app.circleci.com/pipelines/github/filecoin-project/lotus/28643/workflows/32a2f145-5cac-492b-a00e-3ce566d50691/jobs/965295.

The problem is that we try to inject a lot of nulls in order to fast-forward the Paych Settle Delay (which is 12 hours on mainnet). This is nice to speed up the test, but just leads to missed PoSts, especially because we fast-forward entire deadlines at a time.

Proposed Changes

Just wait for the PaychSettleDelay to "normally" pass -- this is only 14 seconds, we don't need to risk flakiness. We could consider skipping fewer epochs at a time, but I honestly don't think it's worth it.

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

@arajasek arajasek requested a review from a team as a code owner May 8, 2023 14:33
require.NoError(t, err)

// it doesn't matter which node we "wait" on
paymentReceiver.WaitTillChain(ctx, kit.HeightAtLeast(head.Height()+policy.PaychSettleDelay+5))
Copy link
Contributor

Choose a reason for hiding this comment

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

what's up with 5?

Copy link
Contributor

Choose a reason for hiding this comment

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

Making sure that all nodes are at that height? Probably would be best to do as a helper, kit.WaitTillChainAll.. or something like that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ZenGround0 Just a little extra buffer, not needed
@magik6k Yeah, good suggestion, will do

@arajasek arajasek enabled auto-merge May 8, 2023 18:37
@arajasek arajasek merged commit 106d354 into master May 8, 2023
@arajasek arajasek deleted the asr/deflake-paych branch May 8, 2023 18:48
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