-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Robustness: votes are disappearing between the backend and the DELA node #346
Comments
just to make sure that it is not introduced/exacerbated by the changes introduced in dela#270, I ran some tests on the main branch as well, and there I get consistently an off-by-one (n votes submitted by the backend to the cluster according to the logs, n-1 registered) so either it is a problem that gets worse the more votes are cast (I tried with 10, 20, 40, 80 and 2, 4, 8, 16, 32, 64 on a new chain and always got only an off-by-one) or it is a problem that gets exacerbated by dela#270 any ideas how the changes in dedis/dela#270 might have led to this behaviour (and how to address the off-by-one)? |
redid the 2, 4, 8, 16, 64, 128 on DELA with the fix, and 128 is the first one where a notable number of votes are missing 117/128, which is also when the 256 blocks threshold would have been passed (similar results for 256 and 512) so I'm not sure whether this is just another symptom of dedis/dela#269 that's not addressed by dela/dedis#270 or if it is behaviour we are just not aware of because we couldn't test this yet (I tested some 192 votes on the branch without the fix, and there got also only an off-by-one, so it's not > 100 that causes the problem) |
|
set the proxy log level, so now I've got this (on a completely clean chain with only one election):
so 512 requests and their respective payloads have been send to the proxd, and 512 requests have arrived at the proxy some examples (it is always the same vote, so the payload is the same) backend:
dela-worker-0 (also leader if that's important):
error messages:
but these have always been there, not sure if they are related |
and according to the frontend, 412 votes and the chain is at index 419 (so the 412 plus 1 for the election itself plus 1 per node?) |
I don't understand that. What is in the payload? If it is the transaction, then I think the vote is supposed to be encrypted asymmetrically, so even if it is the same vote, the message should change. Or what am I missing here? |
the data I'm sending is the already encrypted vote (since I took one POST request from the client that I keep resending to cast a vote), and that is encoded in base64, so the payload is always the same the signature changes, since it's added by the backend |
There is something I don't understand, or another bug: usually with asymmetric cryptography, if you encrypt the same data twice, you get another byte-blob. If this weren't the case, then you could very easily verify what the person voted: you just encrypt the different possible outcomes and compare them to the data stored on the blockchain. So either I don't understand it, or it's a bug :) |
I'll try to explain better, that was a bit confusing the way I put it before:
i.e. it's the same already encrypted request that gets send, and hence the base64 encoding is always the same, but the signature in the payload changes because that's added by the backend server |
Ah, that makes sense. -1 bugs :) |
I observed this behaviour also before testing dedis/dela#270 but as the number of missing votes were a lot smaller (like off-by-one or by 3) I thought nothing of it, but now it is more pronounced:
according to the logs:
a. in the backend/DELA nodes: 3 concurrency-related failures (#345)
b. in the backend: 509 PUT requests that got an 200 answer
c. DELA: no errors apart from the 3 concurrency failures
which means that 102 votes or roughly a fifth of the votes are unaccounted for - are there dedicated logs of the DELA proxies somewhere?
The text was updated successfully, but these errors were encountered: