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

open_genesis_config should return a human-friendly error #291

Merged
merged 28 commits into from
Oct 13, 2022

Conversation

tzemanovic
Copy link
Member

moved from anoma/anoma#1176

depends on #250

Give a slightly better error message when anomac or anomaw commands are run, but a chain hasn't been joined. Before we would just get No such file or directory (os error 2), now we should indicate that specifically we can't read a genesis config file.

mbp> target/debug/anomac epoch
2022-07-07T16:58:56.136364Z  INFO anoma_apps::cli::context: Chain ID: anoma-internal.000000000000000
Error: 
   0: couldn't read genesis config file from .anoma/anoma-internal.000000000000000.toml
   1: No such file or directory (os error 2)

Location:
   apps/src/lib/config/genesis.rs:601

Backtrace omitted.
Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
[1] - 2022-07-07 17:58:56

This PR also makes some changes such that we can propagate an error all the way back up to main() of anomac, anoman, anomaw, so that it will be easier in the future to propagate errors like this. (Relates to anoma/anoma#1049)

To close #97, we should catch the error and translate it to a friendly message such as one indicating to the user to join a network first, rather than panicking with a backtrace.

tzemanovic and others added 28 commits July 1, 2022 11:09
* tomas/update-bin-names:
  cli: update binary names dispatch for namada
  [ci] docker use rust:1.61.0
  update wasm checksums
  [ci] run specific step in docker container
* tomas/update-changelog-config:
  update the changelog config to namada repo
* tomas/e2e-fix-cmd-assert:
  changelog: add #247
  test/e2e: update assert_success/failure to first consume output
* tomas/remove-abci:
  [ci] wasm checksums update
  ledger: debug log some ABCI++ requests
  ledger: make prepare_proposal and process_proposal stateless
  ledger: refactor tx_queue
  scripts/get_tendermint: update for ABCI++ temp fork release
  test/e2e/ledger: enable ignored tests for ABCI++ workaround
  shell: process transaction when `ProcessProposal` hasn't (non-validator)
  make: remove "*-abci-plus-plus"
  all: remove "ABCI" conditional compilation
  deps: remove ABCI dependencies, use ABCI++ as default
* fraccaman+tomas/ci-e2e-validator-logs:
  [ci] improve e2e log upload to add validator logs
* tomas/expectrl-switch-from-fork:
  changelog: add #1142
  switch from a fork to expectrl v0.5.2
@tzemanovic tzemanovic mentioned this pull request Aug 19, 2022
35 tasks
tzemanovic added a commit that referenced this pull request Aug 19, 2022
* james/genesis-config-error:
  Add changelog
  open_genesis_config should return a human-friendly error
@juped juped merged commit 10c4d56 into main Oct 13, 2022
@juped juped deleted the james/genesis-config-error branch October 13, 2022 06:51
phy-chain pushed a commit to phy-chain/namada that referenced this pull request Mar 1, 2024
* feat: transfers from shielded addresses

* fix: support shielded transfers in FF

* refactor: fix unwraps

* feat: point namada to rev instead of branch

* feat: masp params fetch url

* feat: PathBuf instead of wasm files
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.

anoma commands should hint to join a chain on first use rather than panicking
3 participants