Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sequencer-client: add extension trait to subscriber to new sequencer …
…blocks (#382) ## Summary Add a `SequencerSubscriptionClientExt` trait with a `subscribe_new_block_data` method. ## Background Removing gossipnet from conductor as part of #332 requires it to read new blocks directly from cometbft / sequencer. This patch extends the sequencer-client crate to provide that functionality using a convenience function so that conductor need not know how to convert comertbft new-block events to sequencer block data. ## Changes - Add a `SequencerSubscriptionClientExt` trait to the sequencer-client crate. - Reorganize the sequencer-client crate to export items under the appropriate features. - warn users if they set neither the `http` nor `websocket` features. ## Testing Testing this client is out of scope for this PR. We are relying on the underlying tendermint-rpc WebSocketClient being correctly implemented. It would be great to extend wiremock or a similar crate to provide a quick way to test websocket APIs. An alternative is to derive a jsonrpc server with jsonrpsee, but that's a lot more work. ## Breaking Changelist None, only functionality was added crates depending on sequencer-client were not touched. ## Related Issues Part of #332 #375 and #376 are precursor PRs unblocking this patch. --------- Co-authored-by: noot <36753753+noot@users.noreply.github.com>
- Loading branch information