Skip to content

Commit 685dfd9

Browse files
committed
Merge branch 'main' into feature/adk
2 parents 7d3731e + 9647997 commit 685dfd9

File tree

9 files changed

+1650
-44
lines changed

9 files changed

+1650
-44
lines changed

README.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The Obol Stack is a framework to make it easier to distribute decentralised appl
1717
Running the Obol Stack locally requires a [Docker](https://www.docker.com/) engine. Install Docker for Linux using one of the options [here](https://docs.docker.com/engine/install/). Install Docker Desktop for Other Operating Systems [here](https://docs.docker.com/desktop/).
1818

1919
> [!TIP]
20-
> If you use Docker Desktop, be sure to go to the settings section, resources tab, and allocate most or all of your CPUs and most of your disk space. The stack won't sync a local L1 node if there is not enough available disk space.
20+
> If you use Docker Desktop, be sure to go to the settings section, resources tab, and allocate most or all of your CPUs and most of your disk space. The stack won't succeed in syncing a local L1 node if there is not enough available disk space.
2121
2222
Once you have Docker installed, the easiest way to bootstrap the stack is to use the `obolup` installer. `obolup` keeps your stack running the latest versions of its software.
2323

@@ -39,19 +39,41 @@ You can also clone this repo locally and run:
3939
git clone [email protected]:ObolNetwork/obol-stack.git
4040
cd obol-stack/obolup
4141
sudo chmod u+x ./obolup
42+
<<<<<<< HEAD
4243
./obolup
44+
=======
45+
46+
# Launch the stack in light client mode
47+
./obolup
48+
49+
# Launch the stack in light client mode with host OS access
50+
./obolup --host
51+
>>>>>>> main
4352
```
4453

45-
More advanced usage of `obolup` will be documented [here](./obolup/README.md).
54+
The complete usage of `obolup` is documented [here](./obolup/README.md).
4655

4756
## Stack Overview
4857

49-
The default installation of the Stack configures an Ethereum L1 light client (using [Helios](https://github.com/a16z/helios)) and also attempts to sync an L1 full node ([Erigon](https://github.com/erigontech/erigon)). Both sit behind a specialised load balancer called [eRPC](https://erpc.cloud/). The stack aims to provide a high quality L1 RPC for all dApps installed on the stack. The default address for this RPC is:
58+
The default installation of the Stack configures an Ethereum L1 light client (using [Helios](https://github.com/a16z/helios)) and when `--mode=full` is passed, the stack syncs an L1 full node ([Erigon](https://github.com/erigontech/erigon)). Both sit behind a specialised Ethereum load balancer called [eRPC](https://erpc.cloud/). The stack aims to provide a high quality L1 RPC for all dApps installed on the stack. The default address for this RPC is:
5059
```bash
51-
# Obol Stack L1 JSON-RPC API
52-
http://rpc.l1.cluster.svc.local
60+
# Obol Stack L1 JSON-RPC for Obol Apps running within the stack
61+
http://rpc.l1.cluster.svc.local/rpc/mainnet
62+
http://rpc.l1.cluster.svc.local/rpc/hoodi
63+
64+
# Obol Stack L1 JSON-RPC accessible by the host OS when --host flag is passed to `obolup`
65+
http://obol.stack/rpc/mainnnet
66+
http://obol.stack/rpc/hoodi
5367
```
5468

69+
### `host` mode
70+
71+
To access your Obol Stack dApps in your web browser, such as local-RPCs and local dApps, you need to enable `--host` mode.
72+
Supplying the `--host` flag to `obolup` will make the Obol Stack accessible on http://obol.stack.
73+
74+
> [!INFO]
75+
> Obol Stack host-mode may cause your browser to warn you about self-signed HTTPS certificates when accessing the stack. This is unavoidable when using custom local web domains. You should click "Accept the risk and continue" to access the stack web page.
76+
5577
### Installing an Obol App (Helm Chart)
5678

5779
Here's an example of adding on a popular Ethereum sidecar called contributoor, built by the EthPandaOps team, which streams data from your full node to their backend for analysis and visualisation.
@@ -62,7 +84,7 @@ obol install ethereum/contributooor
6284

6385
### Adding another Obol App Store
6486

65-
The Obol Stack is built on Helm, you can add your own Helm Chart repository easily.
87+
The Obol Stack is built on Helm, so you can add your own Helm Chart repository easily.
6688

6789
```bash
6890
# Add a repository of Helm Charts

obolup/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ To start a light-client, mainnet node, simply run `./obolup` from this directory
88

99
To start a Hoodi testnet instance of the Obol Stack, run `./obolup --network hoodi`.
1010

11+
To start the Obol Stack in a mode accessible to your web browser run `./obolup --host`.
12+
1113
```text
12-
Usage: ./obolup [--help] [--network <network>] [--mode <mode>] [--clean]
14+
Usage: ./obolup [--help] [--network <network>] [--mode <mode>] [--host] [--clean]
1315
1416
Options:
1517
--help Display this help message
1618
--network <network> Specify the network (default: mainnet) [mainnet, hoodi]
1719
--mode <mode> Specify the type of sync mode (default: light) [light, full]
20+
--host Exposes the stack to the host operating system's web browser
1821
--clean Deletes and recreates the Obol Stack
1922
```
2023

obolup/manifests/expose-erpc.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: Ingress
3+
metadata:
4+
name: expose-erpc
5+
namespace: l1
6+
spec:
7+
ingressClassName: nginx
8+
rules:
9+
- host: obol.stack
10+
http:
11+
paths:
12+
- path: /rpc
13+
pathType: Prefix
14+
backend:
15+
service:
16+
name: rpc
17+
port:
18+
number: 80
Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: web
5+
6+
---
7+
apiVersion: v1
8+
kind: ConfigMap
9+
metadata:
10+
name: simple-html
11+
namespace: web
12+
data:
13+
index.html: |
14+
<!DOCTYPE html>
15+
<html lang="en">
16+
<head>
17+
<meta charset="UTF-8">
18+
<title>Obol Stack</title>
19+
<style>
20+
body { font-family: sans-serif; max-width: 900px; margin: 2rem auto; line-height: 1.6; padding: 0 1rem; }
21+
h1, h2, h3 { color: #222; }
22+
code, pre { background: #f4f4f4; padding: 0.2em 0.4em; border-radius: 4px; font-family: monospace; }
23+
pre { padding: 1em; overflow-x: auto; }
24+
blockquote { background: #e9f5ff; padding: 0.5em 1em; border-left: 5px solid #007acc; margin: 1em 0; }
25+
img { max-width: 150px; display: block; margin: 1rem auto; }
26+
hr { margin: 2em 0; }
27+
</style>
28+
</head>
29+
<body>
30+
31+
<img src="https://obol.tech/obolnetwork.png" alt="Obol Logo" style="width: 100%; height: auto; max-width: none;">
32+
<h1 align="center">The Obol Stack: Decentralised Applications For Ethereum</h1>
33+
34+
<h2>Overview</h2>
35+
<p>The Obol Stack is a framework to make it easier to distribute decentralised applications (dApps), and easier to install and run them locally. The stack is built on <a href="https://kubernetes.io">Kubernetes</a>, with <a href="https://helm.sh/">Helm</a> as a package management system.</p>
36+
37+
<h2>Getting Started</h2>
38+
<blockquote>
39+
<strong>IMPORTANT:</strong> The Obol Stack is alpha software. It is not complete, and it may not be working smoothly. If you encounter an issue that does not appear to be documented, please open a <a href="http://github.com/obolNetwork/obol-stack/issues">GitHub issue</a> if an appropriate one is not already present.<br>
40+
See <a href="https://github.com/ObolNetwork/obol-stack/tree/main/obolup/README.md#supported-architectures">here</a> for the latest on OS and architectures supported.
41+
</blockquote>
42+
43+
<p>The default installation of the Stack configures Ethereum L1 RPCs. The default addresses for these RPCs are:</p>
44+
45+
<pre><code># Mainnet
46+
http://obol.stack/rpc/mainnet
47+
48+
# Hoodi
49+
http://obol.stack/rpc/hoodi
50+
51+
# Test they are working with
52+
curl -s -X POST http://obol.stack/rpc/mainnet -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
53+
curl -s -X POST http://obol.stack/rpc/hoodi -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
54+
</code></pre>
55+
56+
Try adding them to your metamask.
57+
58+
<div style="margin: 1em 0;">
59+
<button id="add-mainnet" style="background: #037DD6; color: white; padding: 0.5em 1em; border: none; border-radius: 4px; cursor: pointer; margin-right: 1em;">Add Mainnet to MetaMask</button>
60+
<button id="add-hoodi" style="background: #037DD6; color: white; padding: 0.5em 1em; border: none; border-radius: 4px; cursor: pointer;">Add Hoodi to MetaMask</button>
61+
</div>
62+
63+
<script>
64+
document.getElementById('add-mainnet').addEventListener('click', async () => {
65+
if (typeof window.ethereum !== 'undefined') {
66+
try {
67+
await window.ethereum.request({
68+
method: 'wallet_addEthereumChain',
69+
params: [{
70+
chainId: '0x1',
71+
chainName: 'Ethereum Mainnet (Obol Stack)',
72+
nativeCurrency: {
73+
name: 'Ether',
74+
symbol: 'ETH',
75+
decimals: 18
76+
},
77+
rpcUrls: ['http://obol.stack/rpc/mainnet'],
78+
blockExplorerUrls: ['https://etherscan.io']
79+
}]
80+
});
81+
} catch (error) {}
82+
}
83+
});
84+
85+
document.getElementById('add-hoodi').addEventListener('click', async () => {
86+
if (typeof window.ethereum !== 'undefined') {
87+
try {
88+
await window.ethereum.request({
89+
method: 'wallet_addEthereumChain',
90+
params: [{
91+
chainId: '0x44787',
92+
chainName: 'Hoodi Testnet (Obol Stack)',
93+
nativeCurrency: {
94+
name: 'Hoodi Ether',
95+
symbol: 'ETH',
96+
decimals: 18
97+
},
98+
rpcUrls: ['http://obol.stack/rpc/hoodi'],
99+
blockExplorerUrls: ['https://hoodi.etherscan.io']
100+
}]
101+
});
102+
} catch (error) {}
103+
}
104+
});
105+
</script>
106+
107+
<h3>Installing an Obol App (Helm Chart)</h3>
108+
<p>Here's an example of adding on a popular Ethereum sidecar called contributoor, built by the EthPandaOps team, which streams data from your full node to their backend for analysis and visualisation.</p>
109+
110+
<pre><code>obol install ethereum/contributooor
111+
</code></pre>
112+
113+
<h3>Adding another Obol App Store</h3>
114+
<p>The Obol Stack is built on Helm, you can add your own Helm Chart repository easily.</p>
115+
116+
<pre><code># Add a repository of Helm Charts
117+
obol repo add ithaca https://github.com/ithacaxyz/obol-charts
118+
119+
# Install a chart from the new 'App Store'
120+
obol install ithaca/op-reth
121+
</code></pre>
122+
123+
<h3>Custom deployments</h3>
124+
<p>Each Obol App has a <code>values.yaml</code> file with default values. You can customize these values by creating your own values file and passing it to the install command:</p>
125+
126+
<pre><code>obol install &lt;app-store-name&gt;/&lt;chart-name&gt; --values custom-values.yaml
127+
</code></pre>
128+
129+
<h3>Using advanced tooling</h3>
130+
<p>The <code>obol</code> CLI is intended to be a simple command-line user interface to simplify the use of the Obol Stack for non-developers. It is a work in progress, and does not cover many advanced use cases that Kubernetes and Helm can offer. If you are an experienced Kubernetes user, <code>obolup</code> also installs <a href="https://kubernetes.io/docs/reference/kubectl/">kubectl</a> and <a href="https://helm.sh/docs/helm/helm/">helm</a>, such that you can manage your stack with the tooling you are used to.</p>
131+
132+
<p>If you encounter node management requirements that an end-user might need but cannot achieve with the Obol CLI, instead needing to use <code>kubectl</code> or <code>helm</code>, consider opening a feature request issue on the <a href="https://github.com/ObolNetwork/obol-cli/issues">obol-cli</a> repo.</p>
133+
134+
<h2>Project Status</h2>
135+
<p>This project is currently in alpha, and should not be used in production.</p>
136+
<p>The stack aims to support all popular Kubernetes backends and all Ethereum client types, with a developer experience designed to be useful for local app development, through to production deployment and management.</p>
137+
138+
<h2>Contributing</h2>
139+
<p>Please see <a href="CONTRIBUTING.md">CONTRIBUTING.md</a> for details.</p>
140+
141+
<h2>License</h2>
142+
<p>This project is licensed under the <a href="LICENSE">Apache License 2.0</a>.</p>
143+
144+
</body>
145+
</html>
146+
147+
---
148+
apiVersion: apps/v1
149+
kind: Deployment
150+
metadata:
151+
name: html-server
152+
namespace: web
153+
spec:
154+
replicas: 1
155+
selector:
156+
matchLabels:
157+
app: html-server
158+
template:
159+
metadata:
160+
labels:
161+
app: html-server
162+
spec:
163+
containers:
164+
- name: nginx
165+
image: nginx:alpine
166+
volumeMounts:
167+
- name: html
168+
mountPath: /usr/share/nginx/html
169+
volumes:
170+
- name: html
171+
configMap:
172+
name: simple-html
173+
174+
---
175+
apiVersion: v1
176+
kind: Service
177+
metadata:
178+
name: html-service
179+
namespace: web
180+
spec:
181+
selector:
182+
app: html-server
183+
ports:
184+
- port: 80
185+
targetPort: 80
186+
187+
---
188+
apiVersion: networking.k8s.io/v1
189+
kind: Ingress
190+
metadata:
191+
name: html-ingress
192+
namespace: web
193+
annotations:
194+
nginx.ingress.kubernetes.io/rewrite-target: /
195+
spec:
196+
ingressClassName: nginx
197+
rules:
198+
- host: obol.stack
199+
http:
200+
paths:
201+
- path: /
202+
pathType: Prefix
203+
backend:
204+
service:
205+
name: html-service
206+
port:
207+
number: 80

obolup/manifests/kind_host.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# kind-config.yaml
2+
kind: Cluster
3+
apiVersion: kind.x-k8s.io/v1alpha4
4+
nodes:
5+
- role: control-plane
6+
extraPortMappings:
7+
- containerPort: 80
8+
hostPort: 80
9+
protocol: TCP
10+
- containerPort: 443
11+
hostPort: 443
12+
protocol: TCP

obolup/manifests/kind_no_host.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# kind-config.yaml
2+
kind: Cluster
3+
apiVersion: kind.x-k8s.io/v1alpha4
4+
nodes:
5+
- role: control-plane

0 commit comments

Comments
 (0)