-
Notifications
You must be signed in to change notification settings - Fork 136
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
Warrants pt 2 - Allow multiple sys validation dependencies #3861
base: develop
Are you sure you want to change the base?
Conversation
Co-authored-by: David Braden <neonphog@gmail.com>
* Fix benchmark errors * holochain_state passes * About to do some global find-replace * Global search and replace * More * Format 2-up.sql * More * Ready to update sql queries * Adjust SQL queries * No errors or warnings * REMOVE COLUMN is not a thing. * Let's try this * Oh formatting * Proper migration * Rewrite migration * Reduce storage_info test thresholds * PR feedback * Doc change * Ooopss
// TODO: this must be generalized to support multiple dependencies. | ||
// we're only using the first here. | ||
if let Some(dep) = dep.first() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only affects hc_sleuth which is an experimental diagnostic tool
@@ -127,15 +127,18 @@ CREATE TABLE IF NOT EXISTS DhtOp ( | |||
num_validation_attempts INTEGER NULL, | |||
last_validation_attempt INTEGER NULL, | |||
|
|||
-- The integration dependency if there is one. | |||
-- The FIRST integration dependency if there is one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could mention that his is an action that another action like update or delete references.
dependency BLOB NULL, | ||
-- The SECOND integration dependency if there is one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And that this is only used by warrants.
AND OP_DEP.when_integrated IS NOT NULL | ||
AND OP_DEP.type = :create_link | ||
( | ||
DhtOpDep.action_hash = DhtOp.dependency |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to have the convention to store chain op deps in DhtOp.dependency
and warrant op dependency 2 in DhtOp.dependency2
? This change wouldn't be needed then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you mean. The way I read this, it sounds like you're suggesting putting a chain op dep in one slot, and one of the warrant op deps in the other?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, yes, exactly. Keep the first slot dependency
for chain ops' sys dependency or a warrant op's first dependency accordingly, and the second slot only for the warrant op's second dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes of course. As you say it is how it is. And I see that the comment you're making is that all of these queries are only for chain ops, which have no second dependency, and so including that is redundant, which is also correct. I'll change that back to only check the first dep.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
Part of #3639
With the addition of ChainFork warrants, with two actions referenced, DhtOps in general now can have multiple sys validation dependencies.
However now that i wrote this, this function is only being used to check for the existence of dependencies, the actual deps returned are never used.
TODO: