-
Notifications
You must be signed in to change notification settings - Fork 21
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
🤯 Cognitarium: Prevent blank nodes conflicts #434
Comments
I complement what I've commented here: #494 (comment) I agree with defining a method for generating blank node identifiers that ensures: uniqueness,determinism and efficiency. Yet, I have reservations about employing hashing for this purpose. Why not opt for a straightforward counter for blank nodes, using a |
It is indeed way more appropriate to use a simple counter for that purpose. As a matter of consistency maybe we should use |
@amimart yes that's perfect. 😌 |
When inserting triples, avoid same blank nodes being reused across insertions.
Issue description
Blank nodes allowing to create edges in graphs at insertion, their meaning is only linked to the set of triples being inserted and shall be ensured unique per insertion. Allowing to define same blank nodes across multiples insertions could affect previous ones and therefore alter unintentionally the data contained.
When inserting blank nodes, they shall be ensured unique scoped per insert message execution.
Proposal
In order to provide unique blank nodes at insertion, their identifier shall be formed with the context of this particular execution. I propose so to prefix alter their ids before writing by prefixing them with a hash representing the execution context, which shall carry the block height, the index of the transaction the message come from, and the insert message itself.
The text was updated successfully, but these errors were encountered: