vocdoni / vocdoni-node

A set of libraries and tools for the Vocdoni decentralized backend infrastructure, the main ground of our universally verifiable, privacy-centric and scalable digital voting protocol
GNU Affero General Public License v3.0
86 stars 17 forks source link

bug: published results for process are not correct, but they are. #501

Closed NateWilliams2 closed 8 months ago

NateWilliams2 commented 2 years ago

Describe the bug

The gateways are reporting a "published results for process xxx are not correct" warning. This comes from scrutinizer/scrutinizer.go:554, which compares the results calculated by the scrutinizer to the results directly on the vochain. I have been unable to tell why this appears, or what the difference is between the results. The published results in these cases seem correct, have the correct number of votes, etc. It happens fairly frequently.

dvotenode_1   | 2022-03-02T17:25:51Z    DEBUG   vochain/app.go:357  deliver tx: {"setProcess":{"txtype":"SET_PROCESS_RESULTS", "nonce":"PrQyD1fXyyd2dC5YEo8/rOjk2o6VIKduRLEdol9bg1Y=", "processId":"0VBwAQh8zAv6BHw15LKJAYqCWFWrNyBXmgQM5n/CakA=", "status":"RESULTS", "results":{"votes":[{"question":["AQ==", ""]}], "processId":"0VBwAQh8zAv6BHw15LKJAYqCWFWrNyBXmgQM5n/CakA=", "entityId":"VU6hfvUYwDgeBIXtnIfrrNBd3mk="}}}
dvotenode_1   | 2022-03-02T17:25:51Z    DEBUG   vochain/app.go:359  rejected tx: setProcess cannot set results, invalid status: RESULTS
dvotenode_1   | 2022-03-02T17:25:51Z    DEBUG   scrutinizer/vote.go:289 GetResults took 840.072µs
dvotenode_1   | 2022-03-02T17:25:51Z    WARN    scrutinizer/scrutinizer.go:554  published results for process d1507001087ccc0bfa047c35e4b289018a825855ab3720579a040ce67fc26a40 are not correct

As you can see, this only happens after a rejected setProcess transaction. This tells me that another gateway has already set the process results, and possibly there's a timing or sync issue that's causing this.

To Reproduce (please complete the following information)

This appears in the production gateway logs, you can search for it in the docker logs.

altergui commented 8 months ago

this was either fixed, or irrelevant by now