Skip to content

Commit

Permalink
Desmos "Helios"
Browse files Browse the repository at this point in the history
See PR #339
  • Loading branch information
RiccardoM authored Jan 14, 2021
1 parent 8eafbff commit 23bd4ca
Show file tree
Hide file tree
Showing 27 changed files with 201 additions and 150 deletions.
38 changes: 36 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,41 @@
# Desmos v0.15.0 "Helios"
This release updates Desmos to be based on the new Cosmos v0.40 "Stargate" release. Such version brings a lot of
different changes with it. Following you can find a list of the most important changes, and how they will affect Desmos.
If you want to have a mor detailed view of what Stargate brings, you can check out
their [release notes](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.0).

## IBC
The major aim of this release is to set up the path to a brighter future thanks to the integration
of [IBC](https://cosmos.network/ibc), the Inter Blockchain Communication protocol. This will allow any chain to
independently send transaction towards Desmos, enabling it to be a true hub for social networks among the Cosmos
ecosystem.

## Protocol buffers
With Stargate, the official encoding has been switched from Amino to the more popular and
fast [protocol buffers](https://developers.google.com/protocol-buffers). This will allow the chain nodes to handle
transactions faster improving the overall throughput. It will also allow clients to query the data
using [gRPC](https://grpc.io/), making it easier, faster and more reliable.

## State sync
Another big improvements is the introduction
of [Tendermint State Sync](https://docs.tendermint.com/master/tendermint-core/state-sync.html). This will allow new
nodes to easily catch up to the current chain state, thanks to automatic data snapshosts that other nodes will
periodically create and share.

## Single application binary
Starting from this version, you will no longer have the access to `desmoscli`. Instead, everything has been merged
together inside `desmosd`. This will also make it easier to handle automatic upgrades.

## Introduction of the `--recover` flag inside the `init` command
Once thing that has been highly requested from validators, is the ability to recover the node key in the case something
goes wrong. Starting from this version, you will be able to provide a custom seed to the `desmosd init` command using
the `--recover` flag. This enables nodes operator to always recover their keys if needed, starting from the seed node.

# Version 0.14.0
## Changes

- Implemented blocked users checks (#298)
- Implemented the possibility to set a minimum messages fee (#230)
- Implemented the possibility to set a minimum messages fee (#230)

## Bug fixes
- Fixed height not working in REST queries (#299)
Expand All @@ -16,7 +50,7 @@

## Bug fixes
- Fixed the possibility of requesting a transfer of an empty DTag (#292)
- Fixed the impossibility of querying all the relationships on chain (#306)
- Fixed the impossibility of querying all the relationships on chain (#306)

# Version 0.12.3
## Changes
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ COPY --from=build-env /go/src/github.com/desmos-labs/desmos/build/desmosd /usr/b

EXPOSE 26656 26657 1317 9090

# Run desmosd by default, omit entrypoint to ease using container with desmoscli
# Run desmosd by default, omit entrypoint to ease using container with desmosd
CMD ["desmosd"]
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,12 @@ build: BUILD_ARGS=-o $(BUILDDIR)/
build-linux: go.sum
GOOS=linux GOARCH=amd64 LEDGER_ENABLED=false $(MAKE) build

build-arm64: go.sum
GOOS=linux GOARCH=arm64 $(MAKE) build

$(BUILD_TARGETS): go.sum $(BUILDDIR)/
go $@ -mod=readonly $(BUILD_FLAGS) $(BUILD_ARGS) ./...

build-armv8: go.sum
env GOARCH=arm go build -mod=readonly $(BUILD_FLAGS) -o ./build/arm-v8/desmosd ./cmd/desmosd
env GOARCH=arm go build -mod=readonly $(BUILD_FLAGS) -o ./build/arm-v8/desmoscli ./cmd/desmoscli

$(BUILDDIR)/:
mkdir -p $(BUILDDIR)/

Expand Down
15 changes: 7 additions & 8 deletions contrib/validators/automatic-fullnode-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ if [ -z "$MONIKER" ]; then
echo "Validator moniker not given. Please specify it as the first argument"
exit
fi
SEED=$2

USER=$(id -u -n)

Expand Down Expand Up @@ -83,13 +84,6 @@ if [ -d "$DESMOSD_FOLDER" ]; then
sudo rm -r DESMOSD_FOLDER
fi

# Delete the old $HOME/.desmoscli folder
DESMOSCLI_FOLDER="$HOME/.desmoscli"
if [ -d "$DESMOSCLI_FOLDER" ]; then
echo "====> Removing existing desmoscli folder"
sudo rm -r DESMOSCLI_FOLDER
fi

# Clone Desmos
echo "====> Downloading Desmos"
{
Expand All @@ -111,8 +105,13 @@ echo "====> Downloading Desmos"
# Initialize the chain
echo "====> Initializing a new chain"
{
MONIKER=$1
if [ -z "$SEED" ]; then
cosmovisor init "$MONIKER"
else
cosmovisor init "$MONIKER" --recover "$SEED"
fi
cosmovisor unsafe-reset-all
cosmovisor init "$MONIKER"
} &> /dev/null

# Restore the priv validator key
Expand Down
4 changes: 2 additions & 2 deletions docs/developers/queries/params.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This query endpoint returns all the parameters of the `posts` module.

**CLI**
```bash
desmoscli query posts parameters
desmosd query posts parameters
```

**REST**
Expand All @@ -19,7 +19,7 @@ This query endpoint returns all the parameters of the `profiles` module.

**CLI**
```bash
desmoscli query profiles parameters
desmosd query profiles parameters
```

**REST**
Expand Down
4 changes: 2 additions & 2 deletions docs/developers/queries/poll-answers.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ This query endpoint allows you to retrieve the details of answers made to a post

**CLI**
```bash
desmoscli query posts poll-answers [id]
desmosd query posts poll-answers [id]

# Example
# desmoscli query posts poll-answers a4469741bb0c0622627810082a5f2e4e54fbbb888f25a4771a5eebc697d30cfc
# desmosd query posts poll-answers a4469741bb0c0622627810082a5f2e4e54fbbb888f25a4771a5eebc697d30cfc
```

**REST**
Expand Down
8 changes: 4 additions & 4 deletions docs/developers/queries/posts.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ This query endpoint allows you to retrieve the details of a single post having i

**CLI**
```bash
desmoscli query posts post [id]
desmosd query posts post [id]

# Example
# desmoscli query posts post a4469741bb0c0622627810082a5f2e4e54fbbb888f25a4771a5eebc697d30cfc
# desmosd query posts post a4469741bb0c0622627810082a5f2e4e54fbbb888f25a4771a5eebc697d30cfc
```

**REST**
Expand All @@ -22,7 +22,7 @@ This query endpoint allows you to get all the stored posts that match one or mor

**CLI**
```bash
desmoscli query posts [--flags]
desmosd query posts [--flags]
```

Available flags:
Expand All @@ -44,7 +44,7 @@ Available flags:

```bash
# Example
# desmoscli query posts --parent-id=a4469741bb0c0622627810082a5f2e4e54fbbb888f25a4771a5eebc697d30cfc --allows-comments=true --subspace=desmos --sort=created --sort-order=descending
# desmosd query posts --parent-id=a4469741bb0c0622627810082a5f2e4e54fbbb888f25a4771a5eebc697d30cfc --allows-comments=true --subspace=desmos --sort=created --sort-order=descending
```

**REST**
Expand Down
6 changes: 3 additions & 3 deletions docs/developers/queries/profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ This query endpoint allows you to retrieve the details of a single profile havin

**CLI**
```bash
desmoscli query profiles profile [address_or_dtag]
desmosd query profiles profile [address_or_dtag]

# Example
# desmoscli query profiles profile desmos12a2y7fflz6g4e5gn0mh0n9dkrzllj0q5vx7c6t
# desmoscli query profiles profile leonardo
# desmosd query profiles profile desmos12a2y7fflz6g4e5gn0mh0n9dkrzllj0q5vx7c6t
# desmosd query profiles profile leonardo
```

**REST**
Expand Down
4 changes: 2 additions & 2 deletions docs/developers/queries/reactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ This query endpoint allows you to retrieve the list of registered reactions.

**CLI**
```bash
desmoscli query posts registered-reactions
desmosd query posts registered-reactions

# Example
# desmoscli query posts registered-reactions
# desmosd query posts registered-reactions
```

**REST**
Expand Down
4 changes: 2 additions & 2 deletions docs/developers/queries/reports.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ post ID.

**CLI**
```bash
desmoscli query reports post [id]
desmosd query reports post [id]

# Example
# desmoscli query reports all 301921ac3c8e623d8f35aef1886fea20849e49f08ec8ddfdd9b96feaf0c4fd15
# desmosd query reports all 301921ac3c8e623d8f35aef1886fea20849e49f08ec8ddfdd9b96feaf0c4fd15
```

**REST**
Expand Down
4 changes: 2 additions & 2 deletions docs/developers/queries/session.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ This query allows you to retrieve the details of a session having its id.

**CLI**
```bash
desmoscli query sessions session [id]
desmosd query sessions session [id]

# Example
# desmosli query sessions session 66
# desmosd query sessions session 66
```

**REST**
Expand Down
4 changes: 2 additions & 2 deletions docs/developers/queries/user-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ This query endpoint allows you to retrieve the user blocked by the user with the

**CLI**
```bash
desmoscli query relationships blocklist [address]
desmosd query relationships blocklist [address]

# Example
# desmoscli query relationships blocklist desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud
# desmosd query relationships blocklist desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud
```

**REST**
Expand Down
6 changes: 3 additions & 3 deletions docs/developers/queries/user-dtag-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ This query endpoint allows you to retrieve the DTag requests of the user with th

**CLI**
```bash
desmoscli query profiles dtag-requests [address]
desmosd query profiles dtag-requests [address]

# Example
# desmoscli query relationships dtag-requests desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud
# desmosd query profiles dtag-requests desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud
```

**REST**
Expand All @@ -15,4 +15,4 @@ desmoscli query profiles dtag-requests [address]
# Example
# curl http://lcd.morpheus.desmos.network:1317/profiles/desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud/incoming-dtag-requests
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ This query endpoint allows you to retrieve the details of a relationship where t

**CLI**
```bash
desmoscli query relationships user [address]
desmosd query relationships user [address]

# Example
# desmoscli query relationships user desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud
# desmosd query relationships user desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud
```

**REST**
Expand Down
2 changes: 1 addition & 1 deletion docs/developers/query-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Aside from [performing transactions](perform-transactions.md) you can also query
- [Query all the DTag transfer requests](queries/user-dtag-requests.md)

## Relationships
- [Query user's relationships](queries/user_relationships.md)
- [Query user's relationships](queries/user-relationships.md)
- [Query user's blocked users](queries/user-blocks.md)

## Reports
Expand Down
8 changes: 7 additions & 1 deletion docs/fullnode/setup/automatic.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ Once you got the script, you are now ready to use it.
In order to work, it needs the following parameters:

1. The `moniker` of the validator you are creating.
This is just a string that will allow you to identify the validator you are running locally. It can be anything you want.
This is just a string that identifies the validator you are running locally. It can be anything you
want.

2. (Optional) A `seed` from which to generate the node's private key.
This should be a seed phrase (made of 24 words) used to generate your node's private key. You can provide it if you
want to be able to recover your node key in the future. If not provided, a random seed will be generated, making it
impossible to recover the private key if lost.

### Running the script
Once you are ready to run the script, just execute:
Expand Down
39 changes: 35 additions & 4 deletions docs/fullnode/setup/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,18 @@ make install
make install DB_BACKEND=rocksdb
```

If the software is built successfully, `desmosd` and `desmoscli` will be located at `/go/bin` of your home directory. If you have setup your environment variables correctly in the previous step, you should be able to access them correctly. Try to check the version of the software.
If the software is built successfully, `desmosd` will be located at `/go/bin` of your home directory. If you have setup
your environment variables correctly in the previous step, you should be able to access them correctly. Try to check the
version of the software.

```bash
desmosd version --long
```

## 2. Initialize the Desmos working directory
Configuration files and chain data will be stored inside the `.desmosd` directory under your home directory by default. It will be created when you initialize the environment.

Configuration files and chain data will be stored inside the `.desmosd` directory under your home directory by default.
It will be created when you initialize the environment.

```bash
# Initialize the working envinorment for Desmos
Expand All @@ -50,8 +54,35 @@ desmosd init <your_moniker>

You can choose any moniker your like. It will be saved in the `config.toml` under the `.desmosd` working directory.

### Recovering a previous node

Starting from `v0.15.0`, you are now able to provide a custom seed when initializing your node. This will be
particularly useful because, in the case that you want to reset your node, you will be able to re-generate the same
private node key instead of having to create a brand new node.

In order to provide a custom seed to your private key, you can do as follows:

1. Get a new random seed by running
```shell
desmosd keys add node --dry-run
```
This will create a new key **without** adding it to your keystore, and output the underlying seed.

2. Copy the above provided seed, and then pass it to the `init` command using the `--recover` flag:
```shell
desmosd init <your_moniker> --recover <your_seed>
```

:::tip Recovering a node If you already have a seed, you can directly use the `--recover` flag without generating a new
one. This will recover the private key associated to that seed.
:::

## 3. Get the genesis file
To connect to or start a new network, a genesis file is required. The file contains all the settings telling how the genesis block of the network should look like. To connect to the `morpheus` testnets, you will need the corresponding genesis file of each testnet. Visit the [testnet repo](https://github.com/desmos-labs/morpheus) and download the correct genesis file by running the following command.

To connect to or start a new network, a genesis file is required. The file contains all the settings telling how the
genesis block of the network should look like. To connect to the `morpheus` testnets, you will need the corresponding
genesis file of each testnet. Visit the [testnet repo](https://github.com/desmos-labs/morpheus) and download the correct
genesis file by running the following command.

```bash
# First, remove the newly created genesis file during the initialization
Expand Down Expand Up @@ -108,7 +139,7 @@ The full node will connect to the peers and start syncing. You can check the sta
```bash
# Check status of the node
desmoscli status
desmosd status
```
You should see an output like the following one:
Expand Down
2 changes: 1 addition & 1 deletion docs/fullnode/setup/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ A part from disk space, the following requirements should be met.


## 1. Setup your environment
In order to run a fullnode, you need to build `desmosd` and `desmoscli` which require `Go`, `git`, `gcc` and `make` installed.
In order to run a fullnode, you need to build `desmosd` which requires `Go`, `git`, `gcc` and `make` installed.

This process depends on your working environment.

Expand Down
Loading

0 comments on commit 23bd4ca

Please sign in to comment.