-
Notifications
You must be signed in to change notification settings - Fork 226
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
WIP: Musa Bootstrapper #878
Conversation
Import zikade code
v2/cmd/musa/musa.go
Outdated
dhtConfig.TracerProvider = traceProvider | ||
|
||
if dhtConfig.ProtocolID == dht.ProtocolIPFS { | ||
dhtConfig.Datastore = datastore.NewNullDatastore() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we always want a Null datastore? What's the behaviour here with a different protocol?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the protocol is the /ipfs/kad/1.0.0
protocol, the DHT v2 implementation will configure three backends for the provider, ipns, and pk records. Unless there's a datastore passed into the DHT configuration, we're using an in-memory leveldb datastore.
To mimic the behaviour of the rust bootstrapper I configured the null datastore to not store anything.
Moved ticker initialization outside the garbage collection goroutine. There was a race condition between advancing the mocked time in TestProvidersBackend_GarbageCollection and the initialization of the ticker that triggers the garbage collection runs. It happened that we were advancing the time without the ticker being initialized. Hence, advancing the time hasn't had any effect. In this PR, I moved the ticker initialization outside the garbage collection goroutine. This means the ticker will be registered with the MockClock object after StartGarbageCollection returns. Calls to mockClock.Add will therefore trigger the ticker.
* Increase test iterations to trigger flake * Add failfast * Replace routing notification channel with a RoutingNotifier type * Remove unused code * Remove test count
As discussed, we'll move Musa to https://github.com/plprobelab/musa. I only kept the none Musa-specific changes and deleted the v2/cmd/musa/ directory. |
This PR adds the
Musa
bootstrapper. It's called like that to capture the 🍌 vibes around here.Run Jaeger with:
Then just run
musa
with, e.g.,go run musa.go
. Check out the CLI options with--help
.Notes:
/dev/null
To test it I've run:
zQmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D
is just a random CID with multibase encoding. The$MUSA_PEER_ID
is printed to the console after Musa has started.