AppLayer
  • Welcome to AppLayer Docs
  • Introducing AppLayer
    • A Primer on Smart Contracts
    • The Problem With EVMs
    • What is AppLayer?
  • How AppLayer works
    • Validators
    • Sentinels
    • Application Chains
    • Bridging
      • AppLayer-to-AppLayer Data Bridging
      • AppLayer-to-AppLayer Token Bridging
      • AppLayer-to-External Bridging (Ethereum, Solana, etc.)
  • Understanding rdPoS
    • Blockchains overview
    • How rdPoS works
    • Validator implementations
    • Slashing
  • BDK implementation
    • The utils folder
    • The contract folder
    • The core folder
    • Transactions and Blocks
    • Database
    • Contract call handling
    • RLP (Recursive-Length Prefix)
    • P2P Overview
    • P2P Encoding
  • Understanding contracts
    • Solidity ABI
    • Internal and external contract calls
    • Setting up the development environment
    • Contract Tester
  • Precompiled contracts
    • Types of pre-compiled contracts
    • Dynamic and Protocol Contracts
    • SafeVariables and commit/revert logic
    • How to code a precompiled contract
    • Creating a Dynamic Contract (Simple)
      • Simple Contract Header
      • Simple Contract Source
      • Deploying and testing
    • Creating a Dynamic Contract (Advanced)
    • Creating a Protocol Contract (Advanced)
  • EVM contracts
    • State management and VM instance creation
    • Seamless C++/EVM integration
    • C++ to other contract calls
    • EVM to other contract calls
    • Executing contract calls via EVMC
    • Calling EVM contracts from C++
    • Calling C++ contracts from EVM
  • Getting started with AppLayer Testnet
  • Join our Community
  • Get in Touch
  • Glossary
Powered by GitBook
On this page
  1. How AppLayer works
  2. Bridging

AppLayer-to-AppLayer Data Bridging

How native chains exchange data on AppLayer.

PreviousBridgingNextAppLayer-to-AppLayer Token Bridging

Last updated 1 year ago

Bridging arbitrary data from an AppLayer chain (A) to another (B) is simple:

  • Chain A sends a request in the upcoming block and communicates this, along with the block reference, to the Chain Abstraction Network. This request is written to the next block and relayed to AppLayer's Chain Abstraction Network.

  • A set of Validators and Sentinels are randomly selected using RandomGen (which works exactly the same way in all nodes in the network). The selected Validators and Sentinels review Chain A's request and forward it to Chain B.

  • Chain B receives the request from the Chain Abstraction Network and retrieves the data from its chain, encapsulating it within a merkled item. This data and its internal reference are subsequently transmitted back to the Chain Abstraction Network for permanent storage.

  • Validators and Sentinels then check and corroborate the data submitted by Chain B with other nodes from Chain B to validate its presence in the designated block.

  • Once data is verified, Validators and Sentinels sign the data and publish it inside the Chain Abstraction Network, while also relaying it back to A along with their signatures.

  • A verifies the signatures and checks if the randomly selected nodes were using the network's RandomGen seed. If everything matches, the exchange is complete, but if not, there's a malicious node in the network which should be reported.

It is possible for A to only send information to the target chain without having to wait for an answer. This call can possibly trigger logic within the target chain, depending on how their developers decided to handle your message.

A sends a request to the Chain Abstraction Network
Validators and Sentinels in the Chain Abstraction Network relay A's request to B
B gathers data from itself and sends it back to the Chain Abstraction Network
Chain Abstraction Network checks other B nodes to verify data
Chain Abstraction Network relays signed data back to A