-
Notifications
You must be signed in to change notification settings - Fork 3
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
new pallet encointer_reputation_commitments
#303
Comments
@OverOrion when is this expected to be ready? |
I haven't started working on it yet as it requires some prerequisite work on my side. |
ok, i could take the task over, as it is blocking me atm. i could start this week and open the PR with this and the KSM faucet next week if everything goes well. @brenzi what do you think? |
sure, please go for it @pifragile |
ok! could you explain in a little bit more depth the rationale behind the commitment hash, as well as the salting mechanism you had in mind @brenzi ? |
Let me roll out my thought process: requirement R1: We need to make sure that a prover (encointer account(s) with reputation) can obtain only one badge for a single nostr account requirement R2: oracles should be stateless (not keep track of issued badges...because that adds quite some complexity because of R3) requirement R3: R1 must hold for any set of unpermissioned oracle instances the naive solution would be to just hash the nostr pubkey so the encointer/personhood-oracle would refuse to issue a badge to any other account than the one which hashes to the commitment directly, but requirement R4: For privacy reasons we want unlinkability between the Encointer account proving its personhood reputation and the nostr account which shall get a badge. Therefore, we can't just hash the nostr account because then you could rainbow-table the registry and reveal the link between all encointer and nostr accounts. So, we can let the user add a random salt to the nostr account before hashing. Later, when requesting the badge from the oracle, the user can present the nostr-account and salt to the oracle to prove that the reputation hasn't already been used to get a badge for another nostr account already This is way too much information for implementing this pallet. It's enough to know that a commitment hash needs to be stored. The rest of the complexity is left for encointer/personhood-oracle#6 |
@pifragile as you implement this pallet for the use with #304, you can ignore R2,R3,R4 there because linkability can't be avoided onchain anyway and the chain is "only one instance". you can leave the hash empty for your case and the faucet pallet should just check if the reputation has already been used for its purpose (assuming the dripping/beneficiary account is the same as the prover which has reputation) |
For the purpose of personhood oracle
In order to get reputation linkability, we need an immutable record of commitments to purposes. While each purpose could maintain such registry for themselves, this is not possible for every purpose. Nostr. for example has no way of referring to a common consensus on commitments. Subsocial could, as they run their own parachain, but it would take integration effort which may slow down adoption. So the Encointer mainnet could provide such a simple registry:
where commitment is the hash of the requesting purpose account (i.e. nostr pubkey) and a random salt which should be unique per call and must later be provided to request a badge
the scope of purposes is global
including unit tests
The text was updated successfully, but these errors were encountered: