Skip to content

Commit b40bcf7

Browse files
authored
Merge pull request #750 from ethersphere/quickstart-install-revision
Quickstart install revision
2 parents 5eb911e + 44d86a7 commit b40bcf7

File tree

1 file changed

+46
-135
lines changed

1 file changed

+46
-135
lines changed

docs/bee/installation/quick-start.md

Lines changed: 46 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Quickstart
33
id: quick-start
44
---
55

6-
This guide will help you install and run a Bee [light node](/docs/bee/working-with-bee/node-types) using the [shell script](/docs/bee/installation/shell-script-install) install method. After explaining how to install and start the node, the guide then explains how to use the [`swarm-cli` command line tool](/docs/bee/working-with-bee/swarm-cli) to find your node's address, fund your node, and buy a batch of postage stamps. Finally it explains how to upload data using a postage stamp batch and how to download that data.
6+
This guide will help you install and run a Bee [light node](/docs/bee/working-with-bee/node-types) using the [shell script](/docs/bee/installation/shell-script-install) install method. After explaining how to install and start the node, the guide then explains how to use the [`swarm-cli` command line tool](/docs/bee/working-with-bee/swarm-cli) to find your node's address, fund your node, and fully initialize it so that it is ready interact with the network.
77

88
:::tip
99
A "light" node can download and upload data from Swarm but does not share its disk space with the network and does not earn rewards. [Learn more](/docs/bee/working-with-bee/node-types).
@@ -168,11 +168,11 @@ Learn how to [get xDAI and xBZZ](/docs/bee/installation/fund-your-node#getting-t
168168
If you wait too long to fund your node it may shut itself down. In that case, simply use the same startup command to start the node again.
169169
:::
170170
171-
## Wait to Sync (~30 Minutes)
171+
## Wait to Sync (~5 Minutes)
172172
173173
After starting and funding a Bee light node for the first time, the node will automatically issue a [transaction](https://gnosisscan.io/tx/0xf8048c4e8020ccef842c9a901e6262e9c06d6f5926ff31bdb7dd9d7274dcf19c) on Gnosis Chain to deploy the node's [chequebook contract](/docs/concepts/incentives/bandwidth-incentives#chequebook-contract).
174174
175-
The node then needs to sync blockchain data before it can buy a postage stamp batch. The process may take ***half an hour or longer*** depending on your RPC provider and network speed.
175+
The node then needs to sync blockchain data before it can buy a postage stamp batch. The process may take **~5 minutes** depending on your RPC provider and network speed.
176176
177177
You can check your node's syncing progress with the `swarm-cli status` command:
178178
@@ -183,27 +183,16 @@ swarm-cli status
183183
```bash
184184
Bee
185185
API: http://localhost:1633 [OK]
186-
Version: 2.6.0-390a402e
186+
Version: 2.6.0-d0aa8b93
187187
Mode: light
188188
189-
Topology
190-
Connected Peers: 143
191-
Population: 6991
192-
Depth: 11
193-
194-
Wallet
195-
xBZZ: 0.0000000000000000
196-
xDAI: 0.009829728398864856
197-
198189
Chainsync
199-
Block: 33,515,656 / 38,855,4075,339,751)
190+
Block: 39,566,742 / 41,710,8072,144,065)
200191
201-
Chequebook
202-
Available xBZZ: 0.0000000000000000
203-
Total xBZZ: 0.0000000000000000
192+
Topology
193+
ERROR Request failed with status code 503
204194
205-
Staking
206-
Staked xBZZ: 0.0000000000000000
195+
There may be additional information in the Bee logs.
207196
```
208197
209198
The `Chainsync` section tells us how many blocks our node has synced so far out of the total Gnosis Chain blocks (and the number after the Δ symbol shows how many blocks still need to be synced):
@@ -213,137 +202,59 @@ Chainsync
213202
Block: 33,515,656 / 38,855,407 (Δ 5,339,751)
214203
```
215204
216-
Once our node is fully synced, we can move on to buying a batch of postage stamps.
217-
218-
## Buy a Batch of Postage Stamps
219-
220-
:::tip
221-
If you try to purchase a batch of postage stamps before your node has fully synced, you will get a `503` error:
222-
223-
```bash
224-
ERROR Request failed with status code 503
225-
```
226-
:::
227-
228-
Before uploading, you need a **postage stamp**. [Learn more](/docs/develop/access-the-swarm/buy-a-stamp-batch):
229-
230-
You can purchase a batch of stamps using the `swarm-cli create` command to specify how much data you wish to store and for how long:
231-
232-
```bash
233-
swarm-cli stamp create
234-
```
235-
236-
237-
Example output:
238-
239-
```bash
240-
Please provide the total capacity of the postage stamp batch
241-
This represents the total size of data that can be uploaded
242-
Example: 1GB
243-
244-
Please provide the time-to-live (TTL) of the postage stamps
245-
Defines the duration after which the stamp will expire
246-
Example: 1d, 1w, 1month
247-
```
248-
249-
After running the command, you will be asked to specify how much data you wish to store and for how long. In our example we specified one day using `1d` and one gigabyte using `1gb`. The script then parses our input and chooses a ["depth" and "amount"](/docs/develop/access-the-swarm/buy-a-stamp-batch#setting-stamp-batch-parameters-and-options) for our batch, gives as an estimated cost, and prompts us to confirm if we wish to continue or not:
250-
251-
:::tip
252-
The `amount` value determines how long your batch stays a live, while the `depth` value determines how much data it can store. There is a minimum depth of 17 and the `amount` value must be high enough for a batch with at least 24 hours of TTL (time to live). [Learn more](/docs/develop/access-the-swarm/buy-a-stamp-batch#setting-stamp-batch-parameters-and-options).
253-
:::
254-
255-
```bash
256-
You have provided the following parameters:
257-
Capacity: 1.000 GB
258-
TTL: 24 hours
259-
260-
Your parameters are now converted to Swarm's internal parameters:
261-
Depth (capacity): 18
262-
Amount (TTL): 581056344
263-
264-
Estimated cost: 0.015 xBZZ
265-
Estimated capacity: 1.000 GB
266-
Estimated TTL: 24 hours
267-
Type: Immutable
268-
? Confirm the purchase (Y/n)
269-
```
270-
271-
:::info
272-
The capacity and TTL are shown as estimates since the actual capacity and TTL are not deterministic. This is because of Swarm's [dynamic pricing model](/docs/concepts/incentives/price-oracle) and stamp batch [utilization mechanics](/docs/concepts/incentives/postage-stamps#batch-utilisation).
273-
:::
274-
275-
We input `Y` to confirm our purchase, and then we wait a few moments for the script to issue a transaction on Gnosis Chain to purchase our batch. Finally the script will return a `Stamp ID`, which is the unique identifier for our postage stamp batch.
276-
277-
```bash
278-
? Confirm the purchase Yes
279-
Stamp ID: 0f473645b8444eb75e647bee4ee5d51ad11b94c32a31a0e80729d16eee07b428
280-
```
281-
282-
## Upload a File
283-
284-
After purchasing a batch of postage stamps, we're ready to upload to Swarm. First create a sample file to upload. Open it with your text editor of choice and write a message:
205+
The `Topology` section will show information about which other nodes your own node is connected with. It will display an `ERROR` until the node is fully initialized.
285206
286-
```bash
287-
vi test.txt
288-
cat test.txt
289-
```
207+
After several minutes, your node will be fully synced, and can now interact with the Swarm network - we can use `swarm-cli status` again to confirm:
290208
291209
```bash
292-
Hello Swarm!
293-
```
294-
295-
After saving your test file, use the `swarm-cli upload` command to upload your file:
296-
297-
```bash
298-
swarm-cli upload test.txt
210+
swarm-cli status
299211
```
300212
301-
Then we will be prompted to choose a stamp batch ID, we only have a single batch so we just hit "Enter" to continue:
302-
303213
```bash
304-
? Please select a stamp for this action (Use arrow keys)
305-
❯ 0f473645b8444eb75e647bee4ee5d51ad11b94c32a31a0e80729d16eee07b428 256.000 MB remaining, TTL 24 hours
306-
```
307-
308-
309-
Response:
214+
Bee
215+
API: http://localhost:1633 [OK]
216+
Version: 2.6.0-d0aa8b93
217+
Mode: light
310218
311-
```
312-
Swarm hash: cb8fbcc7bc0901afa2cec86590c09b491206af40fc6781874abfc3edc7aa495f
313-
URL: http://localhost:1633/bzz/cb8fbcc7bc0901afa2cec86590c09b491206af40fc6781874abfc3edc7aa495f/
314-
Stamp ID: 8d60f9c2
315-
Usage: 50%
316-
Capacity (immutable): 256.000 MB remaining out of 512.000 MB
317-
```
219+
Chainsync
220+
Block: 41,710,955 / 41,710,962 (Δ 7)
318221
319-
The "Swarm hash" returned here is the unique reference for our upload.
222+
Topology
223+
Connected Peers: 151
224+
Population: 2257
225+
Depth: 10
320226
321-
You can share this hash with someone else and they can use it to download whatever you uploaded for as long as the stamp batch you used still has remaining TTL.
227+
Wallet
228+
xBZZ: 0.0000000000000000
229+
xDAI: 0.009787142484816165
322230
323-
## Download a File
231+
Chequebook
232+
Available xBZZ: 0.0000000000000000
233+
Total xBZZ: 0.0000000000000000
234+
noah@NoahM16:~$ swarm-cli status
235+
Bee
236+
API: http://localhost:1633 [OK]
237+
Version: 2.6.0-d0aa8b93
238+
Mode: light
324239
325-
Use the `swarm-cli download` command with the hash for our uploaded file to download it. We specify the output as the second argument, after the postage stamp hash, using "./" to ensure the file is downloaded into our current directory (otherwise it will create a new directory with the hash itself as the filename and the `test.txt` file we uploaded inside that directory):
240+
Chainsync
241+
Block: 41,711,260 / 41,711,268 (Δ 8)
326242
327-
```bash
328-
swarm-cli download cb8fbcc7bc0901afa2cec86590c09b491206af40fc6781874abfc3edc7aa495f ./
329-
```
330-
Output after a successful download:
331-
```bash
332-
test.txt OK
333-
```
243+
Topology
244+
Connected Peers: 156
245+
Population: 2693
246+
Depth: 10
334247
335-
Check the file contents:
336-
```bash
337-
cat test.txt
338-
```
248+
Wallet
249+
xBZZ: 0.0000000000000000
250+
xDAI: 0.009787142484816165
339251
340-
```bash
341-
Hello Swarm!
252+
Chequebook
253+
Available xBZZ: 0.0000000000000000
254+
Total xBZZ: 0.0000000000000000
342255
```
343256
257+
## Next Steps
344258
345-
## Learn More
346-
347-
This guide introduces you to Bee and Swarm, but omits advanced details for the sake of brevity.
259+
With your node now fully synced, you're ready start [uploading and downloading](/docs/develop/access-the-swarm/upload-and-download) or start learning how to [develop on Swarm](/docs/develop/introduction).
348260
349-
To learn more about Bee (including other installation methods, configuration, node types, and more) read the complete ***[Getting Started](/docs/bee/installation/getting-started)*** section.

0 commit comments

Comments
 (0)