client.toml parameters are not read #32

Closed
opened 2024-06-28 15:04:38 +00:00 by dasanchez · 2 comments

Hi! I have set up a client.toml file as follows:

cat temp/.val_001/config/client.toml 
chain-id = "laconic_9000-1"
keyring-backend = "test"
output = "text"
node = "tcp://localhost:27001"
broadcast-mode = "sync"

When I submit a transaction, these values are not read properly and I need to use all the flags every time.
Setting the home only:

laconicd tx bank send laconic1r5v5srda7xfth3hn2s26txvrcrntldju7hlmqd laconic1r5v5srda7xfth3hn2s26txvrcrntldju7hlmqd 1000photon --from val_001 --gas auto --fees 1000photon --home ~/temp/.val_001 -y
Error: key with address laconic1r5v5srda7xfth3hn2s26txvrcrntldju7hlmqd not found: key not found

Setting keyring-backend:

laconicd tx bank send laconic1r5v5srda7xfth3hn2s26txvrcrntldju7hlmqd laconic1r5v5srda7xfth3hn2s26txvrcrntldju7hlmqd 1000photon --from val_001 --gas auto --fees 1000photon --home ~/temp/.val_001 -y --keyring-backend test
Error: post failed: Post "http://localhost:26657": dial tcp [::1]:26657: connect: connection refused

Setting node:

laconicd tx bank send laconic1r5v5srda7xfth3hn2s26txvrcrntldju7hlmqd laconic1r5v5srda7xfth3hn2s26txvrcrntldju7hlmqd 1000photon --from val_001 --gas auto --fees 1000photon --home ~/temp/.val_001 -y --keyring-backend test --node http://localhost:27001
Error: chain ID required but not specified

Setting chain id:

laconicd tx bank send laconic1r5v5srda7xfth3hn2s26txvrcrntldju7hlmqd laconic1r5v5srda7xfth3hn2s26txvrcrntldju7hlmqd 1000photon --from val_001 --gas auto --fees 1000photon --home ~/temp/.val_001 -y --keyring-backend test --node http://localhost:27001 --chain-id laconic_9000-1
gas estimate: 68070
code: 0
codespace: ""
data: ""
events: []
gas_used: "0"
gas_wanted: "0"
height: "0"
info: ""
logs: []
raw_log: ""
timestamp: ""
tx: null
txhash: 55BBA46BAEF53A7A37FADC10CBD5246E0C21D95856129A23E2CC71524CFEB897

Version:

laconicd version 
main-e63f51cacdb132eec3c934b078bf7465e0f54eee
Hi! I have set up a client.toml file as follows: ``` cat temp/.val_001/config/client.toml chain-id = "laconic_9000-1" keyring-backend = "test" output = "text" node = "tcp://localhost:27001" broadcast-mode = "sync" ``` When I submit a transaction, these values are not read properly and I need to use all the flags every time. Setting the home only: ``` laconicd tx bank send laconic1r5v5srda7xfth3hn2s26txvrcrntldju7hlmqd laconic1r5v5srda7xfth3hn2s26txvrcrntldju7hlmqd 1000photon --from val_001 --gas auto --fees 1000photon --home ~/temp/.val_001 -y Error: key with address laconic1r5v5srda7xfth3hn2s26txvrcrntldju7hlmqd not found: key not found ``` Setting keyring-backend: ``` laconicd tx bank send laconic1r5v5srda7xfth3hn2s26txvrcrntldju7hlmqd laconic1r5v5srda7xfth3hn2s26txvrcrntldju7hlmqd 1000photon --from val_001 --gas auto --fees 1000photon --home ~/temp/.val_001 -y --keyring-backend test Error: post failed: Post "http://localhost:26657": dial tcp [::1]:26657: connect: connection refused ``` Setting node: ``` laconicd tx bank send laconic1r5v5srda7xfth3hn2s26txvrcrntldju7hlmqd laconic1r5v5srda7xfth3hn2s26txvrcrntldju7hlmqd 1000photon --from val_001 --gas auto --fees 1000photon --home ~/temp/.val_001 -y --keyring-backend test --node http://localhost:27001 Error: chain ID required but not specified ``` Setting chain id: ``` laconicd tx bank send laconic1r5v5srda7xfth3hn2s26txvrcrntldju7hlmqd laconic1r5v5srda7xfth3hn2s26txvrcrntldju7hlmqd 1000photon --from val_001 --gas auto --fees 1000photon --home ~/temp/.val_001 -y --keyring-backend test --node http://localhost:27001 --chain-id laconic_9000-1 gas estimate: 68070 code: 0 codespace: "" data: "" events: [] gas_used: "0" gas_wanted: "0" height: "0" info: "" logs: [] raw_log: "" timestamp: "" tx: null txhash: 55BBA46BAEF53A7A37FADC10CBD5246E0C21D95856129A23E2CC71524CFEB897 ``` Version: ``` laconicd version main-e63f51cacdb132eec3c934b078bf7465e0f54eee ```
Member

Hi @dasanchez

  • I was able to reproduce the issue locally
  • The issue appears to be cosmos-sdk giving preference to default node home directory over the one set in CLI flag (--home) when reading the client config (client.toml)
  • Same behavior can be seen in the cosmos-sdk v0.50.3 simapp chain
    However, it seems be working as expected in cosmos-sdk v0.50.7 simapp

Will try upgrading cosmos-sdk and check for any setup differences in simapp and laconicd.

Hi @dasanchez - I was able to reproduce the issue locally - The issue appears to be cosmos-sdk giving preference to default node home directory over the one set in CLI flag (`--home`) when [reading](https://git.vdb.to/cerc-io/laconic2d/src/branch/main/cmd/laconicd/cmd/root.go#L77) the client config (`client.toml`) - Same behavior can be seen in the [cosmos-sdk v0.50.3 simapp](https://github.com/cosmos/cosmos-sdk/tree/v0.50.3/simapp) chain However, it seems be working as expected in [cosmos-sdk v0.50.7 simapp](https://github.com/cosmos/cosmos-sdk/tree/v0.50.7/simapp) Will try upgrading cosmos-sdk and check for any setup differences in simapp and laconicd.
Member

Hi @dasanchez

  • This issue should be handled in PR #34
  • Followed the fix made in simapp in cosmos-sdk v0.50.4 (commit) for the same
Hi @dasanchez - This issue should be handled in PR #34 - Followed the fix made in simapp in cosmos-sdk `v0.50.4` ([commit](https://github.com/cosmos/cosmos-sdk/commit/d2f96344437fbe6a2844112c8f9f5579eaa59ac8)) for the same
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/laconicd#32
No description provided.