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

[zkLogin] Check that bigints fit into the field for extra safety #16891

Merged
merged 3 commits into from
Aug 12, 2024

Conversation

mskd12
Copy link
Contributor

@mskd12 mskd12 commented Mar 26, 2024

Description

Turns out we don't check anywhere that the inputs fit into the field and neither does the poseidon-lite library (it just truncates elements and fits them into the field).

Instrumenting poseidon seems like the simplest way to do this. The other option (which I have not taken) is to instrument as soon as we receive some inputs..

Test Plan

How did you test the new or updated feature?


If your changes are not user-facing and do not break anything, you can skip the following section. Otherwise, please briefly describe what has changed under the Release Notes section.

Type of Change (Check all that apply)

  • protocol change
  • user-visible impact
  • breaking change for a client SDKs
  • breaking change for FNs (FN binary must upgrade)
  • breaking change for validators or node operators (must upgrade binaries)
  • breaking change for on-chain data layout
  • necessitate either a data wipe or data migration

Release notes

Copy link

vercel bot commented Mar 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 12, 2024 2:39pm
mysten-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 12, 2024 2:39pm
sui-core ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 12, 2024 2:39pm
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 12, 2024 2:39pm
sui-typescript-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 12, 2024 2:39pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Aug 12, 2024 2:39pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Aug 12, 2024 2:39pm

Copy link
Contributor

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label May 26, 2024
@github-actions github-actions bot removed the Stale label Jun 1, 2024
@mskd12 mskd12 force-pushed the deepak/zklogin-range-checks branch from f3890b6 to 66261ed Compare August 12, 2024 14:36
@mskd12 mskd12 merged commit 6f79ed9 into main Aug 12, 2024
52 checks passed
@mskd12 mskd12 deleted the deepak/zklogin-range-checks branch August 12, 2024 14:49
suiwombat pushed a commit that referenced this pull request Sep 16, 2024
)

## Description 

Turns out we don't check anywhere that the inputs fit into the field and
neither does the poseidon-lite library (it just truncates elements and
fits them into the field).

Instrumenting poseidon seems like the simplest way to do this. The other
option (which I have not taken) is to instrument as soon as we receive
some inputs..

## Test Plan 

How did you test the new or updated feature?

---
If your changes are not user-facing and do not break anything, you can
skip the following section. Otherwise, please briefly describe what has
changed under the Release Notes section.

### Type of Change (Check all that apply)

- [ ] protocol change
- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes
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