Skip to content

Commit

Permalink
Merge pull request #16 from intls/fix
Browse files Browse the repository at this point in the history
fix: code errors
  • Loading branch information
soniasingla authored Nov 21, 2024
2 parents aca62ee + 68ab7eb commit a56012f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions content/docs/architecture/apis-and-interfaces.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ Reading smart contract events can also be done using Shardeum cycles (we listen
**JSON URL Filter Variables**

```
?startCycle=lastestCycle
&endCycle=lastestCycle
?startCycle=latestCycle
&endCycle=latestCycle
&address=addressToListenTo
&page=1
```
Expand Down Expand Up @@ -179,4 +179,4 @@ The Explorer Server provides several API endpoints categorized into different gr

```
GET /api/account/:address
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Shardeum's approach to consensus and sharding involves complex mechanisms to ens
* The Shardeum network utilizes a trustless consensus system where nodes must agree on the data before it becomes part of the next cycle.
* This process uses advanced algorithms to ensure that all nodes reach a consensus on the transaction records.
* Each node generates cycle records, akin to traditional blockchain blocks but are unique to Shardeum's structure.
* Here you can take a deep dive into the [consensus algorithms used by Shardeum](/docs/faqs/glossary#proof-of-stake-pos) and [Proof of Quorum](/docs/faqs/glossary#proof-of-quorum-poq)", focusing on their design and implementation.
* Here you can take a deep dive into the [consensus algorithms used by Shardeum](/docs/faqs/glossary#proof-of-stake-pos) and [Proof of Quorum](/docs/faqs/glossary#proof-of-quorum-poq), focusing on their design and implementation.

### **2. Node Lifecycle Management:**

Expand Down Expand Up @@ -56,4 +56,4 @@ Sharding is a method of partitioning data and computation to achieve scalability
* Shardeum employs dynamic sharding, where nodes are responsible for specific ranges of the address space, ensuring balanced data distribution and efficient processing. Each node dynamically adjusts its range of responsibility as new nodes join or leave the network. This dynamic approach ensures that the network can scale smoothly without significant disruptions. This approach contrasts with vertical scaling, where a single node is upgraded to handle more load, which can be less efficient and more costly.
* **Adaptation to Network Conditions:** Dynamic sharding allows Shardeum to adapt to changing network conditions and workloads. As nodes join or leave, the address space is redistributed to maintain balance. This ensures that no single node becomes a bottleneck and that the network can continue to operate efficiently even as it scales. The auto-scaling feature detects when to scale up or down, allowing the network to grow and shrink efficiently.
* **Shard Division:** In a dynamic sharding system, the address space is divided into multiple shards, each managed by a different set of nodes. For example, in a network with 512 nodes and a consensus group size of 128, the network is divided into four shards, each responsible for a quarter of the total address space. As nodes are added or removed, the boundaries of these shards adjust to maintain balance and ensure that each node handles a proportional amount of data and transactions. If every node in the network had a single shard, then every node would store all the data. However, as more nodes are added to the network, the consensus group size determines how the data is divided among the nodes. This division allows each node to handle a portion of the workload, thus improving the network's overall efficiency and speed. For instance, if we have a small Shardeum network with a consensus group size of 128 and 128 nodes or fewer, we essentially have a single shard where every node stores all the data. However, as soon as we add one more node, the network dynamically shards, resulting in significant speedup. This is because the workload and data storage are distributed among more nodes, and each node handles only a fraction of the total transactions and data.
* **Gas Pricing Optimization:** Shardeum also optimizes gas prices by adjusting them based on the complexity and resource usage of transactions. This dynamic pricing model ensures that simple transactions remain inexpensive, while more complex transactions that require more resources are priced accordingly. This approach helps prevent abuse and ensures fair resource allocation across the network.
* **Gas Pricing Optimization:** Shardeum also optimizes gas prices by adjusting them based on the complexity and resource usage of transactions. This dynamic pricing model ensures that simple transactions remain inexpensive, while more complex transactions that require more resources are priced accordingly. This approach helps prevent abuse and ensures fair resource allocation across the network.

0 comments on commit a56012f

Please sign in to comment.