Skip to content

Commit

Permalink
readme: update (#50)
Browse files Browse the repository at this point in the history
* readme: explain Nix

* readme: backed and support
  • Loading branch information
tupakkatapa authored Oct 13, 2024
1 parent efffbd2 commit 42bdfec
Show file tree
Hide file tree
Showing 3 changed files with 119 additions and 69 deletions.
82 changes: 62 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,77 @@
# HomestakerOS
# 🏠📈 HomestakerOS

HomestakerOS is a web UI which creates custom Linux OS for Ethereum homestaking. It aims to democratize homestaking by simplifying the process of creating and maintaining servers in home environments.
HomestakerOS is a web UI that creates a custom Linux OS for Ethereum homestaking. It aims to democratize homestaking by simplifying the process of creating and maintaining servers in home environments.

The wizard produces Linux disk images based on NixOS. NixOS allows configurations to be public, deterministic, and self-upgrading. Further, by loading the whole operating system into the RAM, we can eliminate the works on my machine tantrum, while also making it possible to be booted by double-clicking a kernel execution script -- and if you want to return to your previous distribution, just restart your computer.
Check out the live demo at [https://demo.homestakeros.com](https://demo.homestakeros.com)

Check out the live demo at https://demo.homestakeros.com/
## 📋 Overview

## How to Run
The wizard produces Linux disk images based on NixOS. NixOS allows configurations to be public, deterministic, and self-upgrading. You can configure and build your host with a simple form and push of a button, without requiring extensive knowledge of the Nix language. The resulting images are deployed by loading the entire operating system into RAM. This makes it possible to deploy the OS in various ways, such as netbooting, or even booting by double-clicking a kernel execution script. If you want to return to your previous distribution, just restart your computer!

1. **Install Nix:** [nixos.org](https://nixos.org/download.html)
It also offers a dashboard where you can inspect and manage the entire infrastructure from a single point. Information is presented in an intuitive way, with automatically generated graphs and diagrams, representing the entire cluster of machines and real-time data about the services they manage.

## 🛠️ Usage

1. **Install Nix** [nixos.org](https://nixos.org/download.html)

2. **Clone this Repository**
```
git clone https://github.com/ponkila/HomestakerOS && cd HomestakerOS
```

```
git clone https://github.com/ponkila/HomestakerOS && cd HomestakerOS
```
3. **Set Up a Development Environment**
- With Nix: `nix develop . --impure`
- With [direnv](https://direnv.net/): `direnv allow`
- With Nix: `nix develop . --impure`
- With [direnv](https://direnv.net/): `direnv allow`
4. **Start the Web UI**
```
server
```
```
server
```
5. **Open a Command Runner**
```
tail -f pipe | sh
```
The frontend runs its commands through this, leave it open for functionality.
6. **Check it out**
```
tail -f pipe | sh
```
The frontend runs its commands through this, leave it open for functionality.
6. **Check it out**
Go to [http://localhost:8081](http://localhost:8081) to start using the Web UI.
## 🌟 Inspiration
This project was inspired by the challenges encountered while managing our existing Ethereum infrastructure. The lack of knowledge about the setup and configuration of other maintainers' nodes within the same infrastructure leads to wasted time, effort, and downtime. The declarative nature of NixOS configurations, combined with the ephemeral approach, significantly enhances management and collaboration among team maintainers. It ensures that configurations are centralized and real-time information about the whole infrastructure is easily accessible by all participants.
You can see our running, real-time infrastructure right in [homestaking-infra](https://github.com/ponkila/homestaking-infra).
## 🧩 Clients and Addons
In the web user interface, you will configure your node under the 'NixOS config' tab. You can select the Ethereum client(s) and any additional addons. The packages for these mainly come from [ethereum.nix](https://github.com/nix-community/ethereum.nix) and are frequently updated by the collaborators who use them. We look forward to adding more components on-demand and preferably upstreaming them if we package them ourselves.
## 🔍 Looking Ahead
For those interested in the details, let's dive into the documentation from here.
- [1. 📕 Getting Started](./docs/getting_started.md)
Learn how to set up your machine for deploying HomestakerOS, including essential setup and configurations.
- [2. 📗 Tutorial for Homestaking](./docs/tutorial_for_homestaking.md)
This is our entry-level guide to Ethereum and homestaking.
- [3. 📘 Working with Nix](./docs/workflow.md)
An in-depth explanation of the HomestakerOS workflow, including the initialization process and build process.
- [4. 📙 Netbooting with Nixie](https://github.com/majbacka-labs/nixos.fi)
Explore Nixie, a project designed for deploying and managing ephemeral operating systems.
## 💼 Backers and Support
Go to [http://localhost:8081](http://localhost:8081) to start using the Web UI.
HomestakerOS is still a work in progress, and while it has previously received support from a grant by the [Ethereum Foundation](https://ethereum.org/en/foundation/) and [ssv.network](https://ssv.network/), we are actively seeking additional funding and support to continue development. If you're interested in contributing or funding this project, please reach out!
61 changes: 57 additions & 4 deletions docs/client_configuration.md → docs/tutorial_for_homestaking.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,56 @@
# Client Configurations
# Tutorial for Homestaking

Welcome to the Homestaking tutorial. Whether you're looking to run a validator or just explore Ethereum’s decentralized ecosystem, this guide will take you through the essential steps for getting started. We’ll cover everything from setting up a node to understanding how Ethereum's network operates and how you can participate.

Let’s dive in and start by understanding what Ethereum is and how it works.

## What is Ethereum?

<img align="right" src="assets/eth_dark.png" width="150px">

The Ethereum network is a decentralized peer-to-peer network that processes Ethereum blocks and transactions. Ethereum's primary purpose is not just as a digital currency. It serves as a global, open-source computer that allows developers to build decentralized applications, which range from games to financial services. Powered by Ethereum's native cryptocurrency, Ether (ETH).

### Networks

The Ethereum network that hosts real-world applications is referred to as **Ethereum Mainnet**. Ethereum Mainnet is the live, production instance of Ethereum dedicated to managing real ETH and holds real monetary value.

There are other live test instances of Ethereum dedicated to managing test ETH. Each network is compatible with (and only with) its own type of currency. These test networks allow developers and participants to test functionality before using real ETH on the Mainnet.

Every Ethereum network is divided into two layers:

- **Execution Layer (EL):** The execution layer is responsible for processing transactions and executing smart contracts. It handles the computation and processing of code and data within the Ethereum network.

- **Consensus Layer (CL):** The consensus layer is responsible for reaching agreement on the state of the Ethereum blockchain among all participating nodes. It ensures that all nodes have the same view of the blockchain and agree on the order of transactions.

### Nodes and Clients

The Ethereum network consists of Ethereum nodes. An Ethereum node is a running instance of Ethereum software that consists of two components: an **execution client** and a **consensus client**. These clients are a part of their respective layers within the Ethereum network.

<img src="assets/network_dark.png"><br/>

The consensus clients can also function as **validator clients**, which are also a part of the Ethereum's consensus mechanism. Validators, as the name suggests, are responsible of validating new blocks of transactions. The validator client connects to the Ethereum network's CL trough the **consensus client**, and it is possible for a these clients to perform the roles of both a consensus client and a validator client simultaneously.

Running a validator can be a way for individuals to earn income while contributing to Ethereum's security and decentralization. To participate in Ethereum's proof-of-stake consensus mechanism and have the opportunity to earn a profit, a validator requires staking 32 ETH to be activated.

Profit mainly comes from:

- **Block Rewards:** Validators receive a portion of newly created ETH tokens as block rewards. These rewards are distributed to validators for their role in proposing and validating new blocks on the blockchain.

- **Transaction Fees:** Validators also collect transaction fees paid by users for executing smart contracts and conducting transactions. These fees are an additional source of income for validators.

### Syncing

Syncing with a network refers to the process of downloading or updating the blockchain data from the network. Once the node is fully synced, it can participate in the network and interact with other nodes, smart contracts and decentralized applications on the network. There are multiple types of sync modes that represent different approaches to this process, each with various trade-offs.

As of September 18, 2023, the Ethereum blockchain's **full sync** data size is **1221.43 GB**. It is important to note that the size depends on several factors, such as the client and filesystem you are using. The full sync data size can potentially be reduced by using a [COW](https://en.wikipedia.org/wiki/Copy-on-write) filesystem and a compression method.

### Want to know more?

- https://ethereum.org/en/learn/

- https://docs.prylabs.network/docs/concepts/nodes-networks

## Ethereum Client Configuration

There are several Ethereum clients out there and figuring out how to set them up can be confusing, especially with all the different APIs. To make things easier for you, we've provided some essential information on the configuration options of an Ethereum client when you're just getting started.

Expand Down Expand Up @@ -28,7 +80,7 @@ When you are deciding which clients to use, please consider using a minority cli

-**Network**” - There are multiple networks, such as the mainnet and testnets like [Sepolia](https://sepolia.dev/) and [Goerli](https://goerli.net/). It's important to specify which Ethereum network the client should connect to.

-**JWT Secret**” - JSON Web Tokens (JWT) are commonly used for authentication and authorization in web applications and APIs. In the context of Ethereum client configuration, JWT Secret is utilized for authentication between Ethereum clients. To enable communication between the clients, they should share the same JWT Secret.
-**JWT Secret**” - JSON Web Tokens (JWT) are commonly used for authentication and authorization in web applications and APIs. In the context of Ethereum client configuration, JWT Secret is utilized for authentication between Ethereum clients. To enable communication between the clients, they should share the same JWT Secret.

-**Pruning**” - Pruning is the process of erasing historical transaction records and smart contract states that have been processed in order to save disk space. Do not try to prune an archive node, since the archive nodes need to maintain ALL historic data by definition.

Expand Down Expand Up @@ -57,7 +109,7 @@ The Ethereum client can be configured to have multiple interfaces to achieve com

-**WebSockets**” - Similar to the HTTP JSON-RPC API, but operating over WebSockets (WS). They maintain a persistent, bidirectional connection, which can lead to lower latency and more efficient real-time communication, making it ideal for applications that require constant data streams or continuous monitoring of blockchain events. The default port for the WebSockets interface is 8546.

Each of the interfaces usually has options to set the address, port and allowed hosts. Allowed hosts are often referred in a manner like "corsdomain" or "allow-origins" in the client configuration options.
Each of the interfaces usually has options to set the address, port and allowed hosts. Allowed hosts are often referred in a manner like "corsdomain" or "allow-origins" in the client configuration options.

For more comprehensive information about the JSON-RPC APIs, visit: https://ethereum.org/en/developers/docs/apis/json-rpc/

Expand All @@ -69,4 +121,5 @@ In addition for basic settings and communication interfaces, consensus clients m

-**Slasher**” - This refers to a part in the proof-of-stake consensus mechanism that penalizes validators for malicious behavior or double-signing blocks. It imposes a penalty by deducting a portion of a validator's staked cryptocurrency, discouraging fraudulent activities and preserving the integrity of the consensus mechanism.

-**Builder ([MEV-Boost](https://docs.flashbots.net/flashbots-mev-boost/introduction))**” - Maximal Extractable Value (MEV) refers to the process of strategically manipulating the order of transaction execution to maximize profits for validators.
-**Builder ([MEV-Boost](https://docs.flashbots.net/flashbots-mev-boost/introduction))**” - Maximal Extractable Value (MEV) refers to the process of strategically manipulating the order of transaction execution to maximize profits for validators.

45 changes: 0 additions & 45 deletions docs/what_is_ethereum.md

This file was deleted.

0 comments on commit 42bdfec

Please sign in to comment.