-
Notifications
You must be signed in to change notification settings - Fork 202
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
Guard against malicious sentinels #84
Comments
@metalicjames @HalosGhost This is an interesting challenge. How do reach consensus on the state of the sentinels without maintaining some kind of shared state? Thinking out loud here...my initial reaction is a simpler approach with redundant validation:
Of course now I just need to compromise the secondary validator... |
@davebryson there are a couple of interesting things to consider there. I think your final note rings true for me (that moving compaction to a secondary validator is just shifting the burden rather than solving the problem). Additionally, that idea distills to having two sentinels validate the transaction rather than allowing it to be a configurable threshold (as James's PR supports). It also has the additional negative that, right now, the only component in the system that sees the values in a transaction are sentinels; if compaction is moved out of the sentinel, then there's at least one other role inside the network that gets to see more information about a transaction which is a weakening of the system's privacy guarantees. As for disallowing connections from a sentinel that has forwarded a bad tx, there's some additional trouble there:
Secure communication between the components is probably not a terrible idea regardless (as a defense-in-depth measure for an attacker who has managed to get inside the privileged network even if they haven't compromised one of the machines actually participating in the network); however, it alone is not enough to address the compromise of a sentinel (once a sentinel is compromised, malicious communication to the next component in the system could still happen over the secure channel). |
@HalosGhost Some form of BFT consensus among the sentinels sounds like a viable solution. But this will certainly impact performance. |
Mmm, that's absolutely true. BFT could offer an answer to a much stronger threat-model than the one posed in #80. In particular, BFT would allow not just tamper-detection, but tamper-prevention for up to f simultaneous compromises/failures (as long as there are 3f+1 nodes operating). What's more, it could probably be leveraged beyond just the sentinels. However, you're right that it would likely have a pretty significant performance impact—that doesn't mean, though, that we shouldn't explore it as a solution. And, if you wanted to implement that as a proposed solution, that would be interesting to review. |
Here's an interesting approach they may have some applicability to the problem:
https://arxiv.org/abs/2003.11506 FastPay is using an account based model. Byzantine Consistent Broadcast may be worth investigating in the context of the Sentinels and UTXO model |
closed via #87 |
In the current UHS-based data model, sentinels validate the transaction-local invariants of a full transaction, before converting the transaction to a compact representation which is the data structure processed by the backend (2PC or Atomizer). Since the data required to validate the full transaction is lost after being converted to a compact transaction, it would be trivial for a compromised sentinel to submit an invalid transaction for processing. This would allow the adversary to spend any UHS ID, and mint arbitrary UHS IDs representing any value (that an honest sentinel would later accept as a valid output). This is possible because the upstream component from the sentinels (shards in the atomizer architecture, coordinators in 2PC) blindly accepts compact transactions (deleting input UHS IDs, and creating output UHD IDs) and has no knowledge of the pre-image data. The current implementation does not restrict the origin of compact transactions either, so any entity with internal network access can send compact transactions directly to backend components, bypassing the sentinels.
It would be desirable to protect against up to
n
sentinels being compromised.n
should be configurable based on the threat model and number of nodes in the system. As long as<=n
sentinels are malicious, it should be impossible to settle an invalid transaction. Furthermore, upstream components should only accept compact transactions for processing from known sentinels.The text was updated successfully, but these errors were encountered: