GGP: 0017 Scope: Smart Contracts Created: 2022-11-08
GIP: 0040 Title: L2 Bridge and Protocol Deployment Authors: Pablo Carranza Vélez pablo@edgeandnode.com, Ariel Barmat ariel@edgeandnode.com, Tomás Migone tomas@edgeandnode.com Created: 2022-11-03 Updated: 2022-11-03 Category: Protocol Operations
This GIP proposes the deployment of The Graph contracts on Arbitrum from the latest published version.
As mentioned in GIP-0031, there is an interest in the community to move to an L2 to benefit from gas savings, and Arbitrum is thought by many to be the best candidate at this time. It is desirable to move to L2 gradually, however, as Arbitrum is still in beta and such a big protocol change is not without risks. Therefore, we’ve proposed having an experimental stage where rewards are not distributed in L2.
We propose a gradual move to L2 by deploying the new L2 protocol in parallel to the existing L1 deployment. Initially, this new deployment would be experimental because indexing rewards would be disabled. Eventually, governance can enable reward distribution.
The L2 network will mostly work like the existing L1 network. Most of the contracts will be deployed with no functional changes, so staking and curation can be done in the same way as in L1. To participate in the L2 network, users can move GRT to L2 using the bridge proposed in GIP-0031, though future GIPs can propose ways to facilitate migration of staked tokens or subgraphs and curated signal.
We propose deploying the L2 in 3 stages, though this GIP is only about the deployment of the first stage:
This GIP propose the deployment of the updates described in GIP-0031 and GIP-0039 and giving an outline about the different stages.
Stage 1: L2 Bridge and Protocol Deployment
Stage 2: L2 Rewards
Most of the protocol contracts are the same as the ones deployed on Mainnet Ethereum. The only difference is that the GraphToken is upgradeable on L2 and adds a few more functions required by the L2 Bridge.
Having a functioning L2 requires the deployment of an L1-L2 Bridge that can move state over. The bridge is comprised of three contracts that are in charge of passing cross-chain messages and lock GRT. We propose deploying the L1GraphTokenGateway, Escrow and L2GraphTokenGateway and set them up as the canonical bridge for GRT. Please refer to GIP-0031 for more information.
Most of the L2 deployment can be performed using a deployer account with sufficient funds that will then transfer governance to the Council. However, certain actions require the intervention from the Council.
The Bridge is Paused by default when deployed, the Council will send a transaction to unpause when the deployer verifies that the configuration is complete. The Council signals the acceptance of the L2 deployment by accepting ownership of the contracts and unpausing the bridge.
This document is proposing the deployment of the work described in GIP-0031 and GIP-0039.
Please see the Related Work section for a full risk registry.
GIP-0031 has been audited by OpenZeppelin. You can find the audit report in the contracts repo.
The GIP-0031 code has been audited by a CodeArena bounty with no critical issues found.
The updates that this GIP propose to deploy has been tested in a private testnet using Goerli and Goerli Arbitrum Nitro according to a test plan developed by Edge & Node.
We will make public both the test plan and the contingency plan describing potential risks and failure modes.
Copyright and related rights waived via CC0.
GIP: 0031 Title: Arbitrum GRT bridge Authors: Pablo Carranza Velez pablo@edgeandnode.com Created: 2022-04-20 Updated: 2022-09-29 Discussions-To: https://forum.thegraph.com/t/gip-0031-arbitrum-grt-bridge/3305 Category: Protocol Logic, Protocol Interfaces Implementations: Original implementation was https://github.com/graphprotocol/contracts/pull/552 - superseded by https://github.com/graphprotocol/contracts/pull/699 Audits: Main report at https://github.com/graphprotocol/contracts/blob/a2a09a5aac15dd468d73f9c02618a74edafb0fff/audits/OpenZeppelin/2022-07-graph-arbitrum-bridge-audit.pdf - relevant issues summarized in https://github.com/graphprotocol/contracts/blob/a2a09a5aac15dd468d73f9c02618a74edafb0fff/audits/OpenZeppelin/2022-07-pr552-summary.pdf
GIP: 0039 Title: Curation v1.x Authors: Howard Heaton, Anirudh Patel Created: 2022-09-29 Updated: 2022-09-29 Category: Protocol Economics
Following the approval of this proposal, Stage 1 of the protocol deployment to Arbitrum One will be executed as described on GIP 0040.