Skip to content

Conversation

@kien-rise
Copy link

Motivation

let vkey_bytes = vkey_digest_bn254.as_canonical_biguint().to_bytes_be();
...
result[1..].copy_from_slice(&vkey_bytes);

It's not guaranteed that vkey_bytes has 31 bytes.
If it has 30 bytes, or less, .copy_from_slice will panic.

Solution

Use the correct offset.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@kien-rise kien-rise force-pushed the kien-rise/vkey-0107 branch from 2f62d60 to 05570b2 Compare December 4, 2025 20:47
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.

1 participant