forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exit on failed requests to zkpoks and oracle DB (ethereum#46)
If a request to the tfhe-zkpoks or zbc-oracle-db services fails, exit the whole process instead of calling panic(). Rationale is that panic() will unwind the stack and, potentially, leave the process running. If, for example, tfhe-zkpoks or zbc-oracle-db is down for some reason, that will lead to the node continuing and, ultimately, falling out of sync, because other nodes wouldn't have failed and would have added the txn being executed. If we instead stop the whole process, the node won't be able to progress with the txn in question until it gets a response (either success or failure) from tfhe-zkpoks or zbc-oracle-db. Essentially, we treat tfhe-zkpoks and zbc-oracle-db as robust and trusted services that are not supposed to be down or being malicious for the system to progress. For tfhe-zkpoks, we treat the response as verification failure only on HTTP status 406. We treat HTTP status 200 as success. On all other errors or statuses, we exit the process. For zbc-oracle-db, we treat HTTP status 200 as success and on all other errors or statuses, we exit the process. On non-oracle nodes, if signature verification fails or if the require is not found, we exit the process, because it means that the oracle hasn't executed the txn. However, the oracle is assumed to be trusted and always correct. In that case, a non-oracle node cannot reliably proceed.
- Loading branch information
1 parent
ba41f75
commit 806cd88
Showing
1 changed file
with
97 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters