fluree / db

Fluree database library
https://fluree.github.io/db/
Other
337 stars 21 forks source link

Feature/commit annotations2 #734

Closed dpetran closed 5 months ago

dpetran commented 7 months ago

This is the second take on user-supplied commit annotations, after some discussion on https://github.com/fluree/db/pull/716

Now, annotations are converted into flakes and indexed, and are now queryable instead of an opaque json blob. There is no size limit, and users are not charged fuel for the data they supply. In order to simplify inclusion of the annotation with the rest of the commit details, only a single node is allowed.

Also, users are not allowed to specify the subject id, which should prevent the creation of subgraphs that may bypass the validation or authorization policies.

Fixes https://github.com/fluree/core/issues/78

dpetran commented 7 months ago

rebased on main

zonotope commented 5 months ago

I think main needs to be merged back in here before re-reviewing. I made some changes to when and how transactions get written to storage.

dpetran commented 5 months ago

Rebased on main. Biggest change was changing the ->tx-state function to accept kw-args because of all the different places it is used. Here's a summary of my investigations:

I do think it's ripe for a refactor, but I didn't want to do it as part of this PR.