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

Local Ton boot time #33

Open
dkatzan opened this issue Aug 6, 2024 · 12 comments
Open

Local Ton boot time #33

dkatzan opened this issue Aug 6, 2024 · 12 comments

Comments

@dkatzan
Copy link

dkatzan commented Aug 6, 2024

Hi, looking at the logs while starting up a node, it looks like it take around a minute or more to finish loading
specifically I see:
[MyLocalTon - genesis Status Monitor] INFO org.ton.actions.MyLocalTon - genesis is not ready
in intervals of 15 sec like 4-6 times before it's ready

is there anything I can do in the config\setup to get it up faster?

context is that we are planning to use this for some tests as part of our CI pipeline, and it will add non negligible time to it

thx

@undron
Copy link

undron commented Aug 6, 2024

@dkatzan Hi! Could you run MyLocalTon in docker for a long time? I am trying to do the same thing right now and am having problems with block generation. After about 500 blocks all generation stops. It looks like lite-client could not get any data.

@dkatzan
Copy link
Author

dkatzan commented Aug 6, 2024

Still working on getting my setup going, but I did let it run for a while and recached a few thousands
I'm running java -jar MyLocalTon-arm64.jar nogui ton-http-api

@undron
Copy link

undron commented Aug 6, 2024

Can you try to wait at least 600 blocks? Will it still work?

@dkatzan
Copy link
Author

dkatzan commented Aug 6, 2024

I did, I wrote it already reached a few thousands

@undron
Copy link

undron commented Aug 6, 2024

Nevermind, I have the same problem on the local machine, despite of Docker

@dkatzan
Copy link
Author

dkatzan commented Aug 6, 2024

Sure, but I'm seeing some issues now as well, my genesis block got out of sync at block 483
Screenshot 2024-08-06 at 17 21 54

FROM ubuntu:24.04

WORKDIR /app

USER root

COPY $SERVICE_DIR .

RUN apt-get update
RUN apt-get install -y openjdk-17-jdk python3 python3-pip git curl vim cmake wget libsecp256k1-dev libsodium-dev
RUN pip3 install ton-http-api --break-system-packages

# MyLocalTon expects to find ton-http-api in a specific location.
RUN mkdir /root/.local
RUN mkdir /root/.local/bin
RUN cp /usr/local/bin/ton-http-api /root/.local/bin/

RUN wget https://github.com/neodix42/MyLocalTon/releases/latest/download/MyLocalTon-arm64.jar
RUN wget https://github.com/neodix42/MyLocalTon/releases/latest/download/MyLocalTon-x86-64.jar

RUN chmod +x /app/dockerentrypoint.sh

ENTRYPOINT ["/app/dockerentrypoint.sh"]

the dockerentrypoint.sh file contains

#!/bin/bash

java -jar MyLocalTon-arm64.jar nogui ton-http-api

wait

@dkatzan
Copy link
Author

dkatzan commented Aug 6, 2024

Which version of localton are u using?

@undron
Copy link

undron commented Aug 6, 2024

The last one, v111, but on v110 there was the same result.
Anyway, on Windows it pass more than 1200 blocks without any issues.

@dkatzan
Copy link
Author

dkatzan commented Aug 6, 2024

Are u sure u are having the same issue in v110?
I just tried twice with v111, and got out of sync after ±400 blocks
with v110 I'm already at 3000

@undron
Copy link

undron commented Aug 6, 2024

Not sure, will check tomorrow

@undron
Copy link

undron commented Aug 7, 2024

v110 failed after 1238 blocks.
image

@neodix42
Copy link
Owner

neodix42 commented Aug 7, 2024

Definitely, the genesis node should not stop without any reason, I will take a look at this.
Regarding MyLocalTon in Docker - I see many people doing this, but I must say this is an inefficient way.
I will come up with an optimal Docker version of MyLocalTon soon.

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

No branches or pull requests

3 participants