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
Conversation
There's also #2822, which I think is more useful (but is outdated). |
@vicsn I've updated the linked PR. |
cli/src/commands/start.rs
Outdated
@@ -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, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
node/src/validator/mod.rs
Outdated
dev_traffic: bool, | ||
storage_mode: StorageMode, |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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:
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.