Skip to content

Commit

Permalink
Update full-consensus-node.mdx (#1083)
Browse files Browse the repository at this point in the history
* Update full-consensus-node.mdx

Fixed command for getting persistent peers.

* Added note for mac users to use ghead util.

* fix: linting

* Use tip block for mac users instruction.

* Updated command for getting peers for arabica network.

* Fix mistype with extra quote.

* Revert "Fix mistype with extra quote."

This reverts commit 5635e93.

* Fixed linter error.

---------

Co-authored-by: joshcs.eth <[email protected]>
  • Loading branch information
vvuwei and jcstein authored Oct 4, 2023
1 parent d551761 commit 031f4b1
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions docs/nodes/full-consensus-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,26 @@ cp $HOME/networks/{constants.mochaChainId}/genesis.json $HOME/.celestia-app/conf
Set seeds and peers:
<pre><code>
PERSISTENT_PEERS=$(curl -sL https://raw.githubusercontent.com/celestiaorg/networks/master/{constants.mochaChainId}/peers.txt | tr -d '\n')<br/>
PERSISTENT_PEERS=$(curl -sL https://raw.githubusercontent.com/celestiaorg/networks/master/{constants.mochaChainId}/peers.txt | head -c -1 | tr '\n' ',')<br/>
echo $PERSISTENT_PEERS<br/>
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PERSISTENT_PEERS\"/" $HOME/.celestia-app/config/config.toml<br/>
</code></pre>
:::tip
Mac users built-in `head` command does not accept negative numbers for `-c` flag.
Solution is to install `coreutils` package and use `ghead` command from it.
<pre><code>
brew install coreutils
</code></pre>
and optionally set alias from `head` to `ghead` in shell config (`~/.bashrc`, `~/.zshrc` etc):
<pre><code>
alias head=ghead
</code></pre>
:::
Note: You can find more peers at:
<pre><code>
Expand Down Expand Up @@ -104,11 +119,26 @@ cp $HOME/networks/{constants.arabicaChainId}/genesis.json $HOME/.celestia-app/co
Set seeds and peers:
<pre><code>
PERSISTENT_PEERS=$(curl -sL https://raw.githubusercontent.com/celestiaorg/networks/master/{constants.arabicaChainId}/peers.txt | tr -d '\n')<br/>
PERSISTENT_PEERS=$(curl -sL https://raw.githubusercontent.com/celestiaorg/networks/master/{constants.arabicaChainId}/peers.txt | head -c -1 | tr '\n' ',')<br/>
echo $PERSISTENT_PEERS<br/>
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PERSISTENT_PEERS\"/" $HOME/.celestia-app/config/config.toml<br/>
</code></pre>
:::tip
Mac users built-in `head` command does not accept negative numbers for `-c` flag.
Solution is to install `coreutils` package and use `ghead` command from it.
<pre><code>
brew install coreutils
</code></pre>
and optionally set alias from `head` to `ghead` in shell config (`~/.bashrc`, `~/.zshrc` etc):
<pre><code>
alias head=ghead
</code></pre>
:::
Note: You can find more peers at:
<pre><code>
Expand Down

0 comments on commit 031f4b1

Please sign in to comment.