farcaster-node icon indicating copy to clipboard operation
farcaster-node copied to clipboard

feat: introduce sync and rpc buses

Open h4sh3d opened this issue 3 years ago • 1 comments

Implements #706

This PR introduce two new buses: sync and rpc and split requests on these new buses.

  • [ ] Rename module rpc into bus to have bus::msg, bus::rpc, bus::sync ...
  • [ ] Migrate cli over rpc bus
  • [ ] Migrate syncers over sync bus
  • [ ] Only have Rpc, Ctl, Msg, and Sync on the primary Request enum

h4sh3d avatar Aug 30 '22 16:08 h4sh3d

commit refactor: start splitting request messages starts splitting the Request enum into different enums for each buses.

swap-cli info has been fully migrated over the RPC bus; the other cli calls now fail because the rest is still over the CTL bus so CI will not pass.

h4sh3d avatar Aug 30 '22 18:08 h4sh3d

Next steps for this PR to then go into review/heavy test phase next week:

  • [x] check documentation on encoding and API usage for messages
  • [x] chose correct numbers for each message (if API derive is maintained above)
  • [ ] ~maybe add new message types to allow strict filtering of types on each buses; Request::Rpc only on Rpc bus, Ctl on Ctl, etc.~; to do in another PR

h4sh3d avatar Sep 23 '22 11:09 h4sh3d

This PR is a big step toward this architecture:

node-buses

Currently some services are listening to some buses without using it, this needs to be cleanup in the next PR. Also, walletd currently make no usage of the Info (i.e. Rpc) bus, but we can add it if we want to query some state later.

h4sh3d avatar Oct 04 '22 14:10 h4sh3d