Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start French translation of the documentation.
- Loading branch information
Showing
10 changed files
with
517 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
docs/i18n/fr/docusaurus-plugin-content-docs/current/getting-started/_category_.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"label": "Démarrage rapide", | ||
"position": 1 | ||
} |
4 changes: 4 additions & 0 deletions
4
docs/i18n/fr/docusaurus-plugin-content-docs/current/getting-started/demo/_category_.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"label": "Démo", | ||
"position": 4 | ||
} |
20 changes: 20 additions & 0 deletions
20
docs/i18n/fr/docusaurus-plugin-content-docs/current/getting-started/demo/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Démo | ||
|
||
```mdx-code-block | ||
import DocCardList from '@theme/DocCardList'; | ||
import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; | ||
<DocCardList items={useCurrentSidebarCategory().items}/> | ||
``` | ||
|
||
<iframe style={{width: '100%', height: '480px'}} src="https://www.youtube.com/embed/dJk5_kB3BM4" title="Hydra Head Demo" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="true"></iframe> | ||
|
||
<br/><br/> | ||
|
||
:::caution Avant-propos | ||
Cette vidéo montre une interface utilisateur au sein d'un terminal. En coulisse, l'application cliente se connecte à un noeud Hydra local au moyen d'une WebSocket comme n'importe quelle application cliente souhaitant intéragir avec un noeud Hydra le ferait. Autrement dit, bien qu'il ne s'agisse pas d'un exemple des plus palpitants, c'est néanmoins un exemple possible et plausible d'application cliente. | ||
::: |
83 changes: 83 additions & 0 deletions
83
...n/fr/docusaurus-plugin-content-docs/current/getting-started/demo/with-docker.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Via Docker | ||
|
||
```mdx-code-block | ||
import TerminalWindow from '@site/src/components/TerminalWindow'; | ||
``` | ||
|
||
> Ce document détaille les étapes nécessaires pour faire tourner une Hydra Head dans un environment de démo, avec Docker. | ||
La démo comprend: | ||
|
||
- Un cluster de trois noeuds Hydra, connectés point-à-point, et ayant chacun une identité (`alice`, `bob`, `carol`) associée à une paire de clés publique/privée; | ||
- Un noeud Cardano, en mode BFT, produisant des blocs et formant a lui seul un réseau local de développement; | ||
- Un serveur Prometheus pour des métriques; | ||
- Une interface utilisateur dans le terminal pour se connecter et opérer chaque noeud Hydra. | ||
|
||
:::caution Avertissement! | ||
Le noeud Cardano créé un "réseau" privé et local qui démarre depuis un bloc genesis. Pour démarrer, la configuration du noeud doit être à jour (comprendre, récente). Si au démarrage, le noeud Cardano retourne `LedgerNoView`, alors c'est que l'heure de démarrage indiquée dans la configuration génésis est trop loin dans le passé: il faut en ce cas générer la configuration à nouveau via `prepare-devnet.sh`. | ||
::: | ||
|
||
## Mise en place du réseau | ||
|
||
Nous utiliserons [Docker](https://www.docker.com/get-started) et [compose](https://www.docker.com/get-started) pour cette démo, assurez-vous de les avoir accessibles. Si vous ne souhaitez pas utiliser / installer Docker, vous pouvez directement vous rendre sur [Démo: Sans Docker](/docs/getting-started/demo/without-docker) et mettre les mains dans le cambouis. | ||
|
||
:::info Contexte | ||
Toutes les commandes ci-dessous supposent qu'elles sont éxécutées depuis le dossier `demo/`, à la racine du dépôt. Vous aurez donc besoin de cloner le dépôt et de `cd demo` avant d'aller plus loin. | ||
::: | ||
|
||
:::warning (in)compatibilité du système d'exploitation | ||
Les instructions fournies ci-après ont été testées pour des environnements Linux récents (Ubuntu, ArchLinux, NixOS...). Si vous êtes sur Windows ou MacOS vous aurez sans doute besoin d'ajuster certaines commandes liées aux [volumes](https://docs.docker.com/storage/volumes/). | ||
::: | ||
|
||
Pour commencer, récupérez les images des différents services définis dans le fichier compose: | ||
|
||
```mdx-code-block | ||
<TerminalWindow> | ||
docker-compose --profile tui pull | ||
</TerminalWindow> | ||
``` | ||
|
||
D'ici, vous pouvez exécuter le script `./prepare-devnet.sh` pour créer les fichiers nécessaires à la configuration du réseau local (a.k.a devnet). Le script génère une configuration génésis Cardano (qui fixe les paramètres du protocole). Notez que dans le cadre de cette démo, la configuration du réseau n'utilise pas de stake pool et ne requiert qu'un unique noeud pour fonctionner. | ||
|
||
```mdx-code-block | ||
<TerminalWindow> | ||
./prepare-devnet.sh | ||
</TerminalWindow> | ||
``` | ||
|
||
C'est tout. Il est maintenant possible de démarrer le réseau via: | ||
|
||
```mdx-code-block | ||
<TerminalWindow> | ||
docker-compose up -d | ||
</TerminalWindow> | ||
``` | ||
|
||
Toutes ces étapes peuvent être effectuées sont combinées dans un unique script `./run-docker.sh`. Ce script contient aussi quelques petites vérifications pour éviter de vous évitez de vous tirer une balle dans le pied avec certaines commandes. | ||
|
||
## Générer des fonds | ||
|
||
En l'état actuel, les noeuds Hydra requièrent des UTxO dans une forme assez spécifique afin de pouvoir payer les transactions nécessaires au protocole (on appelle ces UTxO: "carburant"), ainsi que des fonds à bloquer dans le contrat pour chaque participant. Parmi les fichiers, vous trouverez un script `./seed-devnet.sh` qui s'occupe de générer ces UTxOs pour chaque participant en utilisant la `cardano-cli`. | ||
|
||
:::info | ||
Il n'y a rien d'intrinsèquement particulier au sujet des transactions générées par `seed-devnet.sh`. Toutefois si vous deviez les générer vous-même, assurez vous que pour chaque addresse générée à partir de la paire publique/privée associée à l'option `--cardano-signing-key` de chaque participant est envoyée deux UTxOs: | ||
|
||
- Un UTxO simple, contenant des Ada ou actifs natifs; | ||
- Un UTxO ne contenant que des Ada et avec le datum hash suivant: `a654fb60d21c1fed48db2c320aa6df9737ec0204c0ba53b9b94a09fb40e757f3` (ce datum identifie les UTxOs réservés au "carburant"). | ||
::: | ||
|
||
## Utiliser l'interface client | ||
|
||
À l'aide de compose, vous pouvez démarrer les interfaces clientes (a.k.a `hydra-tui`) pour interagir avec chaque noeud Hydra. Le fichier compose contient déjà trois services pré-configurés: `hydra-tui-1`, `hydra-tui-2`, and `hydra-tui-3`. Pour démarrer le premier client, utilisez simplement: | ||
|
||
```mdx-code-block | ||
<TerminalWindow> | ||
docker-compose --profile tui run hydra-tui-1 | ||
</TerminalWindow> | ||
``` | ||
|
||
Cette commande lance une interface utilisateur dans le terminal, configurée avec les clés du premier noeud (i.e. Alice). Dans d'autres terminaux, vous pouvez lancer de la même façon `hydra-tui-2` et `hydra-tui-3`. |
153 changes: 153 additions & 0 deletions
153
...r/docusaurus-plugin-content-docs/current/getting-started/demo/without-docker.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
--- | ||
sidebar_position: 3 | ||
--- | ||
|
||
# Sans Docker | ||
|
||
```mdx-code-block | ||
import TerminalWindow from '@site/src/components/TerminalWindow'; | ||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
``` | ||
|
||
> Running the demo without Docker containers, but with plain executables and scripts. | ||
:::info Context | ||
All commands below are written as if executed from the `demo` folder in the project repository, so make sure to clone the repository and `cd demo` before doing anything. | ||
::: | ||
|
||
# Setting-up The Network | ||
|
||
One needs to prepare a `cardano-node` (devnet) and a `hydra-node` "manually". These instructions assume you have both built and in scope for `cabal exec`. | ||
|
||
First, let's prepare and start an ad-hoc, single `cardano-node` devnet using our configuration. Note that this will create a `devnet` directory in your current working directory: | ||
|
||
````mdx-code-block | ||
<TerminalWindow> | ||
``` | ||
./prepare-devnet.sh | ||
cd devnet | ||
mkdir ipc | ||
cabal exec cardano-node -- run \ | ||
--config cardano-node.json \ | ||
--topology topology.json \ | ||
--database-path db \ | ||
--socket-path ipc/node.socket \ | ||
--shelley-operational-certificate credentials/opcert1.cert \ | ||
--shelley-kes-key credentials/delegate1.kes.skey \ | ||
--shelley-vrf-key credentials/delegate1.vrf.skey | ||
``` | ||
</TerminalWindow> | ||
```` | ||
|
||
Then, in 3 different terminals, start 3 Hydra nodes from the `demo/` directory: | ||
|
||
````mdx-code-block | ||
<Tabs> | ||
<TabItem value="Alice"> | ||
<TerminalWindow> | ||
``` | ||
cabal exec hydra-node -- \ | ||
--node-id 1 --port 5001 --api-port 4001 --monitoring-port 6001 \ | ||
--peer localhost:5002 \ | ||
--peer localhost:5003 \ | ||
--hydra-signing-key alice.sk \ | ||
--hydra-verification-key bob.vk \ | ||
--hydra-verification-key carol.vk \ | ||
--cardano-signing-key devnet/credentials/alice.sk \ | ||
--cardano-verification-key devnet/credentials/bob.vk \ | ||
--cardano-verification-key devnet/credentials/carol.vk \ | ||
--ledger-genesis devnet/genesis-shelley.json \ | ||
--ledger-protocol-parameters devnet/protocol-parameters.json \ | ||
--network-id 42 \ | ||
--node-socket devnet/ipc/node.socket | ||
``` | ||
</TerminalWindow> | ||
</TabItem> | ||
<TabItem value="Bob"> | ||
<TerminalWindow> | ||
``` | ||
cabal exec hydra-node -- \ | ||
--node-id 2 --port 5002 --api-port 4002 --monitoring-port 6002 \ | ||
--peer localhost:5001 \ | ||
--peer localhost:5003 \ | ||
--hydra-signing-key bob.sk \ | ||
--hydra-verification-key alice.vk \ | ||
--hydra-verification-key carol.vk \ | ||
--cardano-signing-key devnet/credentials/bob.sk \ | ||
--cardano-verification-key devnet/credentials/alice.vk \ | ||
--cardano-verification-key devnet/credentials/carol.vk \ | ||
--ledger-genesis devnet/genesis-shelley.json \ | ||
--ledger-protocol-parameters devnet/protocol-parameters.json \ | ||
--network-id 42 \ | ||
--node-socket devnet/ipc/node.socket | ||
``` | ||
</TerminalWindow> | ||
</TabItem> | ||
<TabItem value="Carol"> | ||
<TerminalWindow> | ||
``` | ||
cabal exec hydra-node -- \ | ||
--node-id 3 --port 5003 --api-port 4003 --monitoring-port 6003 \ | ||
--peer localhost:5001 \ | ||
--peer localhost:5002 \ | ||
--hydra-signing-key carol.sk \ | ||
--hydra-verification-key alice.vk \ | ||
--hydra-verification-key bob.vk \ | ||
--cardano-signing-key devnet/credentials/carol.sk \ | ||
--cardano-verification-key devnet/credentials/alice.vk \ | ||
--cardano-verification-key devnet/credentials/bob.vk \ | ||
--ledger-genesis devnet/genesis-shelley.json \ | ||
--ledger-protocol-parameters devnet/protocol-parameters.json \ | ||
--network-id 42 \ | ||
--node-socket devnet/ipc/node.socket | ||
``` | ||
</TerminalWindow> | ||
</TabItem> | ||
</Tabs> | ||
```` | ||
|
||
If things go well, the nodes should start logging once connected to the chain. | ||
|
||
# Seeding The Network | ||
|
||
You can use the `seed-devnet.sh` script by passing it the path to a cardano-cli executable to use, instead of having it using the Docker container. For example: | ||
|
||
|
||
```mdx-code-block | ||
<TerminalWindow> | ||
./seed-devnet.sh $(which cardano-cli) | ||
</TerminalWindow> | ||
``` | ||
|
||
Running The Clients | ||
Connect to the nodes using hydra-tui. For example, to use Alice's hydra-node and her on-chain credentials: | ||
|
||
````mdx-code-block | ||
<TerminalWindow> | ||
``` | ||
cabal exec hydra-tui -- \ | ||
--connect 0.0.0.0:4001 \ | ||
--cardano-signing-key devnet/credentials/alice.sk \ | ||
--network-id 42 \ | ||
--node-socket devnet/ipc/node.socket | ||
``` | ||
</TerminalWindow> | ||
```` | ||
|
||
Replace port `4001` with `4002` or `4003` to connect to the other 2 nodes and `alice.sk` with `bob.sk` or `carol.sk` respectively. |
12 changes: 12 additions & 0 deletions
12
docs/i18n/fr/docusaurus-plugin-content-docs/current/getting-started/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Démarrage rapide | ||
|
||
```mdx-code-block | ||
import DocCardList from '@theme/DocCardList'; | ||
import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; | ||
<DocCardList items={useCurrentSidebarCategory().items}/> | ||
``` |
Oops, something went wrong.