poanetwork / poa-dapps-voting

POA Network Governance Dapp
https://voting.poa.network
GNU General Public License v3.0
26 stars 54 forks source link

(Showstopper) Sokol network keeps loading #132

Closed rstormsf closed 6 years ago

rstormsf commented 6 years ago

For some reason, it doesn't always load the Sokol Voting Dapp. Need investigation and finding the root cause and possible bug fixed.

Hypothesis is that there are probably incorrect implementation of handling event loading. There are quite a few already and the App cannot process them all on time.

I can't load the app at all on Sokol

rstormsf commented 6 years ago

Seems like the issue was with public RPC url....works fine now

phahulin commented 6 years ago

Though I can't reproduce it now and don't observe increased cpu/memory usage in the past 24 hours, I noticed in metamask logs that voting dapp on sokol makes about 900 requests while loading. Probably when there is additional load on the network, their combined effect impacts performance. It's also possible that cloudflare limits requests to that endpoint.

As I undetstand by default all ballots are displayed, maybe display only active ones?

vbaranov commented 6 years ago

As I undetstand by default all ballots are displayed, maybe display only active ones?

It will mitigate. I believe, mostly active ballots are interesting for validators. I support this suggestion. Also, we could implement retrieving of ballot's properties in one call: https://github.com/poanetwork/poa-network-consensus-contracts/issues/128

varasev commented 6 years ago

Also, we could implement retrieving of ballot's properties in one call: https://github.com/poanetwork/poa-network-consensus-contracts/issues/128

It is not always possible to return all of the data in a single function because Solidity has a stack depth limit but it's possible to make two or three functions that would return a data piece by piece.

varasev commented 6 years ago

Also, I described my thoughts about excess requests in https://github.com/poanetwork/poa-dapps-voting/issues/124#issuecomment-385615189 a month ago.