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 Flux RPC. #1365

Merged
merged 12 commits into from
Jul 18, 2024
Merged

Feature - Add Flux RPC. #1365

merged 12 commits into from
Jul 18, 2024

Conversation

MorningLightMountain713
Copy link
Contributor

@MorningLightMountain713 MorningLightMountain713 commented Jul 6, 2024

Forked from the feature/zmq_enable branch. So that branch getting merged into develop is a dependency for this branch.

#1363

(It will look a lot smaller once that branch is merged)

What this pull does

  • Removes the bitcoin package
  • Remove the daemonrpc inline package that was reliant on bitcoin
  • Refactor daemonRpcUtils to use asyncLock and small tidy up
  • Fixes issue where every benchmark rpc call was synchronously checking filesysytem
  • Creates our own JSON RPC client - FluxRpc Much simpler, and leverages existing axios
  • Adds test suite for the rpc client, and updates other tests reliant on daemonrpc.
  • Adds extra features to the AsyncLock You can now await ready with a timeout, or await and disable with timeout.

The main reason I needed this was so I can pass a signal into the rpc to cancel it, when necessary. It can take approx 500ms to pull the determ node list, if a block comes in when we are in the middle of this, it makes sense to cancel the pending request and start another.

It was also good to get rid of another couple of dependencies in package.json

@MorningLightMountain713
Copy link
Contributor Author

All tests passing

Screenshot 2024-07-06 at 7 56 50 PM

@Cabecinha84
Copy link
Member

Lots of changes, will review/merge after tomorrow release :)

Copy link
Member

@Cabecinha84 Cabecinha84 left a comment

Choose a reason for hiding this comment

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

ack

@Cabecinha84 Cabecinha84 merged commit 2f0e280 into development Jul 18, 2024
2 checks passed
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.

2 participants