Conversation
@@ -0,0 +1,62 @@ | |||
use crate::{ |
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 file is really the only new piece of core code. The rest is fixing tests and dealing with the macros
…olochain/holochain-rust into add-validation-for-agent-entry
…into add-validation-for-agent-entry
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.
Awesome!
I've spotted a broken merge in the changelog though.
Also, is there a way to test this?
What would happen currently - without any other changes to n3h/lib3h that are needed to fully implement membranes - if an agent would be invalid? Can we add a test for that?
# Conflicts: # CHANGELOG-UNRELEASED.md # nodejs_conductor/test/test.dna.json
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.
Awesome!
Think as a followup we can have a test that has a validate_agent fn that actually calls some zome fn and rejects the agent, to see that it errors out as expected?
PR summary
To enable membranes there must be a way for agents to validate who is allowed to join. This PR adds some new functionality to enable this by making the AgentId (second entry on the local chain) a validate-able entry with a user defined callback in the zome.
This is a breaking change to existing zomes. Zome developers must add a
validate_agent
callback either using the old HDK or the proc-macro HDK.changelog
Please check one of the following, relating to the CHANGELOG-UNRELEASED.md
- summary of change [PR#1234](https://github.com/holochain/holochain-rust/pull/1234)