Skip to content

gossipsub API inconsistency between sub-unsub and topics #5433

Answered by AgeManning
drHuangMHT asked this question in Q&A
Discussion options

You must be logged in to vote

Yep this is intentional.

Originally there was a complication where other implementations had no concept of using a "hash". There were issues with security originally and later it got adopted. The concept of a non-hash'd topic, is a user-friendly object that can abstract away the binary form of the topic. The input of a functions use this user-friendly type, however the internals of gossipsub only work with the hash'd versions. I.e once you submit a Topic gossipsub then instantly converts it to a TopicHash and stores that.

The behaviour::topics function was a helper function that was later built to get access to what topics we are subscribed to. As the internals only know about the hashes …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@drHuangMHT
Comment options

Answer selected by drHuangMHT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants