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

MIssing GasPrice for FHECast, FhePubKey and ProtectedMemory ? #68

Open
jatZama opened this issue Jan 26, 2024 · 0 comments
Open

MIssing GasPrice for FHECast, FhePubKey and ProtectedMemory ? #68

jatZama opened this issue Jan 26, 2024 · 0 comments
Assignees

Comments

@jatZama
Copy link
Member

jatZama commented Jan 26, 2024

I was not able to find the GasPrice for casting operations in the code https://github.com/zama-ai/fhevm-go/blob/main/fhevm/precompiles.go#L700
I noticed that I paid the same gas (edit: found mistake in my test) a bit less than 1000 gas when replacing in a transaction this line :
euint16 xx = TFHE.asEuint16(x);
with this one :
euint32 xx = TFHE.asEuint32(TFHE.asEuint16(x));

Same seem to be true for the FhePubKey precompile function.

We could DDOS the network easily if the gas is set to 0 or too low.

Also : where is the price for the storing or loading privileged memory? I only found a cost for privileged storage but not privileged memory.

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