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

Simplify FHEPayment #189

Closed
jatZama opened this issue Dec 13, 2024 · 5 comments
Closed

Simplify FHEPayment #189

jatZama opened this issue Dec 13, 2024 · 5 comments
Assignees

Comments

@jatZama
Copy link
Member

jatZama commented Dec 13, 2024

The question is should we use this contract only for FHEGas price? This is still unclear since we are waiting ZWS to decide on how to handle Payment for FHE operations. If it is totaally offchain we might have issues with composability if some handles point to nothing.

@immortal-tofu
Copy link
Collaborator

The idea is to:

  • Remove the PaymentContract and PaymentContract calls from TFHEExecutor
  • Extends TFHEExecutor and do one of the following:
    • Calls to FHEGasMonitoring.sol which is dedicated to monitor gas consumption and revert it reach a threshold.
    • Directly store and monitor gas consumption in the TFHEExecutor contract.

@jatZama
Copy link
Member Author

jatZama commented Dec 13, 2024

The idea is to:

  • Remove the PaymentContract and PaymentContract calls from TFHEExecutor

  • Extends TFHEExecutor and do one of the following:

    • Calls to FHEGasMonitoring.sol which is dedicated to monitor gas consumption and revert it reach a threshold.
    • Directly store and monitor gas consumption in the TFHEExecutor contract.

This is almost surely impossible, since both TFHEExecutor and FHEPayment are already just below the smart contract size limit. So we need two separate contracts here, unfortunately.

@immortal-tofu
Copy link
Collaborator

Ok ok so good for FHEGasMonitoring.sol 👍

@immortal-tofu
Copy link
Collaborator

And also we'll remove payment library from fhevm

@immortal-tofu
Copy link
Collaborator

Specified in #198

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

No branches or pull requests

4 participants