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

[Feature] Add --no-dev-txs flag #3132

Merged
merged 7 commits into from Mar 13, 2024
Merged

[Feature] Add --no-dev-txs flag #3132

merged 7 commits into from Mar 13, 2024

Conversation

vicsn
Copy link
Collaborator

@vicsn vicsn commented Feb 27, 2024

Motivation

Adds a --no-dev-txs flag which determines if node 0 generates transactions if the --dev flag is enabled.

Test Plan

Manually ran the devnet.sh script with and without the --no-dev-txs flag to observe correct behaviour.

@vicsn vicsn requested a review from howardwu February 27, 2024 11:04
@joske
Copy link
Contributor

joske commented Feb 27, 2024

There's also #2822, which I think is more useful (but is outdated).

@joske
Copy link
Contributor

joske commented Feb 28, 2024

@vicsn I've updated the linked PR.

@@ -137,6 +137,9 @@ pub struct Start {
/// If development mode is enabled, specify the number of genesis validators (default: 4)
#[clap(long)]
pub dev_num_validators: Option<u16>,
/// If developtment mode is enabled, specify whether node 0 should generate traffic to drive the network
#[clap(long = "dev-traffic")]
pub dev_traffic: bool,
Copy link
Member

Choose a reason for hiding this comment

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

Is this true by default?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is false by default, made it explicit: d3cc72b

I realise this may lead to issues in the community because nodes require this flag to auto-advance blocks. But I think it is the right default for testing and the updated README 281acb5, devnet.sh should be sufficient guidance.

Let me know if you prefer an alternative dev-no-traffic command.

Copy link
Member

Choose a reason for hiding this comment

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

It should be true by default.

Can use no-dev-txs as the flag name. Traffic implies network traffic among clients/validators.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Comment on lines 85 to 86
dev_traffic: bool,
storage_mode: StorageMode,
Copy link
Member

Choose a reason for hiding this comment

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

nit: can you swap the order between storage_mode and dev_traffic?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

71230f2 Sure, though note cargo fmt then makes the comment indentation different:
Screenshot 2024-03-03 at 19 37 36

@vicsn vicsn changed the title Add --dev-traffic flag Add --no-dev-txs flag Mar 9, 2024
@howardwu howardwu merged commit b8ee388 into mainnet-staging Mar 13, 2024
23 of 24 checks passed
@howardwu howardwu deleted the dev-traffic branch March 13, 2024 00:15
@howardwu howardwu changed the title Add --no-dev-txs flag [Feature] Add --no-dev-txs flag Mar 26, 2024
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.

None yet

3 participants