You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure about how exactly `Identity` should look, but we can keep it this way. Although we should probably discuss it in another issue specifically targeting this.
Identities should also be defined in such way that the oracle can handle any type without having to restart it. If you check gn-common/src/identity/mod.rs, you can check how it's handled right now. There are basically three identity types that may contain most identity types. An Address32 is quite generic in the sense that it can contain any 32 byte long public key (e.g. what Solana and Near use). There's an Address20 for EVM addresses and there's an Other variant that may contain any other identity that fits 64 bytes.
This way, all types have a fixed size (great for on-chain applications) and doesn't allocate anything on the heap (contrary to String or Vec<u8>.
Currently we store discord and telegram ids as "discord:123456", "telegram:@xdfhre"` padded with zeros to 64 bytes. However, this might change, so we should address all this in another issue.
Identities should also be defined in such way that the oracle can handle any type without having to restart it. If you check
gn-common/src/identity/mod.rs
, you can check how it's handled right now. There are basically three identity types that may contain most identity types. AnAddress32
is quite generic in the sense that it can contain any 32 byte long public key (e.g. what Solana and Near use). There's anAddress20
for EVM addresses and there's anOther
variant that may contain any other identity that fits 64 bytes.This way, all types have a fixed size (great for on-chain applications) and doesn't allocate anything on the heap (contrary to
String
orVec<u8>
.Currently we store discord and telegram ids as "discord:123456", "telegram:@xdfhre"` padded with zeros to 64 bytes. However, this might change, so we should address all this in another issue.
Originally posted by @PopcornPaws in #18 (comment)
The text was updated successfully, but these errors were encountered: