OriginTrail
  • Get started with OriginTrail
  • OriginTrail Ecosystem — Call for Papers (Coming Soon)
  • Key Concepts
    • Decentralized Knowledge Graph (DKG)
    • DKG key concepts
  • TRAC: DKG utility token
  • Build with DKG
    • Quickstart (test drive the DKG in 5 mins)
      • Quickstart with Node.js
      • Quickstart with Python
    • Querying the DKG
    • DKG Edge Node
      • DKG Edge Node architecture
      • Get started with the Edge Node boilerplate
        • Automated setup with the installer
        • Manual setup
        • Usage example
      • Customize & build with the Edge Node
      • Knowledge Mining and dRAG examples
      • Deploy your Edge Node based project
        • Automated deployment with installer
      • DKG Edge Node inception program
      • DKG Edge Node API documentation
    • DKG Core Node
      • Run a V8 Core Node on testnet
        • Preparation for V8 DKG Core Node deployment
        • V8 DKG Core Node installation
      • Run a V8 Core Node on mainnet
        • Preparation for V8 DKG Core Node deployment
        • V8 DKG Core Node installation
      • How to open up your node for publishing
    • DKG toolkit
      • DKG SDK
        • Development environment setup
        • DKG Javascript SDK (dkg.js)
          • Interact with DKG paranets
          • Knowledge submission & curation
          • Paranet's incentives pool implementation
        • DKG Python SDK (dkg.py)
      • DKG paranets
        • Deploying a DKG paranet
        • Building with DKG paranets
        • Syncing a DKG Paranet
        • Initial Paranet Offerings (IPOs)
          • IPO specification
          • Launching your IPO
          • Paranet's incentives pool
          • IPO voting
      • AI agents
        • ElizaOS DKG agent
        • Custom DKG Python agent
        • Custom DKG JavaScript agent
      • Using the DKG with MCP
    • Ecosystem call for papers
  • DKG under the hood
    • Introduction
    • Delegated staking
      • Step-by-step staking
      • Redelegating stake
  • Random Sampling DKG Proof System
    • Random sampling rollout
    • Random Sampling FAQ
  • DKG Sync
  • Integrated Blockchains
    • Base blockchain
      • Connect to Base
    • Gnosis chain
      • Connect to Gnosis
    • NeuroWeb
    • Teleport instructions - NeuroWeb
    • Bridging to Moonbeam
    • Deployed smart contracts
  • Bounties & rewards
    • General bug bounty
    • Code contributions & V8 bug bounty
  • Whitepapers & RFCs
    • OriginTrail whitepaper
    • OriginTrail RFCs
  • Useful Resources
    • What's new with OriginTrail V8
    • DKG V8 guidebook
      • Protocol updates
      • Feature roadmap
      • How to upgrade to V8?
    • Public nodes
    • Tutorials
    • Test token faucet
    • Development principles
    • Community created resources
    • Linked data & knowledge graphs
    • Available networks, network details and RPCs
    • OT Node Engine implementation details
      • Modules
      • Command Executor
    • Contribution guidelines
      • Guidelines for automated test contributions
    • Explore the OriginTrail ecosystem
Powered by GitBook
On this page
  • Why DKG Sync Was Introduced
  • How It Works
  • Sync Logic and Resource Considerations

Was this helpful?

Edit on GitHub

DKG Sync

The DKG Sync feature enhances the anti-fragility of the OriginTrail Decentralized Knowledge Graph (DKG) by allowing Core Nodes to continuously and efficiently backfill any missing Knowledge Assets (KAs). This is especially useful for gracefully handling temporary node downtime, such as during server upgrades or brief periods of unavailability.

Rather than relying on constant uptime, DKG Sync enables nodes to recover and remain synchronized with the state of the public DKG shard(s) they participate in, ensuring robust participation in discovery, querying, and Random Sampling.

Why DKG Sync Was Introduced

As the DKG grows and evolves, Core Nodes may experience periods of downtime, restarts, or join the network for the first time. Rather than penalizing such situations, the sync system is designed to allow:

  • Reliable and autonomous catch-up for missing data

  • Smooth reintegration of previously unavailable nodes

  • Full historical sync for newly joined nodes to get up to speed

  • Consistently high levels of data replication across the network

This improves the overall anti-fragility of the system, making it more adaptive and resilient as it scales., restarts, or late onboarding. Rather than penalizing such situations, the sync system is designed to allow:

  • Reliable and autonomous catch-up for missing data

  • Smooth reintegration of previously unavailable nodes

  • Consistently high levels of data replication across the network

This makes the network more robust over time, allowing it to adapt and improve from dynamic changes in node availability.

How It Works

The sync feature operates as a background service and performs two key tasks:

1. Sync New Knowledge Collections

  • Compares the latest on-chain KC ID to the node’s own synced state

  • Constructs and sends Batch GET requests for any new, missing KCs

  • Stores verified KCs locally and tracks update progress

  • Queues any missing results for retry

2. Retry Missed Knowledge Collections

  • Periodically retries fetching failed KCs using intelligent retry logic

  • Dynamically schedules based on retry count and last attempt timestamp

  • Removes successfully synced KCs from retry queue

The DKG Sync feature introduces Batch GET, a new network operation optimized for retrieving multiple KCs efficiently. Rather than issuing redundant GET requests to multiple nodes, Batch GET enables smart coordination strategies that reduce bandwidth, balance load, and maximize responsiveness.

These mechanisms ensure that even a freshly joined or recently restarted node can synchronize efficiently without overwhelming the network.

Sync Logic and Resource Considerations

Requirement
Behavior

Fresh Nodes

Can perform full historical sync on joining

Operational Priority

Sync yields to publish/query tasks

Peer Interaction

Sync tracks peer GET volumes to avoid overload

Resilience

Sync recovers cleanly from failures and continues automatically


How to turn on DKG Sync

For DKG Sync to run it needs to be enabled in node configuration.

In .origintrail_noderc file at top level add assetSync object to enable and configure sync:

{
   "modules": {
       ...
   },
   "auth": {
       ...
   },
   "assetSync": {
       "syncDKG": {
           "enabled": true,
           // Number of KCs suggested to be 50 in beginning
           "syncBatchSize": <NUMBER-OF-KCs-IN-BATCH>
       },
       // You already have this if your node is syncing a paranet
       "syncParanets": []
   }
}

PreviousRandom Sampling FAQNextBase blockchain

Last updated 1 day ago

Was this helpful?