Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction Streamer #4288

Merged
merged 3 commits into from
Sep 1, 2022
Merged

Transaction Streamer #4288

merged 3 commits into from
Sep 1, 2022

Conversation

longbowlu
Copy link
Contributor

Create a transaction streamer and transaction subscription apis. Luckily we can rely a lot on previous work on event sub.

  1. FN enables transaction subscription when the node config has a valid "websocket_address"
  2. Today a pubsub connectino subscribes to all finalized txns. In the future more filters will be added according to this proposal and the discussions inside

Why do we need this:

  1. see this proposal
  2. we may use this in the incentivized testnet program.

Test plan:
started a local network with a fullnode, websocat ws://127.0.0.1:9001 then {"jsonrpc":"2.0", "id": 1, "method": "sui_subscribeTransaction", "params": ["Any"]}. Made txns and saw they came through websocat.

In the next PR, I will move EventStreamingAPI into streaming_api.rs

Copy link
Contributor

@patrickkuo patrickkuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great!, just a few minor comments.

Also we need to add this to the Rust SDK and TS SDK, don't have to be in this PR but will be good if we have GH issues to track it.

crates/sui-json-rpc-types/src/lib.rs Outdated Show resolved Hide resolved
crates/sui-json-rpc/src/api.rs Outdated Show resolved Hide resolved
@longbowlu
Copy link
Contributor Author

here you go #4423 and #4424

Copy link
Contributor

@patrickkuo patrickkuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@longbowlu longbowlu merged commit 7daf309 into main Sep 1, 2022
@longbowlu longbowlu deleted the transaction-streamer branch September 1, 2022 07:56
@janetwu11 janetwu11 mentioned this pull request Sep 8, 2022
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.

None yet

2 participants