Skip to content

Conversation

sasurobert
Copy link
Contributor

No description provided.

This change addresses several issues found during an audit of the `vmhost/vmhooks/zkcryptoei.go` file.

- Fixes a critical bug where `ManagedVerifyPlonk` was calling the
  `Groth16` verification function instead of the `Plonk` one.
- Improves naming consistency by renaming `ManagedPairingChecksEC` to
  `ManagedPairingCheckEC`.
- Adds comments to the gas calculation `TODO`s to explain that a more
  accurate gas calculation would require changes to the gas schedule.
- Standardizes error handling by using `FailExecutionConditionally` where
  appropriate.
- Reduces code duplication by creating a helper function for common EC
  operations.
- Fixes a bug where the gas cost for the `ManagedMulEC` operation was
  incorrect.
- Removes an unused comment block to improve code readability.
This change addresses several issues found during a second audit of the `vmhost/vmhooks/zkcryptoei.go` file.

- Fixes the gas costs for `ManagedMultiExpEC` and `ManagedPairingCheckEC`
  to use `VerifyBLSMultiSig` as a placeholder.
- Refactors `ManagedMultiExpECWithHost` and `ManagedPairingCheckECWithHost`
  to reduce code duplication.
- Improves comments about gas cost calculation.
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