Conversation
galaxy-ggatheca
left a comment
There was a problem hiding this comment.
Still needs development to align with other x-docker repos we have, check comments.
- Add the check-sync script or something similar to check the state of RPC
- Public IP detect on running node
- Labels for accessing RPC using traefik, also ports expose, except p2p port should be in another file and can be included if needed, otherwise main way of access is traefik
- Snapshot, give examples on default.env, if possible maybe just full URL for the dump and detect the others like filename/baseurl instead of multiple variables.
- Use aria2 to download snapshot for retry etc
- Instead of variables like USE_TON_DUMP, just check if snapshot url is set, if yes then if also have not initialized before, then download snapshot.
- Make sure ./ethd commands work, ie ./ethd version
- Tested ./ethd terminate on test server, then ./ethd up, confirm it works
- Configure like LOG_LEVEL for the node: VERBOSITY okay here
- TON_WORK_DIR not necessary, assume a path inside container and work from that, reason, in volumes mounting - ton-work:/var/ton-work, if I change variable then my data is lost.
init/fetch-snapshot.sh
Outdated
| echo "[ton-init] Size URL: ${URL_SIZE}" | ||
| echo "[ton-init] Dump URL: ${URL_DUMP}" | ||
|
|
||
| DUMPSIZE="$(curl --fail --retry 5 --retry-delay 5 --silent "${URL_SIZE}" || true)" |
There was a problem hiding this comment.
Would you use aria2 to download instead of curl especially for retry/resume
ton/docker-entrypoint.sh
Outdated
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| : "${PUBLIC_IP:?PUBLIC_IP must be set (public IPv4) for TON node to start}" |
There was a problem hiding this comment.
Can you detect the public IP of the server automatically like we do on other repos. Dont need to be in .env
There was a problem hiding this comment.
- Implemented automatic IPv4 detection.
- PUBLIC_IP environment variable remains available as manual override for edge cases where auto-detection doesn't work.
The upstream ton-docker-ctrl has PUBLIC_IP as a configuration variable: https://github.com/ton-blockchain/ton-docker-ctrl?tab=readme-ov-file#configuration
This PR enhances it by adding automatic detection, so PUBLIC_IP only needs to be set manually in special network configurations.
default.env
Outdated
| VALIDATOR_CONSOLE_PORT= | ||
|
|
||
| # ---- Init dump settings ---- | ||
| USE_TON_DUMP=true |
There was a problem hiding this comment.
Show example of dump url, like for mainnet here as initial values
| case "${__value}" in | ||
| *x.yml* ) | ||
| __docompose exec x-geth x-geth version | ||
| *ton.yml* ) |
There was a problem hiding this comment.
Not working, make sure ./ethd commands work all of them, ie ./ethd version
| - /etc/localtime:/etc/localtime:ro | ||
| <<: *logging | ||
|
|
||
| ton: |
There was a problem hiding this comment.
How will ton be accessed using traefik? No labels
create ton docker