Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schema hash code and docs are confusing #128

Open
sirpy opened this issue Mar 4, 2024 · 1 comment
Open

schema hash code and docs are confusing #128

sirpy opened this issue Mar 4, 2024 · 1 comment
Assignees

Comments

@sirpy
Copy link

sirpy commented Mar 4, 2024

In iden3 docs it says the schema hash is created from the hash of the LD document bytes
https://docs.iden3.io/protocol/claim-schema/#schema-hash

but looking at the code linked from the docs here: https://go.dev/play/p/3id7HAhf-Wi
it only uses the schema @id to create the hash
lastly iden3 bytes to bigint reverses the byte order which is also confusing, when trying to recreate the hash using other code
This happens also when verifying the challenge on chain

  1. iden3/polygon docs should be updated to reflect the correct way to calculate the hash
  2. the go code should just ask for credential type+id instead of pasting the whole credential
  3. the reversal of the bytes should be mentioned in multiple places, that would help future dev avoid this confusion
@OBrezhniev
Copy link
Member

@sirpy thanks for the report!
@0xpulkit please take a look on how we can improve this part of the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants