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

add vk check #1858

Merged
merged 1 commit into from
Apr 2, 2024
Merged

add vk check #1858

merged 1 commit into from
Apr 2, 2024

Conversation

tudor-malene
Copy link
Collaborator

Why this change is needed

avoid crashing enclave when the vk is invalid

What changes were made as part of this PR

validate the vk before processing

PR checks pre-merging

Please indicate below by ticking the checkbox that you have read and performed the required
PR checks

  • PR checks reviewed and performed

Copy link
Collaborator

@BedrockSquirrel BedrockSquirrel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, reproduced issue and verified this fixed it.


func (vk RPCSignedViewingKey) Validate() error {
// todo - remove this when merging to main
if vk.Account == nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could make it compatible with the future format at this point I suppose, infer the account? Would be a throwaway code snippet but means main tools (auth client and gateway) can communicate with sepolia testnet.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's discuss in planning. I don't think it's worth the effort

@tudor-malene tudor-malene merged commit a44ef4c into releases/v0.23 Apr 2, 2024
1 check passed
@tudor-malene tudor-malene deleted the tudor/check_vk branch April 2, 2024 09:54
tudor-malene added a commit that referenced this pull request Apr 2, 2024
tudor-malene added a commit that referenced this pull request Apr 2, 2024
* add vk check (#1858)

* fix merge
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

Successfully merging this pull request may close these issues.

2 participants