hiero-ledger / hiero-ledger/hiero-consensus-node
CLPR-6.3: Ethereum Messaging Layer Functions
- Dominant language
- Java
- Stars
- 406
- Forks
- 226
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 210
Description
## Story CLPR-6.3: Ethereum Messaging Layer Functions
**Parent Epic:** CLPR-6: Ethereum On-Chain Service
**Repo:** TBD
### Objective
Implement messaging layer functions: `sendMessage`, `submitBundle`, `redactMessage`, queue management.
### Acceptance Criteria
- **AC-1:** `sendMessage(bytes32, address, bytes, bytes) → uint64` — Enqueue with connector auth, running hash (SHA-256 precompile), queue depth check, lazy config propagation.
- **AC-2:** `submitBundle(bytes32, bytes, bytes)` — Full verification: verifier call, replay defense, running hash, size limits. Per-message dispatch by type.
- **AC-3:** App dispatch via `onClprMessage(bytes32, bytes, bytes) → bytes`. Gas limited to `max_gas_per_message`. Revert → APPLICATION_ERROR.
- **AC-4:** Response delivery via `onClprResponse(bytes32, uint64, uint8, bytes)` to sender (if contract). EOA responses via event logs.
- **AC-5:** `redactMessage(bytes32, uint64)` — ADMIN_ROLE. Payload removed, hash preserved.
- **AC-6:** `getQueueDepth(bytes32) → (uint64, uint32)`.
- **AC-7:** Reentrancy guard on `submitBundle` and `sendMessage`.
- **AC-8:** Foundry tests: send/submit/verify flow, hash chain, replay, app dispatch, response ordering, redaction.
### Dependencies
- CLPR-6.2
### Risk
**High** — Most complex functions. Gas optimization critical for `submitBundle` loop.
Contributor guide
Research direction
Start by resolving dependency CLPR-6.2, then locate the contract entry points named in this issue: sendMessage, submitBundle, redactMessage, and getQueueDepth. Use the Foundry test requirements and AC-1 through AC-7 as the completion checklist; done means the send/submit flow, verification, dispatch, responses, redaction, queue limits, and reentrancy behavior are covered.
Written by the indexing model from the issue text.
Assessment
- Domain
- blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100