go-ethereum/libevm/ethtest
Arran Schlosberg 1ec8741af9
feat: ethtest.UNSAFEDeterministicPrivateKey() (#244)
## Why this should be merged

The ability to deterministically generate private keys (and
corresponding EOAs) is useful in testing.

## How this works

A `[]byte` seed is written to a Keccak state, which is rejection-sampled
to find a scalar `<` the order of `S256` to use as the private key.

## How this was tested

Unit test that demonstrates (a) determinism of generation; and (b)
correct computation of the public key as proven by ECDSA recovery using
the standard tx-sender functionality.
2025-11-12 18:29:15 +00:00
..
devkey.go feat: ethtest.UNSAFEDeterministicPrivateKey() (#244) 2025-11-12 18:29:15 +00:00
devkey_test.go feat: ethtest.UNSAFEDeterministicPrivateKey() (#244) 2025-11-12 18:29:15 +00:00
evm.go Merge branch 'auto-rename-module_source-2bd6bd01d2e8561dd7fc21b631f4a34ac16627a1_workflow-c1fc594f020d23958b641a4e5a856b6e52c49d3bece94b95594864db16c1b0fc-main' into arr4n/rename-module 2024-10-17 13:07:28 +11:00
rand.go test: lock in types.Header RLP encoding (#87) 2024-12-12 13:00:02 +00:00