Closed manumonti closed 2 years ago
There were already some format changes in a recent commit (see https://github.com/threshold-network/subgraph/commit/525e470b04a8f71670fa6a29df5f687c8934a203). This PR shouldn't try to reintroduce the old format, unless that's agreed with @r-czajkowski. Ideally, this should be part of a linter pre-commit strategy, rather than changes within PRs, which make review more difficult and noisy
There were already some format changes in a recent commit (see 525e470). This PR shouldn't try to reintroduce the old format, unless that's agreed with @r-czajkowski. Ideally, this should be part of a linter pre-commit strategy, rather than changes within PRs, which make review more difficult and noisy
Done!
I don't want to be a blocker here so approving this PR. I left my concerns here and maybe we should consider removing the
stakes
fromEpoch
entity(ofc if at all possible) and findEpochStakes
between dates by query in a script that will l generate a merkle tree.
I'm not sure if I'm understanding well, or if it's better in terms of performace to have the EpochStakes
saved in subgraph or to calculate them with a script. But we can discuss this in other PR if you're ok with it.
GraphQL schema changes:
Singleton
have been replaced byepoch-counter
to have a more meaningful name.staking provider address
andamount
.participation
andstakeData
fields have been removed to avoid redundant data.timestamp
. The total amount of token staked in a epoch entity is saved intotalAmount
field (previouslytotalStaked
).Src files changes: