Shardeum’s Variable-Silo Contract Storage for Unlimited Growth

Shardeum’s Variable-Silo Contract Storage for Unlimited Growth

Explore how Shardeum's Variable-Silo Contract Storage revolutionizes blockchain scalability and efficiency, making future growth limitless. Dive in...

Back to top

Introduction

We’re glad to bring you this inside look into our our implementation of the Variable-Silo Contract Storage milestone few months back!🎉 With the ability to handle a large number of shards, this milestone paves the way for Shardeum’s growth over time. It’s a huge leap in our journey, marking another achievement from Shardeum’s feature-readiness and future-readiness perspective. Brace yourselves as we dive into a new era of optimized performance in the world of Shardeum!

In order to grasp and understand the intricacies of this optimization and its overall benefits, let’s first use an analogy so that we can have an intuitive understanding of the improvements and break this down into multiple easily digestible steps.

Basic Concept of Address Ranges and Prefix in Shardeum

In Shardeum, each smart contract is deployed at a specific address, which can be thought of as a location in the network. These addresses are numbered, for example, from 0 to 5000. When a smart contract is deployed, say at address 3000, all the storage related to this contract is given addresses that are close to 3000, like 3001, 3005, etc. This means they are all grouped together in a similar range.

The addresses are prefixed in a way that groups them tightly together. For example, if the prefix is ‘300’, then the addresses for the contract’s storage might be 3001, 3002, 3003, and so on. While this tight grouping might be beneficial for a niche network that caters to a very specific types of services, it can lead to certain parts of the network (or shards) being very busy and congested in a low fee and scalable network like Shardeum. This will become particularly evident with the frequent use of numerous popular smart contracts, such as USDT’s on the network.

Variable-Silo Contract Storage Project

The goal of this project is to change how these prefixes work. Instead of having a long and fixed prefixes, the prefixes will be shorter and configurable. This means instead of just having addresses like 3001, 3002, etc., you could have a wider range like 30xx or 3xxx. This spreads out the contract’s storage across a broader range of addresses.

Now let’s factor in the kind of storage spaces or addresses we are dealing with on the blockchain so you can see the bigger picture here. In reality, these addresses are in hexadecimal (a base-16 number system) and not in decimal (base 10) and the prefix length is precisely defined in bits. The analogy uses the decimal system which we are all intuitively familiar with so as to make the concepts more comprehensible. The actual addresses used in Shardeum’s core protocol (Shardus) are 64-character hexadecimal strings. In other words, similar to an Ethereum address, but just a little longer. Here’s an example: 2c665fb349768e8ca0753a98205889201f1590fe000000000000000000000000.

By spreading out the storage addresses, the load on the network is more evenly distributed. This prevents certain shards from becoming overly busy while others are underutilized. It also improves performance because more nodes (computers in the network) can share the work of handling transactions and data related to popular smart contracts/dApps.

In Simple Terms: The Power of Variable-Silo Storage

Let us further break this down in layperson terms. Imagine a large city divided into numerous neighborhoods, each with its own unique postal code. The city’s postal service is responsible for delivering mail to every house in every neighborhood. Initially, each neighborhood is assigned a long, fixed postal code. Let’s say the postal codes are very specific, including details right down to the block and building. This system is akin to the long, fixed prefixes in Shardeum’s address system.

Problem: The postal service discovers that certain neighborhoods (especially those with densely populated apartment blocks) are receiving a vast majority of the city’s mail. These neighborhoods represent popular smart contracts in the context of Shardeum. As a result, postal workers in these areas are overwhelmed, leading to delays and inefficiencies. Meanwhile, postal workers in less dense areas have much less mail to deliver and are underutilized.

Solution: To address this issue, the city decides to shorten and make the postal codes configurable. Now, instead of having very specific codes for each block, the codes are more generalized and can cover wider areas.

Before: Long, Fixed Postal Codes

Originally, each block or building in the city had a very specific postal code. For instance, one building might have the code “12345-6789”, where “12345” represents the neighborhood, and “6789” specifies the exact block and building. This level of specificity means that each postal worker is responsible for a very defined, small area. While this system is precise, it leads to inefficiencies: some workers are overloaded with mail because their area includes high-density apartment blocks (popular smart contracts), while others have much lighter loads due to servicing low-density areas.

After: Shortened, Configurable Postal Codes

To solve this imbalance, the city council decides to shorten the postal codes and make them configurable. Instead of the long codes, the city now uses more generalized codes that cover wider areas. For example, instead of “12345-6789”, the postal code might simply be “123”. This broader code does not pinpoint specific blocks or buildings; it covers an entire section of the neighborhood.

Benefits of Variable-Silo Contract Storage

Here are the benefits of completing this feature on Shardeum:

  • Balanced Burden: Spreading the Load – By using shorter, configurable prefixes, the network’s load is distributed more evenly. This means no single shard is overwhelmed, leading to a more efficient system overall. 🌐
  • Enhanced Performance: Faster and Stronger – With a broader range of addresses, more nodes can contribute to processing transactions. This results in faster and more reliable performance, especially for popular smart contracts.💨
  • Scalable Success: Growing Gracefully – The ability to handle a large number of shards ensures that Shardeum can scale smoothly as the network expands, accommodating future growth without a hitch.🌱
  • Optimized Operations: Smarter Storage Solutions – The Variable-Silo Contract Storage system optimizes how storage addresses are assigned, leading to smarter and more effective network operations. 🧠
  • Equilibrium Enhanced: No Shard Left Behind – This upgrade ensures a balanced workload across the network, preventing certain shards from being underused while others are overburdened. ⚖️
  • Global Gains: Inclusive and International – A more efficient network means better service for our global user base, enhancing the Shardeum experience for everyone, everywhere. 🌍 
  • Future-Forward: Ready for Tomorrow – This milestone prepares us for future advancements in distributed ledger technology (DLT), keeping Shardeum at the forefront of innovation.🚀
  • Community Centric: Built for Shardians, by Shardians – This upgrade reflects our commitment to the community’s needs, ensuring a platform that grows and evolves with its users.💙
  • Tech Triumph: A Technological Marvel – The technical sophistication of this system showcases Shardeum’s prowess in distributed ledger technology, marking us as a leader in the field. 🛠️
  • Sustainable Solutions: For a Greener Tomorrow – Efficient use of resources means a more sustainable network, aligning with our vision of a greener, more eco-friendly DLT.🌿

Conclusion

In summary, the Variable-Silo Contract Storage project in Shardeum improves network performance by changing how storage addresses for smart contracts are assigned. By using shorter and configurable prefixes, the project allows for a more distributed and efficient allocation of contract storage across the network, which is especially beneficial as the number of shards grows and the network scales up. This leads to better performance and a more balanced workload across the network.

This upgrade is a testament to Shardeum’s commitment to innovation, efficiency, and community. It’s more than just a technical enhancement; it’s another step towards a future where Shardeum leads the charge in the wider Web3 world. So, here’s to continued growth, unstoppable progress, and a future bright with possibilities. 🚀🌟


4
The Shard

Sign up for The Shard community newsletter

Stay updated on major developments about Shardeum.

  • Share