Conversation
|
| @@ -160,21 +161,21 @@ An example init command will look similar to below: | |||
|
|
|||
| ```bash-vue [Mainnet Beta] | |||
| docker run -e NODE_TYPE=$NODE_TYPE -e P2P_NETWORK=$NETWORK \ | |||
There was a problem hiding this comment.
This should be added here:
-e CELESTIA_HOME=/celestia
or a section above should be added exporting a variable that can be used here like the others.
Or the other option would be to modify the default docker environment variable to use the /celestia path instead of /home/celestia.
Or you may want to switch the other commands back to using /home/celestia for the mounted volume instead of /celestia to maintain persistence.
There was a problem hiding this comment.
i tested the full command when i edited this doc and it worked as expected. -v $HOME/my-node-store:/celestia \ does the trick
There was a problem hiding this comment.
what OS are you on? i think that may be the issue. this doc works for mac and linux.
There was a problem hiding this comment.
I've executed it both within windows and Ubuntu WSL. Are you sure it is actually persisting in your testing? The command executes successfully as written for me as well, it just doesn't actually persist anything. So after running it you can check in the $HOME/my-node-store folder on your host machine and find no files or directories were created (of course you should wipe the directory first to ensure it is empty to begin with and isn't using the data from previous runs).
So while I think all of the commands in the docs will not currently throw any errors, I do believe they are not correct as currently written as they will not achieve the intended goal of a persistent node. Perhaps I messed up somehow though.
There was a problem hiding this comment.
got it, i’ll test to verify!
There was a problem hiding this comment.
The original comment in this thread was to fix the persistence issue I had encountered.
There was a problem hiding this comment.
I'd make a note that trying to run the docker images in windows is likely to run into issues due to the way NTFS handles permissions and that referencing a volume that supports linux permissions (such as within WSL2) is a good way for Windows users to be able to run a node with persistent storage.
There was a problem hiding this comment.
please feel free to make a PR to add the instructions that work for you on Windows!
There was a problem hiding this comment.
for the scope of this PR, i'd just like to fix the docker commands that do work. hopefully you understand 🙏
There was a problem hiding this comment.
For sure that's totally reasonable. I do think--like I mentioned above--that the current commands do not achieve the intended objective of persisting a node although they may not throw any errors but perhaps you are referencing a different version of the docker container or something like that which works.
There was a problem hiding this comment.
The additional parameter I recommend adding to the docker commands should fix this so that it does persist correctly. That, or the other options I mentioned in the other comment thread above should work as well.
There was a problem hiding this comment.
Understood! What is the full start command then? As I understand the -v $HOME/my-node-store:/home/celestia flag would still be used?
There was a problem hiding this comment.
docker run -e NODE_TYPE=$NODE_TYPE -e P2P_NETWORK=$NETWORK -e CELESTIA_HOME=/celestia -v $HOME/my-node-store:/celestia ghcr.io/celestiaorg/celestia-node:v0.12.0 celestia $NODE_TYPE init --p2p.network $NETWORK
Initializing Celestia Node with command:
celestia light init --p2p.network celestia
2023-11-09T10:36:03.394Z INFO node nodebuilder/init.go:31 Initializing Light Node Store over '/celestia/.celestia-light'
Error: mkdir /celestia/.celestia-light: operation not permittedThere was a problem hiding this comment.
it appears to be something related to permissions in the container itself afaiu. here are full logs
There was a problem hiding this comment.
after changing the path back to /home/celestia and using your -e CELESTIA_HOME=/home/celestia flag, i hit an error not being able to create the directory in the container?
|
So my findings:
This should resolve the bug and make this section a little cleaner. |
|
copying this for vis @smuu after changing the path back to /home/celestia and using your -e CELESTIA_HOME=/home/celestia flag, i hit an error not being able to create the directory in the container? |
|
i plan to use p2p network and node type so that users can set up env once in above section in order to not have to explain/set the same variables twice |
I understand, then I propose to use |
I can't reproduce this behavior. |
That is my experience as well. As long as the permissions are set with the prior command ( |
I believe the docs as written are intended to support running on test nets, etc so I'd leave the |
|
I think we're in good shape now! |
Overview
Resolves #1228
running with persistent storage logs
Checklist