Node Sync - Blockchain Patterns (2024)

Disclaimer: This is a summary of patterns we have observed during our research and should not be considered any form of technical or investment advice. Also, the given “known examples” do not imply they are the best implementations of the said pattern or any superior to any other implementation of the pattern not listed.

Summary

Create a clone of a blockchain node by synchronizing blocks and history.

Context

The user wants to add new nodes or swap nodes to change the physical location/node, improve performance, or create multiple instances of the source blockchain. The consensus rules of the target blockchain platform are compatible with the source blockchain. A snapshot of the source blockchain is available.

Problem

How to load states and smart contracts to the target blockchain?

Forces

  • Consistency – States such as blockchain native assets cannot be arbitrarily created because migration must preserve system invariants. It is difficult to create a complete copy of the ledger and block history, as the system is distributed, new blocks are built continuously, and finality is not immediate.
  • Accountability – Initiation of new accounts and their states on the target blockchain must be recorded with proof.
  • Size – A blockchain may contain a large number of accounts, states, smart contracts, and transactions. Moreover, history may consist of a large number of blocks. A large subset of these may need to be initiated on the target blockchain.
  • Latency – Time to create accounts and initialize their states is proportional to the number of accounts and their states. Given the large size of the global state and history, time to make a copy could be very long. It takes even more time to recreate and validate the global state by applying all transactions and running smart contracts.
  • Cost – Each account creation and state assignment may needs to pay a transaction fee. The transaction fee could also be proportional to the size of the state.
  • Consensus – To accept a state, smart contract, transaction, or block as valid, both the sender and receiver nodes must follow the same consensus rules.
  • Governance – The consensus of the blockchain’s governance body is required to update any state or blockchain platform software.

Solution

Steps shown in the following figure can be used to synchronize the new node using the blockchain platform-specific sync tool. First, install the source blockchain platform’s client software (or an updated version that is backward compatible) on the new node. Also, configure the new node to connect to other members of the source blockchain. Second, enable the sync tool on the node to copy various data structures representing the global state, smart contracts, transactions, and blocks from other blockchain nodes. Next, the node should rebuild and validate all the transactions from the genesis to verify the global state. Any errors, such as failed data transfer, need to be resolved by requesting further data. Finally, reconfigure the node to accept new transactions.

Node Sync - Blockchain Patterns (1)

The volume of the global state, smart contract, transaction, and block data of a highly-active blockchain could be in excess of hundreds of Gigabytes. Hence, many days to weeks could be required to download and validate them depending on bandwidth, disk IO, and CPU limitations, as well as ongoing transactions.

Several optimizations could be applied to reduce the sync time. For example, the new node can be bootstrapped using a snapshot of the source blockchain. Then only the data from new blocks created after the snapshot need to be synchronized. Moreover, validation could be performed at different levels, such as validation of the last n blocks, random blocks, entire block history, and entire block history and transactions.

If the objective is to swap blockchain nodes, decommission the old nodes. Whereas if the objective is to create multiple blockchain instances, reconfigure the new node(s) to behave as an independent blockchain after a set block number. This is usually achieved by setting a new blockchain identifier and disconnecting from the parent blockchain’s nodes.

Benefits

  • Consistency, Accountability, Integrity, and Immutability – Blockchain sync tools rely on asynchronous messaging, immutability (to identify states updated after a given block number), consensus (to provide consistency), and validation. Hence, no state, history, and IDs are lost or changed in the process, ensuring consistency, accountability, integrity, and immutability.
  • Governance – No explicit approval of the blockchain governance body is needed to add a new node.
  • Cost – No transaction fees as data synchronization is at the blockchain data structure level.
  • Compatibility – This pattern works on any blockchain where source and target blockchain platforms are compatible (i.e., follow same consensus rules), and the target node(s) is new.

