event_graph: expanding the graph to have multiple DAGs

basically the one dag we had before is now at least one (arbitrarily 5 max) are addressed by their genesis event hash, managed in DAGStore and are sorted chronologically.
creating a new EventGraph instance means creating the configured number of dags deterministically
and open those trees in DB, created if not existing.
prune now drops the oldest tree and adds a new one to the considered trees.
each dag is paired with its unreferenced tips and are updated accordingly.
fetching an event searches through all dags and fetch the wanted one.
in protocol, requesting tips are done by sending the dag_name of which the unreferenced tips are requested (probably breaks comp, still WIP)
This commit is contained in:
dasman
2024-12-24 03:32:48 +03:00
parent 0d2628a53d
commit a500b3d9f1
16 changed files with 490 additions and 183 deletions

View File

@@ -4,6 +4,11 @@ rpc_listen = "tcp://127.0.0.1:8890"
## IRC listen URL
irc_listen = "tcp://127.0.0.1:22022"
## How many DAGs to be synced (currently each DAG represents a 24hr msg
## history counting from UTC midnight), increasing this number means
## you get/sync previous days msg history as well (max. 5)
dags_count = 5
## Sets Datastore Path
datastore = "darkirc1"

View File

@@ -4,6 +4,11 @@ rpc_listen = "tcp://127.0.0.1:8891"
## IRC listen URL
irc_listen = "tcp://127.0.0.1:22023"
## How many DAGs to be synced (currently each DAG represents a 24hr msg
## history counting from UTC midnight), increasing this number means
## you get/sync previous days msg history as well (max. 5)
dags_count = 5
## Sets Datastore Path
datastore = "darkirc2"

View File

@@ -4,6 +4,11 @@ rpc_listen = "tcp://127.0.0.1:8892"
## IRC listen URL
irc_listen = "tcp://127.0.0.1:22024"
## How many DAGs to be synced (currently each DAG represents a 24hr msg
## history counting from UTC midnight), increasing this number means
## you get/sync previous days msg history as well (max. 5)
dags_count = 5
## Sets Datastore Path
datastore = "darkirc3"

View File

@@ -4,6 +4,11 @@ rpc_listen = "tcp://127.0.0.1:8893"
## IRC listen URL
irc_listen = "tcp://127.0.0.1:22025"
## How many DAGs to be synced (currently each DAG represents a 24hr msg
## history counting from UTC midnight), increasing this number means
## you get/sync previous days msg history as well (max. 5)
dags_count = 3
## Sets Datastore Path
datastore = "darkirc4"