Skip to content

Commit

Permalink
fix: undo README.md changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vanderheijden86 committed May 9, 2024
1 parent 3142ea1 commit 02e4e62
Showing 1 changed file with 1 addition and 71 deletions.
72 changes: 1 addition & 71 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
:small_red_triangle: Avalanche Package
======================================
This is a [Kurtosis package](https://docs.kurtosis.com/concepts-reference/packages) that spins up a non-staking Avalanche node. By default, this package works locally over Docker but can also be deployed on Kubernetes if so desired. You may optionally specify the number of nodes you wish to start locally with a simple `arg` passed in at execution time.

<!-- TOC -->
* [:small_red_triangle: Avalanche Package](#small_red_triangle-avalanche-package)
* [Run this package](#run-this-package)
* [Configuration](#configuration)
* [Custom Subnet Genesis](#custom-subnet-genesis)
* [Fixed Ports](#fixed-ports)
* [Use this package in your package](#use-this-package-in-your-package)
* [Kubernetes Configuration](#kubernetes-configuration)
* [Develop on this package](#develop-on-this-package)
* [Avalanche architecture](#avalanche-architecture)
* [Avalanche Nodes & Chains](#avalanche-nodes--chains)
* [Questions and Answers](#questions-and-answers)
<!-- TOC -->
This is a [Kurtosis package](https://docs.kurtosis.com/concepts-reference/packages) that spins up a non-staking Avalanche node. By default, this package works locally over Docker but can also be deployed on Kubernetes if so desired. You may optionally specify the number of nodes you wish to start locally with a simple `arg` passed in at execution time.

Run this package
----------------
Expand Down Expand Up @@ -154,60 +141,3 @@ Develop on this package
<!-------------------------------- LINKS ------------------------------->
[install-kurtosis]: https://docs.kurtosis.com/install
[enclaves-reference]: https://docs.kurtosis.com/concepts-reference/enclaves


## Avalanche architecture
### Avalanche Nodes & Chains
```mermaid
graph TD;
subgraph Avalanche Node
Node[Node Server] -->|RPC & WebSocket Endpoints| Routes
Node -->|Gossip Protocol| Gossip
Node -->|Consensus Messages| Consensus
subgraph X Chain
XChain[X Chain] -->|Asset Exchange| XConsensus[Consensus]
Gossip --> XChain
Consensus --> XConsensus
end
subgraph C Chain
CChain[C Chain] -->|Smart Contracts| CConsensus[Consensus]
Gossip --> CChain
Consensus --> CConsensus
end
subgraph P Chain
PChain[P Chain] -->|Validator Management| PConsensus[Consensus]
Gossip --> PChain
Consensus --> PConsensus
end
end
Routes -.->|/ext/bc/...| XChain
Routes -.->|/ext/bc/...| CChain
Routes -.->|/ext/bc/...| PChain
classDef chain fill:green,stroke:#333,stroke-width:4px;
class XChain,CChain,PChain chain;
```

The P, C, and X chains within the Avalanche platform are designed to fulfill distinct roles but are interconnected and communicate with each other:

1. **P-Chain (Platform Chain)**: The P-Chain manages the Avalanche network's validators, tracks active subnets, and enables the creation of new subnets. Communication with the X and C chains can be necessary for:
- Validator management: Validators might have stakes in multiple chains, requiring coordination between the P-Chain (which manages staking and consensus) and other chains.
- Subnet creation and management: As the P-Chain oversees subnets, creating a blockchain on a subnet (whether on the X or C chain) requires coordination to ensure proper setup and validation.

2. **X-Chain (Exchange Chain)**: The X-Chain facilitates asset creation and exchange. Interactions with the P and C chains include:
- Cross-chain asset transfers: Users might want to move assets between the X-Chain and C-Chain for different purposes, such as using X-Chain assets within smart contracts on the C-Chain.
- Staking rewards and fees: Validators and delegators earn rewards for their services, which might involve transferring assets across chains.

3. **C-Chain (Contract Chain)**: The C-Chain supports smart contracts using the Ethereum Virtual Machine (EVM). Reasons for communication with the P and X chains include:
- Smart contracts involving multiple asset types: Contracts might interact with assets from the X-Chain or require information from the P-Chain.
- Decentralized finance (DeFi) applications: DeFi platforms may use assets across the Avalanche ecosystem, necessitating seamless asset flow between chains.

Inter-chain communication in Avalanche is facilitated through cross-chain transfer protocols, enabling assets and information to move securely between the P, C, and X chains. This interconnectedness allows Avalanche to offer a comprehensive blockchain platform supporting various use cases, from simple asset transfers to complex smart contracts and decentralized applications.

0 comments on commit 02e4e62

Please sign in to comment.