Skip to content

Conversation

@glitch003
Copy link
Contributor

Make EVM Access control conditions implementation match the one in the Node. the thing this fixes is that when the client hashed the access control condition, it was done differently vs the lit node code, so decryption actually succeeded on the node, but we couldn't combine the shares client side, because the hashed access control condition goes into the identity param.

Copilot AI review requested due to automatic review settings October 14, 2025 03:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes EVM access control conditions implementation to match the behavior in the Lit Node, resolving an issue where client-side share combination failed due to mismatched hashing of access control conditions between client and node implementations.

  • Updated access control condition data types from JSON values to strongly typed fields
  • Refactored hashing logic to match the Lit Node implementation
  • Added comprehensive test coverage for EVM contract conditions with client-side decryption

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
lit-rust-sdk/src/types.rs Updated EvmContractCondition and ReturnValueTest structures to use string types instead of JSON values
lit-rust-sdk/src/client/decrypt.rs Refactored access control condition hashing to match Node implementation
lit-rust-sdk/src/utils.rs Added utility function for converting bytes to hex string
lit-rust-sdk/tests/encrypt_test.rs Updated test to use string value instead of JSON for return value test
lit-rust-sdk/tests/decrypt_client_side.rs Added comprehensive test for EVM contract conditions and updated existing test
lit-rust-sdk/src/lib.rs Added utils module export
lit-rust-sdk/Cargo.toml Added ethabi dependency and bumped version

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@glitch003 glitch003 merged commit 05f1356 into main Oct 14, 2025
2 checks passed
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