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: Move localnet development to separate page #977

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aefhm
Copy link
Contributor

@aefhm aefhm commented Oct 8, 2024

Description

Close #959

Note. Configuring Docusaurus redirect is not possible from an URL with an anchor.

message: '"redirects[54].from[0]" (/dapp/emerald/writing-dapps-on-emerald#running-a-private-oasis-network-locally) is not a valid pathname. Pathname should start with slash and not contain any domain or query string.',

TODO

  • run broken link checker

PREVIEW

@aefhm aefhm added the documentation Improvements or additions to documentation label Oct 8, 2024
@aefhm aefhm self-assigned this Oct 8, 2024
Copy link

netlify bot commented Oct 8, 2024

Deploy Preview for oasisprotocol-docs ready!

Name Link
🔨 Latest commit 639f05f
🔍 Latest deploy log https://app.netlify.com/sites/oasisprotocol-docs/deploys/670508a2afaece0008891f67
😎 Deploy Preview https://deploy-preview-977--oasisprotocol-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are several links to [emerald-localnet] below in the create dApp section which are broken.

@@ -79,91 +79,9 @@ ParaTime.
[Emerald Mainnet]: ./network.mdx
[Emerald Testnet]: ./network.mdx

## Running a Private Oasis Network Locally
#### For development and testing, you can run a local [instance][localnet]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#### For development and testing, you can run a local [instance][localnet]
## For development and testing, you can run a local [instance][localnet]

Probably 2 # too much
I think having the old header and card to the localnet could be also a good way

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be nice to have cards for every tooling here, the links in the running text are not as visible.


- single Oasis validator node with 1-second block time and 30-second epoch,
- single Oasis client node,
- single compute node running Oasis Sapphire,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- single compute node running Oasis Sapphire,
- single compute node running Oasis Sapphire or Emerald,


Those familiar with local dApp environments will find the output above similar
to `geth --dev` or `ganache-cli` commands or the `geth-dev-assistant` npm
package. [sapphire-localnet] will spin up a private Oasis Network locally,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
package. [sapphire-localnet] will spin up a private Oasis Network locally,
package. The [sapphire-localnet] will spin up a private Oasis Network locally,

else there is missing capitalisation?

@@ -0,0 +1,118 @@
# Local Development
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to have the "Localnet" term in the title. So "Localnet Development", "Using Localnet", "Running Localnet" or just "Localnet".

- Oasis Web3 gateway with transaction indexer and enabled Oasis RPCs,
- helper script which populates the account(s) for you.

*Note: You will need at least 16GB of memory.*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use admonition. Also, looking at terminology we use here. Something like this?

Suggested change
*Note: You will need at least 16GB of memory.*
:::note Hardware requirements
You will need at least 16GB of RAM to spin up the docker image apart from the OS on your machine.
:::

To run the image, execute:

```sh
docker run -it -p8545:8545 -p8546:8546 ghcr.io/oasisprotocol/sapphire-localnet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we have Envoy support listening on 8544, this should become:

Suggested change
docker run -it -p8545:8545 -p8546:8546 ghcr.io/oasisprotocol/sapphire-localnet
docker run -it -p8544-8546:8544-8546 ghcr.io/oasisprotocol/sapphire-localnet

Also below.

docker run -it -p8545:8545 -p8546:8546 ghcr.io/oasisprotocol/sapphire-localnet
```

or substitute "sapphire" for "emerald"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we used a tab widget with "Sapphire Localnet" and "Emerald Localnet" tabs to separate the shell commands?

docker run -it -p8545:8545 -p8546:8546 ghcr.io/oasisprotocol/emerald-localnet
```

After a while, the tool will show you something like this:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After a while, the tool will show you something like this:
After a while, running the `sapphire-localnet` will show you something like this:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move the Localnet docker section into separate chapter
3 participants