HackMD
  • Prime
    Prime  Full-text search on all paid plans
    Search anywhere and reach everything in a Workspace with Prime plan.
    Got it
      • Create new note
      • Create a note from template
    • Prime  Full-text search on all paid plans
      Prime  Full-text search on all paid plans
      Search anywhere and reach everything in a Workspace with Prime plan.
      Got it
      • Options
      • Versions and GitHub Sync
      • Transfer ownership
      • Delete this note
      • Template
      • Save as template
      • Insert from template
      • Export
      • Dropbox
      • Google Drive
      • Gist
      • Import
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
      • Download
      • Markdown
      • HTML
      • Raw HTML
      • Sharing Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • More (Comment, Invitee)
      • Publishing
        Everyone on the web can find and read all notes of this public team.
        After the note is published, everyone on the web can find and read this note.
        See all published notes on profile page.
      • Commenting Enable
        Disabled Forbidden Owners Signed-in users Everyone
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Invitee
      • No invitee
    Menu Sharing Create Help
    Create Create new note Create a note from template
    Menu
    Options
    Versions and GitHub Sync Transfer ownership Delete this note
    Export
    Dropbox Google Drive Gist
    Import
    Dropbox Google Drive Gist Clipboard
    Download
    Markdown HTML Raw HTML
    Back
    Sharing
    Sharing Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Note Permission
    Read
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    Write
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    More (Comment, Invitee)
    Publishing
    Everyone on the web can find and read all notes of this public team.
    After the note is published, everyone on the web can find and read this note.
    See all published notes on profile page.
    More (Comment, Invitee)
    Commenting Enable
    Disabled Forbidden Owners Signed-in users Everyone
    Permission
    Owners
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Invitee
    No invitee
       owned this note    owned this note      
    Published Linked with GitHub
    Like BookmarkBookmarked
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Indexing additional chains on the network ## Introduction This document outlines in detail some of the considerations & discussions behind the Epoch Block Oracle GIP. ## Considerations There are a few technical approaches which can enable support for new indexed chains on The Graph Network. In choosing between them, it is important to state the decision-making criteria. - **Upfront work**: what initial work is required? - **Adding new chains**: what must be done to add an incremental chain? - **Decentralisation**: what trust assumptions does it introduce, and what is the path to decentralisation? - **Operational cost**: what is the ongoing cost to operate this solution (for an altruistic trusted actor) - **Indexer cost**: is there any change in costs for indexers? - **Legibility**: is the resulting system easy to understand, interrogate and reason about? - **Data freshness**: does it make any changes to the freshness of indexed data? The highest priority criterion is the ability to quickly & simply add new indexed chains. A centralised Oracle approach has been agreed as the necessary starting point in order to do that. A key priority will be a path or a plan to increased decentralisation over time. There are still a range of potential approaches: ### Protocol Chain Epoch Oracle Create an Oracle contract on the Protocol chain, updated by an Owner, which provides the EpochBlock for all supported networks. Per an update to the Arbitration Charter, Indexers close allocations using the latest available EpochBlock for the indexed network. This replicates the existing setup for subgraphs indexing Ethereum mainnet for new indexed chains, while introducing a new Trusted actor (the Owner of the Oracle, which would be decentralised over time). It introduces an ongoing cost to keep the Oracle up to date, and does nothing to improve data freshness. ### Arbitrator verification Indexers can close allocations with a recent block for an indexed chain: the recency requirement is specified by the Arbitration Charter. The Arbitrator is responsible for identifying bad actors (identifying when allocations have been closed with POIs from insufficiently recent blocks on the indexed chain). This is very simple for all participants apart from the Arbitrator, whose monitoring role is significantly complicated. This approach could be enhanced by introducing **anchoring of POIs by Indexers on the Indexed chain**: calling a contract or account with the POI for a recent block in the calldata. This increases the legitimacy of arbitration on the basis data freshness, changing the Arbitrator's responsibility from identifying whether an allocation was closed with a sufficiently recent POI, to identifying whether an allocation was closed sufficiently soon after a recent block was anchored on the Indexed chain (where the recency of that block can be verified definitively on the indexed chain). However it introduces ongoing operational requirements: - The Arbitrator will need to index all subgraphs, in order to cross-check the arbitrary blocks chosen for closure based on recency - Deploying a contract or establishing an equivalent setup on each new indexed chain (which the Indexers would "send" their POIs to) - Monitoring that setup on every chain - Indexers most hold funds and manage wallets on all the chains they wish to index, to make transactions It also requires updating the PoI format to be be self-contained with all the necessary metadata signed off-chain (currently the signature is implicit as the Indexer submits the PoI as part of an Ethereum transaction). ### Comparison | | Epoch Oracle | Arbitrator verification | Arbitrator verification with anchors | |------------------------|-----------------------------------------------------------------|--------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | **Upfront work** | Deploying the oracle, setting up the Owner, updating network and indexer components | Scaling up the Arbitrator, updating network and indexer components | Scaling up the Arbitrator, establishing a setup for anchors on each protocol, updating network and indexer components | | **Adding a new chain** | Add to Oracle | Abitrator set up to monitor new chain | Abitrator setup, Deployment on indexed chain | | **Decentralisation** | New trusted actor, decentralised over time | Increased responsibility of the Arbitrator. Could evolve to a bridging solution over time. | Increased responsibility of the Arbitrator. Could evolve to a bridging solution over time. | | **Operational cost** | Oracle gas costs, RPC costs | Arbitrator workload increases | Arbitrator workload increases | | **Indexer cost** | No change | No change | Transactions on the indexed chain | | **Legibility** | Matches current setup | Less legible without additional tooling | Less legible without additional tooling | | **Data freshness** | No change | Can be introduced, but hard work to monitor and enforce | Can be introduced, easier to monitor (given setup work) | ## Decision The Epoch Oracle is the simplest approach. Since we can expect the network as a whole to change over the coming months given the planned move to L2, this is a key decision-making factor, so we will proceed with an Epoch Oracle. # Copyright Waiver Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). # References [Cross-chain POI (Nov 2021)](https://www.notion.so/Cross-chain-PoI-c9da4a8ea4104b2d93b2e79ca954155b) [Multiblockchain POI (Feb 2022)](https://whimsical.com/multiblockchain-poi-RTse7vNqCfXmzcLpJ5dX9c) [Forum discussion](https://forum.thegraph.com/t/require-that-more-recent-pois-are-submitted-in-order-to-collect-indexing-rewards-multi-blockhain-pois/2500)

    Import from clipboard

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lost their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template is not available.


    Upgrade

    All
    • All
    • Team
    No template found.

    Create custom template


    Upgrade

    Delete template

    Do you really want to delete this template?

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in via Google

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Tutorials

    Book Mode Tutorial

    Slide Mode Tutorial

    YAML Metadata

    Contacts

    Facebook

    Twitter

    Feedback

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions

    Versions and GitHub Sync

    Sign in to link this note to GitHub Learn more
    This note is not linked with GitHub Learn more
     
    Add badge Pull Push GitHub Link Settings
    Upgrade now

    Version named by    

    More Less
    • Edit
    • Delete

    Note content is identical to the latest version.
    Compare with
      Choose a version
      No search result
      Version not found

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub

        Please sign in to GitHub and install the HackMD app on your GitHub repo. Learn more

         Sign in to GitHub

        HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Available push count

        Upgrade

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Upgrade

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully