Skip to content

Commit

Permalink
Getting started update and overhaul (#504)
Browse files Browse the repository at this point in the history
* Getting started update and overhaul

Signed-off-by: a_zorina <64249490+a-zorina@users.noreply.github.com>
Signed-off-by: a-zorina <64249490+a-zorina@users.noreply.github.com>

* fix broken links

Signed-off-by: a_zorina <64249490+a-zorina@users.noreply.github.com>
Signed-off-by: a-zorina <64249490+a-zorina@users.noreply.github.com>

* fix section links

Signed-off-by: a_zorina <64249490+a-zorina@users.noreply.github.com>
Signed-off-by: a-zorina <64249490+a-zorina@users.noreply.github.com>

* Language and structure improvements

Signed-off-by: a-zorina <64249490+a-zorina@users.noreply.github.com>

* External links and crate names fixes

Signed-off-by: a-zorina <64249490+a-zorina@users.noreply.github.com>

* Switch to using cargo install for iroha binaries in getting started

Signed-off-by: a-zorina <64249490+a-zorina@users.noreply.github.com>

* Minor post-review fixes

Signed-off-by: a-zorina <64249490+a-zorina@users.noreply.github.com>

* Fixes and suggestions after review

Signed-off-by: yamkovoy <b.yamkovoy@gmail.com>

* Changes after discussion

Signed-off-by: yamkovoy <b.yamkovoy@gmail.com>

* Minor tweaks in instructions

Signed-off-by: yamkovoy <b.yamkovoy@gmail.com>

* Additional post-review updates

Signed-off-by: a-zorina <64249490+a-zorina@users.noreply.github.com>

* link fixes

Signed-off-by: a-zorina <64249490+a-zorina@users.noreply.github.com>

* final post-review changes

Signed-off-by: a-zorina <64249490+a-zorina@users.noreply.github.com>

---------

Signed-off-by: a_zorina <64249490+a-zorina@users.noreply.github.com>
Signed-off-by: a-zorina <64249490+a-zorina@users.noreply.github.com>
Signed-off-by: yamkovoy <b.yamkovoy@gmail.com>
Co-authored-by: yamkovoy <b.yamkovoy@gmail.com>
  • Loading branch information
a-zorina and yamkovoy authored Sep 11, 2024
1 parent c1520e4 commit 88c4ce0
Show file tree
Hide file tree
Showing 37 changed files with 704 additions and 1,110 deletions.
39 changes: 13 additions & 26 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ function nav(): DefaultTheme.NavItem[] {
text: 'Guide',
items: [
// { text: 'Get Started', link: '/guide/get-started/index' },
// { text: 'Build and Install', link: '/guide/get-started/install' },
// { text: 'Build and Install', link: '/guide/get-started/install-iroha' },
// { text: 'Tutorials', link: '/guide/get-started/tutorials'},
{
text: 'Get Started',
items: [
{ text: 'Build and Install', link: '/guide/get-started/install' },
{ text: 'Install and Build', link: '/guide/get-started/install-iroha-2' },
{ text: 'SDK Tutorials', link: '/guide/get-started/tutorials' },
],
},
Expand Down Expand Up @@ -93,32 +93,23 @@ function sidebarGuide(): DefaultTheme.SidebarItem[] {
return [
{
text: 'Get Started',
link: '/guide/get-started/',
items: [
{
text: 'About Iroha',
link: '/guide/introduction',
text: 'Install Iroha 2',
link: '/guide/get-started/install-iroha-2',
},
{
text: 'Iroha 2 vs. Iroha 1',
link: '/guide/iroha-2',
text: 'Launch Iroha 2',
link: '/guide/get-started/launch-iroha-2',
},
{
text: 'Build and Install',
collapsed: true,
items: [
{
text: 'Install Iroha',
link: '/guide/get-started/install',
},
{
text: 'Build Iroha Client',
link: '/guide/get-started/build',
},
{
text: 'Quick Start with Docker',
link: '/guide/get-started/quick-start',
},
],
text: 'Operate Iroha 2 via CLI',
link: '/guide/get-started/operate-iroha-2-via-cli',
},
{
text: 'Iroha 2 vs. Iroha 1',
link: '/guide/iroha-2',
},
{
text: 'Receive support',
Expand Down Expand Up @@ -174,10 +165,6 @@ function sidebarGuide(): DefaultTheme.SidebarItem[] {
{
text: 'Language-specific Guides',
items: [
{
text: 'Bash',
link: '/guide/get-started/bash',
},
{
text: 'Python 3',
link: '/guide/get-started/python',
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Hyperledger Iroha 2 Tutorial

This repository contains the source files for [Hyperledger Iroha 2 Tutorial](https://hyperledger.github.io/iroha-2-docs/).
This repository contains the source files for [Hyperledger Iroha 2 Documentation](https://hyperledger.github.io/iroha-2-docs/).

The tutorial is suitable for both experienced and novice users. It explains Iroha 2 concepts and features, and also offers language-specific step-by-step guides for these programming languages:

- [Bash](https://hyperledger.github.io/iroha-2-docs/guide/bash.html)
- [CLI](https://hyperledger.github.io/iroha-2-docs/guide/operate-iroha-2-via-cli.html)
- [Python](https://hyperledger.github.io/iroha-2-docs/guide/python.html)
- [Rust](https://hyperledger.github.io/iroha-2-docs/guide/rust.html)
- [Kotlin/Java](https://hyperledger.github.io/iroha-2-docs/guide/kotlin-java.html)
- [Javascript (TypeScript)](https://hyperledger.github.io/iroha-2-docs/guide/javascript.html)

If you are already familiar with Hyperledger Iroha, we invite you to read about [how Iroha 2 is different](https://hyperledger.github.io/iroha-2-docs/guide/iroha-2.html) from its previous version.

Check the [Hyperledger Iroha 2](https://github.com/hyperledger/iroha/tree/iroha2-dev#hyperledger-iroha) repository for more detailed information about API and available features.
Check the [Hyperledger Iroha](https://github.com/hyperledger/iroha/) repository for more detailed information about API and available features.

## Contribution

Expand Down
7 changes: 3 additions & 4 deletions src/documenting/snippets.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ located in other repositories, where they are built, run, and tested.
### Snippet Sources

Snippet sources are defined in
[`snippet_sources.ts`](https://github.com/hyperledger/iroha-2-docs/blob/main/etc/snippet_sources.ts).
The `snippet_sources.ts` file is located at the documentation repository
and has the following format:
[`snippet_sources.ts`](https://github.com/hyperledger/iroha-2-docs/blob/main/etc/snippet-sources.ts).
The `snippet_sources.ts` file is located in the documentation repository and has the following format:

```ts
export default [
{
src: 'https://raw.githubusercontent.com/hyperledger/iroha/iroha2-stable/MAINTAINERS.md',
src: 'https://raw.githubusercontent.com/hyperledger/iroha/main/MAINTAINERS.md',
filename: 'iroha-maintainers-at-stable.md',
},
{
Expand Down
5 changes: 2 additions & 3 deletions src/guide/advanced/running-iroha-on-bare-metal.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,8 @@ ports need to be adjusted so there are no collisions. See the

## Deploy a minimal BFT network

Both of the following approaches could be messy and error-prone, which is why the [Quick Start](../get-started/quick-start.md) tutorial suggests using the `docker compose` command.
However, this brings you closer to the
experience of actually maintaining a functional Iroha peer.
Both of the following approaches could be messy and error-prone, which is why the [Launch Iroha 2](../get-started/launch-iroha-2.md) tutorial suggests using the `docker compose` command.
However, this brings you closer to the experience of actually maintaining a functional Iroha peer.

### Using Environment Variables

Expand Down
2 changes: 1 addition & 1 deletion src/guide/blockchain/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Assets can be [registered](./instructions.md#un-register),
Refer to one of the language-specific guides to walk you through the
process of registering and minting assets in a blockchain:

- [Bash](/guide/get-started/bash.md#_5-registering-and-minting-assets)
- [CLI](/guide/get-started/operate-iroha-2-via-cli.md#_6-register-and-mint-assets)
- [Rust](/guide/get-started/rust.md#_5-registering-and-minting-assets)
- [Kotlin/Java](/guide/get-started/kotlin-java.md#_5-registering-and-minting-assets)
- [Python](/guide/get-started/python.md#_5-registering-and-minting-assets)
Expand Down
2 changes: 1 addition & 1 deletion src/guide/blockchain/consensus.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ fail. The same thing happens if the peers have different instructions.

[^1]:
For prospective wizards, the
[Iroha 2 Whitepaper](https://github.com/hyperledger/iroha/blob/iroha2-dev/docs/source/iroha_2_whitepaper.md)
[Iroha 2 Whitepaper](https://github.com/hyperledger/iroha/blob/main/docs/source/iroha_2_whitepaper.md)
is a good start.
2 changes: 1 addition & 1 deletion src/guide/blockchain/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ domain_looking_glass *-- account_rabbit : registered in

| Language | Guide |
| --------------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Bash | Register a [domain](/guide/get-started/bash.md#_3-registering-a-domain), an [account](/guide/get-started/bash.md#_4-registering-an-account), an [asset](/guide/get-started/bash.md#_5-registering-and-minting-assets) |
| CLI | Register a [domain](/guide/get-started/operate-iroha-2-via-cli.md#_3-register-a-domain), an [account](/guide/get-started/operate-iroha-2-via-cli.md#_4-register-an-account), an [asset](/guide/get-started/operate-iroha-2-via-cli.md#_6-register-and-mint-assets) |
| Rust | Register a [domain](/guide/get-started/rust.md#_3-registering-a-domain), an [account](/guide/get-started/rust.md#_4-registering-an-account), an [asset](/guide/get-started/rust.md#_5-registering-and-minting-assets) |
| Kotlin/Java | Register a [domain](/guide/get-started/kotlin-java.md#_3-querying-and-registering-domains), an [account](/guide/get-started/kotlin-java.md#_4-registering-an-account), an [asset](/guide/get-started/kotlin-java.md#_5-registering-and-minting-assets) |
| Python | Register a [domain](/guide/get-started/python.md#_3-registering-a-domain), an [account](/guide/get-started/python.md#_4-registering-an-account), an [asset](/guide/get-started/python.md#_5-registering-and-minting-assets) |
Expand Down
2 changes: 1 addition & 1 deletion src/guide/blockchain/how-iroha-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

To understand how Iroha operates, let's draw parallels between a blockchain
and a computer. If the blockchain is the computer, then in this metaphor of
ours the client binary (for example: [`iroha_client_cli`](/guide/get-started/bash.md))
ours the client binary (for example: [`iroha`](/guide/get-started/operate-iroha-2-via-cli.md))
is the keyboard, the blockchain is the hard drive, and the Iroha peer
software is the processor. Like a processor, Iroha accepts portable
instructions that modify what's written to the blockchain, allow certain
Expand Down
8 changes: 4 additions & 4 deletions src/guide/blockchain/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ process of registering objects in a blockchain:

| Language | Guide |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Bash | Register a [domain](/guide/get-started/bash.md#_3-registering-a-domain), an [account](/guide/get-started/bash.md#_4-registering-an-account), an [asset](/guide/get-started/bash.md#_5-registering-and-minting-assets) |
| CLI | Register a [domain](/guide/get-started/operate-iroha-2-via-cli.md#_3-register-a-domain), an [account](/guide/get-started/operate-iroha-2-via-cli.md#_4-register-an-account), an [asset](/guide/get-started/operate-iroha-2-via-cli.md#_6-register-and-mint-assets) |
| Rust | Register a [domain](/guide/get-started/rust.md#_3-registering-a-domain), an [account](/guide/get-started/rust.md#_4-registering-an-account), an [asset](/guide/get-started/rust.md#_5-registering-and-minting-assets) |
| Kotlin/Java | Register a [domain](/guide/get-started/kotlin-java.md#_3-querying-and-registering-domains), an [account](/guide/get-started/kotlin-java.md#_4-registering-an-account), an [asset](/guide/get-started/kotlin-java.md#_5-registering-and-minting-assets) |
| Python | Register a [domain](/guide/get-started/python.md#_3-registering-a-domain), an [account](/guide/get-started/python.md#_4-registering-an-account), an [asset](/guide/get-started/python.md#_5-registering-and-minting-assets) |
Expand All @@ -130,15 +130,15 @@ are assumed to be non-negative as well, so you can never have $-1.0$ of
Refer to one of the language-specific guides to walk you through the
process of minting assets in a blockchain:

- [Bash](/guide/get-started/bash.md#_5-registering-and-minting-assets)
- [CLI](/guide/get-started/operate-iroha-2-via-cli.md#_6-register-and-mint-assets)
- [Rust](/guide/get-started/rust.md#_5-registering-and-minting-assets)
- [Kotlin/Java](/guide/get-started/kotlin-java.md#_5-registering-and-minting-assets)
- [Python](/guide/get-started/python.md#_5-registering-and-minting-assets)
- [JavaScript/TypeScript ](/guide/get-started/javascript.md#_5-registering-and-minting-assets)

Here are examples of burning assets:

- [Bash](/guide/get-started/bash.md#_7-burning-assets)
- [CLI](/guide/get-started/operate-iroha-2-via-cli.md#_8-burn-assets)
- [Rust](/guide/get-started/rust.md#_7-burning-assets)

## Transfer
Expand All @@ -149,7 +149,7 @@ can transfer assets between different accounts.
To do this, an account have to be granted the
[permission to transfer assets](/reference/permissions.md).
Refer to an example on how to
transfer assets in [Bash](/guide/get-started/bash.md#_6-transferring-assets) or [Rust](/guide/get-started/rust.md#_6-transferring-assets).
transfer assets with [CLI](/guide/get-started/operate-iroha-2-via-cli.md#_7-transfer-assets) or [Rust](/guide/get-started/rust.md#_6-transferring-assets).

<!--TODO: add links to transferring assets example in which guide after https://github.com/hyperledger/iroha-2-docs/issues/81 is addressed -->

Expand Down
2 changes: 1 addition & 1 deletion src/guide/blockchain/triggers.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ contains the necessary information:
The documentation on the `EventFilter` types is under construction, as
we are likely to make major changes to that particular architecture.
For now, suffice it to say that you can look at the
[source code](https://github.com/hyperledger/iroha/blob/iroha2-dev/data_model/src/events/data/filters.rs)
[source code](https://github.com/hyperledger/iroha/blob/main/data_model/src/events/data/filters.rs)
in `iroha_data_model` and see a few particularly interesting
applications.

Expand Down
2 changes: 1 addition & 1 deletion src/guide/blockchain/wasm.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ edition = "2021"
crate-type = ['cdylib']

[dependencies]
iroha_wasm = { git = "https://github.com/hyperledger/iroha/", branch = "iroha2-dev" }
iroha_wasm = { git = "https://github.com/hyperledger/iroha/"}
```

Note that the crate type is `cdylib`. Most Rust code is linked in a
Expand Down
2 changes: 1 addition & 1 deletion src/guide/configure/client-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ kagami config client > client-config.json

## Public and Private Keys

The `configs/client_cli/config.json` client configuration file should contain a pair of the user's public `PUBLIC_KEY` and private `PRIVATE_KEY` cryptographic keys for their account's `ACCOUNT_ID`.
The `defaults/client.toml` client configuration file should contain the user's `domain` and a pair of their cryptographic keys: `public_key` and `private_key`.

For details on cryptographic keys, see [Public Key Cryptography](../security/public-key-cryptography.md).

Expand Down
11 changes: 5 additions & 6 deletions src/guide/configure/keys-for-network-deployment.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Keys for Network Deployment

If you're deploying your own Iroha 2 network, your unique cryptographic keys must be specified in all three of the configuration files:
If you're deploying your own Iroha 2 network, your unique cryptographic keys must be specified in all configuration files:

1. Peer configuration file: [`configs/peer/config.json`](./peer-configuration.md)
2. Client configuration file: [`configs/client_cli/config.json`](./client-configuration.md)
3. Genesis block file: [`configs/peer/genesis.json`](./genesis.md)
1. Client configuration file: [`defaults/client.toml`](./client-configuration.md)
2. Genesis block file: [`defaults/genesis.json`](./genesis.md)

To learn more about cryptographic keys and their role, see [Security > Public Key Cryptography](../security/public-key-cryptography.md).

Expand Down Expand Up @@ -52,13 +51,13 @@ Finally, while the first client _could_ use the genesis account to register new

::: warning

`iroha_client_cli` currently processes all of its instructions in the JSON format, it also provides a dedicated instruction to unregister accounts.
`iroha` binary currently processes all of its instructions in the JSON format, it also provides a dedicated instruction to unregister accounts.

If you plan on creating a private blockchain, you should consider writing your own client based on the `client` Rust crate, or any of the provided client libraries:

- [iroha-python](https://github.com/hyperledger/iroha-python)
- [iroha-iOS](https://github.com/hyperledger/iroha-ios)
- [iroha-java](https://github.com/hyperledger/iroha-java)
- [iroha-javascript](https://github.com/hyperledger/iroha-javascript/tree/iroha2)
- [iroha-javascript](https://github.com/hyperledger/iroha-javascript)

:::
2 changes: 1 addition & 1 deletion src/guide/configure/peer-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ way it works in the examples is that you just specify in four `config.json`
files four peers with their public keys and API addresses.

Since Iroha has no automatic peer discovery, the only other way to make
peers known to each other is to use the `iroha_client_cli` to
peers known to each other is to use the `iroha` binary to
[register new peers](peer-management.md#registering-peers)). This is not
too difficult with the provided client libraries. With Python's
[Beautiful Soup](https://www.crummy.com/software/BeautifulSoup/), the
Expand Down
8 changes: 2 additions & 6 deletions src/guide/configure/sample-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@

Here you can find sample configuration files for Iroha 2:

- Peer Configuration [`configs/peer/config.json`](https://github.com/hyperledger/iroha/blob/iroha2-dev/configs/peer/config.json).\
For details, see [Peer Configuration](peer-configuration.md).
- Genesis Block [`configs/peer/genesis.json`](https://github.com/hyperledger/iroha/blob/iroha2-dev/configs/peer/genesis.json).\
- Genesis Block [`configs/peer/genesis.json`](https://github.com/hyperledger/iroha/blob/main/defaults/genesis.json).\
For details, see [Genesis Block](genesis.md).
- Client Configuration [`configs/client/config.json`](https://github.com/hyperledger/iroha/blob/iroha2-dev/configs/client/config.json).\
- Client Configuration [`configs/client/config.json`](https://github.com/hyperledger/iroha/blob/main/defaults/client.toml).\
For details, see [Client Configuration](client-configuration.md).

::: code-group

<<< @/snippets/peer-config-template.toml

<<< @/snippets/genesis.json

<<< @/snippets/client-cli-config-template.toml
Expand Down
Loading

0 comments on commit 88c4ce0

Please sign in to comment.