RangerMauve / hyper-sdk

Make your own hyper apps!
https://www.youtube.com/watch?v=HyHk4aImd_I&list=PL7sG5SCUNyeYx8wnfMOUpsh7rM_g0w_cu&index=20
MIT License
290 stars 46 forks source link

Different Extensions per Hyperdrive/Hypercore #6

Closed martinheidegger closed 5 years ago

martinheidegger commented 5 years ago

It would probably result in unexpected behavior if different Hyperdrives/Hypercores used different extensions:

const sdk = new SDK()
sdk.Hypercore({extensions: ['a']})
sdk.Hypercore(..., {extensions: ['b']})

as the first hyper* would add the extension a to the swarm but the second hypercore would have a & b (even though only a was specified). And while the first one would expect it only had a connecting to it, in the protocol it would broadcast both the availability of a and b.

For the time being I think the quickest solution to this would be that extensions are added as option to the swarm and explicitly forbidden as option to a core/drive.

RangerMauve commented 5 years ago

Could you elaborate more on why sharing extensions should be avoided?

RangerMauve commented 5 years ago

Gonna close this for now. 😁