Peerstore interfaces should accept contexts #2231
Labels
exp/beginner
Can be confidently tackled by newcomers
help wanted
Seeking public contribution on this issue
The peerstore family of interfaces currently don't accept any Go contexts, despite performing IO. This means that, for example, the "pstoreds" package which implements a datastore-backed peerstore can't propagate contexts into the backing datastore. Example:
go-libp2p/p2p/host/peerstore/pstoreds/addr_book.go
Line 54 in 8c466ab
This means that the datastore can't respect context cancelations and any values stored in the context are also lost (ex. tracing metadata).
The text was updated successfully, but these errors were encountered: