-
Notifications
You must be signed in to change notification settings - Fork 0
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
[coprocessor] add inputs support for coprocessor #9
Conversation
916f55e
to
7a736a9
Compare
7a736a9
to
807a848
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I added some minor comments that I think should be fixed, if I am not missing something.
fhevm-engine/Cargo.toml
Outdated
@@ -3,5 +3,6 @@ resolver = "2" | |||
members = ["coprocessor", "executor", "fhevm-engine-common"] | |||
|
|||
[workspace.dependencies] | |||
tfhe = { version = "0.8.0-alpha.2", features = ["boolean", "shortint", "integer", "aarch64-unix"] } | |||
tfhe = { version = "0.8.0-alpha.2", features = ["boolean", "shortint", "integer", "aarch64-unix", "zk-pok"] } | |||
tfhe-zk-pok = "0.2.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need this dependency as the alpha version of tfhe has a dependency on 0.3...-alpha for tfhe-zk-pok. Or maybe you need to use the 0.3..-alpha one.
fhevm-engine/coprocessor/Cargo.toml
Outdated
@@ -25,6 +25,7 @@ bigdecimal = "0.4" | |||
fhevm-engine-common = { path = "../fhevm-engine-common" } | |||
strum = { version = "0.26", features = ["derive"] } | |||
bincode = "1.3.3" | |||
keccak-asm = "0.1.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doc for this crate says:
[!WARNING] Code is somewhat [tested](https://github.com/danipopes/keccak-asm/blob/HEAD/tests/test.rs) and [benchmarked](https://github.com/DaniPopes/bench-keccak256). Use at your own risk.
It doesn't have too much downloads. Maybe we can use a more popular one? Maybe sha3
?
|
||
for (ct_idx, the_ct) in corresponding_unpacked.iter().enumerate() { | ||
let mut handle: [u8; 32] = [0; 32]; | ||
handle.copy_from_slice(&blob_hash); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we have to include the index in the hash computation, say hash(input_payload || index)
? And then add the index as byte [29] too.
02f3c98
to
2f5ad0f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Adds inputs support for coprocessor
No signature verification yet.
Inputs endpoint:
@dartdart26 @immortal-tofu