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

error checking balances & submitting PFD, v0.5.0-rc5 #1381

Closed
jcstein opened this issue Nov 17, 2022 · 11 comments
Closed

error checking balances & submitting PFD, v0.5.0-rc5 #1381

jcstein opened this issue Nov 17, 2022 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@jcstein
Copy link
Member

jcstein commented Nov 17, 2022

Celestia Node version

v0.5.0-rc5, golang 1.19.1

OS

Ubuntu 21.04

Install tools

ver="1.19.1"
cd $HOME
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"

then

cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.5.0-rc5
make install
make cel-key

And finally, import wallet with Arabica token, start node.

Others

No response

Steps to reproduce it

Run light node: celestia light start --core.ip https://limani.celestia-devops.dev/ --core.grpc.port 9090 --gateway.addr localhost --gateway.port 26659 --keyring.accname keplr

When running the light node, with an account funded with Arabica tokens (celestia1c425ckmve2489atttx022qpc02gxspa29wmh0d), I am experiencing the following behavior:

Checking balance - Port 26659
Request: curl -X GET http://localhost:26659/balance
Response: curl: (7) Failed to connect to localhost port 26659 after 6 ms: Connection refused

Checking balance - Port 26658
Request: curl -X GET http://localhost:26658/balance
Response: none, and below:

2022-11-17T17:51:47.871-0500	ERROR	rpc	go-jsonrpc@v0.1.8/server.go:97	RPC Error: unmarshaling request: EOF
2022-11-17T17:51:47.871-0500	WARN	rpc	go-jsonrpc@v0.1.8/server.go:103	rpc error: unmarshaling request: EOF

I have also queried other addresses using curl -X GET http://localhost:26659/balance/celestia1c425ckmve2489atttx022qpc02gxspa29wmh0d with the same results.


PFD
Request:

curl -X POST -d '{"namespace_id": "0c204d39600fddd3",
  "data": "f1f20ca8007e910a3bf8b2e61da0f26bca07ef78717a6ea54165f5",
  "gas_limit": 70000}' http://localhost:26659/submit_pfd

Response: curl: (7) Failed to connect to localhost port 26659 after 0 ms: Connection refused


Rollmint with Cosmwasm
Response:

11:26PM INF submitting block to DA layer height=1 module=BlockManager
11:26PM ERR DA layer submission failed error="Post \"http://localhost:26659/submit_pfd\": dial tcp [::1]:26659: connect: connection refused" attempt=1 module=BlockManager
11:26PM ERR DA layer submission failed error="Post \"http://localhost:26659/submit_pfd\": dial tcp [::1]:26659: connect: connection refused" attempt=2 module=BlockManager

Expected result

The balance of the account running the node or account specified after /balance/

Actual result

above in steps to reproduce

Relevant log output

For Rollmint:

p://localhost:26659/namespaced_data/000000000000ffff/height/7000\": dial tcp [::1]:26659: connect: connection refused; failed to retrieve block: Get \"http://localhost:26659/namespaced_data/000000000000ffff/height/7000\": dial tcp [::1]:26659: connect: connection refused; failed to retrieve block: Get \"http://localhost:26659/namespaced_data/000000000000ffff/height/7000\": dial tcp [::1]:26659: connect: connection refused; failed to retrieve block: Get \"http://localhost:26659/namespaced_data/000000000000ffff/height/7000\": dial tcp [::1]:26659: connect: connection refused; failed to retrieve block: Get \"http://localhost:26659/namespaced_data/000000000000ffff/height/7000\": dial tcp [::1]:26659: connect: connection refused; failed to retrieve block: Get \"http://localhost:26659/namespaced_data/000000000000ffff/height/7000\": dial tcp [::1]:26659: connect: connection refused; failed to retrieve block: Get \"http://localhost:26659/namespaced_data/000000000000ffff/height/7000\": dial tcp [::1]:26659: connect: connection refused; failed to retrieve block: Get \"http://localhost:26659/namespaced_data/000000000000ffff/height/7000\": dial tcp [::1]:26659: connect: connection refused" module=BlockManager
11:33PM ERR DA layer submission failed error="Post \"http://localhost:26659/submit_pfd\": dial tcp [::1]:26659: connect: connection refused" attempt=13 module=BlockManager

Notes

No response

@jcstein jcstein added the bug Something isn't working label Nov 17, 2022
@jcstein jcstein changed the title error checking balances error checking balances & submitting PFD, v0.5.0-rc5 Nov 17, 2022
@renaynay
Copy link
Member

@jcstein It is because you do not enable gateway -- unfortunately you have to pass --gateway flag to enable the REST gateway. We have to open an issue to add it to the docs.

@Bidon15
Copy link
Member

Bidon15 commented Nov 18, 2022

this issue should also be resolved by this PR
#1378

@renaynay
Copy link
Member

What do you mean? @Bidon15 This is an issue with not enabling the gateway.

@renaynay
Copy link
Member

Actually @distractedm1nd we should short circuit when a user provides --gateway.addr or --gateway.port without specifying --gateway?

We do this elsewhere I believe.

@Wondertan
Copy link
Member

Wondertan commented Nov 18, 2022

--gateway "127.0.0.1:55555" 🙂

@jcstein
Copy link
Member Author

jcstein commented Nov 18, 2022

okay thank you all. so the --gateway flag is passed with no args?

@jcstein
Copy link
Member Author

jcstein commented Nov 18, 2022

seeing an error when i pass the gateway flag before other gateway flags

Start node: root@stein-debug:~# celestia light start --core.ip https://limani.celestia-devops.dev/ --core.grpc.port 9090 --gateway --gateway.addr localhost --gateway.port 26659 --keyring.accname keplr

Error: Error: gateway: invalid listen address format: localhost

I had the same results with https://localhost http://localhost https://localhost: and http://localhost:


and for @Wondertan's suggestion (which I may be doing wrong)

Input: root@stein-debug:~# celestia light start --core.ip https://limani.celestia-devops.dev/ --core.grpc.port 9090 --gateway "127.0.0.1:5555" --gateway.addr localhost --gateway.port 26659 --keyring.accname keplr
Error: Error: unknown command "127.0.0.1:5555" for "celestia light start"


This starts up, now to verify PFDs/Balance works ✅

root@stein-debug:~# celestia light start --core.ip https://limani.celestia-devops.dev/ --core.grpc.port 9090 --gateway --gateway.addr 127.0.0.1 --gateway.port 26659 --keyring.accname keplr

Check Balance - success ✅

root@stein-debug:~# curl -X GET http://localhost:26659/balance
{"denom":"utia","amount":"5000000"}root@stein-debug:~#

@Wondertan
Copy link
Member

@jcstein, i didn't suggested a working solution 😅, but hinted the way we can simplify flags into one, instead of 3. The tradeoffs between both ways are yet be analyzed.

@jcstein
Copy link
Member Author

jcstein commented Nov 18, 2022

oh 💡 the last one worked in comment above fwiw 🙂 and i am a fan of the suggestion!

@jcstein
Copy link
Member Author

jcstein commented Nov 18, 2022

this issue should be resolved with this PR celestiaorg/docs#322 😅

I am still curious how it is possible to pass in localhost? or if it is not?

@renaynay
Copy link
Member

renaynay commented Mar 2, 2023

localhost is default @jcstein, closing as seems to have been resolved

@renaynay renaynay closed this as completed Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants