fedimint icon indicating copy to clipboard operation
fedimint copied to clipboard

Refactoring ideas

Open dpc opened this issue 1 year ago • 2 comments

  • [ ] move cli handling structs and fn to fedimint-cli/src/opts.rs or something. They seem scattered all over ATM.
  • [ ] Module and ModuleInit should live in fedimint-server (just like ClientModule and ClientModuleInit live in fedimint-client?)
  • [ ] fedimint_core::net::peer could be flattened to just fedimint_core::peer (or just fedimint_core::net?).
  • [ ] fedimint_core::query should probably live in fedimint-client? Server doesn't do queries, right?
  • [ ] fedimint-core/src/epoch.rs could be just merged with something bigger.
  • [ ] fedimint_core::cancellable should probably live under or be merged into fedimint_core::task
  • [ ] fedimint_core::bitcoinrpc seems to only have env vars stuff, and could live under fedimint_core::envs.
  • [ ] move txoutproofs out of fedimint-core
  • [ ] Extract database stuff from fedimint-core to fedimint-db, and encoding stuff to fedimint-encoding. As much as I dislike rocksdb, I grew fond of our DB abstractions, and would love to use them in other projects.

dpc avatar Mar 23 '24 05:03 dpc

* [ ]  `fedimint_core::query` should probably live in `fedimint-client`? Server doesn't do queries, right?

I wish that was true, but we do use the public API for fetching whole sessions when catching up after being offline.

elsirion avatar Mar 23 '24 16:03 elsirion

I wish that was true, but we do use the public API for fetching whole sessions when catching up after being offline.

@elsirion We could extra to separate crate, import from fedimint-server and fedimint-client maybe? fedimint-core is kind of a pain, as anything touching it causes everything to rebuild, so minimizing/split it seems worthwhile.

dpc avatar Mar 23 '24 18:03 dpc