fluree / db

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

Normalized branch state #774

Closed zonotope closed 1 month ago

zonotope commented 1 month ago

This patch removes the cyclic dependency between ledgers -> branches -> and dbs by removing references to the ledger from the db record and loading a db directly from a commit (and only that way).

It also adds an explicit "genesis commit" at t = 0 that helps us load new dbs and will (in the future) help us create ledgers without an explicit transaction. The genesis commit is currently being persisted with this patch, but I decided to leave both pushing the genesis commit out to the nameservices, adding genesis commit metadata flakes to the ledger, and using the genesis commit to detect if a ledger exists, which will allow us to create ledgers without transactions, for later. Those tasks require some reorganization of how the name services work, and there are higher priority changes to index processing that I'd like to tackle before that.

bplatz commented 1 month ago

Any chance you can merge #766 and re-target this to main?