[libdream] Each universe should have it's own swam key #159
Labels
good first issue
No deep understanding of tau needed
high priority
High Priority, should be implemented immediatley
We are using a static dev mode swam key in libdream. See:
https://github.com/taubyte/tau/blob/main/libdream/simple.go#L145
https://github.com/taubyte/tau/blob/main/libdream/universe.go#L222
While this was fine at the very start, it's causing issues when running multiple tests in parallel.
We need a function like:
Which will generate the same swarm key for the same universe id, and use that in lieu of protocols.SwarmKey()
Maybe have universe.SwarmKey() which calls generateSwarmKey and caches the result, or call generateSwarmKey when universe is created here https://github.com/taubyte/tau/blob/main/libdream/universe.go#L22. I prefer the second way better.
protocols.SwarmKey() function should then be deleted.
The text was updated successfully, but these errors were encountered: