Open yanyanho opened 4 years ago
Hi.
the code to generate Poseidon EVM contract is at: https://github.com/HarryR/ethsnarks/blob/master/ethsnarks/poseidon/contract.py - it emits raw EVM bytecode rather than Solidity, but could be modified to emit Solidity with mostly inline assembly like the MiMC contract generator does.
The Poseidon hash inputs and outputs are in the zkSNARK scalar field, so not 256bit integers, or the altbn curve field, but the order of the curve (L, which is a ~254 bit prime).
I find that : inputs = [3, 0] python_result = poseidon(inputs) print(python_result)
the result is 254bit? is it a bug?