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

Allow local tever events when not in local mode #806

Closed

Conversation

rodolfomiranda
Copy link
Contributor

@rodolfomiranda rodolfomiranda commented Jun 23, 2024

This PR solves issue #799
In KERIA, when a credential is issued to someone that is also part of the issuer, the credential is rejected by the issuee with Local event regk={} when nonlocal mode.
I understand that this should be a valid case when the event is received as non local, so I'm proposing to remove the check that prevents to continue with the event processing.

Copy link
Member

@pfeairheller pfeairheller left a comment

Choose a reason for hiding this comment

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

This should not be a KERIpy PR but changes to the use of Tevery in other repos, most likely KERIA

@@ -1559,8 +1559,7 @@ def processEvent(self, serder, seqner=None, saider=None, wigers=None):
"".format(regk, self.registries))
else:
if regk in self.registries: # local event when not in local mode
raise ValueError("Local event regk={} when nonlocal mode."
"".format(regk))
pass
Copy link
Member

Choose a reason for hiding this comment

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

This is not the proper fix for this as it disables the features provided by both the lax and the local properties of the Tevery. Please use those flags when launching the Tevery to accomplish this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, the problem is that in KERIA we have one global Tevery process that is shared and used in the escrows. It's instantiated as non local. Do we need to check if the event is local or non local before launching a Tevery? I'll take a look on how that can be implemented in KERIA if that's the way to go.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, you can create 2 Tevery objects. One to use for local events that you create and one for remote messages that is used to process incoming messages.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. I'll look into that direction. The main problem to solve is that the incoming message received is the one that has the local event. We need to detect that before deciding which Tevery object should be called.

@rodolfomiranda rodolfomiranda marked this pull request as draft July 31, 2024 13:50
@pfeairheller
Copy link
Member

Can this PR be closed?

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.

2 participants