mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 09:50:01 +00:00
## Summary - Wire the Frontier `EthPubSub` module into the node's RPC layer, enabling WebSocket-based `eth_subscribe`/`eth_unsubscribe` support for `newHeads`, `logs`, and `newPendingTransactions` - Use Ethereum-style hex (`0x`-prefixed) subscription IDs via `EthereumSubIdProvider` for client compatibility - Add Moonwall test suites (adapted from Moonbeam) covering block header subscriptions, log filtering (by address, topics, wildcards, conditional parameters), and pending transaction notifications ## Changes ### `operator/node/src/rpc.rs` - Import and merge `EthPubSub` / `EthPubSubApiServer` into the RPC module - Accept `subscription_task_executor` and `pubsub_notification_sinks` parameters in `create_full()` - Remove stale commented-out boilerplate ### `operator/node/src/service.rs` - Clone `pubsub_notification_sinks` and forward it (along with `subscription_executor`) into the RPC factory closure - Set `config.rpc.id_provider` to `EthereumSubIdProvider` for Ethereum-compatible subscription IDs ### `test/moonwall/suites/dev/stagenet/subscription/` - `test-subscription.ts` — `newHeads`: subscription ID format, block header field validation - `test-subscription-logs.ts` — `logs`: basic log notification on contract deployment - `test-subscription-logs2.ts` — `logs`: filtering by single/multiple addresses, topics, wildcards, conditional and combined parameters (8 cases) - `test-subscription-pending.ts` — `newPendingTransactions`: pending tx hash notification Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| contracts/src | ||
| helpers | ||
| suites/dev | ||