From 19def6bfe2681cf8578eb926d00a593e885deca6 Mon Sep 17 00:00:00 2001 From: Sahil-4555 Date: Thu, 26 Feb 2026 08:50:56 +0530 Subject: [PATCH] crypto: fix KeccakState undefined reference in ziren build tag --- crypto/keccak_ziren.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crypto/keccak_ziren.go b/crypto/keccak_ziren.go index 8e967c6dbf..2429012e92 100644 --- a/crypto/keccak_ziren.go +++ b/crypto/keccak_ziren.go @@ -21,6 +21,7 @@ package crypto import ( "github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto/keccak" ) // zirenKeccakState implements the KeccakState interface using the Ziren zkvm_runtime. @@ -31,7 +32,7 @@ type zirenKeccakState struct { dirty bool // whether new data has been written since last hash } -func newZirenKeccakState() KeccakState { +func newZirenKeccakState() keccak.KeccakState { return &zirenKeccakState{ buf: make([]byte, 0, 512), // pre-allocate reasonable capacity } @@ -85,7 +86,7 @@ func (s *zirenKeccakState) computeHashIfNeeded() { // NewKeccakState creates a new KeccakState // This uses a Ziren-optimized implementation that leverages the zkvm_runtime.Keccak256 system call. -func NewKeccakState() KeccakState { +func NewKeccakState() keccak.KeccakState { return newZirenKeccakState() }