Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a new documentation page for running celestia-app with Docker. The new guide is comprehensive and covers prerequisites, a quick start guide with persistent storage, and instructions for running celestia-node against the containerized celestia-app. The changes also include adding cross-links from other relevant pages. My review focuses on the new documentation file. I've found a few minor issues in the shell commands for configuring persistent peers. The commands can be improved for correctness and consistency by properly handling trailing commas in the peer lists. I've provided suggestions to fix these.
| <Tabs items={['Mainnet Beta', 'Mocha', 'Arabica']}> | ||
| <Tabs.Tab> | ||
| ```bash | ||
| PERSISTENT_PEERS=$(curl -sL https://raw.githubusercontent.com/cosmos/chain-registry/master/{{constants['mainnetChainId']}}/chain.json | jq -r '.peers.persistent_peers[].address' | tr '\n' ',' | sed 's/,$/\n/') |
There was a problem hiding this comment.
The sed 's/,$/\n/' command at the end of this pipeline replaces the trailing comma with a newline character. This results in the PERSISTENT_PEERS variable containing a trailing newline, which will be written into the config.toml file. This is likely not the intended behavior. To simply remove the trailing comma, sed 's/,$//' should be used instead.
PERSISTENT_PEERS=$(curl -sL https://raw.githubusercontent.com/cosmos/chain-registry/master/{{constants['mainnetChainId']}}/chain.json | jq -r '.peers.persistent_peers[].address' | tr '\n' ',' | sed 's/,$//')
| </Tabs.Tab> | ||
| <Tabs.Tab> | ||
| ```bash | ||
| PERSISTENT_PEERS=$(curl -sL https://raw.githubusercontent.com/celestiaorg/networks/master/{{constants['mochaChainId']}}/peers.txt | tr '\n' ',') |
There was a problem hiding this comment.
This command will produce a comma-separated list of peers with a trailing comma. While this may be valid, it's cleaner to remove the trailing comma for correctness and consistency. You can pipe the output to sed 's/,$//' to remove it.
PERSISTENT_PEERS=$(curl -sL https://raw.githubusercontent.com/celestiaorg/networks/master/{{constants['mochaChainId']}}/peers.txt | tr '\n' ',' | sed 's/,$//')
| </Tabs.Tab> | ||
| <Tabs.Tab> | ||
| ```bash | ||
| PERSISTENT_PEERS=$(curl -sL https://raw.githubusercontent.com/celestiaorg/networks/master/{{constants['arabicaChainId']}}/peers.txt | tr '\n' ',') |
There was a problem hiding this comment.
This command will produce a comma-separated list of peers with a trailing comma. While this may be valid, it's cleaner to remove the trailing comma for correctness and consistency. You can pipe the output to sed 's/,$//' to remove it.
PERSISTENT_PEERS=$(curl -sL https://raw.githubusercontent.com/celestiaorg/networks/master/{{constants['arabicaChainId']}}/peers.txt | tr '\n' ',' | sed 's/,$//')
|
🚀 Preview Deployment Your preview is ready: https://celestiaorg.github.io/docs-preview/pr-2438/ |
Co-authored-by: jcstein <46639943+jcstein@users.noreply.github.com>
Summary
celestia-appDocker guide under consensus validatorscelestia-nodeagainst containerizedcelestia-appCloses #1100