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

docs: add ecAdd / ecMul #80

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 11 additions & 14 deletions docs/differences.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,22 @@ it still has some edge case behaviors.

The below opcodes differ in behavior between Ethereum and Kakarot:

| Item | Ethereum | Kakarot |
| ----------- | ---------------------------------------------------------- | --------------------------------------------------------------- |
| BLOCKHASH | Get the hash of one of the 256 most recent complete blocks | The last 10 blocks are not available, and 0 is returned instead |
| BLOBBASEFEE | Get the current data-blob base-fee | Return 0 as there are no blobs on Kakarot |
| BLOBHASH | Get blob versioned hashes at index | Return 0 as there are no blobs on Kakarot |
| Item | Ethereum | Kakarot |
| ----------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| BLOCKHASH | Get the hash of one of the 256 most recent complete blocks | The last 10 blocks are not available, and 0 is returned instead |
| BLOBBASEFEE | Get the current data-blob base-fee | Return 1 as there are no blobs on Kakarot. Corresponds to `MIN_BASE_FEE_PER_BLOB_GAS` as per [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) |
| BLOBHASH | Get blob versioned hashes at index | Return 0 as there are no blobs on Kakarot |

## EVM precompiles

The below precompiles differ in behavior between Ethereum and Kakarot:

| Item | Ethereum | Kakarot |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| ecAdd | Point addition (ADD) on the elliptic curve `alt_bn128` | Not supported |
| ecMul | Scalar multiplication (MUL) on the elliptic curve `alt_bn128` | Not supported |
| ecPairing | Bilinear function on groups on the elliptic curve `alt_bn128` | Not supported |
| Modexp |
Arbitrary-precision exponentiation under modulo | Not supported |
| Point evaluation | Verify p(z) = y given commitment that corresponds to the polynomial p(x) and a KZG proof. Also verify that the provided commitment matches the provided versioned_hash. | Not supported |
| P256 Verification (secp256r1 - [RIP-7212](https://github.com/ethereum/RIPs/blob/master/RIPS/rip-7212.md)) | Not Supported | P256 is used in Apple’s Secure Enclave, Webauthn, Android Keychain. Enables many use cases such as cheap FaceID signature verification for smart wallets on Kakarot. |
| Item | Ethereum | Kakarot |
| --------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ecPairing | Bilinear function on groups on the elliptic curve `alt_bn128` | Not supported |
| Modexp | Arbitrary-precision exponentiation under modulo | Not supported |
| Point evaluation | Verify p(z) = y given commitment that corresponds to the polynomial p(x) and a KZG proof. Also verify that the provided commitment matches the provided versioned_hash. | Not supported |
| P256 Verification (secp256r1 - [RIP-7212](https://github.com/ethereum/RIPs/blob/master/RIPS/rip-7212.md)) | Not Supported | P256 is used in Apple’s Secure Enclave, Webauthn, Android Keychain. Enables many use cases such as cheap FaceID signature verification for smart wallets on Kakarot. |

## EVM State computation

Expand Down
Loading