-
Notifications
You must be signed in to change notification settings - Fork 677
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: Add --config
and --network
flags to several stacks-inspect
subcommands
#5551
feat: Add --config
and --network
flags to several stacks-inspect
subcommands
#5551
Conversation
7a48a7a
to
318f3cf
Compare
--config <file>
to stacks-inspect try_mine
(and other commands)--config
and --network
flags to several stacks-inspect
subcommands
db3b490
to
7c4e997
Compare
…nd other commands)
7c4e997
to
5fe4948
Compare
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.
LGTM! This has already proven to be very useful. Thanks 🙌
The one thing i'd like to know about here is the choice to move the example configs. was there a specific reason the existing location wouldn't work, or this was an attempt to standardize it more? if we do keep these changes (or decide to use but, as @obycode said - this PR has already been incredibly useful, nice work! |
b274a80
to
1767ee0
Compare
There were unit tests in let conf_dir: PathBuf = Path::new(env!("CARGO_MANIFEST_DIR")).join("conf"); So this was the simplest way to get the tests passing. If these config files are just unit test fixtures, it makes sense to keep them close to the code. If they are also meant to be examples to users setting up a node, then perhaps they should be elsewhere, like a top-level |
…on Nakamoto chainstate
…as not to break existing links
@wileyj I added a symlink from the old example config location to the new one to address your concern. I think this is the best solution because:
But I know symlinks can cause issues in some environments, so let me know if this is a problem |
i like the symlink idea (but i also like a more standardized location for the example configs, since they are meant for users, not necessarily for tests). |
I assume the tests would be fine if |
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.
linked to #5575
lgtm!
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.
Tested and LGTM, but please address all remaining comments before merging. Thanks for making this change!
3da3394
Description
Allow for users to pass either:
--config <file>
--network <helium|mainnet|mocknet|xenon>
to the following
stacks-inspect
subcommands:try-mine
replay-block
replay-naka-block
replay-mock-mining
This allows these commands to be used with non-mainnet chainstate. These CLI options must come before the subcommand:
Applicable issues
Additional info (benefits, drawbacks, caveats)
Warning
It was discovered while testing this PR that
stacks-inspect try-mine
is currently broken and does not work on post-Nakamoto chainstates. For now, I have added an explicit panic when using this command on Nakamoto a chainstate, and I intend to add Nakamoto support in a separate PRThis PR moves config.rs from
stacks-node
tostackslib
in order for thestacks-inspect
command to use the same config file as a Stacks node.Checklist
docs/rpc/openapi.yaml
andrpc-endpoints.md
for v2 endpoints,event-dispatcher.md
for new events)clarity-benchmarking
repobitcoin-tests.yml