Files
gpu/ecrecover.go
zeekay c9336309e7 feat: add BatchEcrecover using lux_gpu_ecrecover_batch C API
Provides Signature, EcrecoverResult types and BatchEcrecover function
required by luxfi/evm parallel tx verification. Uses the native
lux_gpu_ecrecover_batch for GPU-accelerated secp256k1 recovery.
2026-04-09 08:49:27 -07:00

17 lines
594 B
Go

// Package gpu provides GPU-accelerated ecrecover for batch tx signature verification.
package gpu
// Signature holds the components needed for secp256k1 ecrecover.
type Signature struct {
R [32]byte // r component (big-endian, left-padded)
S [32]byte // s component (big-endian, left-padded)
V uint8 // recovery id (0 or 1)
MsgHash [32]byte // Keccak256 signing hash
}
// EcrecoverResult holds the output of a single ecrecover operation.
type EcrecoverResult struct {
Address [20]byte // recovered Ethereum address
Valid bool // true if recovery succeeded
}