Conversation
ba14850 to
6664251
Compare
|
@lucasfernog and @tensor-programming - would love to have you both do an in depth review of this PR, from the perspective of your respective sides of this actor stack. |
|
I am right now doing some refactoring, but I will soon be done with that and then also mark the PR's as ready for review. |
|
Please tag me when this is ready :) |
b80434e to
9e29b09
Compare
|
@lucasfernog @tensor-programming the PR is ready for review, but the following aspects are not implemented yet / need to be discussed afterwards:
|
f294d1f to
0fc47b3
Compare
client/src/interface.rs
Outdated
| let vault_path = &location.vault_path(); | ||
| let vault_path = vault_path.to_vec(); | ||
| // check if vault exists | ||
| let b = match self |
There was a problem hiding this comment.
can you rename these b variables to vault_exists and record_exists?
There was a problem hiding this comment.
also, should this whole logic be a core stronghold message? like a EnsureVaultExists and EnsureRecordExists - maybe this is useful for consumers too
There was a problem hiding this comment.
I copied this logical sequence of the messages from the interface for targeting the local client, so this question also concerns those methods. But yes I can imagine that a user might need these dedicated message types when they don't want to automatically create a new vault if the vault path doesn't exist, especially with remote strongholds but also in a local system.
@tensor-programming what do you think about this?
There was a problem hiding this comment.
I have to wonder if we should even allow a user to create a remote vault. Or if there should be some kind of policy for restricting that kind of behavior. Ideally, we would want each user to have access to a select number of vaults based on which paths they know and haven't really considered how we would restrict users inside of a shared stronghold. Perhaps, its something to think about later.
For now it should be ok to just enable the ability to add/create a new vault remotely if the vault doesn't exist and we can restrict/change that behavior later using policies.
There was a problem hiding this comment.
Well, i think this type of policy that you are talking about Tensor could maybe be decided by the Firewall, so the Firewall can be configured for each stronghold individually to allow or reject a SHRequest::CreateNewVault?
tensor-programming
left a comment
There was a problem hiding this comment.
Most of this looks good.
|
The tests currently fail until this PR is merged. |
8053e08 to
eed3b75
Compare
There was a problem hiding this comment.
Looks good. Just a couple of questions and minor things really.
One more thing, there are a ton of unwraps in the code that kind of make me uneasy. I know that its kind of hard to deal with these especially when you are implementing an interface or working in a closure. The problem is that theses unwraps will cause panics if the error happens (in most cases these are options). In production that's not necessarily what we want to happen, in other words, some of them should be recoverable errors if possible. I would recommend going back over each of the unwrap cases to make sure that they are absolutely necessary. If you can't remove the unwrap, it might be better to use expect because at least you give the user some information.
707cff1 to
d1c8547
Compare
Description of change
Refactor communication actor and integrate it into the stronghold interface.
Type of change
How the change has been tested
Added interface tests to read/ write a remote stronghold store.
Change checklist