MinaProtocol / mina

Mina is a cryptocurrency protocol with a constant size blockchain, improving scaling while maintaining decentralization and security.
https://minaprotocol.com
Apache License 2.0
1.99k stars 527 forks source link

unable to connect to mina daemon : rosetta-v7 #9869

Open PrernaPadhee opened 2 years ago

PrernaPadhee commented 2 years ago

Preliminary Checks

Description

Steps to Reproduce

  1. setup mina container using docker image
  2. ...

Expected Result

mina node should sync with latest block

Actual Result

unable to connect with mina daemon

How frequently do you see this issue?

Always

What is the impact of this issue on your ability to run a node?

Blocker

Status

Error: Unable to connect to Mina daemon.
- The daemon might not be running. See logs (in `~/.mina-config/mina.log`) for details under the host:127.0.0.1.
  Run `mina daemon -help` to see how to start daemon.
- If you just started the daemon, wait a minute for the RPC server to start.
- Alternatively, the daemon may not be running the RPC server on (127.0.0.1 8301).
  If so, add flag `---daemon-port` with correct port when running this command.

Additional information

please let me know if there is a tentative date or timeline for the official mina-rosetta docker image release

tkdlqm2 commented 2 years ago

i have same error please help

Sventimir commented 1 year ago

I'm investigating this issue. While the daemon seems to connect to the mainnet successfully, it indeed is not reachable by mina client from outside the container.

Sventimir commented 1 year ago

I've got trouble reproducing the issue exactly, because release/1.3.0 is pretty old code and I have trouble compiling the CLI to use from outside the docker, but one thing that I notice is that the client tries to connect to the daemon on port 8301, which is not exposed in the docker run command. Please expose port 8301 and try again.

$ docker exec -it mina-rosetta mina client status
Mina daemon status
-----------------------------------

Max observed block height:              193803
Max observed unvalidated block height:  193803
Local uptime:                           18m4s
Chain id:                               5f704cc0c82e0ed70e873f0893d7e06f148524e3f0bdae2afb02e7819a0c24d1
Git SHA-1:                              9b0369c27bb85c8ab2f8725c6e977eb27b53b826
Configuration directory:                /data/.mina-config
Peers:                                  30
User_commands sent:                     0
SNARK worker:                           None
SNARK work fee:                         100000000
Sync status:                            Bootstrap
Block producers running:                0
Coinbase receiver:                      Block producer
Consensus time now:                     epoch=40, slot=261
Consensus mechanism:                    proof_of_stake
Consensus configuration:
        Delta:                     0
        k:                         290
        Slots per epoch:           7140
        Slot duration:             3m
        Epoch duration:            14d21h
        Chain start timestamp:     2021-03-17 00:00:00.000000Z
        Acceptable network delay:  3m

Addresses and ports:
        External IP:    178.235.189.26
        Bind IP:        0.0.0.0
        Libp2p PeerID:  12D3KooWRmhP2WXwnnn7iWzTNukchPLiFeVmL1nRpfhgkNXK3m1X
        Libp2p port:    10101
        Client port:    8301

^ This suggests that it's a docker issue only.

Sventimir commented 1 year ago

I think I have found the other issue as well. The linked README does not mention the fact that the daemon needs to be compiled with a specific DUNE_PROFILE argument in order to be able to connect to the mainnet. I'm updating the README to contain this information. https://github.com/MinaProtocol/mina/pull/12103 updates the README accordingly.

Sventimir commented 1 year ago

I'm putting this aside for the time being, as I Have trouble gathering information and there's more urgent work to do on Rosetta.

kantp commented 1 year ago

Thanks @Sventimir, that sounds good!

I will move it from "blocked" to the backlog, as it's only blocked on having someone with nothing more urgent and important to do, not on other work that is a prerequiusite.

Sventimir commented 1 year ago

@PrernaPadhee, do you still experience this issue? I have trouble building the image, because the issue is quite old. Does the issue appear on other netwroks (devnet, berkeley) too? After the hard fork this configuration will become irrelevant anyway, replaced by newer one, so we wonder if it really makes sense to spend too much time on this issue at this point…

robinbb commented 1 year ago

I propose that, with this issue, we should attempt to repro using an updated version of the Mina node software distribution. If it can't be repro'd, then we can mark done, provided there is no more input from the OP.

kantp commented 1 year ago

Sounds good. @Sventimir is working on #12452 right now (which he and @ejMina226 discovered while working on #8084), and will return to this later.

ejMina226 commented 1 year ago

The commands in https://github.com/MinaProtocol/mina/blob/develop/src/app/rosetta/README.md no longer build an image. An error is thrown. @Sventimir is also seeing this.

robinbb commented 1 year ago

So, does that means that the instructions in that README.md will be updated (under the auspices of working on this issue), and then the OP asked to repro? (Probably, the OP is gone, frustrated with the experience, and may not expect a reply.)

ejMina226 commented 1 year ago

@robinbb It looks like the issue may be to do with the processor on the M1 Mac. The build looks to work for other hardware.

ejMina226 commented 1 year ago

I'm communicating with @kaozenn about this.

robinbb commented 1 year ago

Okay, @ejMina226. It would be nice to see, here, what your plan is to close this issue (what you think should be done), after you have that discussion. Thanks for the update.