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

tests:f3: Basic itests coverage for F3 #12204

Closed
wants to merge 18 commits into from

Conversation

adlrocha
Copy link
Contributor

@adlrocha adlrocha commented Jul 9, 2024

Related Issues

Depends on #12196

Proposed Changes

This PR covers some basic itests for F3, mainly:

  • A test to check that F3 is able to make progress.
  • One that rebootstraps F3 after a manifest change.
  • One that pauses, resumes and rebootstraps F3.

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, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • Update CHANGELOG.md or signal that this change does not need it.
    • If the PR affects users (e.g., new feature, bug fix, system requirements change), update the CHANGELOG.md and add details to the UNRELEASED section.
    • If the change does not require a CHANGELOG.md entry, do one of the following:
      • Add [skip changelog] to the PR title
      • Add the label skip-changelog to the PR
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

adlrocha and others added 16 commits July 2, 2024 10:30
Signed-off-by: Alfonso de la Rocha <adlrocha@tutamail.com>
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
…to f3-itests

Signed-off-by: Alfonso de la Rocha <adlrocha@tutamail.com>
const F3BootstrapEpoch abi.ChainEpoch = -1
// TODO: We need F3Enabled to be public because without it there is no way to
// allow f3 pubsub topics without a lot of refactoring.
var F3Enabled = false
Copy link
Contributor Author

@adlrocha adlrocha Jul 10, 2024

Choose a reason for hiding this comment

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

Unfortunately, this one needs to be public so it can be enabled at will in itests. Without them, pubsub F3 topics won't be allowed. For the rest we don't need it because we manually build the node F3-enabled through DI.

There may be a better way to do this, suggestions welcome.

var F3Enabled = false
var ManifestServerID = "12D3KooWENMwUF9YxvQxar7uBWJtZkA6amvK4xWmKXfSiHUo2Qq7"
var F3BootstrapEpoch abi.ChainEpoch = -1
var F3Finality = Finality
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same here, this is convenient so we can change the finality considered for F3 in itests.

Signed-off-by: Alfonso de la Rocha <adlrocha@tutamail.com>
@adlrocha adlrocha marked this pull request as ready for review July 11, 2024 17:31
one, two TestMiner
)
minerOpts := append(nopts, ConstructorOpts(
node.Override(node.F3Participation, modules.F3Participation),
Copy link
Member

Choose a reason for hiding this comment

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

could you just add a new option to enable f3 participation to the ensemble rather than an entire new constructor just to add this?

Copy link
Member

Choose a reason for hiding this comment

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

oh, you have one below, F3Enabled, so why is this needed?

@@ -215,6 +218,19 @@ func MutateSealingConfig(mut func(sc *config.SealingConfig)) NodeOpt {
})))
}

func F3Enabled(bootstrapEpoch abi.ChainEpoch, blockDelay time.Duration, finality abi.ChainEpoch) NodeOpt {
Copy link
Member

@rvagg rvagg Jul 15, 2024

Choose a reason for hiding this comment

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

Suggested change
func F3Enabled(bootstrapEpoch abi.ChainEpoch, blockDelay time.Duration, finality abi.ChainEpoch) NodeOpt {
func WithF3Enabled(bootstrapEpoch abi.ChainEpoch, blockDelay time.Duration, finality abi.ChainEpoch) NodeOpt {

I know there's a mixed pattern in here but it'd be nice to default to With options

Stebalien added a commit that referenced this pull request Aug 14, 2024
This way, we don't have to rely on a global variable to determine if F3
is enabled, which will make testing easier.

Pre-requisite for #12204
Stebalien added a commit that referenced this pull request Aug 14, 2024
This way, we don't have to rely on a global variable to determine if F3
is enabled, which will make testing easier.

Pre-requisite for #12204
Stebalien added a commit that referenced this pull request Aug 14, 2024
This way, we don't have to rely on a global variable to determine if F3
is enabled, which will make testing easier.

Pre-requisite for #12204
Stebalien added a commit that referenced this pull request Aug 14, 2024
This way, we don't have to rely on a global variable to determine if F3
is enabled, which will make testing easier.

Pre-requisite for #12204
Stebalien added a commit that referenced this pull request Aug 14, 2024
This way, we don't have to rely on a global variable to determine if F3
is enabled, which will make testing easier.

Pre-requisite for #12204
Stebalien added a commit that referenced this pull request Aug 14, 2024
This way, we don't have to rely on a global variable to determine if F3
is enabled, which will make testing easier.

Pre-requisite for #12204
@Stebalien
Copy link
Member

Replacing with #12486.

@Stebalien Stebalien closed this Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants