Skip to content

Commit 0b7a882

Browse files
Merge branch 'main' into feat/basic-sdk-example
2 parents 442d42d + 9c0c7ae commit 0b7a882

File tree

3 files changed

+112
-32
lines changed

3 files changed

+112
-32
lines changed

content/guides/spin-up-a-devnet.md

Lines changed: 76 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Spin up a devnet for Entropy"
2+
title: "Spin up a devnet"
33
lead: "A developer network (devnet) is a private blockchain network that mimics the mainnet but is isolated for testing and development purposes. This allows developers to make mistakes and iterate quickly without impacting real users or risking real-world assets. This guide will walk you through setting up a local devnet for the Entropy."
44
---
55

@@ -27,34 +27,93 @@ This method leverages pre-built Docker images to quickly and easily spin up a lo
2727

2828
### Steps
2929

30-
1. Clone the Entropy Core repo:
30+
1. Ensure that the Docker daemon is running:
3131

32-
```bash
33-
git clone https://github.com/entropyxyz/entropy-core.git
34-
cd entropy-core
35-
```
36-
37-
1. Start the Docker daemon:
38-
39-
{{< tabs items="MacOS, Linux" >}}
32+
{{< tabs items="As root, Rootless" >}}
4033
{{< tab >}}
4134
```shell
42-
sudo systemctl start docker
35+
sudo systemctl status docker
4336
```
4437
{{< /tab >}}
4538

4639
{{< tab >}}
4740
```shell
48-
dockerd
41+
systemctl --user status docker
4942
```
5043
{{< /tab >}}
5144
{{< /tabs >}}
5245

