LogoLogo
🔬 Our Homepage💬 Join Our Discord👾 Contribute on GitHubPrivacy Policy
  • 🌄Introduction
    • 🎯How Blockchain Protects Public Safety
      • 🗺️Old System, New World
      • 💡A Working Solution
    • ℹ️Important Links
  • ⛵Researchers
    • 🗓️Publication Pipeline
      • 📢Publication Requests
      • 🐳Research Development
        • 🛣️RD1 | Build3 Roadmap for Blockchain-Based Construction Supervision
        • 👷‍♀️RD2 | Labor-Based Based Voting Authority
        • 🪶RD3 | Authorship, not Ownership: Re-understanding and NFT
        • 👿RD5 | Blockchain Makes Everything Worse for Everyone in Every Industry
        • 🥑RD6 | Configuring a DAO as a Legal 503(c)
      • 🗄️PR Archives
    • 🔭Use Cases
      • 🫔Proof of Supervision with Blockchain
      • 🏔️Record of Work
      • 🏝️Connecting to Land
      • 🛫PermitZIP: Two-Week Project
  • 🕹️Developers
    • 🧑‍🚀Architecture Overview
      • 🥝Consensus
      • 🛰️Storage
    • ⚗️Notes about Substrate
      • 🏃‍♂️Runtime
      • 🏗️FRAME Pallet
        • ⬇️Imports
        • ⚙️Runtime Configuration Trait
        • 💾Runtime Storage
        • 👍Runtime Events
        • 🏑Hook
        • 🙋Extrinsics (Dispatchable Calls)
      • 📦Other Important Crates
        • 📡frame_system
        • 🤝frame_support
        • 🤠frame_executive
      • 🍇Prebuilt Pallets
        • 🪙Assets
        • ⚛️Atomic Swap
        • ⚖️Balances
        • 📊Benchmark
        • ☮️Collective
        • 📃Contracts
        • Democracy
        • Elections Phragmén
        • 🌌Off-chain Worker
        • 👴GRANDPA
        • 🆔Identity
        • Indices
        • 🧜Membership
        • 🫂Multisig
        • 👩‍⚖️Offences
        • 👨‍🏫Proxy
        • 🌄Recovery
        • Scheduler
        • Scored Pool
        • Society
        • 🍶Staking
        • Sudo
        • ⏲️Timestamp
        • 🍺Transaction Payment
        • Treasury
        • ☺️Utility
        • 🦺Vesting
      • 🐙ink! Smart Contracts
        • 🕊️Development
    • 🦀Rust Programming Language
Powered by GitBook
On this page
  • The Blockchain Data Storage Problem
  • Off-Chain Workers
  • IPFS

Was this helpful?

Edit on GitHub
Export as PDF
  1. Developers
  2. Architecture Overview

Storage

The block size limitations make storing large values a challenge. How do we deal with that?

PreviousConsensusNextNotes about Substrate

Last updated 3 years ago

Was this helpful?

The Blockchain Data Storage Problem

Storing boolean and integer values is easy. Decimals are a bit more challenging. And strings are extremely limited.

To make things a bit more constrained, ink! contracting language only allows a single low-level primitive, Mapping , for access to contract storage.

This means the front-end developers will have to continuously transform data for most RPC requests.

In practice, the do not normally exceed 32 bytes for reasons outside of cryptographic security. The H12 Struct allows for up to 64 bytes. This paragraph is larger than 64 bytes.

Off-Chain Workers

Substrate has pallet which off-chain computational efforts to occur. This is great because more complicated work should be taken offline, or all nodes would have to perform the same computations causing a massive bandwidth problem.

The substrate_ off-chain worker subsystem allows for tasks that are data and computationally intensive to be performed without slowing down the block production.

This allows for an asynchronous element of producing blocks to exist where a node will go off-chain, produce their results, and report back with the cryptographic results representing the results.

Check out this

This does not solve the storage problem. After all, the final result is just a hash of the final data, not the data itself. The data can be stored in a database, but that comes at the cost of trusting someone to maintain a central database.

There are likely many private companies that would append the blockchain by offering these services, but how can we find a way to persist the data for a longer period of time?

  • This multifront-end developer will have to continually transform data for most RPC requests

IPFS

IPFS is a peer-to-peer data storage system that helps to solve the large format, immutable and persistent storage dilemma presented by traditional blockchain.

More on this later.

Luckily, the IPFS development team has already worked to start solving this problem and they have constructed an .

🕹️
🧑‍🚀
🛰️
substrate primitives
Off-chain Worker Callback Example
off-chain worker manual