hiero-ledger / hiero-ledger/hiero-consensus-node

CLPR-5.1: IClprVerifier Interface, System Contract Framework, and Pass-Through Verifier

Open
#24,540 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

## Story CLPR-5.1: IClprVerifier Interface, System Contract Framework, and Pass-Through Verifier

**Parent Epic:** CLPR-5: Hiero Verifier Contracts

### Objective

Define the `IClprVerifier` Solidity interface, establish the framework for deploying verifier system contracts, and provide a pass-through reference implementation for testing.

### Acceptance Criteria

- **AC-1:** `IClprVerifier` interface with three `view` functions:
- `verifyConfig(bytes proofBytes) → bytes` (serialized `ClprLedgerConfiguration`)
- `verifyBundle(bytes proofBytes) → (bytes, bytes)` (`ClprQueueMetadata`, `ClprMessagePayload[]`)
- `verifyMetadata(bytes proofBytes) → bytes` (`ClprQueueMetadata`)
- **AC-2:** No `verifyEndpoints` — peer endpoint discovery is off-chain via gossip.
- **AC-3:** Functions SHOULD fail fast on malformed inputs before expensive crypto.
- **AC-4:** Verifiers deployed as EVM system contracts with Hiero AccountIDs.
- **AC-5:** Invoked via `HandleContext.dispatchChildTransaction(ContractCallTransactionBody)`.
- **AC-6:** Implementation fingerprint: `keccak256(bytecode)` matching `EXTCODEHASH` semantics. Stored on Connection at registration as informational field.
- **AC-7:** Pass-through verifier: accepts any proof bytes, parses and returns data without cryptographic verification. For testing only.
- **AC-8:** ABI encoding/decoding helpers for protobuf ↔ Solidity struct conversion.
- **AC-9:** Performance consideration: EVM verifier call is on the hot path (every `submitBundle`). Document latency baseline. Consider native Java SPI as future optimization (impl spec §5.3, Finding F-6).

### Dependencies

- Hiero smart contract infrastructure
- CLPR-1.1 (types verifiers return)

### Risk

**Medium** — System contract deployment, protobuf ↔ ABI conversion. Pass-through verifier unblocks all downstream testing.

Contributor guide

Open the contributing guide

Research direction

Start with the IClprVerifier acceptance criteria, the referenced CLPR-1.1 types, and the invocation point HandleContext.dispatchChildTransaction(ContractCallTransactionBody). Review the Hiero smart contract infrastructure and implementation spec §5.3/Finding F-6 before defining the interface, system-contract deployment path, ABI/protobuf helpers, and pass-through verifier. Done means the stated interface, fingerprinting, testing implementation, and latency baseline are covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, solidity
Domain
backend-api-design, blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.