Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs restructure #1419

Merged
merged 30 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
04c5464
Remove most links from navbar
ch1bo Mar 18, 2024
46d48e8
Move FAQ to docs
ch1bo Mar 18, 2024
69c925c
Create a custom sidebar
ch1bo Mar 18, 2024
27d4e06
Decrease opacity of sidebar headers
ch1bo Mar 18, 2024
10160d8
Draft developer docs in /docs/dev/
ch1bo Mar 18, 2024
9547590
Re-add topologies / use case to navbar
ch1bo Mar 18, 2024
46aaa4c
Some modifications done during discussion
ch1bo Mar 18, 2024
4ec1f80
Disable i18n and remove translations
ch1bo May 6, 2024
0db5268
Rename testnet tutorial file
ch1bo May 6, 2024
1a3a9d9
Convert demo to a tutorial
ch1bo May 6, 2024
bc87c27
Move protocol overview into user manual
ch1bo May 6, 2024
f84d1ce
Rename / add a welcome page
ch1bo May 6, 2024
4959813
Move network constraints to architecture page and update known issues
ch1bo May 6, 2024
fe69b01
Minor modification on installation page
ch1bo May 6, 2024
b0735cd
Move quickstart/configuration and installation
ch1bo May 6, 2024
c8befac
Rename tutorials again
ch1bo May 6, 2024
1135b46
Drop verbatim help from configuration and rewrite a bit
ch1bo May 6, 2024
4d47230
Start a how-to section
ch1bo May 6, 2024
96ba5a9
Refine configuration section
ch1bo May 8, 2024
c46c2f9
Convert and fix instructions how to submit a transaction
ch1bo May 8, 2024
2f9164c
Move operating a hydra node to how-to
ch1bo May 8, 2024
74e9edb
Move example setups to operating a node how-to
ch1bo May 8, 2024
1b59ccd
Delete developing on hydra guide
ch1bo May 8, 2024
4ea4bd4
Drop glossary
ch1bo May 8, 2024
d9d0f62
Add faq to sidebar
ch1bo May 8, 2024
4f77271
Add intro to developer documentation
ch1bo May 8, 2024
33fd99b
Move tutorial back into sub-dir
ch1bo May 8, 2024
7bc4bd4
Fix link to haskell packages index page
ch1bo May 8, 2024
25c6d7b
Keep a Core Concepts area
ch1bo May 8, 2024
ab9be42
Fix some links and do best-effort redirects
ch1bo May 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ changes.
from a script `UTxO`, and also unlock more involved use-cases, users need to provide additional
unsigned transaction that correctly specifies required data (like redeemers, validity ranges etc.)

- Update navigation and re-organized documentation website https://hydra.family
- Updated logos
- Removed localization as it got outdated and on-demand site translation tools exist.

- Add `GET /snapshot/utxo` API endpoint to query confirmed UTxO set on demand.
- Always responds with the last confirmed UTxO

