-
Notifications
You must be signed in to change notification settings - Fork 443
Description
Related issues and PRs
Motivation
In issue #1568, @deelawn implemented a Gno-based oracle and provided an example of how to use Gnorkle to link a Gno wallet address with a GitHub handle.
Upon reviewing the current process, we identified two key points:
- First, only whitelisted addresses can view pending verification requests. Every time the GitHub Agent retrieves active verification requests, it incurs gas fees.
- Second, after the agent verifies off-chain that the user owns the GitHub handle, it must pay additional gas fees to register the verification on the ghverify (Gnorkle instance).
The challenge with this approach is that Gnorkle bears the entire cost of the GitHub verification process. While this is feasible, we must ensure that the agent consistently has enough tokens to cover these expenses.
Proposition
Allow Gnorkle to execute messages from any sender, whether they are whitelisted or not, but only if the message is proven to be signed by a whitelisted address.
An GnoEvent should be published each time a user requests verification (this covers first point). This event can then be indexed by the off-chain agent, which will attempt to verify the ownership of the account. If ownership is confirmed, the agent will issue a payload to the user in the following format:
GNORKLE_FUNC,PUBLIC_KEY,RELAYED_PAYLOAD_SIGNATURE,RELAYED_PAYLOAD
GNORKLE_FUNC = 'relay' // always relay for relayed messages
PUBLIC_KEY ='gpub...' // Get it from gnokey list
// identical to a non-relayed ingestion message
RELAYED_PAYLOAD='ingest,FEED_ID,OK'
RELAYED_PAYLOAD_SIGNATURE=Sign(RELAYED_PAYLOAD, privKey)Delivrables
- Implement the native function verifySignature, which will take the public key, message, and signature as input, and return a boolean to indicate whether the signature corresponds to the provided public key, along with the address associated with that public key. feat: verifySignature function #2776
- Emit an event each time a user invokes the GitHub verification method.
- Modify the Gnorkle code to handle relayed messages by adding support for message.FuncTypeRelay. Update the relevant section of the code, to include this new case and perform all necessary verifications.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status