Skip to main content

One post tagged with "pi"

View All Tags

ยท 5 min read
Diego de Pablos
Marcos Maceo

Juno is a node which aims to help decentralise StarkNet, a prominent Ethereum Layer 2.

For its mission to be achieved, it needs people to start running their own node.

To become one of the early few making StarkNet better, read below.


In this short article we lay out the steps to get a Raspberry PI with a working Raspbian installation to run the Juno StarkNet node. We assume that you have access as a root user to the Pi.

At time of writing, both StarkNet and Juno are still in an early release. Expect this guide and required steps to change often!

For the latest on the project, check out our Github repo, and refer to our Documentation.

The disk space issues are currently work in progress, and will be addressed in an upcoming new release.

๐ŸŽฏ Featuresโ€‹

  • Get and Sync state from Layer 1 (Ethereum).
  • Get and Sync state from API (Feeder Gateway).
  • Store StarkNet State locally.
  • Store StarkNet Transactions.
  • Store StarkNet Blocks.
  • Store the ABI and full code of StarkNet contracts.
  • Ethereum-like JSON RPC API following this spec. Currently supported are:
  • starknet_getBlockWithTxHashes - Get block information with transaction hashes given the block id.
  • starknet_getBlockWithTxs - Get block information with full transactions given the block id.
  • starknet_getStateUpdate - Get the information about the result of executing the requested block.
  • starknet_getStorageAt - Get the value of the storage at the given address and key.
  • starknet_getTransactionByHash - Get the details and status of a submitted transaction.
  • starknet_getTransactionByBlockIdAndIndex - Get the details of a transaction by a given block id and index.
  • starknet_getTransactionReceipt - Get the transaction receipt by the transaction hash.
  • starknet_getClassHashAt - Get the contract class hash in the given block for the contract deployed at the given address.
  • starknet_getBlockTransactionCount - Get the number of transactions in a block given a block id.
  • starknet_call - Call a StarkNet function without creating a transaction.
  • starknet_blockNumber - Get the most recent accepted block number.
  • starknet_blockHashAndNumber - Get the most recent accepted block hash and number.
  • starknet_chainId - Return the currently configured StarkNet chain id.
  • starknet_pendingTransactions - Returns the transactions in the transaction pool, recognized by this sequencer.
  • starknet_syncing - Returns an object about the sync status, or false if the node is not synching.
  • Prometheus Metrics.
  • Dockerized app.


Specification ๐Ÿค–โ€‹

- Raspberry 4 (model B) - 4GB running Raspbian
- MicroSD card - 16GB+ (Class 10 Minimum) or SSD
- Power supply
- Internet connection (ethernet preferrable)
- USB keyboard, a monitor, and an HDMI cable to interact with the computer or ssh into the raspberry pi.

Get Golang ๐Ÿฆซโ€‹

Ensure that your Raspberry Pi is up-to-date.

sudo apt update
sudo apt full-upgrade

Check the Golang download website for the latest armv6l version. At time of writing, we would download go 1.18.3.

wget -O go.tar.gz

Now extract the tarball into your /usr/local/ directory (root access required).

sudo tar -C /usr/local -xzf go.tar.gz

Add the following to your shell config (usually ~/.bashrc). If you have no preferred text editor, you can use nano ~/.bashrc to edit your bash config from the terminal.

# ~/.bashrc
export GOPATH=$HOME/go
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin

Afterwards press CTRL + X and then Y to exit the nano text editor and save the file.

Finally, as your .bashrc is only initialised when the shell is started, you need to source the new ~/.bashrc to update available commands.

source ~/.bashrc

You should now have a working Golang installation in your Raspberry Pi. You can check it typing:

go version

Install Juno โš™๏ธโ€‹


Clone the repository:

git clone

Install Python dependenciesโ€‹

We are currently only support python 3.7, and we recommend use pyenv. To install it, you can follow this instruction:

  1. Install dependencies:
sudo apt-get update
sudo apt-get install make build-essential git patch zlib1g-dev clang \
openssl libssl-dev libbz2-dev libreadline-dev libsqlite3-dev llvm \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev \
  1. Install pyenv:
curl | bash
  1. Add the following entries into your ~/.bashrc file:
# pyenv
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
  1. Restart your shell:
exec $SHELL
  1. Install Python 3.7:
pyenv install 3.7.13
pyenv global 3.7.13
  1. Inside of the project folder, install Python dependencies:
$ pip install -r requirenments.txt

Installing Go dependenciesโ€‹

You can install all golang dependencies running the next command inside the project folder:

$ go get ./...


$ make juno


To synchronize with the StarkNet state from the centralized feeder gateway, run the following command:

# For Ethereum Goerli testnet
$ ./build/juno

# For Ethereum Mainnet
$ ./build/juno --netowrk 1

To sync the state without relying on the feeder gateway, configure an Ethereum node and run the following command:

# For Ethereum Goerli testnet
$ ./build/juno --eth-node "<node-endpoint>"

# For Ethereum Mainnet
$ ./build/juno --netowrk 1 --eth-node "<node-endpoint>"

To view other available options please run ./build/juno -h.

For more configuration details, check the config description.

Configuring Junoโ€‹

When syncing the StarkNet state from a Raspberry Pi, we expect you to have at least 64GB. In case of you don't have this space, you can run it using an SSD, ensuring that the property db-path in the config or the flag --db-path points to the external SSD:

# juno.yaml
db-path: /path/to/ssd/database/here

And yes, you are now helping on the StarkNet decentralisation!