From e22bbe64bad6f7e56eebca494ed8690b0c48680d Mon Sep 17 00:00:00 2001 From: Roy Lu Date: Sun, 29 Sep 2024 11:10:16 -0700 Subject: [PATCH] Updated DA Docs --- docs/og-da.md | 13 ++++++---- docs/run-a-node/validator.md | 50 +++++++++++++++++++++++++++++++++++- 2 files changed, 57 insertions(+), 6 deletions(-) diff --git a/docs/og-da.md b/docs/og-da.md index 0e52961..b5bb94c 100644 --- a/docs/og-da.md +++ b/docs/og-da.md @@ -30,6 +30,7 @@ While existing DA solutions like Celestia and Avail have been instrumental for L This is for several reasons: - DALs tend to require that data be simultaneously sent to all of their network nodes, preventing horizontal scalability and limiting network speed to its slowest node. +- Today's blockchain infrastructure falls short in meeting the needs of real-world AI applications due to limited throughput: Ethereum processes 10-20 TPS, Solana [less than 4,000 TPS](https://explorer.solana.com/), and Layer 2s [less than 400 TPS](https://l2beat.com/scaling/activity). This equates to data throughput of ~1.5 mbps on average, which is 33,333x lower than the 50+ gbps that's needed to fuel AI applications. - They also do not have built-in storage systems, requiring connectivity to external systems that impact throughput, latency, and cost. - 0G inherits Ethereum's security, while other systems rely upon their own security mechanisms that fall short. - Even more issues exist, including EigenDA's lack of randomization over its data committees. @@ -38,7 +39,8 @@ This is for several reasons: The result is that 0G serves as the foundational layer for decentralized AI applications, bringing on-chain AI and more to life. -## Why 0G Is The Superior DA Solution + +## Why 0G Is The Superior DA Solution? There are 4 key differentiators of 0G: @@ -52,13 +54,14 @@ There are 4 key differentiators of 0G: These differentiators make 0G uniquely positioned to tackle the challenges of scaling AI on a decentralized platform, which is critical for the future of Web3 and decentralized intelligence. -## How Does This Work? +### 0G has achieved 50 gbps DA throughput per consensus layer. -As covered in [0G Storage](./og-storage.md), data within the 0G ecosystem is first erasure-coded and split into "data chunks," which are then distributed across various Storage Nodes in the 0G Storage network. +On [Testnet](/run-a-node/testnet-information), each 0G node demonstrated 10mbps throughput. With 5,000 nodes, that’s 50,000mbps or **50gbps** per consensus layer. As the consensus layer becomes the bottleneck, 0G plans to implement its own custom consensus (currently using Tendermint), akin to adding more AWS servers in a Web2 context, ultimately enabling infinite throughput. -To ensure data availability, 0G utilizes DA nodes that are randomly selected through a Verifiable Random Function (VRF). These DA nodes form quorums to query and verify the stored data, operating under an "honest majority" assumption. Once consensus is reached on the availability of the data, the availability proofs are submitted to the 0G Consensus network. +This is possible by incorporating cutting-edge horizontal scaling and sharding mechanisms to achieve remarkable speed. By distributing AI workloads across a network of specialized nodes, 0G reduces latency and accelerates processing times, making it highly competitive with centralized Web2 AI systems. This efficiency is critical as AI applications scale and require increasingly powerful resources. You can read more about this in the following [section](/intro). + +0G’s novel approach to decoupling data availability from consensus allows independent scaling of storage and validation layers. This architecture not only addresses the scalability challenges faced by traditional blockchain systems, but also enhances data resilience and retrieval efficiency. -[... previous content ...] ## How Does This Work? diff --git a/docs/run-a-node/validator.md b/docs/run-a-node/validator.md index 92cc33a..11a3a7b 100644 --- a/docs/run-a-node/validator.md +++ b/docs/run-a-node/validator.md @@ -7,9 +7,57 @@ import TabItem from '@theme/TabItem'; # Validator Node --- -Running a validator node in the 0G ecosystem means actively participating in the network's security and consensus through the Proof-of-Stake (PoS) mechanism. As a validator, you'll validate transactions, propose new blocks, and earn rewards for your contribution to the network's integrity and decentralisation. +Running a validator node in the 0G ecosystem means actively participating in the network's security and consensus through the Proof-of-Stake (PoS) mechanism. As a validator, you'll validate transactions, propose new blocks, and earn rewards for your contribution to the network's integrity and decentralization. + + +## Starting Your Node +**1. Clone the Validator Node Repo:** + ```bash + git clone https://github.com/0glabs/0g-chain.git + ``` + +**2. Build and Start the Docker Node:** + + ```bash + docker build -f ./0g-chain/Dockerfile-node -t 0g-chain-validator . + docker run -d --name 0g-chain-validator -p 26656:26656 -p 26657:26657 0g-chain-validator + ``` + +## Registering Your Validator + +**3. Acquite Testnet Tokens:** Obtain testnet tokens from the 0G faucet by entering your Node Operator ECDSA public key on our [website](https://faucet.0g.ai) or by requesting on [Discord](disord/0glabs). These tokens are necessary for staking and becoming a validator. + +Note: Make sure you have the private key to your ECDSA key pair to import into the validator node. + +**4. Registering Node Operator Account:** +Once you have the tokens, register your node operator account by putting in your ECDSA private key. + + ```bash + # Import an existing key + docker exec it 0g-chain-validator 0gchaind keys unsafe-import-eth-key + ``` + +**5. Become a Validator:** Register your node as a validator on the 0G network, specifying your stake amount, commission rates, and other important parameters. + + ```bash + docker exec -it 0g-chain-validator 0gchaind tx staking create-validator \ + --amount=ua0gi \ + --pubkey=$(0gchaind tendermint show-validator) \ + --moniker="" \ + --chain-id=zgtendermint_16600-2 \ + --commission-rate="0.10" \ + --commission-max-rate="0.20" \ + --commission-max-change-rate="0.01" \ + --min-self-delegation="1" \ + --from= \ + --gas=auto \ + --gas-adjustment=1.4 + ``` + + + ## Installation