go-ethereum/crypto
Péter Garamvölgyi 304af60f50
feat: change bytecode hash function from Keccak to Poseidon (#149)
* feat: change bytecode hash function from Keccak to Poseidon

* fix TestStateProcessorErrors

* rename files

* copy iden3's poseidon package to local

* update poseidon hash

* apply new hash in codehash

* extend hash method, use actual code size as cap

* prune keccak(nil) for empty code

* update empty code hash references to Poseidon

* add TestPoseidonCodeHash

* use keccak for empty code hash

* go mod tidy

* goimports

* use Poseidon code hash in state and sync tests

* run goimports

* run goimports

* remove unnecessary reallocation from CodeHash

* goimports

* move codehash API to separate module

* add missing package

* fix review comments

* improve comments

Co-authored-by: Ho Vei <noelwei@gmail.com>
2022-09-08 06:16:17 +08:00
..
blake2b all: add go:build lines (#23468) 2021-08-25 18:46:29 +02:00
bls12381 Update mod file and all imports to use scroll-tech URL (#15) 2021-12-24 10:59:22 +01:00
bn256 Update mod file and all imports to use scroll-tech URL (#15) 2021-12-24 10:59:22 +01:00
codehash feat: change bytecode hash function from Keccak to Poseidon (#149) 2022-09-08 06:16:17 +08:00
ecies Update mod file and all imports to use scroll-tech URL (#15) 2021-12-24 10:59:22 +01:00
poseidon feat: change bytecode hash function from Keccak to Poseidon (#149) 2022-09-08 06:16:17 +08:00
signify all: add go:build lines (#23468) 2021-08-25 18:46:29 +02:00
crypto.go Add goimports lint (#54) 2022-03-24 16:53:59 +08:00
crypto_test.go Update mod file and all imports to use scroll-tech URL (#15) 2021-12-24 10:59:22 +01:00
signature_cgo.go Add goimports lint (#54) 2022-03-24 16:53:59 +08:00
signature_nocgo.go all: add go:build lines (#23468) 2021-08-25 18:46:29 +02:00
signature_test.go Update mod file and all imports to use scroll-tech URL (#15) 2021-12-24 10:59:22 +01:00