Skip to content

Add Keccak-256, ECDSA support, and tests#141

Merged
BlobMaster41 merged 1 commit intomainfrom
chore/keccak256
Feb 15, 2026
Merged

Add Keccak-256, ECDSA support, and tests#141
BlobMaster41 merged 1 commit intomainfrom
chore/keccak256

Conversation

@BlobMaster41
Copy link
Collaborator

@BlobMaster41 BlobMaster41 commented Feb 12, 2026

Description

Bump package to v1.11.0-rc.5 and add a native Keccak-256 implementation and test suite. Export keccak helpers from runtime/index and add keccak256, keccak256Concat, functionSelector, ethAddressFromPubKey, and low-level rot64 utilities. Extend signature handling: add ECDSA to SignaturesMethods, introduce verifyECDSASignature/internalVerifyECDSA and secp256k1 public-key validation, and update Blockchain.verifySignature to accept an explicit signatureType (with consensus checks, deprecation warnings, and error handling). Small API/behavior change in ExtendedAddress: use Revert for tweakedPublicKey validation. Includes comprehensive as-pect tests for keccak256 and rotation helpers.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Performance improvement
  • Refactoring (no functional changes)
  • Documentation update
  • CI/CD changes
  • Dependencies update

Checklist

Build & Tests

  • npm install completes without errors
  • npm test passes all tests

Code Quality

  • Code follows the project's coding standards
  • No new compiler warnings introduced
  • Error handling is appropriate
  • SafeMath used for all arithmetic operations

Documentation

  • Code comments added for complex logic
  • Public APIs are documented
  • README updated (if applicable)

Security

  • No sensitive data (keys, credentials) committed
  • No new security vulnerabilities introduced
  • No floating-point arithmetic used

OPNet Specific

  • Changes are compatible with existing smart contracts
  • WASM execution behavior is unchanged (or documented if changed)
  • Storage pointer allocation is correct
  • Reentrancy considerations addressed

Testing

Related Issues


By submitting this PR, I confirm that my contribution is made under the terms of the project's license.

Add Keccak-256, ECDSA support, and tests

Bump package to v1.11.0-rc.5 and add a native Keccak-256 implementation and test suite. Export keccak helpers from runtime/index and add keccak256, keccak256Concat, functionSelector, ethAddressFromPubKey, and low-level rot64 utilities. Extend signature handling: add ECDSA to SignaturesMethods, introduce verifyECDSASignature/internalVerifyECDSA and secp256k1 public-key validation, and update Blockchain.verifySignature to accept an explicit signatureType (with consensus checks, deprecation warnings, and error handling). Small API/behavior change in ExtendedAddress: use Revert for tweakedPublicKey validation. Includes comprehensive as-pect tests for keccak256 and rotation helpers.
@BlobMaster41 BlobMaster41 merged commit 6fa84a6 into main Feb 15, 2026
3 checks passed
@BlobMaster41 BlobMaster41 deleted the chore/keccak256 branch February 15, 2026 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant