Skip to content

Commit

Permalink
[GENERAL UPDATE] Add variables $VERSION to agility the installing and…
Browse files Browse the repository at this point in the history
… updating process of the services (raspibolt#1200)

* Update lightning-client.md

* Update lightning-client.md

* Update lightning-client.md

removed variable $DISTRO
added a missed $VERSION in the manifest gpg command

* Update bitcoin-client.md

Adding the VERSION and VERSION_CORE variables for easy maintenance

* Update bitcoin-client.md

Finished the VERSION variable changes

* Update bitcoin-client.md

updated some errors made

* Update guide/bitcoin/bitcoin-client.md

Co-authored-by: ⚡️2FakTor⚡️ <[email protected]>

* Update guide/bitcoin/bitcoin-client.md

Co-authored-by: ⚡️2FakTor⚡️ <[email protected]>

* Update guide/bitcoin/bitcoin-client.md

Co-authored-by: ⚡️2FakTor⚡️ <[email protected]>

* Apply suggestions from code review

Co-authored-by: ⚡️2FakTor⚡️ <[email protected]>

* Apply suggestions from code review

Co-authored-by: ⚡️2FakTor⚡️ <[email protected]>

* Apply suggestions from code review

Co-authored-by: ⚡️2FakTor⚡️ <[email protected]>

* Update guide/lightning/lightning-client.md

Co-authored-by: Mynima <[email protected]>

* Update guide/lightning/lightning-client.md

Co-authored-by: Mynima <[email protected]>

* Update guide/lightning/lightning-client.md

Co-authored-by: Mynima <[email protected]>

* Update bitcoin-client.md

---------

Co-authored-by: ⚡️2FakTor⚡️ <[email protected]>
Co-authored-by: Mynima <[email protected]>
  • Loading branch information
3 people authored Jun 16, 2023
1 parent 969df67 commit c463c45
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 20 deletions.
27 changes: 16 additions & 11 deletions guide/bitcoin/bitcoin-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,17 @@ This is a precaution to make sure that this is an official release and not a mal
* Get the latest download links at [bitcoincore.org/en/download](https://bitcoincore.org/en/download){:target="_blank"} (ARM Linux 64 bit), they change with each update.

```sh
# set up some version variables for easier maintenance later on
$ VERSION="25.0"

# download Bitcoin Core binary
$ wget https://bitcoincore.org/bin/bitcoin-core-25.0/bitcoin-25.0-aarch64-linux-gnu.tar.gz
$ wget https://bitcoincore.org/bin/bitcoin-core-$VERSION/bitcoin-$VERSION-aarch64-linux-gnu.tar.gz

# download the list of cryptographic checksum
$ wget https://bitcoincore.org/bin/bitcoin-core-25.0/SHA256SUMS
$ wget https://bitcoincore.org/bin/bitcoin-core-$VERSION/SHA256SUMS

# download the signatures attesting to validity of the checksums
$ wget https://bitcoincore.org/bin/bitcoin-core-25.0/SHA256SUMS.asc
$ wget https://bitcoincore.org/bin/bitcoin-core-$VERSION/SHA256SUMS.asc
```

### Checksum check
Expand Down Expand Up @@ -116,8 +119,8 @@ Expected output:
* If you're satisfied with the checkum, signature and timestamp checks, extract the Bitcoin Core binaries, install them and check the version.

```sh
$ tar -xvf bitcoin-25.0-aarch64-linux-gnu.tar.gz
$ sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-25.0/bin/*
$ tar -xvf bitcoin-$VERSION-aarch64-linux-gnu.tar.gz
$ sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-$VERSION/bin/*
$ bitcoind --version
> Bitcoin Core version v25.0.0
> [...]
Expand Down Expand Up @@ -525,11 +528,13 @@ When upgrading, there might be breaking changes, or changes in the data structur
* Get the latest download links at [bitcoincore.org/en/download](https://bitcoincore.org/en/download){:target="_blank"} (ARM Linux 64 bit), they change with each update. This page tends to lag the Github releases page linked above.

```sh
# set up some version variables for easier maintenance later on
$ VERSION="25.0"
# download Bitcoin Core binary, checksums, signature file, and timestamp file
$ wget https://bitcoincore.org/bin/bitcoin-core-25.0/bitcoin-25.0-aarch64-linux-gnu.tar.gz
$ wget https://bitcoincore.org/bin/bitcoin-core-25.0/SHA256SUMS
$ wget https://bitcoincore.org/bin/bitcoin-core-25.0/SHA256SUMS.asc
$ wget https://bitcoincore.org/bin/bitcoin-core-25.0/SHA256SUMS.ots
$ wget https://bitcoincore.org/bin/bitcoin-core-$VERSION/bitcoin-$VERSION-aarch64-linux-gnu.tar.gz
$ wget https://bitcoincore.org/bin/bitcoin-core-$VERSION/SHA256SUMS
$ wget https://bitcoincore.org/bin/bitcoin-core-$VERSION/SHA256SUMS.asc
$ wget https://bitcoincore.org/bin/bitcoin-core-$VERSION/SHA256SUMS.ots
```

* Verify the new version against its checksums
Expand Down Expand Up @@ -592,8 +597,8 @@ Now, just check that the timestamp date is close to the [release](https://github
* If you're satisfied with the checksum, signature and timestamp checks, extract the Bitcoin Core binaries, install them and check the version.

```sh
$ tar -xvf bitcoin-25.0-aarch64-linux-gnu.tar.gz
$ sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-25.0/bin/*
$ tar -xvf bitcoin-$VERSION-aarch64-linux-gnu.tar.gz
$ sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-$VERSION/bin/*
```

* Check the new version
Expand Down
19 changes: 10 additions & 9 deletions guide/lightning/lightning-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,19 @@ We'll download, verify and install LND.

```sh
$ cd /tmp
$ wget https://github.com/lightningnetwork/lnd/releases/download/v0.16.3-beta/lnd-linux-arm64-v0.16.3-beta.tar.gz
$ wget https://github.com/lightningnetwork/lnd/releases/download/v0.16.3-beta/manifest-v0.16.3-beta.txt
$ wget https://github.com/lightningnetwork/lnd/releases/download/v0.16.3-beta/manifest-roasbeef-v0.16.3-beta.sig
$ wget https://github.com/lightningnetwork/lnd/releases/download/v0.16.3-beta/manifest-roasbeef-v0.16.3-beta.sig.ots
$ VERSION="0.16.3"
$ wget https://github.com/lightningnetwork/lnd/releases/download/v$VERSION-beta/lnd-linux-arm64-v$VERSION-beta.tar.gz
$ wget https://github.com/lightningnetwork/lnd/releases/download/v$VERSION-beta/manifest-v$VERSION-beta.txt
$ wget https://github.com/lightningnetwork/lnd/releases/download/v$VERSION-beta/manifest-roasbeef-v$VERSION-beta.sig
$ wget https://github.com/lightningnetwork/lnd/releases/download/v$VERSION-beta/manifest-roasbeef-v$VERSION-beta.sig.ots
```

### Checksum check

* Verify the signed checksum against the actual checksum of your download

```sh
$ sha256sum --check manifest-v0.16.3-beta.txt --ignore-missing
$ sha256sum --check manifest-v$VERSION-beta.txt --ignore-missing
> lnd-linux-arm64-v0.16.3-beta.tar.gz: OK
```

Expand All @@ -63,7 +64,7 @@ Now that we've verified the integrity of the downloaded binary, we need to check
* Verify the signature of the text file containing the checksums for the application

```sh
$ gpg --verify manifest-roasbeef-v0.16.3-beta.sig manifest-v0.16.3-beta.txt
$ gpg --verify manifest-roasbeef-v$VERSION-beta.sig manifest-v$VERSION-beta.txt
> gpg: Signature made Tue Jun 6 04:57:08 2023 EEST
> gpg: using RSA key 60A1FA7DA5BFF08BDCBBE7903BBD59E99B280306
> gpg: Good signature from "Olaoluwa Osuntokun <[email protected]>" [unknown]
Expand All @@ -80,7 +81,7 @@ We can also check that the manifest file was in existence around the time of the
* Let's verify the timestamp of the file matches the release date.

```sh
$ ots verify manifest-roasbeef-v0.16.3-beta.sig.ots -f manifest-roasbeef-v0.16.3-beta.sig
$ ots --no-cache verify manifest-roasbeef-v$VERSION-beta.sig.ots -f manifest-roasbeef-v$VERSION-beta.sig
> [...]
> Success! Bitcoin block 793048 attests existence as of 2023-06-06 EEST
```
Expand All @@ -94,8 +95,8 @@ Having verified the integrity and authenticity of the release binary, we can saf
* Install LND

```sh
$ tar -xzf lnd-linux-arm64-v0.16.3-beta.tar.gz
$ sudo install -m 0755 -o root -g root -t /usr/local/bin lnd-linux-arm64-v0.16.3-beta/*
$ tar -xvf lnd-linux-arm64-v$VERSION-beta.tar.gz
$ sudo install -m 0755 -o root -g root -t /usr/local/bin lnd-linux-arm64-v$VERSION-beta/*
$ lnd --version
> lnd version v0.16.3-beta commit=v0.16.3-beta
```
Expand Down

0 comments on commit c463c45

Please sign in to comment.