Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update rasp pi ergo node to flash and boot directly from external memory #19

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a0b1eb9
commented out broken build number link
wcatz Jan 23, 2023
1b20843
Update node version 1.35.5
jterrier84 Feb 5, 2023
3eb5d8f
add gtag for analytics
AstroWa3l Feb 19, 2023
69e8027
add gtag for tracking and update docusarus
AstroWa3l Feb 19, 2023
fa25fae
Merge pull request #8 from jterrier84/master
AstroWa3l Feb 19, 2023
0424912
updated Asahi links
wcatz Feb 26, 2023
166efdb
updated for 1.35.6
wcatz Mar 17, 2023
84f2187
updated cnode reload per psb
wcatz Mar 17, 2023
d2d6595
fix psb mistake lol
wcatz Mar 17, 2023
414229e
updated per Martin
wcatz Mar 17, 2023
7904705
oops
wcatz Mar 17, 2023
277b141
pretty
wcatz Mar 17, 2023
0f47c96
updated relay format
wcatz Mar 18, 2023
75d8433
cleanup
wcatz Mar 18, 2023
10de896
name configs
wcatz Mar 18, 2023
8418dcd
removed valency
wcatz Mar 18, 2023
0355489
config peers match iog
wcatz Mar 18, 2023
f3348b5
updated some words
wcatz Mar 18, 2023
7bf6aff
node version
wcatz Mar 18, 2023
5d1b1a4
Update to node version 1.35.7
jterrier84 Apr 22, 2023
60fc41f
Merge pull request #9 from jterrier84/master
AstroWa3l Apr 22, 2023
6b4c91e
Add Mendable AI Bot
rekuenkdr Apr 28, 2023
c33dfac
Merge pull request #10 from armada-alliance/feature/mendableAIbot
AstroWa3l Apr 28, 2023
8707680
update package
AstroWa3l Apr 28, 2023
6e904ac
remove old url
AstroWa3l Apr 28, 2023
90a4b91
Update workflow - Add Mendable Key
rekuenkdr Apr 29, 2023
94b4838
Update translate_and_deploy.yml
rekuenkdr Apr 29, 2023
c58262f
updated build intstructions for secp
wcatz Jun 22, 2023
2516df0
update for conway, added yay aur helper
wcatz Jun 24, 2023
00bc8dc
fixed typo
wcatz Jun 24, 2023
3596aa2
Updates for node version 8.1.1
jterrier84 Jun 25, 2023
02f90de
Merge pull request #11 from jterrier84/master
AstroWa3l Jun 25, 2023
602ab31
updated files and variables
wcatz Jul 4, 2023
87ca975
small update
AstroWa3l Jul 6, 2023
516b1b2
update two testnets, add conway files
AstroWa3l Jul 9, 2023
a117750
updating guide
AstroWa3l Jul 23, 2023
27f8b9a
added blst instructions
wcatz Sep 5, 2023
69aa0f8
updated blst instructions
wcatz Sep 6, 2023
318c4c3
Bump node version to v18
rekuenkdr Sep 6, 2023
3f130e9
update submit api tutorial
AstroWa3l Sep 12, 2023
34cfdd0
update a path
wcatz Sep 21, 2023
7205434
ergo-developer-guides
ccgarant Oct 3, 2023
565dcff
fixing small things
AstroWa3l Oct 14, 2023
5f07bda
Merge pull request #12 from ccgarant/ergo-node-updates
AstroWa3l Oct 14, 2023
639af14
fixing files
AstroWa3l Oct 14, 2023
f99878d
broken link
AstroWa3l Oct 14, 2023
ef1db77
update static build guide
AstroWa3l Oct 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/translate_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
MENDABLE_KEY: ${{ secrets.MENDABLE_KEY }}

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16
v18
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"githubPullRequests.ignoredPullRequestBranches": [
"master"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ If you've set up your node using our [docker image guide](https://docs.armada-al
Download the latest version of the Cardano node, cli, and tx-submit-api from the [Armada Alliance Github repository](https://github.com/armada-alliance/cardano-node-binaries).

```bash title=">_ Terminal"
wget -O 1_33_1.zip https://github.com/armada-alliance/cardano-node-binaries/blob/main/static-binaries/1_33_1.zip?raw=true
wget -O 8_1_2.zip https://github.com/armada-alliance/cardano-node-binaries/blob/main/static-binaries/8_1_2.zip?raw=true
```

Unzip the contents of the zip file.

```bash title=">_ Terminal"
unzip 1_33_1.zip -d cardano-node-1.33.1
unzip 8_1_2.zip -d cardano-node-8.1.2
```

```bash title=">_ Terminal"
mv cardano-node-1.33.1/cardano-node/cardano-submit-api ~/.local/bin/
mv cardano-node-8.1.2/cardano-node/cardano-submit-api ~/.local/bin/
```

## Make a simple bash script to run the Cardano Submit API
Expand Down
62 changes: 62 additions & 0 deletions docs/ergo-developer-guides/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Tutorial: Running an Ergo Full Node on a Headless Raspberry Pi

A tutorial on how to setup and run an Ergo Full Node on a Headless Raspberry Pi.

![test1](../../static/ergo-images/rpi-finished-iso-view.jpeg)

A headless raspberry pi (pi, raspi, or raspberrypi) does not have a monitor or mouse plugged in. Instead, you are securely remoted into the pi via the terminal command line.

This is geared toward beginners who want to learn and hopefully get more Ergo nodes running! See [ErgoNodes.net](https://ergonodes.net/).

Don't worry, it's not that hard, and you will feel super cool afterwards.

The tutorial includes:

## [Part 1: Headless Raspi Setup & Login](./part1-raspi-setup.md)
- Hardware Shopping List
- Brief Intro to Headless Command Line Interface (CLI)
- Flash Setup & Configuration of the Pi
- Secure Shelling into the Pi
- Setup External Storage USB

## [Part 2: Ergo Full Node Configure & Run](./part2-ergo-full-node.md)
- Setup & Configure the Pi for Ergo Node
- Headless Ergo Node setup
- goal is for nipopow bootstrap setup
- Run the node in the background thru a tmux session

## [Part 3: Run the Node in the Background as a tmux Session](./part3-run-node-in-background-tmux.md)
- Why is this needed (ssh connection breaks when computer sleeps)
- What is a tmux session?
- Run the node syncing in the background as a tmux session

## [Part 4: Robustly run the node in the background as a systemd](./part4-robust-run-node-in-background-systemd.md)
- Robustly configure the rpi to run the node upon startup, restart, and in the background
- Port forwarding to get incoming peer connections (not just outgoing)

## [Part 5: Satergo Wallet Full Node Wallet Setup](./part5-setup-satergo-full-node-wallet.md)
- Setup wallet in the Ergo Node Explorer
- Setup wallet in Satergo w/ remote node into the rpi
- Enjoy the beautiful Satergo wallet gui on your local machine

## [Ergo Full Node Resources](./resources.md)
A cheatsheet and comprehensive list of references.

------------------------------------
## Issues, Improvements, Help

This project is still in work #buildinginpublic

If anything doesn't work or needs clarification, open a github Issue, or fork and submit a pull request update.

If you need help, DM me on twitter [@thestophe](https://twitter.com/TheStophe) or find me in the [Matrix #ergomatrix:matrix.org](https://matrix.to/#/#ergomatrix:matrix.org).

-------------------

## Too Much Work - Something Easier!

A really simple and nice option is to just use [Satergo](https://satergo.com/) full node wallet.

You can just download and run it, batteries included. If you don't have the computer memory storage, you can reference a "remote" full node.

This is a great option, plus the UI/UX is beautiful.
116 changes: 116 additions & 0 deletions docs/ergo-developer-guides/command_cheatsheet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Command Line Cheatsheet
The everyday commands you just can't live without. Meant to be a quick reference.


## Monitoring and Troubleshooting

### Systemd

====Common Troubleshooting and Monitoring====

see what's running in systemd

```bash
systemctl --type=service --state=running
```

Edit the service file

```bash
sudo nano /etc/systemd/system/ergo-node.service
```

Reboot and run the service

```bash
sudo systemctl daemon-reload
sudo systemctl enable ergo-node.service
sudo systemctl start ergo-node.service
```

Check high level status

```bash
sudo systemctl status ergo-node
```

Stop the service to edit or troubleshoot
```bash
sudo systemctl stop ergo-node.service
```

See what the service is doing, or "journalling"

```bash
journalctl --unit=ergo-node --output=cat -f
```

### Memory & Storage

Check memory limits (like Control Panel) and status

```bash
htop
```

High level memory list
```bash
df -h
```

List block partitions
```bash
lsblk
```

Another list block paritions
```bash
sudo blkid
```

To find uuid upon boot up
```bash
ls -l /dev/disk/by-uuid
```

Remount a drive to be read-write
```bash
sudo su
#[type password]
mount -o remount, rw /
```

## Ergo Node Maintenance

Upgrade the node, here shown for version 5.0.14. Update the version!

Copy and paste this into a text file, edit the version, then c & p into terminal
```bash
wget https://github.com/ergoplatform/ergo/releases/download/v5.0.14/ergo-5.0.14.jar
```

Run the node not as a systemd
```bash
java -jar -Xmx2g ergo-5.0.14.jar --mainnet -c ergo.conf
```

Update the rpi for whatever reason

```bash
sudo apt update
sudo apt upgrade
```

reboot the pi
```bash
sudo reboot
```


## Networking

To find your public IP

```bash
curl icanhazip.com
```
29 changes: 29 additions & 0 deletions docs/ergo-developer-guides/example-ergo-node-service-file.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
```bash
# The Ergo Node Service (part of systemd)
# file: /etc/systemd/system/ergo-node.service

[Unit]
Description =Ergo Node Service
Wants =network-online.target
After =network-online.target

[Service]
User =pi
Type =simple

#note path/to/ergo-node in this tutorial is /mnt/hd1/ergo-node but in general =/path/to/ergo-node
WorkingDirectory =/mnt/hd1/ergo-node

#update the version!!!
ExecStart =/usr/bin/java -jar -Xmx2g ergo-<VERSION>.jar --mainnet -c ergo.conf
KillSignal =SIGINT
RestartKillSignal =SIGINT
TimeoutStopSec =10
LimitNOFILE =32768
Restart =always
RestartSec =10
#EnvironmentFile =

[Install]
WantedBy =multi-user.target
```
42 changes: 42 additions & 0 deletions docs/ergo-developer-guides/example_ergo_config_file.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
```bash
ergo {
node {
mining = false
extraIndex = false
utxo {
# Download and apply UTxO set snapshot and full-blocks after that
utxoBootstrap = false

# How many utxo set snapshots to store, 0 means that they are not stored at all
storingUtxoSnapshots = 2

# How many utxo set snapshots for a height with the same id we need to find in p2p network
# in order to start downloading it
p2pUtxoSnapshots = 2
}
# Settings releated to headers-chain bootstrapping via NiPoPows
nipopow {
# Download PoPoW proof on node utxoBootstrap
nipopowBootstrap = false

#how many different proofs we are downloading from other peers
# and compare with each other, before choosing the best one
p2pNipopows = 2
}
}
}
scorex {
restApi {
# node which exposes restApi in firewall should define publicly accessible URL of it
# you will need to enable port forwarding from logging into your router for 9053
# publicUrl = "http://xxx.xxx.xxx.xxx:9053"
# apiKeyHash = "CHANGE_ME_HASH"
}
network {
# For below declared address do not include "http://"!
# you will need to enable port forwarding from logging into your router for 9030
# declaredAddress = "xxx.xxx.xxx.xxx:9030"
# nodeName = "my-ergo-node"
}
}
```
48 changes: 48 additions & 0 deletions docs/ergo-developer-guides/example_ergo_config_file_light.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
```bash
ergo {
node {
mining = false
extraIndex = false

## for light weight nipopow node using just block headers for state
## uncomment the below stateType, blocksToKeep (for last 3 days), and nipopowBootstrap
stateType = "digest"
blocksToKeep = 1440

utxo {
# Download and apply UTxO set snapshot and full-blocks after that
utxoBootstrap = true

# How many utxo set snapshots to store, 0 means that they are not stored at all
storingUtxoSnapshots = 2

# How many utxo set snapshots for a height with the same id we need to find in p2p network
# in order to start downloading it
p2pUtxoSnapshots = 2
}
# Settings releated to headers-chain bootstrapping via NiPoPows
nipopow {
# Download PoPoW proof on node utxoBootstrap
nipopowBootstrap = true

#how many different proofs we are downloading from other peers
# and compare with each other, before choosing the best one
p2pNipopows = 2
}
}
}
scorex {
restApi {
# node which exposes restApi in firewall should define publicly accessible URL of it
# you will need to enable port forwarding from logging into your router for 9053
# publicUrl = "http://xxx.xxx.xxx.xxx:9053"
# apiKeyHash = "CHANGE_ME_HASH"
}
network {
# For below declared address do not include "http://"!
# you will need to enable port forwarding from logging into your router for 9030
# declaredAddress = "xxx.xxx.xxx.xxx:9030"
# nodeName = "my-ergo-node"
}
}
```
Loading
Loading