If traffic isn't that concerned, you may want to look into my current setup.
My current setup is as follow,
- AWS Instance Type: t2.large: 2 vCPUs, 8GB RAM
- Disk: 80GB (50 GB currently used, expected to grow over time).
I am running Parity with the flag --warp synced, this will keep only the latest 64 states by default. however, its expected to grow over time, not much though.
We also tried geth with --fast sync mode, but we choose to use parity as our mainnet given the fact that it had the reputation of being the most robust and performant. Refer here for current geth --fast sync size
- Set up a non-root user, with sudo rights
- Remove root login via ssh
- I strongly recommend restricting access to the JSON RPC interface. There are so many bots out there, they can easily get into publicly
posted node and steel all your hard earned ethers from unlocked
Setup Parity as a service under systemd
Set up the following systemd service:
$ vi /etc/systemd/system/parity.service
ExecStart=/usr/bin/parity --warp --port 30303 --jsonrpc-port 8545
Tuning parity sync:
- Parity offers continuous state trie pruning; —pruning fast will keep only latest 64 states in the client. Its expected grow with less growth. Its default with latest version?
- To speed up block processing, you can increase the cache size based on your memory size.If you have 8 gb, you can leave 1/2GB —cache-size 1024. You can increase even further based your memory usage.
- Use database compaction if you want to optimize using following flags based on your disk type
--db-compaction hdd or --db-compaction ssd respectively.
parity --pruning fast --db-compaction ssd --cache-size 1024
This chain data will have to be removed and re --fast(if you are using geth client) or --warp(if parity client) synced periodically to keep the disk space requirements lean.