vacp2p / mvds

Minimal Viable Data Sync Implementation
https://specs.vac.dev/specs/mvds.html
MIT License
13 stars 3 forks source link

enhancement/peer-id-bytes #41

Closed decanus closed 5 years ago

decanus commented 5 years ago

closes #40

@oskarth @adambabik we need to discuss what size the array should have. Right now 64 was taken, this is completely arbitrary though.

decanus commented 5 years ago

@adambabik do you think the length is ok?

adambabik commented 5 years ago

@decanus the length of what?

decanus commented 5 years ago

@adambabik the array, 64 byte.

cammellos commented 5 years ago

I guess it depends on the use cases, but widely accepted schemes are uuid for example, which is 16 bytes, and would fit fine in the 64 (for sure 64 is plenty).

In our case we could use the compressed version, which is 33 bytes, if we want to reduce the size. But more generally unless we need to recover the key, we can just use an hash of the key (16, 32, 64 bytes, up to us)

decanus commented 5 years ago

@cammellos I'll merge it with 64, we can change it later.