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

Update docs content #359

Merged
merged 5 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file removed public/img/docs/grafana-config.png
Binary file not shown.
Binary file removed public/img/docs/grafana-import.png
Binary file not shown.
Binary file removed public/img/docs/grafana-preview.png
Binary file not shown.
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ export const navMainItems: NavItem[][] = [
url: "/developers",
},
{
label: "Validate",
label: "Operate",
icon: IconStaking,
url: "/validators",
url: "/nodes",
},
{
label: "Use",
Expand Down
14 changes: 7 additions & 7 deletions src/pages/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
},
"developers": {
"title": "Build",
"description": "Learn how to build on ZetaChain"
"description": "Learn how to build on ZetaChain."
},
"validators": {
"title": "Start Validating",
"description": "Setup and run a ZetaChain node",
"nodes": {
"title": "Start Operating",
"description": "Setup and run a ZetaChain node.",
"variant": "fancy",
"navImgUrl": "/img/pages/validate.svg"
"navImgUrl": "/img/pages/operate.svg"
},
"users": {
"title": "Using our Products",
"description": "Start using our many products"
"description": "Start using our many products."
},
"reference": {
"title": "Tools",
"description": "Useful articles to help get you up and running"
"description": "Useful articles to help get you up and running."
},
"about": {
"title": "About",
Expand Down
6 changes: 4 additions & 2 deletions src/pages/about/_meta.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"index": {
"title": "About",
"description": "All about ZetaChain, the foundational, public blockchain that enables omnichain, generic smart contracts and messaging between any blockchain."
"description": "All about ZetaChain, the foundational, public blockchain that enables omnichain, generic smart contracts and messaging between any blockchain.",
"readTime": "10 min"
},
"token-utility": {
"title": "About ZETA Token",
"description": "Understand more about the token underpinning ZetaChain"
"description": "Understand more about the token underpinning ZetaChain",
"readTime": "5 min"
}
}
2 changes: 1 addition & 1 deletion src/pages/about/token-utility/liquidity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ ZetaChain needs a [ZETA] / [Gas ZRC-20] Uniswap Pool (on ZetaChain's EVM) to
convert ZETA in order to write outbound transactions to that chain. Whenever a
chain's support is added, a corresponding pool between ZETA and that chain's
native gas asset is also created. You can read more about how to pool
your ZETA [here](/users/zetahub/pool).
your ZETA [here](/users/zetahub/pool).
2 changes: 1 addition & 1 deletion src/pages/developers/apps/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ contract YourContract is zContract {
}
```

It's implemented in Solidity and uses ZetaChain's universal EVM features (like
Its implemented in Solidity and uses ZetaChain's universal EVM features (like
`onCrossChainCall`) to handle calls from connected chains.

<Alert variant="tip"> For a quick hands-on introduction to building omnichain
Expand Down
2 changes: 1 addition & 1 deletion src/pages/developers/architecture/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ particular addresses via their full nodes of external chains.
ZetaChain collectively holds standard ECDSA/EdDSA keys for authenticated
interaction with external chains. The keys are distributed among multiple
signers in such a way that only a super majority of them can sign on behalf of
the ZetaChain. It's important to ensure that at no time is any single entity or
the ZetaChain. Its important to ensure that at no time is any single entity or
small fraction of nodes able to sign messages on behalf of ZetaChain on external
chains. The ZetaChain system uses bonded stakes and positive/negative incentives
to ensure economic safety.
2 changes: 1 addition & 1 deletion src/pages/developers/evm/bitcoin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ In summary, a ZetaChain's EVM BTC transaction would look like this:
saying (colloquially) “deposit to 0x1337”.
2. Upon receiving this tx, the ZetaCore state machine calls the deposit (0x1337,
1e8) to mint and credit 0x1337 with 1 zBTC minus fees.
3. If 0x1337 is an Externally Owned Account (EOA), that's it. If it's a
3. If 0x1337 is an Externally Owned Account (EOA), that's it. If its a
contract, ZetaCore will call the `onCrossChainMessage` function sending the
message that was specified in the `OP_RETURN` memo.

Expand Down
4 changes: 2 additions & 2 deletions src/pages/developers/evm/gas.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ You can add ZETA tokens to the contract and the contract will use these tokens
when sending cross chain messages.

This is easier for end-users, because they don't have to think about using ZETA
tokens, but it's more complex for the contract developer because they have to
tokens, but its more complex for the contract developer because they have to
ensure that the contract has enough ZETA tokens.

```solidity
Expand All @@ -156,7 +156,7 @@ function sendMessage(uint256 destinationChainId, bytes calldata destinationAddre
Your contract can accept any token and swap it to ZETA internally.

This approach is more complex, because you need to add a swap logic to your
contract and take market price fluctuations into account. But it's more
contract and take market price fluctuations into account. But its more
convenient for end-users, because they can use any token to pay for cross chain
messages without even knowing that ZETA is being used under the hood.

Expand Down
8 changes: 4 additions & 4 deletions src/pages/developers/services/pyth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ Pyth Entropy is currently available on Zetachain. [Learn more](https://docs.pyth

Pyth contract addresses:

| Network | Address |
| :------ | :----------------------------------------------------------------------------------------------------------------------------------------- |
| Mainnet | [0x36825bf3Fbdf5a29E2d5148bfe7Dcf7B5639e320](https://zetachain.blockscout.com/address/0x36825bf3Fbdf5a29E2d5148bfe7Dcf7B5639e320) |
| Testnet | [0x4374e5a8b9C22271E9EB878A2AA31DE97DF15DAF](https://zetachain-athens-3.blockscout.com/address/0x4374e5a8b9C22271E9EB878A2AA31DE97DF15DAF) |
| Network | Address |
| :----------- | :----------------------------------------------------------------------------------------------------------------------------------------- |
| Mainnet Beta | [0x36825bf3Fbdf5a29E2d5148bfe7Dcf7B5639e320](https://zetachain.blockscout.com/address/0x36825bf3Fbdf5a29E2d5148bfe7Dcf7B5639e320) |
| Testnet | [0x4374e5a8b9C22271E9EB878A2AA31DE97DF15DAF](https://zetachain-athens-3.blockscout.com/address/0x4374e5a8b9C22271E9EB878A2AA31DE97DF15DAF) |

Create your first Entropy-powered app through this [example](https://docs.pyth.network/entropy/create-your-first-entropy-app).
2 changes: 1 addition & 1 deletion src/pages/developers/tutorials/multioutput.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ It first calls the `withdrawGasFee` function to get the gas token and the gas
fee.

If `targetZRC20` is an ERC-20 token, `gasZRC20` will not be the same as
`targetZRC20` and it's important to have two swaps: the first swap is to swap
`targetZRC20` and its important to have two swaps: the first swap is to swap
the source token for the gas token, and the second swap is to swap the rest of
the source token amount for the target token.

Expand Down
8 changes: 4 additions & 4 deletions src/pages/developers/tutorials/swap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,19 @@ The contract expects to receive two values in the `message`:
When the contract is called from an EVM chain, the `message` is encoded as a
`bytes` array using the ABI encoding.

When the contract is called from Bitcoin it's up to us to encode and then decode
When the contract is called from Bitcoin its up to us to encode and then decode
the message.

Use `context.chainID` to determine the connected chain from which the contract
is called.

If it's Bitcoin, the first 20 bytes of the `message` are the
If its Bitcoin, the first 20 bytes of the `message` are the
`targetTokenAddress` encoded as an `address`. Use `bytesToAddress` helper method
to get the target token address. To get the recipient address, use the same
helper method with an offset of 20 bytes and then use `abi.encodePacked` to
convert the address to `bytes`.

If it's an EVM chain, use `abi.decode` to decode the `message` into the
If its an EVM chain, use `abi.decode` to decode the `message` into the
`targetToken` and `recipient` variables.

Next, get the gas fee and the gas coin address from the target token. The gas
Expand All @@ -153,7 +153,7 @@ To support both EVM and Bitcoin addresses, we need to check if the recipient is
a valid Bitcoin address. If it is, we need to encode it as `bytes` using
`utils.solidityPack`.

If it's not a valid bech32 address, then we assume it's an EVM address and use
If its not a valid bech32 address, then we assume its an EVM address and use
`args.recipient` as the value for the recipient.

Finally, update the `prepareData` function call to use the `bytes` type for the
Expand Down
4 changes: 2 additions & 2 deletions src/pages/developers/tutorials/zeta.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ valid. Then it approves the contract to spend an amount of ZETA
[Cross-chain messaging fees](/developers/evm/gas/#cross-chain-messaging-fees) are
paid in ZETA tokens. This is convenient if the caller has ZETA tokens on the
source chain. However, many users might only have native gas tokens. In this
case it's more convenient for a contract to accept native gas token, and swap it
case its more convenient for a contract to accept native gas token, and swap it
for ZETA.

To choose which token your contract accepts, use the `--fees` flag.
Expand All @@ -147,7 +147,7 @@ with the following arguments wrapped in a struct:
destination chain (expressed in bytes since it can be non-EVM)
- `destinationGasLimit`: gas limit for the destination chain's transaction
- `message`: arbitrary message to be parsed by the receiving contract on the
destination chain. In this example it's empty as we're only sending ZETA, not
destination chain. In this example its empty as we're only sending ZETA, not
arbitrary data.
- `zetaValueAndGas`: amount of ZETA tokens to be sent to the destination chain,
ZetaChain gas fees, and destination chain gas fees (expressed in ZETA tokens)
Expand Down
14 changes: 14 additions & 0 deletions src/pages/nodes/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"index": {
"title": "Operate",
"description": "Become an important part of the ZetaChain network by operating an node. It’s easy to get started on Testnet or Mainnet"
},
"start-here": {
"title": "Start Here",
"description": "These docs will provide you with all the necessary steps to successfully set up your node"
},
"validate": {
"title": "Validate",
"description": "Start validating transactions for the chain."
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Validate
description: Become one of the important pieces of ZetaChain operation by validating transactions for the chain. It’s easy to get setup and started on our testnet and mainnet.
heroImgUrl: /img/pages/validate.svg
title: Operate
description: Become an important part of the ZetaChain network by operating an node. It’s easy to get started on Testnet or Mainnet.
heroImgUrl: /img/pages/operate.svg
heroImgWidth: 549
---

Expand Down
26 changes: 26 additions & 0 deletions src/pages/nodes/start-here/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"requirements": {
"title": "Technical Requirements",
"description": "Before you start running a node, make sure you have the following technical requirements.",
"readTime": "5 min",
"readType": "Beginner"
},
"setup": {
"title": "Setting Up a Node",
"description": "A guide to set up a ZetaChain Mainnet or Testnet node.",
"readTime": "30 min",
"readType": "Intermediate"
},
"syncing": {
"title": "Syncing a Node",
"description": "Syncing a node using snapshots or KSYNC.",
"readTime": "15 min",
"readType": "Beginner"
},
"validator": {
"title": "Create a Core Validator",
"description": "Become a core validator on the ZetaChain network.",
"readTime": "1 hr",
"readType": "Advanced"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,37 @@ These are the recommended specs for a ZetaChain node.

| Node Type | CPU | Memory | Data Disk |
| :-------------- | :----- | :----------- | :---------------- |
| Observer Signer | 8 CPUs | 32 GB Memory | 300+ GB Data Disk |
| Core Validator | 4 CPUs | 16 GB Memory | 300+ GB Data Disk |
| Full Node | 4 CPUs | 12 GB Memory | 300+ GB Data Disk |
| Archive | 4 CPUs | 12 GB Memory | 3+ TB Data Disk |

It is recommended to run a validator on a machine with NVMe SSDs that support
high IOPS (12K or higher).
It is recommended to run validators on a machine with NVMe SSDs that support
high IOPS (12K or higher) to avoid falling behind and getting the validator jailed.

## Network Requirements

### Public Ports
#### Public Ports

ZetaChain nodes communicate over the following ports. Make sure these are open
to the public internet.

| Node Type | Port | Protocol |
| :---------------------- | :---- | :------- |
| Full Node and Validator | 26656 | TCP |
| Observer Signer Only | 8123 | TCP |
| Observer Signer Only | 6668 | TCP |

Additionally, Observer Signers must allow communication between `zetacored` and
`zetaclientd` on port 9090 but this port should not be publicly accessible.

### RPC/API/Archive Nodes
#### RPC/API/Archive Nodes

If you want to access RPC/API services on your node you'll need to make sure the
following ports are open.

| RPC Type | Port | Protocol |
| :------------- | :--- | :------- |
| EVM RPC - HTTP | 8545 | TCP |
| EVM RPC - WSS | 8546 | TCP |
| Cosmos RPC | 1317 | TCP |
| RPC Type | Port | Protocol |
| :------------- | :--- | :------- |
| Tendermint | 26657 | TCP |
| EVM RPC - HTTP | 8545 | TCP |
| EVM RPC - WSS | 8546 | TCP |
| Cosmos RPC | 1317 | TCP |

### Operating System
#### Operating System

ZetaChain nodes have been developed and tested on x86_64 architecture. Our
binary files have been compiled with Ubuntu 22.04 LTS x86_64. This guide assumes
Expand Down
Loading
Loading