Skip to content
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

Open
wants to merge 47 commits into
base: develop
Choose a base branch
from

Conversation

maackle
Copy link
Member

@maackle maackle commented May 13, 2024

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:

  • CHANGELOGs updated with appropriate info

maackle and others added 8 commits May 13, 2024 11:18
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
Comment on lines +210 to +212
// TODO: this must be generalized to support multiple dependencies.
// we're only using the first here.
if let Some(dep) = dep.first() {
Copy link
Member Author

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

Base automatically changed from warrants-1 to warrants May 14, 2024 00:36
Base automatically changed from warrants to develop May 16, 2024 00:42
@maackle maackle changed the title Allow multiple sys validation dependencies Warrants pt 2 - Allow multiple sys validation dependencies May 16, 2024
@@ -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.
Copy link
Contributor

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.
Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Member Author

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?

Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

@jost-s jost-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants