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

feature: add rpc client #12

Merged
merged 2 commits into from
May 18, 2023
Merged

feature: add rpc client #12

merged 2 commits into from
May 18, 2023

Conversation

peterzhb
Copy link

This pr adds both the axon client which handles communication with axon and the ckb client which handles rpc requests to ckb_indexer.

The axon client is not fully finished. The endpoint to send the metadata to axon is left unimplemented so far.

@driftluo
Copy link
Contributor

Why not directly rely on emitter-lib, but choose to copy the code?

@peterzhb
Copy link
Author

Why not directly rely on emitter-lib, but choose to copy the code?

The call to the server doesn't need to be a rpc call or socket subscription since now rpc is inside the spark. Also it doesn't need the header sync. So far it only needs to sync the metadata cell data actually. So the functionalities and code size are less. Actually I can further reduce the serialization and persistence to be just a dict of searchkey and block number.
On the other hand, isn't emitter going to be merged into forcerelay in the future?

@peterzhb peterzhb force-pushed the @peter/add-rpc-client branch 3 times, most recently from c6f3f64 to 15281e2 Compare May 17, 2023 02:46
@peterzhb peterzhb marked this pull request as ready for review May 17, 2023 06:41
@KaoImin KaoImin added this pull request to the merge queue May 18, 2023
Merged via the queue into main with commit 0b081d5 May 18, 2023
@KaoImin KaoImin deleted the @peter/add-rpc-client branch May 18, 2023 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants