Skip to content

Commit

Permalink
feat(taiko-client): use Keccak256 for packing difficulty calculation (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
johntaiko authored Feb 12, 2025
1 parent 1396911 commit afb15b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/taiko-client/bindings/encoding/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"math/big"

"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"

"github.com/taikoxyz/taiko-mono/packages/taiko-client/bindings/metadata"
Expand Down Expand Up @@ -583,7 +584,7 @@ func CalculatePacayaDifficulty(blockNum *big.Int) ([]byte, error) {
return nil, fmt.Errorf("failed to abi.encode pacaya difficulty, %w", err)
}

return packed, nil
return crypto.Keccak256(packed), nil
}

// EncodeBaseFeeConfig encodes the block.extraData field from the given base fee config.
Expand Down

0 comments on commit afb15b7

Please sign in to comment.