Expand Down
12 changes: 0 additions & 12 deletions demo/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ services:
build:
context: ../
target: hydra-node
profiles:
- hydra-node
volumes:
- .:/keys:ro
- ./devnet:/devnet
Expand Down Expand Up @@ -64,8 +62,6 @@ services:
build:
context: ../
target: hydra-node
profiles:
- hydra-node
volumes:
- .:/keys:ro
- ./devnet:/devnet
Expand Down Expand Up @@ -101,8 +97,6 @@ services:
build:
context: ../
target: hydra-node
profiles:
- hydra-node
volumes:
- .:/keys:ro
- ./devnet:/devnet
Expand Down Expand Up @@ -137,8 +131,6 @@ services:
build:
context: ../
target: hydra-tui
profiles:
- tui
command:
[ "--connect", "172.16.238.10:4001"
, "--node-socket", "/devnet/node.socket"
Expand All @@ -156,8 +148,6 @@ services:
build:
context: ../
target: hydra-tui
profiles:
- tui
command:
[ "--connect", "172.16.238.20:4001"
, "--node-socket", "/devnet/node.socket"
Expand All @@ -175,8 +165,6 @@ services:
build:
context: ../
target: hydra-tui
profiles:
- tui
command:
[ "--connect", "172.16.238.30:4001"
, "--node-socket", "/devnet/node.socket"
Expand Down
10 changes: 5 additions & 5 deletions demo/run-docker.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#
# Prepare environment to run the demo cluster, then launches docker-compose demo.
# If there's already a demo running, bail out.
# Prepare environment to run the demo cluster, then launches docker compose
# demo. If there's already a demo running, bail out.
set -e

SCRIPT_DIR=$(dirname $(realpath $0))
Expand All @@ -25,7 +25,7 @@ fi
"${SCRIPT_DIR}/prepare-devnet.sh"
${DOCKER_COMPOSE_CMD} up -d cardano-node
"${SCRIPT_DIR}/seed-devnet.sh"
${DOCKER_COMPOSE_CMD} --profile hydra-node up -d
echo >&2 -e "\n# Launch TUI on hydra-node-1: ${DOCKER_COMPOSE_CMD} --profile tui run hydra-tui-1"
${DOCKER_COMPOSE_CMD} up -d hydra-node-{1,2,3}
echo >&2 -e "\n# Launch TUI on hydra-node-1: ${DOCKER_COMPOSE_CMD} run hydra-tui-1"
echo >&2 -e "\n# Stop the demo: ${DOCKER_COMPOSE_CMD} down\n"
${DOCKER_COMPOSE_CMD} --profile tui run hydra-tui-1
${DOCKER_COMPOSE_CMD} run hydra-tui-1
29 changes: 1 addition & 28 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,31 +42,4 @@ nix build .#haddocks -o docs/static/haddock

# Translating

Translations of the documentation are provided in the `i18n/{lang}` folder (for example `i18n/fr` for French). Translations of both the content and the various website elements (such as buttons, headers etc...) are needed. To initialize a new language translation (e.g. `fr`), run the following command:

```console
$ yarn write-translations --locale fr
```

This command will pre-generate all the website elements which need to be translated into French (locale `fr`) in JSON files. Translations have to be provided for each items in generated JSON files, mapping ids to messages as such:

```json
{
"theme.TOCCollapsible.toggleButtonLabel": {
"message": "Sur cette page",
"description": "The label used by the button on the collapsible TOC component"
}
}
```

> Note that only the value of the key `message` needs to be translated, the `description` simply provides context regarding the translated element and is automatically generated.

In addition content files themselves (markdown) need to be copied under their respective directories, and then translated. Here is a table that summarizes the correspondence between the default website structure and their localized versions:

| default | translations |
| ---------------- | ------------------------------------------------------------------- |
| `docs/` | `i18n/{lang}/docusaurus-plugin-content-docs/current/` |
| `benchmarks/` | `i18n/{lang}/docusaurus-plugin-content-docs-benchmarks/current/` |
| `core-concepts/` | `i18n/{lang}/docusaurus-plugin-content-docs-core-concepts/current/` |
| `topologies/` | `i18n/{lang}/docusaurus-plugin-content-docs-topologies/current/` |
| `adr/` | `i18n/{lang}/docusaurus-plugin-content-blog/current/` |
While we supported and encouraged contributing translations in the past, we turned off internationalization features as translations inevitably became out-of-date and on-demand translation of website became significantly better with AI language models. Nontheless, if you feel like we should offer translated pages and want to contribute that, please don't hesitate to file an [issue](https://github.com/input-output-hk/hydra/issues/new/choose).
2 changes: 1 addition & 1 deletion docs/adr/2022-03-28_017-udp-networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Current Hydra networking layer is based on [Ouroboros network framework](https:/
2. A Multiplexing connection manager that manages a set of equivalent peers, maintains connectivity, and ensures diffusion of messages to/from all peers,
2. Typed protocols for expressing the logic of message exchanges as a form of _state machine_.

While it's been working mostly fine so far, the abstractions and facilities provided by this network layer are not well suited for Hydra Head networking. Some of the questions and shortcomings are discussed in a document on [Networking Requirements](/core-concepts/architecture/networking), and as the Hydra Head matures it seems time is ripe for overhauling current network implementation to better suite current and future Hydra Head networks needs.
While it's been working mostly fine so far, the abstractions and facilities provided by this network layer are not well suited for Hydra Head networking. Some of the questions and shortcomings are discussed in a document on [Networking Requirements](/docs/dev/architecture/networking), and as the Hydra Head matures it seems time is ripe for overhauling current network implementation to better suite current and future Hydra Head networks needs.

## Decision

Expand Down
4 changes: 4 additions & 0 deletions docs/core-concepts/behavior.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ sidebar_position: 4

# API Behavior

:::caution Deprecated
This page will soon move into the [API reference](/api-reference) itself.
:::

This page documents the behavior of a `hydra-node` at the API layer. That is, how the system behaves given [ClientInputs](pathname:///haddock/hydra-node/Hydra-API-ClientInput.html#t:ClientInput) and what [ServerOutputs](pathname:///haddock/hydra-node/Hydra-API-ServerOutput.html#t:ServerOutput) are produced in response to it. See also the [API reference](/api-reference/) for more details about individual API messages. The only discrepancy is http `POST /commit` action which is not a state transition but a user action that submits a commit transaction which should produce `Committed` output.

The formalism uses [UML statechart](https://en.wikipedia.org/wiki/UML_state_machine) language where transitions are labeled: `input [condition] / output`. When two outputs (e.g. `A` and `B`) are expected we write `A,B`, while `{A,B}` denotes mutual exclusiveness of outputs.
Expand Down
4 changes: 0 additions & 4 deletions docs/core-concepts/faq/_category_.json

This file was deleted.

19 changes: 1 addition & 18 deletions docs/core-concepts/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,7 @@
sidebar_position: 1
---

# Overview

Hydra is the layer 2 scalability solution for Cardano, which aims to increase transaction speed through low latency and high throughput and minimize transaction cost.

[Hydra Head](https://eprint.iacr.org/2020/299.pdf) is the first protocol of the Hydra family and embodies the foundation for more advanced deployment scenarios relying on isomorphic, multi-party state-channels. For an introduction to the protocol also check out these two blog posts

- [Hydra – Cardano’s solution for ultimate Layer 2 scalability](https://iohk.io/en/blog/posts/2021/09/17/hydra-cardano-s-solution-for-ultimate-scalability/)
- [Implementing Hydra Heads: the first step towards the full Hydra vision ](https://iohk.io/en/blog/posts/2022/02/03/implementing-hydra-heads-the-first-step-towards-the-full-hydra-vision/)

There are different flavors and extensions of the Hydra Head protocol, but let's start by looking at the full lifecycle of a basic Hydra Head, and how it allows for isomorphic state transfer between layer 1 and layer 2.

![](./hydra-head-lifecycle.svg)

A Hydra Head is formed by a group of online and responsive participants. Participants **init**ialize a Head by announcing several parameters on-chain, including the participants list. Then each of the participants **commit**s unspent transaction outputs (UTXOs) from the Cardano main-chain to it, before all the UTXOs are **collect**ed and made available in a Hydra Head as initial state (`U0`). At any moment before collecting, participants can also **abort** the process and recover their funds.

While open, they can use the Hydra Head via a hydra-node to submit transactions over the Head network. Transactions have the same format and properties as on the main-chain: they are _isomorphic_. When UTXO entries are spent, and new UTXO entries are created in a Hydra Head, all participants are required to acknowledge and agree on the new state in so-called snapshots (`U1..Un`). Snapshots are _not_ posted back onto the layer 1, but are only kept around by the participants.

Any participant can **close** the Head using a snapshot, when for example they wish to cash out on the mainnet, or if another party misbehaves or stalls the Head's evolution. There is a mechanism to **contest** the final state on the main chain. Ultimately, a **fanout** transaction distributes the final agreed state and makes available on the layer 1 what only existed virtually in the Head.
# Core Concepts

```mdx-code-block
import DocCardList from '@theme/DocCardList';
Expand Down
Loading