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

Standardization for aggregation module #14

Merged
merged 2 commits into from
Jan 21, 2025
Merged

Standardization for aggregation module #14

merged 2 commits into from
Jan 21, 2025

Conversation

0xjei
Copy link
Member

@0xjei 0xjei commented Jan 14, 2025

This PR aims to implement a standard mechanism to reuse & aggregate in logic expressions multiple external contracts ("verifiers") using standard built-in Solidity language to optimize gas consumption and checks, leaving max freedom of implementation to the developer to advanced tricks (e.g., short circuit). These contracts have logic that is NOT controlled by the specific Checker or any Excubiae contract, but are managed externally by someone else. The Checker uses these contracts to verify specific verifiable attributes defined on the check(). These attributes verify evidence that is enforced by the `policy' that will use them. This diagram exemplifies what is the terminology relationship.

graph LR;
    Verifiers-->|verify validity of evidence for|Verifiable_Attributes;
    Verifiable_Attributes-->|defined and checked by|Checker;
    Checker-->|is enforced by|Policy;
Loading

To avoid creating an over-engineered parser of logical expressions or new types of abstract Checker' contracts, we have abstracted at a high level taking it as inherent and necessary to any contract, implementing things directly in the core contracts. This way, any Base/AdvancedChecker' has a standard mechanism to handle multiple external contracts without having to code them manually (e.g., specifying a set of addresses and extending the current core), and the ability to specify a single encoded `evidence' for each one.

More details will be released in the documentation, which will be updated prior to release. This example [AdvancedVoting](https://github.com/privacy-scaling-explorations/excubiae/blob/main/packages/contracts/contracts/src/test/advanced/AdvancedVoting.sol) will be updated to demonstrate the new functionality.

TODO

  • Basic Design & Implementation & Adaptation to current tests
  •  Refactoring & Optimization
  • update test x demonstration
  • Naming
  • 100% code coverage

@0xjei 0xjei added this to the [MVP-2] Arms milestone Jan 14, 2025
@0xjei 0xjei self-assigned this Jan 14, 2025
@0xjei 0xjei requested a review from a team as a code owner January 14, 2025 18:34
@0xjei 0xjei requested a review from ctrlc03 January 17, 2025 15:01
@ctrlc03 ctrlc03 self-requested a review January 21, 2025 11:09
Copy link

@ctrlc03 ctrlc03 left a comment

Choose a reason for hiding this comment

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

Thanks

@0xjei 0xjei merged commit 96a3312 into main Jan 21, 2025
2 checks passed
@0xjei 0xjei deleted the feat/aggregation branch January 21, 2025 11:11
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