ZcashFoundation / zcash-grant-system

The Zcash Foundation Grant System
https://grants.zfnd.org
MIT License
11 stars 8 forks source link

Don't show primary keys as integers #245

Closed dternyak closed 5 years ago

dternyak commented 5 years ago

Wherever we expose primary keys, we should instead use a hash/uuid-esque identifier/non incrementing integer.

This includes:

wbobeirne commented 5 years ago

Just a heads up that proposal contributions currently use ID as the index for address derivation. We'll either need to make a new column for that, or keep them numeric and less than 2^31.

AMStrix commented 5 years ago

I think I prefer the simplicity of using straight up UUIDs as IDs everywhere.

But, I'd like to just drop a note on another possible approach. We could use a marshmallow custom field to deserialize/serialize IDs using simple encryption. Something like hashids lib might work well.

wbobeirne commented 5 years ago

Ah, there's one thing I didn't think to test here, which is how discovery of funds works with bip 32. If it's sequential, we'll want to revert this change on contributions alone, or switch them to have their own address_index column that's auto incrementing separate of the id.

wbobeirne commented 5 years ago

Opened #301 for the above comment