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

pcli: add config file generated by pcli init #3239

Merged
merged 3 commits into from
Oct 30, 2023
Merged

Conversation

hdevalence
Copy link
Member

This change has a few different goals:

  1. It simplifies pcli's command-line interface, by moving configuration out of the CLI arguments and into a config file. The top-level --home parameter now controls everything, since it determines where pcli will load configuration data from.

  2. It opens the door to having more custody backends in the future (like hardware wallets or threshold custody) by making the custody backend configurable in the config file.

  3. It acts as a forcing function for testnet users to migrate to BIP44-derived addresses. pcli won't work without the config file, and the config file is generated from pcli init, which only accepts a seed phrase (and uses BIP44 derivation by default). So users need to re-insert their seed phrases; if they've lost access to the seed phrase, now is a much better time to find out than mainnet.

Point (3) is in contrast with previous changes, where we've auto-migrated data. Now we force re-importing it, to ensure that that flow works.

This change has a few different goals:

1. It simplifies `pcli`'s command-line interface, by moving configuration out
of the CLI arguments and into a config file. The top-level `--home` parameter
now controls everything, since it determines where `pcli` will load
configuration data from.

2. It opens the door to having more custody backends in the future (like
hardware wallets or threshold custody) by making the custody backend
configurable in the config file.

3. It acts as a forcing function for testnet users to migrate to BIP44-derived
addresses.  `pcli` won't work without the config file, and the config file is
generated from `pcli init`, which only accepts a seed phrase (and uses BIP44
derivation by default).  So users need to re-insert their seed phrases; if
they've lost access to the seed phrase, now is a much better time to find out
than mainnet.

Point (3) is in contrast with previous changes, where we've auto-migrated data.
Now we force re-importing it, to ensure that that flow works.
@hdevalence hdevalence temporarily deployed to smoke-test October 30, 2023 01:35 — with GitHub Actions Inactive
@hdevalence hdevalence temporarily deployed to smoke-test October 30, 2023 02:42 — with GitHub Actions Inactive
@hdevalence hdevalence merged commit 57d3f73 into main Oct 30, 2023
8 checks passed
@hdevalence hdevalence deleted the pcli-pd-config branch October 30, 2023 04:02
conorsch added a commit that referenced this pull request Oct 31, 2023
Follow up to the new `pcli init` logic [0], adding a more informative
error message, in case folks forget to rotate their address format, as
required by Rhea 63.

[0] #3239
hdevalence pushed a commit that referenced this pull request Oct 31, 2023
Follow up to the new `pcli init` logic [0], adding a more informative
error message, in case folks forget to rotate their address format, as
required by Rhea 63.

[0] #3239
conorsch added a commit that referenced this pull request Nov 14, 2023
Since we moved to new pcli config file in #3239, we don't use the
archives anymore. If a machine doesn't have archive dirs, then pcli will
throw an error, which is bad. Stop looking for archive dirs.

Similar, we shouldn't look for a custody.json file, we should look for
the new config.toml file.

Closes #3321.
hdevalence pushed a commit that referenced this pull request Nov 14, 2023
Since we moved to new pcli config file in #3239, we don't use the
archives anymore. If a machine doesn't have archive dirs, then pcli will
throw an error, which is bad. Stop looking for archive dirs.

Similar, we shouldn't look for a custody.json file, we should look for
the new config.toml file.

Closes #3321.
conorsch added a commit that referenced this pull request Nov 16, 2023
Since we moved to new pcli config file in #3239, we don't use the
archives anymore. If a machine doesn't have archive dirs, then pcli will
throw an error, which is bad. Stop looking for archive dirs.

Similar, we shouldn't look for a custody.json file, we should look for
the new config.toml file.

Closes #3321.

(cherry picked from commit f839582)
conorsch added a commit that referenced this pull request Nov 16, 2023
Since we moved to new pcli config file in #3239, we don't use the
archives anymore. If a machine doesn't have archive dirs, then pcli will
throw an error, which is bad. Stop looking for archive dirs.

Similar, we shouldn't look for a custody.json file, we should look for
the new config.toml file.

Closes #3321.

(cherry picked from commit f839582)
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.

1 participant