Skip to content
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

☀️ Graph Horizon and Subgraph Service ☀️ #944

Open
wants to merge 386 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
386 commits
Select commit Hold shift + click to select a range
bc4aba1
chore: more linting
tmigone Jun 11, 2024
203a3b0
fix: require params change when calling set provision parameters
tmigone Jun 11, 2024
da34d9b
test: add tests for DataServicePausable
tmigone Jun 12, 2024
17d3b79
test: upgradeable contracts
tmigone Jun 12, 2024
54c4a39
test: more pausable
tmigone Jun 12, 2024
086a94c
test: add data service fees tests
tmigone Jun 13, 2024
6627b7d
fix: remove console import
tmigone Jun 14, 2024
b4f3285
Merge pull request #983 from graphprotocol/horizon-fixes
Maikol Jun 17, 2024
c4b4958
chore: refactor dispute manager tests
Maikol Jun 18, 2024
29dedff
chore: add register tests
Maikol Jun 19, 2024
f76fc3f
chore: use HorizonStaking instead of mock implementation
Maikol Jun 19, 2024
d448641
chore: add more subgraph service tests
Maikol Jun 20, 2024
826181c
chore: start allocation tests
Maikol Jun 20, 2024
215758a
chore: stop allocation tests started
Maikol Jun 21, 2024
cd77239
chore: stop allocation tests
Maikol Jun 25, 2024
6b99a6d
WIP
Maikol Jun 26, 2024
30973f1
chore: subgraph service unit tests
Maikol Jun 27, 2024
19cb287
fix: revert unit type change
Maikol Jun 27, 2024
f47cf91
Merge pull request #986 from graphprotocol/mde/subgraph-service-tests
Maikol Jun 27, 2024
0f366d2
fix: update subgraph endpoints to network and some linting
tmigone Aug 14, 2024
d025632
fix: add STUDIO_API_KEY to GitHub action
tmigone Aug 15, 2024
8345a1f
fix: missing env var declaration
tmigone Aug 15, 2024
5c5787a
ci: build packages individudally
tmigone Aug 15, 2024
4bdd237
fix: addToDelegationPool access control and token transfer (OZ C-01)
Maikol Aug 7, 2024
f4f9bad
fix: moved pull tokens and made addToDelegationPool open to all
Maikol Aug 13, 2024
a183d7e
fix: add subgraph service as a caller when collecting from curation c…
Maikol Aug 8, 2024
e0cf705
fix: subgraphService access controll (OZ C-04)
Maikol Aug 8, 2024
857f27b
fix: collecting other indexers query fees
Maikol Aug 9, 2024
0364b41
fix: renaming errors and variables
Maikol Aug 13, 2024
c783118
fix: resize only open allocations and access control (OZ C-05)
Maikol Aug 14, 2024
7876046
fix: change pending rewards due to resize to token amounts instead of…
tmigone Aug 15, 2024
7726b58
fix: pin smock version
tmigone Aug 15, 2024
d80a025
fix: ensure maxVerifierCut is a valid PPM
tmigone Aug 19, 2024
d7814ea
fix: use isvalidPPM
tmigone Aug 19, 2024
4c58b62
fix: cap slash amount to a stake snapshot percentage (OZ M-02)
tmigone Aug 23, 2024
94fe5a0
fix: early return in Staking withdraw (OZ M-03)
Maikol Aug 15, 2024
cab507f
fix: slashing reverts when exceeding provision balance (OZ M-05)
Maikol Aug 16, 2024
6697548
fix: revert when delegating, undelegating or withdrawing from an inva…
Maikol Aug 19, 2024
50a8fa3
fix: rename error
Maikol Aug 20, 2024
bdaa2c4
fix: check for shares thawing
Maikol Aug 20, 2024
3ab169b
fix: return tokens to delegator when bridging if the pool is invalid …
tmigone Aug 22, 2024
5a06dd8
fix: invalid pool detection
tmigone Aug 22, 2024
1650a91
fix: wip
tmigone Aug 20, 2024
afe8bbc
fix: calculation of shares when receiving delegation from l1 (OZ H-03)
tmigone Aug 20, 2024
7d1b2fb
test: add test for receivedelegation special case
tmigone Aug 22, 2024
4787e12
fix: remove subgraph service cut (OZ H-04)
tmigone Aug 21, 2024
0a9fe15
fix: prevent provisions from being overwritten if they exist (OZ H-05)
tmigone Aug 21, 2024
ab8f39b
fix: div by zero when delegating to a pool where all tokens are thawi…
tmigone Aug 21, 2024
61bf0ee
fix: remove white space from typehash calculation (OZ H-07)
tmigone Aug 22, 2024
11b7d44
fix: include rav metadata in signature verification (OZ H-08)
tmigone Aug 23, 2024
03ce865
fix: wip
tmigone Aug 23, 2024
dd6a007
fix: add fn to allow force closing stale allocations (OZ H-09)
tmigone Aug 23, 2024
7b7cff2
fix: timestamp instead of block number
tmigone Aug 23, 2024
36f9112
test: use skip instead of warp
tmigone Aug 23, 2024
41eb02b
fix: max verifier tokens calculation when slashing (OZ H-11)
tmigone Aug 23, 2024
b2bf070
fix: consider tokens allocated to legacy allos as not idle (OZ H-10)
tmigone Aug 23, 2024
b56567e
fix: make fisherman deposit a fixed value (OZ L-01)
Maikol Aug 20, 2024
dc3add0
fix: add max fisherman rewards cut (OZ L-02)
Maikol Aug 21, 2024
3aeb4b6
fix: make PaymentsEscrow upgradable and pausable (OZ L-03)
Maikol Aug 22, 2024
63f6ea1
fix: compute address and deploy using create2
Maikol Aug 22, 2024
d3f5ece
fix: use OpenZeppelin Address to transfer ETH (OZ L-04)
Maikol Aug 22, 2024
4d25fcd
fix: approve collector now increases allowance (OZ L-05)
Maikol Aug 22, 2024
1c6bb31
fix: inonsistent coding style (OZ L-06)
Maikol Aug 22, 2024
fb5956a
fix: missing validations (OZ L-07)
Maikol Aug 23, 2024
2a131ca
fix: missing or incorrect documentation (OZ L-08)
Maikol Aug 23, 2024
7436871
fix: gas inefficiencies (OZ L-09)
Maikol Aug 23, 2024
aa04aa8
fix: allow slashing even if SubgraphService is paused (OZ CR-01)
Maikol Aug 23, 2024
5f74009
WIP
Maikol Aug 23, 2024
1088e22
fix: close allocation when collecting rewards if over allocated (OZ C…
tmigone Aug 23, 2024
b71eca0
fix: remove old address from event (OZ C-01)
Maikol Aug 27, 2024
157bfc6
fix: updated variable description (OZ H-01)
Maikol Aug 27, 2024
99af0a6
fix: update upper bound for verifierCutRange (OZ H-02)
Maikol Aug 27, 2024
e2ac05d
fix: typo (OZ H-04)
Maikol Aug 27, 2024
d8bce8c
fix: encode _rav.metadata as keccak256 hash (OZ H-08)
Maikol Aug 27, 2024
58ba769
fix: remove unused import (OZ L-06)
Maikol Aug 27, 2024
ddbc4d2
fix: remove if conditions (OZ H-02)
Maikol Aug 28, 2024
63d2ba4
Subgraph Service - Unit tests (#1022)
Maikol Sep 9, 2024
4387c6c
test: wip refactor unit tests for staking fns (#1021)
tmigone Sep 9, 2024
282ea51
fix: add security contact to DisputeManager.sol
MoonBoi9001 Sep 17, 2024
491041b
fix: add security contact to GraphPayments.sol
MoonBoi9001 Sep 17, 2024
86fd039
fix: add security contact to HorizonStaking.sol
MoonBoi9001 Sep 17, 2024
5ea1fe9
fix: add security contact to HorizonStakingExtension.sol
MoonBoi9001 Sep 17, 2024
c269117
fix: add security contact to PaymentsEscrow.sol
MoonBoi9001 Sep 17, 2024
61a1544
fix: add security contact to SubgraphService.sol + add NatSpec before…
MoonBoi9001 Sep 17, 2024
d52be6d
fix: add security contact to TAPCollector.sol
MoonBoi9001 Sep 17, 2024
a58f807
fix: change EIP712_ALLOCATION_PROOF_TYPEHASH from variable to constan…
MoonBoi9001 Sep 18, 2024
516a4e3
fix: add override keyword in functions
MoonBoi9001 Sep 18, 2024
9dfb8b0
fix: remove unused return value. (OZ N-10)
MoonBoi9001 Sep 18, 2024
bd62e95
fix: remove unused return values from the Allocation library. (OZ N-10)
MoonBoi9001 Sep 18, 2024
ffe9b89
fix: address magic number use. (OZ N-11)
MoonBoi9001 Sep 18, 2024
374f57d
fix: typographical errors throughout codebase. (OZ N-07)
MoonBoi9001 Sep 19, 2024
79f7828
fix: reorder parameter use in mulPPM function call in mulPPMRoundUp. …
MoonBoi9001 Sep 19, 2024
54286e3
Merge pull request #1040 from graphprotocol/fix_oz_n-10
MoonBoi9001 Sep 19, 2024
0438f62
Merge pull request #1037 from graphprotocol/fix_oz_n-07
MoonBoi9001 Sep 19, 2024
613d7f3
Merge pull request #1043 from graphprotocol/fix_oz_n-12
MoonBoi9001 Sep 19, 2024
4354737
fix: only add to delegation pool if shares is greater than 0 (#1031)
Maikol Sep 19, 2024
fe380e4
fix(SubgraphService): use correct payment type for collect indexing r…
Maikol Sep 19, 2024
95b3f83
fix(Horizon): only allow addToDelegationPool if provision exists and …
Maikol Sep 19, 2024
f2a5498
Merge pull request #1039 from graphprotocol/fix_oz_n-09
MoonBoi9001 Sep 20, 2024
ff7a0ed
Merge pull request #1035 from graphprotocol/fix_oz_n-06
MoonBoi9001 Sep 20, 2024
76e4940
fix: update constant names. (OZ N-11)
MoonBoi9001 Sep 20, 2024
3bdaec6
chore: add stakeToFeesRatio to SubgraphService initialize (#1027)
Maikol Sep 20, 2024
51dd7a8
chore(SubgraphService): add Multicall to SubgraphService (#1030)
Maikol Sep 20, 2024
08539af
fix(SubgraphService): allow collecting rewards when delegation fee cu…
Maikol Sep 20, 2024
3e57ba3
chore(SubgraphService): add current epoch to IndexingRewardsCollected…
Maikol Sep 20, 2024
8912125
Update packages/horizon/contracts/data-service/utilities/ProvisionMan…
MoonBoi9001 Sep 20, 2024
cf2109f
fix: remove unused errors, use LegacyAllocationAlreadyMigrated to pre…
MoonBoi9001 Sep 24, 2024
4ad1ccd
fix: releaseStake n parameter changed to numClaimsToRelease.
MoonBoi9001 Sep 20, 2024
d90b971
fix: function _setPartialPaused(bool _toPause) chnaged to function _s…
MoonBoi9001 Sep 20, 2024
9d819ef
fix: lastPausePartialTime now lastPartialPauseTime..
MoonBoi9001 Sep 20, 2024
2d69d2a
fix: acceptProvision updated to acceptProvisionPendingParameters
MoonBoi9001 Sep 20, 2024
a4ba0ab
fix: rename staged to pending.
MoonBoi9001 Sep 20, 2024
76bedb3
fix: rename maxVerifierCut to newMaxVerifierCut and thawingPeriod to …
MoonBoi9001 Sep 20, 2024
faafe82
fix: onlyProvisionAuthorized now onlyAuthorizedForProvision.
MoonBoi9001 Sep 20, 2024
e73cb44
fix: ProvisionAccepted now ProvisionPendingParametersAccepted.
MoonBoi9001 Sep 20, 2024
69e1971
fix: releaseAt updated to releasableAt
MoonBoi9001 Sep 20, 2024
78821ab
fix: "Resolve the conflicting dispute" updated to "Draw the conflicti…
MoonBoi9001 Sep 20, 2024
99d9bba
fix: MAX_THAWING_PERIOD rename to MAX_WAIT_PERIOD in PaymentsEscrow a…
MoonBoi9001 Sep 20, 2024
9503f1d
fix: challenger and submitter updated to fisherman.
MoonBoi9001 Sep 20, 2024
2729a37
fix: use new constants in subgraphservice.sol
MoonBoi9001 Sep 30, 2024
f8e39df
Merge branch 'horizon' into fix_oz_n-11
MoonBoi9001 Sep 30, 2024
aa27c54
fix: emit amount authorized + rescuded token in AuthorizedCollector/T…
MoonBoi9001 Sep 30, 2024
8ce493f
fix: direct bugs to new security contact email address.
MoonBoi9001 Oct 1, 2024
b721f72
fix: set _verifyAllocationProof visability private.
MoonBoi9001 Oct 1, 2024
fbc6654
fix: set _getDelegatedTokensAvailable visability private.
MoonBoi9001 Oct 1, 2024
decde7f
fix: set _receiveIndexerStake _receiveDelegation visability private.
MoonBoi9001 Oct 1, 2024
b5d3a7d
fix: set _deposit visability private.
MoonBoi9001 Oct 1, 2024
32b3965
fix: set drawDispute visability external.
MoonBoi9001 Oct 1, 2024
157216a
Merge pull request #1028 from graphprotocol/fix_oz_n-03
MoonBoi9001 Oct 1, 2024
96b5c3c
fix: emit both amount authorized and total authorized
MoonBoi9001 Sep 30, 2024
a598eca
fix: set all ProvisionManager constants internal.
MoonBoi9001 Oct 1, 2024
de6c822
fix: remove ProvisionManager inheritance.
MoonBoi9001 Oct 1, 2024
ffd1f79
fix: remove whitespace.
MoonBoi9001 Oct 1, 2024
3a51379
Merge pull request #1041 from graphprotocol/fix_oz_n-11
MoonBoi9001 Oct 1, 2024
f86b12a
feat(horizon): deploy horizon with Hardhat Ignition (#1025)
tmigone Oct 1, 2024
2f3a5e0
chore(Horizon): reprovision only tokens thawed (#1046)
Maikol Oct 1, 2024
fe9d605
chore(SubgraphService): allow force closing over allocated allocation…
Maikol Oct 1, 2024
41f85c8
Merge pull request #1051 from graphprotocol/fix_oz_n-16
MoonBoi9001 Oct 2, 2024
e33bf12
fix: revert DisputeManager.sol to previous state
MoonBoi9001 Oct 2, 2024
2b79a69
fix(Horizon): graph directory test (#1054)
Maikol Oct 2, 2024
31d57b2
Merge pull request #1047 from graphprotocol/fix_oz_n-13
MoonBoi9001 Oct 2, 2024
dcbcf7e
fix: fix broken test
MoonBoi9001 Oct 2, 2024
d459928
Update packages/horizon/contracts/data-service/interfaces/IDataServic…
MoonBoi9001 Oct 2, 2024
8be58f9
Merge pull request #1049 from graphprotocol/fix_oz_n-14
MoonBoi9001 Oct 2, 2024
570b21e
chore(Horizon): add a beneficiary address to undelegate (#1052)
Maikol Oct 2, 2024
4e41890
feat: remove transfer tools from horizon (#1053)
tmigone Oct 3, 2024
2284a3d
fix(Horizon): add input validation for set provision parameters (#1055)
Maikol Oct 3, 2024
f88f335
feat: add rav collected event (#1056)
tmigone Oct 4, 2024
e40c8fe
fix(Horizon): withdraw delegation with beneficiary test fix (#1057)
Maikol Oct 7, 2024
8b3a86b
fix: apply consistent mapping order HorizonStakingNotAuthorized (OZ_N…
MoonBoi9001 Oct 3, 2024
fa9da60
fix: apply consistent mapping order ProvisionManagerNotAuthorized (OZ…
MoonBoi9001 Oct 4, 2024
b75154c
fix: apply consistent mapping order isAuthorized (OZ_N-05)
MoonBoi9001 Oct 4, 2024
cc14383
fix: apply consistent mapping order _isAuthorized (OZ_N-05)
MoonBoi9001 Oct 4, 2024
6af9e66
fix: apply consistent mapping order isAuthorized (OZ_N-05)
MoonBoi9001 Oct 4, 2024
ac965cd
fix: apply consistent mapping order _operatorAuth (OZ_N-05)
MoonBoi9001 Oct 3, 2024
68157c0
fix: swap peram order _getStorage_OperatorAuth
MoonBoi9001 Oct 4, 2024
1693d76
fix: set new peram order various functions (OZ_N-05)
MoonBoi9001 Oct 7, 2024
0f1522d
Update packages/horizon/contracts/data-service/utilities/ProvisionMan…
MoonBoi9001 Oct 7, 2024
a76a0d6
feat: separate escrow accounts for each collector (#1058)
tmigone Oct 8, 2024
f0294b0
Merge pull request #1034 from graphprotocol/fix_oz_n-05
MoonBoi9001 Oct 9, 2024
7035403
fix: tweaks to thawing pool management (#1048)
tmigone Oct 9, 2024
0f5ba68
chore(Horizon): add redelegate option (#1059)
Maikol Oct 9, 2024
36b81e3
fix: delegation withdraw test and typo in subgraph test name
Maikol Oct 10, 2024
516ac3c
chore: added unit tests for PPMMath
Maikol Oct 10, 2024
971a5c5
chore: added unit tests for TAPCollector
Maikol Oct 10, 2024
504fff1
chore(Horizon): add signers to TAPCollector (#1060)
Maikol Oct 11, 2024
0c0d090
fix: lint errors
Maikol Oct 11, 2024
5876cd5
fix: added missing parameters to deploy script and reduced runs to 50…
Maikol Oct 17, 2024
a256d74
fix: change foundry to use 50 runs for optimization
Maikol Oct 17, 2024
ba40a74
chore: bump ignition version to 0.15.7
tmigone Nov 14, 2024
4f0a479
chore: bump ignition in subgraph service package
tmigone Nov 14, 2024
9ae3410
chore: use hardhat-secure-accounts for non local chains
tmigone Nov 15, 2024
13ea6ca
feat: add gre/sdk with support for horizon
tmigone Nov 20, 2024
4111600
feat(gre): working version for horizon with legacy contracts
tmigone Nov 21, 2024
42b43b6
feat: gre now loads all horizon contracts
tmigone Nov 22, 2024
a99e216
fix: couple fixes and tweaks
tmigone Nov 22, 2024
6f67600
chore: bump hardhat ignition to 0.15.8
tmigone Nov 22, 2024
b234104
chore: remove deploy files
tmigone Nov 22, 2024
a475c4a
chore: move files and fix test
tmigone Nov 22, 2024
cdf3fb4
feat: add subgraph service to gre
tmigone Nov 22, 2024
4fa4f57
chore: hardcode ignition config
tmigone Nov 25, 2024
e5dc797
fix: update all ignition packages
tmigone Nov 26, 2024
1ce1a17
ci: fix circular dependency in build stage
tmigone Nov 26, 2024
5026fbb
fix: build scripts
tmigone Nov 26, 2024
8f3e0f1
fix: build steps
tmigone Nov 26, 2024
c8efe89
fix: prevent payers from being able to bypass escrow mechanism (TRST-…
tmigone Nov 26, 2024
ce749be
fix: separate delegation and provision thaw request lists (TRST-H02)
Maikol Nov 28, 2024
9dc58d0
fix: disallow signers to be authorized for different payers (TRST-M10)
tmigone Nov 27, 2024
65f4d68
fix: remove collector allowance feature from payments escrow (TRST-CL1)
tmigone Nov 27, 2024
86b998b
fix: make getBalance return 0 if balance is less than thawing amount …
tmigone Nov 27, 2024
a9bf99c
fix: allow partially collecting RAVs (TRST-M05)
tmigone Nov 27, 2024
670fba7
fix: subgraph service test broke after rebase
tmigone Nov 28, 2024
7efedcc
fix: overallocated condition no longer allows force closing (TRST-H05)
tmigone Nov 28, 2024
9a9f53b
fix: use staking contract to check for allo collision (TRST-M06)
tmigone Nov 29, 2024
d02f410
fix: separate delegation and delegationWithBeneficiary thaw requests …
Maikol Nov 29, 2024
167055a
fix: round down tokens thawing when slashing (TRST-H04)
Maikol Dec 2, 2024
4d75947
fix: dispute manager refactor (TRST-M07 / TRST-M08)
tmigone Nov 29, 2024
def8026
fix: ignore thawing tokens on provision token check (TRST-L13)
tmigone Dec 3, 2024
2e10813
fix: clarify data service initialization modes (TRST-L01)
tmigone Dec 3, 2024
2bf4456
fix: verify state transition for tap collector thawing signers (TRST-…
tmigone Dec 3, 2024
abe3321
fix: add legacy slasher for transition period (TRST-H06)
Maikol Dec 3, 2024
63ee9ed
fix: verify state transition for pause guardian (TRST-R03)
tmigone Dec 3, 2024
194b603
fix: add storage gap to upgradeable contract (TRST-R04)
tmigone Dec 4, 2024
29ed2e6
fix: allow setting pause guardian when paused (TRST-R05)
tmigone Dec 4, 2024
c8ede7a
fix: clarify initialization needs for data service extensions (TRST-R06)
tmigone Dec 4, 2024
f254897
fix: add missing legacy withdraw delegated (TRST-H07)
Maikol Dec 4, 2024
91cda56
fix: added minimum delegation for provisions (TRST-M03)
Maikol Dec 4, 2024
07ef418
fix: operator check in closeAllocation (TRST-M12)
Maikol Dec 4, 2024
26e4dc7
fix: getThawedTokens calculation (TRST-L03)
Maikol Dec 4, 2024
c9f8a2f
fix: documentation on unstake (TRST-M11)
Maikol Dec 4, 2024
9271b99
fix: remove unused value from event (TRST-R01)
Maikol Dec 4, 2024
151e63a
fix: round thawing shares up (TRST-R07)
Maikol Dec 5, 2024
4d62209
fix: remove redundant non-zero check (TRST-R09)
Maikol Dec 5, 2024
6e5a295
fix: check shares are not zero when creating a thaw request (TRST-R14)
Maikol Dec 5, 2024
d9c6190
fix: move legacyWithdrawDelegated to withdrawDelegated (TRST-H07)
Maikol Dec 6, 2024
161f8a2
fix: added comment for stack too deep solution
Maikol Dec 6, 2024
43bc72b
fix: added comment to explain minimum delegation (TRST-M03)
Maikol Dec 6, 2024
c59c186
fix: new event for minimum delegation not met (TRST-M03)
Maikol Dec 6, 2024
d1c5cc7
fix: add a new mapping instead of splitting thaw requests (TRST-H02)
Maikol Dec 6, 2024
0a31b58
fix: ensure subgraph service is set before using it (TRST-R10)
tmigone Dec 9, 2024
85de5bd
fix: documentation error (TRST-R09)
tmigone Dec 9, 2024
6ec9710
docs: add missing return value documentation (TRST-R)
tmigone Dec 9, 2024
6e00d17
docs: fix documentation errors (TRST-R09)
tmigone Dec 9, 2024
a065804
fix: refactor payments cut distribution (TRST-L12)
tmigone Dec 10, 2024
25d22e4
fix: added new function for accept dispute in conflict that includes …
Maikol Dec 13, 2024
dc79bd4
fix: add payer to EIP712 rav type hash (TRST-M15)
Maikol Dec 13, 2024
4ba215c
fix: accept dispute documentation
Maikol Dec 16, 2024
d6d376c
fix: legacy slashing underflow (TRST-H08)
Maikol Dec 12, 2024
7d90ad2
fix: underflow in getIdleStake (TRST-L14)
Maikol Dec 12, 2024
57aea44
fix: added thaw request type to thaw request fulfilled event (TRST-R15)
Maikol Dec 12, 2024
bbd23f5
fix: add minimum tokens amount for undelegate with beneficiary (TRST-…
Maikol Dec 13, 2024
399b7a9
fix: natspec for new undelegate error
Maikol Dec 13, 2024
032e4a4
Merge pull request #1073 from graphprotocol/mde/trust-staking-fixes
tmigone Dec 17, 2024
0542ab7
Merge branch 'horizon' into tmigone/trust-fixes-payments
tmigone Dec 17, 2024
1109537
Merge pull request #1072 from graphprotocol/tmigone/trust-fixes-payments
tmigone Dec 17, 2024
4a25bab
Merge branch 'horizon' into tmigone/trust-fixes-data-service
tmigone Dec 17, 2024
8e1144c
Merge pull request #1076 from graphprotocol/tmigone/trust-fixes-data-…
tmigone Dec 17, 2024
ac8a071
Merge branch 'horizon' into tmigone/trust-fixes-subgraph-service
tmigone Dec 17, 2024
2fbe0e1
Merge pull request #1074 from graphprotocol/tmigone/trust-fixes-subgr…
tmigone Dec 17, 2024
8aa05c4
Merge branch 'horizon' into tmigone/trust-fixes-dispute-manager
tmigone Dec 17, 2024
a228e0e
Merge pull request #1075 from graphprotocol/tmigone/trust-fixes-dispu…
tmigone Dec 17, 2024
2b03618
Merge branch 'horizon' into mde/horizon-and-subgrah-service-deploy-fix
tmigone Dec 17, 2024
0f2100d
Merge pull request #1062 from graphprotocol/mde/horizon-and-subgrah-s…
tmigone Dec 17, 2024
b1c1f8e
Merge branch 'horizon' into tmigone/update-hsa
tmigone Dec 17, 2024
27afeb8
Merge pull request #1070 from graphprotocol/tmigone/update-hsa
tmigone Dec 17, 2024
cd24658
Merge branch 'horizon' into tmigone/ignition-v0.15.7
tmigone Dec 17, 2024
170572f
Merge pull request #1069 from graphprotocol/tmigone/ignition-v0.15.7
tmigone Dec 17, 2024
58c518c
Merge branch 'horizon' into horizon-gre
tmigone Dec 17, 2024
468ed2c
Merge pull request #1071 from graphprotocol/horizon-gre
tmigone Dec 17, 2024
1038cf4
fix: use min delegation for SubgraphService tests (#1080)
Maikol Dec 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 2 additions & 3 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ runs:
using: composite

steps:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Enable corepack for modern yarn
shell: bash
run: corepack enable
Expand All @@ -15,6 +17,3 @@ runs:
- name: Install dependencies
shell: bash
run: yarn --immutable
- name: Build
shell: bash
run: yarn build || yarn build
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Build

env:
CI: true
STUDIO_API_KEY: ${{ secrets.STUDIO_API_KEY }}

on:
push:
Expand All @@ -16,5 +17,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
uses: ./.github/actions/setup
- name: Build
run: yarn build || yarn build
6 changes: 6 additions & 0 deletions .github/workflows/ci-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- name: Build
run: |
pushd packages/contracts
yarn build || yarn build
- name: Run tests
run: |
pushd packages/contracts
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci-data-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@ jobs:
uses: actions/checkout@v4
- name: Set up environment
uses: ./.github/actions/setup
- name: Build
run: |
pushd packages/data-edge
yarn build
- name: Run tests
run: yarn test
50 changes: 50 additions & 0 deletions .github/workflows/ci-horizon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI - packages/horizon

env:
CI: true

on:
push:
branches: "*"
paths:
- packages/horizon/**
pull_request:
branches: "*"
paths:
- packages/horizon/**
workflow_dispatch:

jobs:
test-ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- name: Build contracts
run: |
pushd packages/contracts
yarn build
popd
- name: Build horizon
run: |
pushd packages/horizon
yarn build
popd
- name: Build subgraph service
run: |
pushd packages/subgraph-service
yarn build
popd
- name: Build hardhat-graph-protocol
run: |
pushd packages/hardhat-graph-protocol
yarn build
popd
- name: Run tests
run: |
pushd packages/horizon
yarn test
34 changes: 34 additions & 0 deletions .github/workflows/ci-subgraph-service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI - packages/subgraph-service

env:
CI: true

on:
push:
branches: "*"
paths:
- packages/subgraph-service/**
pull_request:
branches: "*"
paths:
- packages/subgraph-service/**
workflow_dispatch:

jobs:
test-ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- name: Build
run: |
pushd packages/subgraph-service
yarn build
- name: Run tests
run: |
pushd packages/subgraph-service
yarn test
11 changes: 10 additions & 1 deletion .github/workflows/ci-token-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: CI - packages/token-distribution

env:
CI: true
STUDIO_API_KEY: ${{ secrets.STUDIO_API_KEY }}

on:
push:
Expand All @@ -20,7 +21,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- name: Build
run: |
pushd packages/token-distribution
yarn build
- name: Run tests
run: yarn test
run: |
pushd packages/token-distribution
yarn test
6 changes: 6 additions & 0 deletions .github/workflows/e2e-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- name: Build
run: |
pushd packages/contracts
yarn build || yarn build
- name: Run e2e tests
run: |
git clone https://github.com/OffchainLabs/nitro-testnode/
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- name: Publish 🚀
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/verifydeployed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup

- name: Compile contracts
run: yarn build
- name: Build
run: |
pushd packages/contracts
yarn build || yarn build

- name: Save build artifacts
uses: actions/upload-artifact@v3
Expand All @@ -48,6 +52,10 @@ jobs:
uses: actions/checkout@v3
- name: Set up environment
uses: ./.github/actions/setup
- name: Build
run: |
pushd packages/contracts
yarn build || yarn build
- name: Get build artifacts
uses: actions/download-artifact@v3
with:
Expand Down
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ cached/
# Build artifacts
dist/
build/
typechain/
typechain-types/
deployments/hardhat/

# Ignore solc bin output
Expand All @@ -45,8 +47,14 @@ addresses-fork.json
# Keys
.keystore

# Forge artifacts
cache_forge
# Graph client
.graphclient

tx-builder-*.json
!tx-builder-template.json
!tx-builder-template.json

# Hardhat Ignition
**/chain-31337/
!**/ignition/**/artifacts/
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[submodule "packages/subgraph-service/lib/forge-std"]
path = packages/subgraph-service/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "packages/horizon/lib/forge-std"]
path = packages/horizon/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "packages/horizon/lib/openzeppelin-foundry-upgrades"]
path = packages/horizon/lib/openzeppelin-foundry-upgrades
url = https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades
[submodule "packages/subgraph-service/lib/openzeppelin-foundry-upgrades"]
path = packages/subgraph-service/lib/openzeppelin-foundry-upgrades
url = https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades
12 changes: 11 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@ pushd packages/contracts
npx --no-install lint-staged
popd

# subgraph service
pushd packages/subgraph-service
npx --no-install lint-staged
popd

# data-edge
pushd packages/data-edge
npx --no-install lint-staged
popd
popd

# graph horizon
pushd packages/horizon
npx --no-install lint-staged
popd
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ This repository is a Yarn workspaces monorepo containing the following packages:
| --- | --- | --- |
| [contracts](./packages/contracts) | [![npm version](https://badge.fury.io/js/@graphprotocol%2Fcontracts.svg)](https://badge.fury.io/js/@graphprotocol%2Fcontracts) | Contracts enabling the open and permissionless decentralized network known as The Graph protocol. |
| [eslint-graph-config](./packages/eslint-graph-config) | [![npm version]()]() | Shared linting and formatting rules for TypeScript projects. |
| [token-distribution](./packages/token-distribution) | - | Contracts managing token locks for network participants |
| [horizon](./packages/horizon) | [![npm version]()]() | Contracts for Graph Horizon, the next iteration of The Graph protocol. |
| [sdk](./packages/sdk) | [![npm version](https://badge.fury.io/js/@graphprotocol%2Fsdk.svg)](https://badge.fury.io/js/@graphprotocol%2Fsdk) | TypeScript based SDK to interact with the protocol contracts |
| [solhint-graph-config](./packages/eslint-graph-config) | [![npm version]()]() | Shared linting and formatting rules for Solidity projects. |
| [solhint-graph-config](./packages/solhint-graph-config) | [![npm version]()]() | Shared linting and formatting rules for Solidity projects. |
| [solhint-plugin-graph](./packages/solhint-plugin-graph) | [![npm version]()]() | Plugin for Solhint with specific Graph linting rules. |
| [subgraph-service](./packages/subgraph-service) | [![npm version]()]() | Contracts for the Subgraph data service in Graph Horizon. |
| [token-distribution](./packages/token-distribution) | - | Contracts managing token locks for network participants |


## Development
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@
"packages/contracts",
"packages/data-edge",
"packages/eslint-graph-config",
"packages/hardhat-graph-protocol",
"packages/horizon",
"packages/sdk",
"packages/solhint-graph-config",
"packages/solhint-plugin-graph",
"packages/subgraph-service",
"packages/token-distribution"
],
"scripts": {
"postinstall": "husky install",
"clean": "yarn workspaces foreach --all --parallel --verbose run clean",
"clean:all": "yarn clean && rm -rf node_modules packages/*/node_modules",
"build": "yarn workspaces foreach --all --verbose run build",
"build": "chmod +x ./scripts/build && ./scripts/build",
"lint": "yarn workspaces foreach --all --parallel --verbose run lint",
"test": "yarn workspaces foreach --all --parallel --verbose --interlaced run test"
},
Expand Down
14 changes: 0 additions & 14 deletions packages/contracts/.solhint.json

This file was deleted.

8 changes: 0 additions & 8 deletions packages/contracts/.solhintignore

This file was deleted.

6 changes: 6 additions & 0 deletions packages/contracts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @graphprotocol/contracts

## 7.0.0

### Major Changes

- 9686ce1: Add Horizon staking interface
tmigone marked this conversation as resolved.
Show resolved Hide resolved

## 6.2.1

### Patch Changes
Expand Down
5 changes: 5 additions & 0 deletions packages/contracts/contracts/arbitrum/Arbitrum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Arbitrum contracts

These contracts have been copied from the [Arbitrum repo](https://github.com/OffchainLabs/arbitrum).

They are also available as part of the npm packages [arb-bridge-eth](https://www.npmjs.com/package/arb-bridge-eth) and [arb-bridge-peripherals](https://www.npmjs.com/package/arb-bridge-peripherals). The reason for copying them rather than installing those packages is the contracts only support Solidity `^0.6.11`, so we had to change the version to `^0.7.6` for it to be compatible with our other contracts.
Loading
Loading