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(f3): add f3_* fields to chain config #4871

Merged
merged 7 commits into from
Oct 10, 2024

Conversation

hanabi1224
Copy link
Contributor

@hanabi1224 hanabi1224 commented Oct 9, 2024

Summary of changes

Changes introduced in this pull request:

  • add f3_bootstrap_epoch field to ChainConfig
  • add FOREST_F3_BOOTSTRAP_EPOCH environment variable
  • add f3_initial_power_table field to ChainConfig
  • add f3_mainfest_server field to ChainConfig

Reference issue to close (if applicable)

Closes #4870

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

@@ -249,6 +252,13 @@ impl ChainConfig {
breeze_gas_tamping_duration: BREEZE_GAS_TAMPING_DURATION,
// 1 year on mainnet
fip0081_ramp_duration_epochs: 365 * EPOCHS_IN_DAY as u64,
f3_bootstrap_epoch: -1,
f3_initial_power_table: Default::default(),
f3_mainfest_server: Some(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These values are from Lotus but I suspect f3_mainfest_server will be deprecated once F3 is fully bootstrapped to avoid single point network dependencies

Copy link
Member

Choose a reason for hiding this comment

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

It'd best to put this comment in the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@hanabi1224 hanabi1224 force-pushed the hm/add-f3-options-to-chain-config branch from 61bc273 to e165f00 Compare October 9, 2024 12:58
@hanabi1224 hanabi1224 marked this pull request as ready for review October 9, 2024 13:24
@hanabi1224 hanabi1224 requested a review from a team as a code owner October 9, 2024 13:24
@hanabi1224 hanabi1224 requested review from ruseinov and LesnyRumcajs and removed request for a team October 9, 2024 13:25
@ruseinov
Copy link
Contributor

ruseinov commented Oct 9, 2024

you likely need to add those env variables to the forest docs repo as well.

@hanabi1224
Copy link
Contributor Author

you likely need to add those env variables to the forest docs repo as well.

@ruseinov Done in https://github.com/ChainSafe/forest-docs-v2/pull/90

@@ -428,21 +427,46 @@ pub(super) async fn start(
None
}
})
.inspect(|i| {
Copy link
Member

Choose a reason for hiding this comment

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

It'd be great to de-clunk this method which is already pretty bloated. How about moving the F3 init + config + service into f3/?

For readability, I'd imagine the end the end usage to be along lines of:

services.spawn_block({
  f3::service(...)
})

After moving it into a separate module, it'd be great to have some basic unit tests if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

de-clunked the method and added unit test

Copy link
Member

@LesnyRumcajs LesnyRumcajs left a comment

Choose a reason for hiding this comment

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

Rock-solid

@hanabi1224 hanabi1224 added this pull request to the merge queue Oct 10, 2024
Merged via the queue into main with commit bb450e2 Oct 10, 2024
33 checks passed
@hanabi1224 hanabi1224 deleted the hm/add-f3-options-to-chain-config branch October 10, 2024 12:34
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.

Add f3_bootstrap_epoch to chain_config
3 participants