threshold-network / staking-subgraphs

Threshold Network staking subgraphs
https://threshold.network
1 stars 1 forks source link

Cleanup Epoch and EpochStake schemas' entities #8

Closed manumonti closed 2 years ago

manumonti commented 2 years ago

GraphQL schema changes:

Src files changes:

cygnusv commented 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

manumonti commented 2 years ago

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!

manumonti commented 2 years ago

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 from Epoch entity(ofc if at all possible) and find EpochStakes 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.