53-
1. Start the Docker containers:
46+
This should output something like:
47+
48+
```plaintext
49+
● docker.service - Docker Application Container Engine (Rootless)
50+
Loaded: loaded (/home/johnny/.config/systemd/user/docker.service; enabled; preset: enable>
51+
Active: active (running) since Mon 2025-01-27 14:04:16 AST; 3min 27s ago
52+
Invocation: b0aea9e287394e268914b54c6177370c
53+
Docs: https://docs.docker.com/go/rootless/
54+
Main PID: 46707 (rootlesskit)
55+
Tasks: 297
56+
Memory: 524.4M (peak: 622.2M)
57+
```
5458
55-
```bash
56-
docker compose up --detach
57-
```
59+
1. Create the following Docker file and call it `four-nodes.yaml`:
60+
61+
```shell
62+
---
63+
name: entropy-devnet-local-4-nodes
64+
services:
65+
alice-tss-server:
66+
image: entropyxyz/entropy-tss:${ENTROPY_CORE_VERSION:-latest}
67+
ports: ["127.0.0.1:3001:3001/tcp"]
68+
command: ["--alice", "--threshold-url", "0.0.0.0:3001", "--chain-endpoint", "ws://alice-chain-node:9944", "--no-sync"]
69+
alice-chain-node:
70+
image: entropyxyz/entropy:${ENTROPY_CORE_VERSION:-latest}
71+
ports: ["127.0.0.1:9944:9944/tcp"]
72+
volumes: ["${PWD}/dev:/srv/entropy/dev"]
73+
command: ["--chain", "devnet-local", "--alice", "--base-path", ".entropy/alice", "--rpc-port", "9944", "--rpc-cors", "all", "--unsafe-rpc-external", "--node-key=0000000000000000000000000000000000000000000000000000000000000001", "--tss-server-endpoint", "http://alice-tss-server:3001"]
74+
bob-tss-server:
75+
image: entropyxyz/entropy-tss:${ENTROPY_CORE_VERSION:-latest}
76+
ports: ["127.0.0.1:3002:3002/tcp"]
77+
command: ["--bob", "--threshold-url", "0.0.0.0:3002", "--chain-endpoint", "ws://bob-chain-node:9944", "--no-sync"]
78+
bob-chain-node:
79+
image: entropyxyz/entropy:${ENTROPY_CORE_VERSION:-latest}
80+
ports: ["127.0.0.1:9945:9944/tcp"]
81+
volumes: ["${PWD}/dev:/srv/entropy/dev"]
82+
command: ["--chain", "devnet-local", "--bob", "--base-path", ".entropy/bob", "--rpc-port", "9944", "--rpc-cors", "all", "--unsafe-rpc-external", "--bootnodes", "/dns4/alice-chain-node/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp", "--tss-server-endpoint", "http://bob-tss-server:3002"]
83+
charlie-tss-server:
84+
image: entropyxyz/entropy-tss:${ENTROPY_CORE_VERSION:-latest}
85+
ports: ["127.0.0.1:3003:3003/tcp"]
86+
command: ["--charlie", "--threshold-url", "0.0.0.0:3003", "--chain-endpoint", "ws://charlie-chain-node:9944", "--no-sync"]
87+
charlie-chain-node:
88+
image: entropyxyz/entropy:${ENTROPY_CORE_VERSION:-latest}
89+
ports: ["127.0.0.1:9946:9944/tcp"]
90+
volumes: ["${PWD}/dev:/srv/entropy/dev"]
91+
command: ["--chain", "devnet-local", "--charlie", "--base-path", ".entropy/charlie", "--rpc-port", "9944", "--rpc-cors", "all", "--unsafe-rpc-external", "--bootnodes", "/dns4/alice-chain-node/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp", "--tss-server-endpoint", "http://charlie-tss-server:3003"]
92+
dave-tss-server:
93+
image: entropyxyz/entropy-tss:${ENTROPY_CORE_VERSION:-latest}
94+
ports: ["127.0.0.1:3004:3004/tcp"]
95+
command: ["--dave", "--threshold-url", "0.0.0.0:3004", "--chain-endpoint", "ws://dave-chain-node:9944", "--no-sync"]
96+
dave-chain-node:
97+
image: entropyxyz/entropy:${ENTROPY_CORE_VERSION:-latest}
98+
ports: ["127.0.0.1:9947:9944/tcp"]
99+
volumes: ["${PWD}/dev:/srv/entropy/dev"]
100+
command: ["--chain", "devnet-local", "--dave", "--base-path", ".entropy/dave", "--rpc-port", "9944", "--rpc-cors", "all", "--unsafe-rpc-external", "--bootnodes", "/dns4/alice-chain-node/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp", "--tss-server-endpoint", "http://dave-tss-server:3004"]
101+
```
102+
103+
The reference for this file can be found in the [Entropy JavaScript SDK repo](https://github.com/entropyxyz/sdk/blob/4ea6037276a5e406668bd1ff25b0ea265b5e904e/dev/docker-scripts/four-nodes.yaml).
104+
105+
1. Grab the [entropyxyz/entropy](https://hub.docker.com/r/entropyxyz/entropy) and [entropyxyz/entropy-tss](https://hub.docker.com/r/entropyxyz/entropy-tss) Docker containers:
106+
107+
```shell
108+
docker pull entropyxyz/entropy
109+
docker pull entropyxyz/entropy-tss
110+
```
111+
112+
1. Start the devnet using the two containers you just downloaded and the `four-nodes.yaml` file you created:
113+
114+
```shell
115+
docker-compose -f four-up.yaml up -d
116+
```
58117
59118
1. Verify container status:
60119
@@ -70,7 +129,7 @@ This method leverages pre-built Docker images to quickly and easily spin up a lo
70129
docker compose logs
71130
```
72131

73-
While optional, this command shows logs from running containers which can be helpful for troubleshooting.
132+
While optional, this command shows logs from running containers, which can help with troubleshooting.
74133

75134
1. Stop all running containers:
76135

content/guides/use-the-explorer.md

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,42 @@
11
---
22
title: "Use the explorer"
3-
lead: "A blockchain explorer is a web-based tool that functions like a search engine specifically designed for blockchain data. This page explains how to connect to one for Entropy."
3+
lead: "A blockchain explorer is a web-based tool that functions like a search engine specifically designed for blockchain data. The act as an interface, allowing users to quickly search, retrieve, and analyze information on the blockchain. This page explains how to view information about the Entropy network through an explorer."
44
---
55

6-
Blockchains, like Entropy, store information in public databases called ledgers. These ledgers are transparent, meaning anyone can view them. However, the data can be complex and challenging to understand without assistance. Blockchain explorers act as an interface, allowing users to quickly search, retrieve, and analyze information on the blockchain.
6+
The [Polkadot\{.js\} Apps](https://polkadot.js.org/apps) is a popular user interface for interacting with Substrate blockchains. Since Entropy is built using Substrate, we can use this explorer to search and view chain data on the Entropy network.
77

8-
The [Polkadot\{.js\} Apps](https://polkadot.js.org/apps) is a user interface for interacting with Substrate blockchains. Since Entropy is built using Substrate, we can use this explorer to search and view chain data on the Entropy network.
9-
10-
## Prerequisites
11-
12-
- [Docker](https://docker.com)
8+
## Public interface
139

1410
{{< callout type="info" >}}
15-
**Why Docker?** The Entropy networks use regular WebSockets `ws://...`, rather than Secure WebSockets `wss://...`. Due to this limitation, you must run the block explorer _locally_. The easiest way to do this is to use Docker.
11+
**Quick hint**: You can jump straight to the explorer with this link: [polkadot.js.org/apps/?rpc=wss%3A%2F%2Ftestnet.entropy.xyz](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Ftestnet.entropy.xyz)
1612
{{< /callout >}}
1713

18-
## Run the explorer
14+
The fastest way to view information about the Entropy blockchain is to visit the public Polkadot\{.js\} interface.
15+
16+
1. Go to [polkadot.js.org/apps](https://polkadot.js.org/apps/#/explorer)
17+
1. Click the network dropdown at the top left of the screen.
18+
19+
![Click network dropdown.](./images/use-the-explorer-click-network-dropdown.png)
20+
21+
1. In the sidebar, select the **Development** dropdown.
22+
1. Within the **custom endpoint** field, enter the address for the network you want to connect to:
23+
24+
```plaintext
25+
wss://testnet.entropy.xyz
26+
```
27+
28+
1. Click the **Save** icon next to the address field.
29+
1. You should now be able to use the Polkadot\{.js\} interface with Entropy.
30+
31+
## Local install
32+
33+
If you don't want to use the public web interface, you can spin up a local copy of the Polkadot\{.js\} explorer.
34+
35+
### Prerequisites
36+
37+
- [Docker](https://docker.com)
38+
39+
### Run the explorer
1940

2041
1. Open a terminal window and run:
2142

@@ -27,7 +48,7 @@ The [Polkadot\{.js\} Apps](https://polkadot.js.org/apps) is a user interface for
2748

2849
1. Open a browser and go to `http://localhost`.
2950

30-
## Connect to the Entropy network
51+
### Connect to the Entropy network
3152

3253
1. With the explorer running, select the **Unknown** dropdown at the top left:
3354

@@ -37,7 +58,6 @@ The [Polkadot\{.js\} Apps](https://polkadot.js.org/apps) is a user interface for
3758
1. Within the **custom endpoint** field, enter the address for the network you want to connect to:
3859

3960
```plaintext
40-
# Testnet
4161
ws://testnet.entropy.xyz:9944
4262
```
4363

@@ -49,4 +69,4 @@ The [Polkadot\{.js\} Apps](https://polkadot.js.org/apps) is a user interface for
4969

5070
![A functioning blockchain explorer window.](./images/functioning-block-explorer.png)
5171

52-
You should now be able to use the block explorer as usual. Check out the [wiki](https://wiki.polkadot.network/) for details on what information you can get from this blockchain explorer.
72+
You should now be able to use the block explorer as usual. Check out the [wiki](https://wiki.polkadot.network/) for what information you can get from this blockchain explorer.

themes/hextra/layouts/docs/list.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
<div class="content">
99
<h1>{{ .Title }}</h1>
1010

11+
<p class="lead italic">{{ .Params.Lead | markdownify }}</p>
12+
1113
{{ .Content }}
12-
<p class="lead italic">{{ .Params.Lead }}</p>
1314

1415
<div class="hextra-cards hx-mt-4 hx-gap-4 hx-grid not-prose">
1516
{{ range .Pages }}
@@ -20,9 +21,9 @@ <h1>{{ .Title }}</h1>
2021
</span>
2122
<div class="hextra-card-subtitle hx-line-clamp-3 hx-text-sm hx-font-normal hx-text-gray-500 dark:hx-text-gray-400 hx-px-4 hx-mb-4 hx-mt-2">
2223
{{ if .Params.lead }}
23-
{{ .Params.lead | truncate 200 }}
24+
{{ .Params.lead | truncate 200 | markdownify }}
2425
{{ else }}
25-
{{ .Summary | truncate 200 }}
26+
{{ .Summary | truncate 200 | markdownify }}
2627
{{ end }}
2728
</div>
2829
</a>

0 commit comments

Comments
 (0)