-
Notifications
You must be signed in to change notification settings - Fork 8
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
docs: zk email recovery module #53
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great thanks for this Saul! Left some comments
Apart from comments on email-recovery.mdx
, all very small suggestions
|
||
## How it works | ||
|
||
Email Recovery is a executor module that enables account recovery through email verification. When a guardian is set, their email address is hashed and stored on-chain. During recovery, the guardian's email response generates a ZK proof that validates against this stored hash, allowing them to authorize changes to validator configurations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we mention the random account code as this sounds insecure just reading that the email is hashed
|
||
## Getting started | ||
|
||
To enable email recovery, you need to install the Email Recovery module. Once installed, configure the recovery settings by setting a guardian email and timelock duration — this creates a delay period between when guardians approve recovery and when it can be executed, providing security against malicious recovery attempts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once installed, configure the recovery settings by setting a guardian email and timelock duration
Configuration is done in the same step as installation here instead of a separate step
this creates a delay period between when guardians approve recovery and when it can be executed, providing security against malicious recovery attempts.
It's not clear "this" refers to the timelock, can you add emphasis that this sentence is referencing timelock.
Also if we're explaining the config in detail. Could we either:
- Explain all of it
- Point to where it is all explained
- Not go into detail on the delay period here
|
||
To enable email recovery, you need to install the Email Recovery module. Once installed, configure the recovery settings by setting a guardian email and timelock duration — this creates a delay period between when guardians approve recovery and when it can be executed, providing security against malicious recovery attempts. | ||
|
||
The system will automatically send verification emails to each guardian. Guardians must confirm their role by simply replying to this verification email. This ensures guardians are aware of their responsibility and have access to the email account. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of "system", can you mention something along the lines of "ZK Email infrastructure" or "relayer infrastructure"
@@ -0,0 +1,21 @@ | |||
# CANCEL_EXPIRED_RECOVERY_COOLDOWN | |||
|
|||
Returns the cooldown period that prevents a guardian from initiating another recovery request after their previous request expired. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returns the cooldown period that prevents a guardian from initiating another recovery request after their previous request expired. | |
Returns the cooldown period after which a subsequent recovery attempt can be initiated by the same guardian. This helps prevent guardians threatening the liveness of recovery attempts by submitting malicious recovery hashes before honest guardians correctly submit theirs. |
|
||
- Type: `bigint` | ||
|
||
Template index parameter (unused in current implementation). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Template index parameter (unused in current implementation). | |
Template index parameter. |
|
||
Object containing: | ||
- `delay`: The delay period before recovery can be executed | ||
- `expiry`: The timestamp when the recovery configuration expires |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `expiry`: The timestamp when the recovery configuration expires | |
- `expiry`: The timestamp when a recovery request expires |
|
||
- Type: [`Address`](https://viem.sh/docs/glossary/types#address) | ||
|
||
The address of the validator contract that will verify email signatures. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The address of the validator contract that will verify email signatures. | |
The address of the validator contract that will be initially configured for recovery |
|
||
- Type: [`Hex`](https://viem.sh/docs/glossary/types#hex) | ||
|
||
Context data used to check if the module is installed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Context data used to check if the module is installed. | |
Additional context that may be required to determine if the module is installed. |
|
||
- Type: [`Hex`](https://viem.sh/docs/glossary/types#hex) | ||
|
||
The initial function selector for the recovery process. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The initial function selector for the recovery process. | |
The function selector to allow when executing recovery for the specified module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Saul, left a nitpick for CANCEL_EXPIRED_RECOVERY_COOLDOWN
pages/module-sdk/modules/email-recovery/CANCEL_EXPIRED_RECOVERY_COOLDOWN.mdx
Outdated
Show resolved
Hide resolved
pages/module-sdk/modules/email-recovery/CANCEL_EXPIRED_RECOVERY_COOLDOWN.mdx
Outdated
Show resolved
Hide resolved
…Y_COOLDOWN.mdx Co-authored-by: John Guilding <[email protected]>
…Y_COOLDOWN.mdx Co-authored-by: John Guilding <[email protected]>
Co-authored-by: Konrad <[email protected]>
Co-authored-by: Konrad <[email protected]>
…tFromRecoveryCommand.mdx Co-authored-by: John Guilding <[email protected]>
ZK Email Recovery Module Documentation