nucypher / nucypher-contracts

Ethereum contracts supporting TACo applications on the Threshold Network.
16 stars 11 forks source link

Optimized Participant Views #231

Closed KPrasch closed 7 months ago

KPrasch commented 7 months ago
Notes

Requires downstream changes https://github.com/nucypher/nucypher/pull/3419

vzotova commented 7 months ago

general question regarding those optimizations: would this add at any moment call for data in a loop? Why I'm asking - similar task was with getActiveStakikingProviders and in the result best outcome was with less calls as possible

piotr-roslaniec commented 7 months ago

Note: I don't see any breaking changes for taco-web

theref commented 7 months ago

Could we clean up the commit history? i think a bunch of these can be squashed together - then it looks good to go

derekpierre commented 7 months ago

Could we clean up the commit history? i think a bunch of these can be squashed together - then it looks good to go

I cleaned up some of the extra linting commits - it's a little tricky doing more than that because the commits are very specific, and there was a bit of winding journey (😄 ) that would get lost as part of a squashing which I don't think we want to lose because context would be lost.

cygnusv commented 7 months ago

Could we clean up the commit history? i think a bunch of these can be squashed together - then it looks good to go

I cleaned up some of the extra linting commits - it's a little tricky doing more than that because the commits are very specific, and there was a bit of winding journey (😄 ) that would get lost as part of a squashing which I don't think we want to lose because context would be lost.

Yeah, the journey is important. Unless the commit history is particularly messy, I'd prefer not to squash it.

derekpierre commented 7 months ago

Note: I don't see any breaking changes for taco-web

@piotr-roslaniec while there isn't a breaking change for taco-web, there should be a change to how participants are obtained. This call, https://github.com/nucypher/taco-web/blob/main/packages/shared/src/contracts/agents/coordinator.ts#L54C44-L54C59, should now either be:

coordinator.getParticipants(ritualId, 0, 0, False);

to get all participants without paging

OR you can implement paging logic similar to what nucypher does - https://github.com/nucypher/nucypher/pull/3419/files#diff-911a370c18d0d0e3ea62099fc5ff6daa16915da19cf5399f24e404b7d8d6d168R712 - with transcript False as well.

Filed https://github.com/nucypher/taco-web/issues/485