MyLocalTon icon indicating copy to clipboard operation
MyLocalTon copied to clipboard

Local Ton boot time

Open dkatzan opened this issue 1 year ago • 12 comments

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

dkatzan avatar Aug 06 '24 10:08 dkatzan

@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.

undron avatar Aug 06 '24 12:08 undron

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

dkatzan avatar Aug 06 '24 13:08 dkatzan

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

undron avatar Aug 06 '24 13:08 undron

I did, I wrote it already reached a few thousands

dkatzan avatar Aug 06 '24 13:08 dkatzan

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

undron avatar Aug 06 '24 14:08 undron

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 avatar Aug 06 '24 14:08 dkatzan

Which version of localton are u using?

dkatzan avatar Aug 06 '24 15:08 dkatzan

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

undron avatar Aug 06 '24 15:08 undron

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

dkatzan avatar Aug 06 '24 15:08 dkatzan

Not sure, will check tomorrow

undron avatar Aug 06 '24 15:08 undron

v110 failed after 1238 blocks. image

undron avatar Aug 07 '24 07:08 undron

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.

neodix42 avatar Aug 07 '24 13:08 neodix42