-
Notifications
You must be signed in to change notification settings - Fork 667
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
Rename helium to local testnet/regtest #4911
base: develop
Are you sure you want to change the base?
Rename helium to local testnet/regtest #4911
Conversation
@@ -2406,7 +2406,7 @@ impl ConnectionOptionsFile { | |||
.map_err(|e| format!("Invalid connection_option.public_ip_address: {}", e)) | |||
}) | |||
.transpose()?; | |||
let mut read_only_call_limit = HELIUM_DEFAULT_CONNECTION_OPTIONS | |||
let mut read_only_call_limit = LOCAL_TESTNET_DEFAULT_CONNECTION_OPTIONS |
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.
I see here there are a lot move possible networks so in this context LOCAL_TESTNET
would refer to more network besides regtest
and mocknet
. @ldiego08 I'm curious how you think this should be treated based on this. And thanks again for making this PR!
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.
@ASuciuX, while this function (and thus this constant) isn't used by runloops outside of regtest and mocknet (and some tests), other generic CLI commands like stacks-node check-config
do utilize it. Therefore, it can be concluded that more networks are indeed involved here. Additionally, a function like into_config
from a generic struct like ConnectionOptionsFile
suggests a general-purpose use.
We could rename it to simply DEFAULT_CONNECTION_OPTIONS
since there isn't another set of default connection options anyway. What do you think?
I would also suggest revisiting these config structs in a separate PR to refactor and document them for clarity.
@@ -8687,14 +8687,14 @@ pub mod test { | |||
epoch_id: StacksEpochId::Epoch2_05, | |||
start_height: 1, | |||
end_height: 2, | |||
block_limit: HELIUM_BLOCK_LIMIT_20.clone(), | |||
block_limit: LOCAL_TESTNET_BLOCK_LIMIT_20.clone(), |
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.
I would suggest a more explicit naming as it adds extra terms, while its goal is of removing them.
eg. REGTEST_BLOCK_LIMIT or REGTEST_OR_MOCKNET_BLOCK_LIMIT.
I am open to any suggestions.
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.
@ASuciuX regtest and mocknet refer to local testnet nodes, hence why I suggested reconciling to "local" whenever "helium" was being used interchangeably for both. Past the CLI and into the runloops, regtest and mocknet are used for the respective Bitcoin burnchains. Reconciling might help create that boundary between the Stacks node and its burnchains. With that said, I'm okay with renaming to REGTEST_OR_MOCKNET_BLOCK_LIMIT
. I don't think there will be other chains that would complicate this convention (e.g. REGTEST_OR_MOCKNET_OR_SIMNET_BLOCK_LIMIT
). Thoughts?
network_epoch: PEER_VERSION_EPOCH_2_05, | ||
}, | ||
_ => StacksEpoch { | ||
epoch_id: StacksEpochId::Epoch21, | ||
start_height: 2, | ||
end_height: u64::MAX, | ||
block_limit: HELIUM_BLOCK_LIMIT_20.clone(), | ||
block_limit: LOCAL_TESTNET_BLOCK_LIMIT_20.clone(), |
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.
Same as in the above comment. And for the others as well.
Also, tests passed successfully using
after modifying locally what I also modified on one of my PRs. |
Description
This PR renames
helium
to eitherregtest
orlocal testnet
, depending on the context. It provides a starting point to the migration from noble gas names to standard network names (regtest
,mocknet
,testnet
,mainnet
).The following changes have been applied:
Renamed the
stacks-node helium
subcommand tostacks-node regtest
— Thehelium
subcommand is intended to run Stacks with a local regtest Bitcoin node (for mocknet, there's amocknet
subcommand), hence it has been renamed toregtest
.Refactored
stacks-node
code to use the termlocal testnet
instead ofhelium
— Beyond the CLI subcommand, "helium" is used interchangeably to refer to Stacks running with a local regtest or mocknet Bitcoin node (inferring it's for local development). Therefore, thehelium.rs
runloop file has been renamed tolocal.rs
, comments now use "local testnet," and variables are updated tolocal_testnet
.If these names aren't the best, any suggestions are appreciated!
Applicable issues
Additional info (benefits, drawbacks, caveats)
Checklist
docs/rpc/openapi.yaml
andrpc-endpoints.md
for v2 endpoints,event-dispatcher.md
for new events)clarity-benchmarking
repobitcoin-tests.yml