Skip to content

feat: transfer of subgraphs and curation to L2 through GNS #585

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 95 commits into from
May 24, 2023

Conversation

pcarranzav
Copy link
Member

@pcarranzav pcarranzav commented Jun 27, 2022

GIP pending.

This PR would be part of the third stage of The Graph's migration to Arbitrum.

It does the following:

  • Add an L1GNS and L2GNS (replacing GNS on each layer), with helper functions to send a subgraph from L1 to L2 with the owner's curation signal.
  • L1GNS can also send specific curators' balances for migrated subgraphs to L2 through the bridge.
  • L2Curation replaces Curation in L2, removing the bonding curve logic as reserve ratio in L2 is meant to be always 1 (i.e. a flat curve).
  • QA improvements across affected files: using explicit imports, re-ordering functions to follow the Solidity style guide, and some gas efficiency changes (e.g. using != 0 instead of > 0 where appropriate)

See GIP-0046 for details: https://forum.thegraph.com/t/gip-0046-l2-migration-helpers/4023

@pcarranzav pcarranzav changed the title (experimental) migration of subgraphs to L2 through GNS (WIP/experimental) migration of subgraphs to L2 through GNS Jun 27, 2022
@pcarranzav pcarranzav force-pushed the pcv/l2-gns-migration branch from 7582e12 to c8e1a5e Compare June 27, 2022 16:50
@codecov
Copy link

codecov bot commented Jun 27, 2022

Codecov Report

Patch coverage: 99.44% and project coverage change: +1.84 🎉

Comparison is base (02eedcf) 91.68% compared to head (f1d2599) 93.52%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #585      +/-   ##
==========================================
+ Coverage   91.68%   93.52%   +1.84%     
==========================================
  Files          40       44       +4     
  Lines        1997     2256     +259     
  Branches      359      401      +42     
==========================================
+ Hits         1831     2110     +279     
+ Misses        166      146      -20     
Flag Coverage Δ
unittests 93.52% <99.44%> (+1.84%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
contracts/gateway/L1GraphTokenGateway.sol 100.00% <ø> (ø)
contracts/l2/gateway/L2GraphTokenGateway.sol 100.00% <ø> (ø)
contracts/discovery/GNS.sol 98.98% <97.40%> (+9.79%) ⬆️
contracts/curation/Curation.sol 100.00% <100.00%> (ø)
contracts/discovery/L1GNS.sol 100.00% <100.00%> (ø)
contracts/governance/Managed.sol 98.24% <100.00%> (+3.70%) ⬆️
contracts/l2/curation/L2Curation.sol 100.00% <100.00%> (ø)
contracts/l2/discovery/L2GNS.sol 100.00% <100.00%> (ø)
contracts/tests/LegacyGNSMock.sol 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pcarranzav pcarranzav force-pushed the pcv/drip-issuance-reward branch 4 times, most recently from b657902 to 29b8373 Compare July 15, 2022 12:22
@pcarranzav pcarranzav force-pushed the pcv/l2-gns-migration branch from 2ff64f5 to ba916b7 Compare July 15, 2022 12:52
@pcarranzav pcarranzav force-pushed the pcv/drip-issuance-reward branch 2 times, most recently from 1b4987b to 1a6df5d Compare July 28, 2022 14:07
@pcarranzav pcarranzav force-pushed the pcv/l2-gns-migration branch from 46554b0 to fb51ae4 Compare August 26, 2022 15:58
@pcarranzav pcarranzav changed the base branch from pcv/drip-issuance-reward to pcv/582-n02-explicit-imports August 26, 2022 16:01
Base automatically changed from pcv/582-n02-explicit-imports to pcv/drip-issuance-reward September 2, 2022 13:57
Base automatically changed from pcv/drip-issuance-reward to pcv/arb-bridge September 2, 2022 18:34
@pcarranzav pcarranzav changed the base branch from pcv/arb-bridge to pcv/l2-bridge September 16, 2022 20:30
@pcarranzav pcarranzav force-pushed the pcv/l2-gns-migration branch from 26b1032 to 5c7ec9d Compare October 14, 2022 19:18
@pcarranzav pcarranzav force-pushed the pcv/l2-gns-migration branch from 47062d2 to 88eea47 Compare October 27, 2022 20:02
@pcarranzav pcarranzav changed the base branch from pcv/l2-bridge to pcv/c4-699-qa October 27, 2022 20:03
@pcarranzav pcarranzav force-pushed the pcv/l2-gns-migration branch 2 times, most recently from 6f8c2ab to 0eb1703 Compare November 2, 2022 13:58
@pcarranzav pcarranzav changed the base branch from pcv/c4-699-qa to pcv/fix-bridge-callhook-data November 4, 2022 14:27
@socket-security
Copy link

socket-security bot commented Nov 8, 2022

No dependency changes detected. Learn more about Socket for GitHub ↗︎


👍 No dependency changes detected in pull request

Pull request alert summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

@pcarranzav pcarranzav changed the base branch from pcv/fix-bridge-callhook-data to l2-public-testnet November 10, 2022 17:51
@pcarranzav pcarranzav changed the title (WIP/experimental) migration of subgraphs to L2 through GNS feat: migration of subgraphs to L2 through GNS Nov 18, 2022
@pcarranzav pcarranzav marked this pull request as ready for review November 18, 2022 08:52
Base automatically changed from l2-public-testnet to pcv/l2-bridge November 23, 2022 22:41
tmigone
tmigone previously approved these changes Feb 16, 2023
abarmat
abarmat previously approved these changes May 23, 2023
@pcarranzav pcarranzav changed the title feat: migration of subgraphs to L2 through GNS feat: transfer of subgraphs and curation to L2 through GNS May 23, 2023
@pcarranzav pcarranzav merged commit 97219a2 into dev May 24, 2023
@pcarranzav pcarranzav deleted the pcv/l2-gns-migration branch May 24, 2023 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants