Commit Graph

141 Commits

Author SHA1 Message Date
PacificYield
57bf95c516 refactor: add custom errors for TFHE 2024-12-20 12:03:12 +01:00
jatZama
770ebad9c2 feat: add allowTransient for ebytes64 and ebytes128 2024-12-14 16:16:21 +01:00
jatZama
6319bee113 chore: moved FHEVMConfig.sol to examples folder 2024-12-03 12:21:45 +01:00
jatZama
3ba5c16820 chore: fixed FHEVMConfig imports 2024-12-03 12:00:47 +01:00
jatZama
83280c66d4 chore: update codegen and removed FHEVMConfig 2024-12-03 11:36:37 +01:00
PacificYield
ec49462f2e docs: updates NatSpec for lib contracts 2024-11-15 14:26:49 +01:00
Joseph-André Turk
552fa63293 feat: refactor importing fhevm-core-contracts 2024-10-25 18:15:28 +02:00
Joseph-André Turk
fe56493b8d feat: creates codegen for InputVerifier variants 2024-10-25 11:34:55 +02:00
Joseph-André Turk
a7dc2c86c6 feat: tfhe-executor events variant with faster mock 2024-10-23 17:20:05 +02:00
Joseph-André Turk
8ea2a2001d chore: adds view modifier in ACL 2024-10-21 14:41:23 +02:00
Joseph-André Turk
45e860d577 feat: updated TFHEExecutor to support new types
chore: eq-neq  bool support and bitwise scalar support

chore: overloads for fheEq and fheNe

fix: reverts onchain when rhs is 0 in fheDiv-fheRem

feat: added support for scalar and,or,xor

chore: cleanup codegen

feat: adds euint128 and euint256 types

chore: removes ebool fheRandBounded and adds manual tests

feat: adds new types for fheRand

feat: adds trivialEncrypt for ebytesXXX

feat: adds fheEq fheNe ifThenElse for new types

chore: rename asyncDecrypt() to initGateway()
2024-10-18 02:33:10 +02:00
Joseph-André Turk
43a8d3d977 feat: adds getter functions for address constants 2024-10-08 17:25:08 +02:00
Joseph-André Turk
be852a3b5f chore: removed file copying need for InputVerifier deployment 2024-10-07 11:30:35 +02:00
Joseph-André Turk
0943a0895c feat: use fhevm deployer private key for deployment
chore: cleanup README

feat: add option to pass addresses for kms signers instead of private keys

chore: typo and cleanup in sh script
2024-10-04 16:15:57 +02:00
Joseph-André Turk
02482facfd feat: native InputVerifier
feat: finalized InputVerifier for native version

chore: fixed native test

chore: fixed index

chore: removed hardhat console import
2024-10-03 19:25:12 +02:00
Joseph-André Turk
228709a8a3 feat: moved input KMS sig checking in KMSVerifier
chore: refactored transient storage cleanup

chore: fixed input verifier revert message
2024-10-01 18:49:05 +02:00
Joseph-André Turk
7b24a8c659 chore: removed useless file 2024-09-27 16:07:44 +02:00
Joseph-André Turk
b5c3234874 feat: set null FHE gas prices + remove Payment lib 2024-09-27 15:42:42 +02:00
jat
e51ef785e7 Merge pull request #508 from zama-ai/InputVerifier
feat: added aclAddress in EIP712 struct of KMSVerifier
2024-09-19 16:43:43 +02:00
Joseph-André Turk
04e0ed38db chore: removed reliance on viaIR 2024-09-19 13:38:43 +02:00
Joseph-André Turk
a00fc344fe feat: added InputVerifier contract with tests and mock
chore: fixed coverage
2024-09-19 04:32:49 +02:00
Joseph-André Turk
2359de5c51 feat: added aclAddress in EIP712 struct of KMSVerifier 2024-09-17 18:51:01 +02:00
jat
ea0a61a2d5 Merge pull request #506 from zama-ai/removeDelegatedRevoke
fix: removed ability to revoke reencryption delegation
2024-09-17 18:18:14 +02:00
Joseph-André Turk
366e3a838b feat: new handle computation method 2024-09-17 17:36:21 +02:00
Joseph-André Turk
e8c063dea4 fix: removed ability to revoke reencryption delegation 2024-09-17 15:40:33 +02:00
Joseph-André Turk
4eeb0d22e5 feat: added kms signature in mocked mode
chore: fixed typo
2024-09-13 11:41:40 +02:00
Joseph-André Turk
a2786b4364 feat: made all fhevm contracts UUPS
chore: fixed prettier

fix: typo in address starting with 0

fix: get correct value of counter when doing snapshot
2024-09-12 15:42:48 +02:00
Joseph-André Turk
fa5cb0edaf feat: set protocol addresses in dApp storage
chore: removed useless import
2024-09-10 15:01:43 +02:00
Joseph-André Turk
aa11c4e263 feat: added allowThis function and docs 2024-08-30 12:42:42 +02:00
Joseph-André Turk
625970fb09 feat: added fallback on origin, AA compatibility, tests 2024-08-29 19:40:03 +02:00
Joseph-André Turk
0049e9df76 chore: move deposit function from TFHE to Payment library
chore fixed typo
2024-08-28 21:26:11 +02:00
Joseph-André Turk
52c90d75fd feat: factored tx gasprice in fhe gasprice with min cap 2024-08-28 16:33:27 +02:00
Joseph-André Turk
665a2ac959 chore: refactored FHEPayment with custom errors
chore: removed obsolete workflow
2024-08-27 20:35:05 +02:00
Joseph-André Turk
190ab2a181 feat: added recoverBurntFunds function 2024-08-27 19:35:53 +02:00
Joseph-André Turk
ce34ad5fd6 feat: fhe-payment v0 2024-08-27 19:35:28 +02:00
Joseph-André Turk
25d10871e5 chore: refactored TFHEExecutor 2024-08-23 18:47:44 +02:00
Joseph-André Turk
a13cb753e9 feat: symbolic computation of fhe operations handles
chore: fixed typo
2024-08-23 18:22:31 +02:00
Joseph-André Turk
56dbfe0681 feat: new mocked mode 2024-08-07 00:46:38 +02:00
Joseph-André Turk
a1c02aa962 fix: allow for ebytes256 + reencrypt tests
chore: removed console logs
2024-07-09 14:13:27 +02:00
Joseph-André Turk
205f7e9fda fix: kmsverifier, solidity ver and silence transient warning
chore: updated version of package

chore: updated npmignore and deleted abstracts
2024-07-05 18:50:44 +02:00
Petar Ivanov
a54d2b53a3 feat: pass a contract address to verifyCiphertext
Will be needed in the future to verify the input ZKPoK.
2024-06-21 17:58:21 +03:00
Petar Ivanov
68ea71ac70 feat: update with latest Solidity implementation
There are a number of tests that are still not rewritten with the new
APIs. The EncryptedERC20 and Rand examples do work.
2024-06-21 08:05:05 +03:00
Petar Ivanov
d1d41843c1 feat: add support for list-based inputs
More info: https://github.com/zama-ai/fhevm-go/pull/120

API changes will be described in the documentation.

More tests and examples are to be done in a future commit.
2024-06-18 12:45:12 +03:00
Levent DEMIR
cb73a82beb fixture: refactoring from oracle to gateway
This PR is rebasing original fhevm repository to include last async
decrypt api.

The old oracle has been refatored to Gateway plus related changes

A fix in ACL. sol has been done.

The async decrypt test is successfully triggering an event.

The missing part to have the full test is the signatures part in
KMSVerifier.sol.

Check setup-local-fhevm.sh script to see the steps needed to have a
working configuration. Deployment is as follows:

1. Deploy ACL + write deployed @ to lib/.env.acl
2. Deploy TFHEExecutor + write deployed @ to lib/.env.exec
3. Deploy KMSVerifier + write deployed @ to lib/.env.kmsverifier
4. Deploy Gateway + write deployed @ to gateway/.env.gateway
2024-06-12 14:26:07 +02:00
Petar Ivanov
7c19b2b426 feat: introduce the ACL and TFHEExecutor contracts
Purpose of this commit is to establish a baseline for a working fhEVM
using the ACL and TFHEExecutor contracts. More tests and a rewrite of
examples will come in a future commit.

The ACL contract manages ciphertext permissions, removing the need for
privileged storage and memory in fhEVM.

The TFHEExecutor contract checks ciphertext permissions in the ACL
contract. Only TFHEExecutor is allowed to call FHE precompiles in the
fhEVM.

Not all tests are passing at that point. Only the Rand and the
EncryptedERC20 ones work.

Tests don't use the KMS for decryption. Instead, we load the secret FHE
key and pass it to fhevmjs for decryption.

Update to fhevmjs 0.5.0-1 and tfhe-rs 0.6.1
2024-06-12 11:30:52 +03:00
Clément 'birdy' Danjou
dd30420517 fix: regenerate codegen 2024-05-29 20:29:23 +02:00
Clément 'birdy' Danjou
1e76d443ce fix: fix bug on require 2024-05-28 16:41:06 +02:00
Clément 'birdy' Danjou
a46463c835 test: many fixes 2024-05-27 15:26:24 +02:00
Clément 'birdy' Danjou
82b50abb1c fix: remove length from call to fhevm-go 2024-05-27 14:56:20 +02:00
Clément 'birdy' Danjou
b17ebc7d55 feat: various fixes regarding array eq 2024-05-23 16:37:51 +02:00