Drawbacks

  • Latency – Time to synchronize a large volume of states and history could vary from hours to days. Time can be substantially reduced by bootstrapping a node using a snapshot and synchronizing only the ledger state.

Related patterns

  • Snapshotting pattern can be used to speed up the bootstrap process.

Known uses

  • This pattern is frequently used to connect new nodes to an existing blockchain. Bitcoin, Ethereum, and Bithereum allow new nodes to download a snapshot file that reflects the global state and blocks at a set block number, and then sync with other nodes to speed up the process.
  • Ethereum supports syncing data at different granularity levels, such as full, fast, and light. Similarly, Bitcoin supports full node and lightweight node syncing.
Node Sync - Blockchain Patterns (2024)
Top Articles
Alexi Harding | Is Being a Millionaire Not Enough?
New Coursera Survey: Industry Certificates Hold Strong Appeal For College Students And Employers
Foxy Roxxie Coomer
Garrison Blacksmith Bench
Was ist ein Crawler? | Finde es jetzt raus! | OMT-Lexikon
The UPS Store | Ship & Print Here > 400 West Broadway
Archived Obituaries
What happened to Lori Petty? What is she doing today? Wiki
Tyrunt
Sportsman Warehouse Cda
Yi Asian Chinese Union
Music Archives | Hotel Grand Bach - Hotel GrandBach
Housework 2 Jab
The fabulous trio of the Miller sisters
I Wanna Dance with Somebody : séances à Paris et en Île-de-France - L'Officiel des spectacles
7 Fly Traps For Effective Pest Control
Craigslist Panama City Fl
The Grand Canyon main water line has broken dozens of times. Why is it getting a major fix only now?
Conan Exiles: Nahrung und Trinken finden und herstellen
Ubg98.Github.io Unblocked
Tips and Walkthrough: Candy Crush Level 9795
Kingdom Tattoo Ithaca Mi
Troy Gamefarm Prices
Roanoke Skipthegames Com
Craigslist Auburn Al
Darknet Opsec Bible 2022
Trust/Family Bank Contingency Plan
2487872771
Adecco Check Stubs
Old Peterbilt For Sale Craigslist
El agente nocturno, actores y personajes: quién es quién en la serie de Netflix The Night Agent | MAG | EL COMERCIO PERÚ
67-72 Chevy Truck Parts Craigslist
Bimar Produkte Test & Vergleich 09/2024 » GUT bis SEHR GUT
Pitchfork's Top 200 of the 2010s: 50-1 (clips)
Frank 26 Forum
Latest Nigerian Music (Next 2020)
Evil Dead Rise (2023) | Film, Trailer, Kritik
Verizon Outage Cuyahoga Falls Ohio
Samantha Lyne Wikipedia
The Realreal Temporary Closure
Shoecarnival Com Careers
Craigslist Antique
Blow Dry Bar Boynton Beach
This Doctor Was Vilified After Contracting Ebola. Now He Sees History Repeating Itself With Coronavirus
Anonib New
The Latest Books, Reports, Videos, and Audiobooks - O'Reilly Media
Join MileSplit to get access to the latest news, films, and events!
Osrs Vorkath Combat Achievements
Festival Gas Rewards Log In
Edict Of Force Poe
Rise Meadville Reviews
Arre St Wv Srj
Latest Posts
Article information

Author: Kareem Mueller DO

Last Updated:

Views: 5342

Rating: 4.6 / 5 (46 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Kareem Mueller DO

Birthday: 1997-01-04

Address: Apt. 156 12935 Runolfsdottir Mission, Greenfort, MN 74384-6749

Phone: +16704982844747

Job: Corporate Administration Planner

Hobby: Mountain biking, Jewelry making, Stone skipping, Lacemaking, Knife making, Scrapbooking, Letterboxing

Introduction: My name is Kareem Mueller DO, I am a vivacious, super, thoughtful, excited, handsome, beautiful, combative person who loves writing and wants to share my knowledge and understanding with you.