Joystream / Joystream/joystream

Giza: Refactor common functionality

Open
#2,701 0 comments 2 reactions 1 assignee View on GitHub

@Lezek123 is already working on this.

Since Sep 23, 2021.

estimate-40h giza
Dominant language
Rust
Stars
1.4k
Forks
116
PR merge metrics
No merged PRs in 30d

Description

Storage node and distributor node are currently beeing developed on separate branches and it's clear that there will be a lot of copy-pasted code between them. There is also code duplicated between @joystream/cli and storage/distributor CLIs, query-node and CLIs etc. Some examples include:

  • Metadata handling (metadataToBytes / metadataFromBytes) - CLI, storage-node, distributor-node and probably integration tests
  • BagId parsing - storage-node, distributor-node, query-node
  • CLI base structure - CLI, storage-node, distributor-node
  • Logging - storage-node, dsitributor-node
  • Query node communication&codegen - CLI, distributor-node, storage-node and probably integration tests
  • Storage node communication - CLI, dsitributor-node and probably integration tests

Some of the code may be probably refactored to existing libraries like @joystream/metadata-protobuf or @joystream/types, but it may make sense to introduce another librar/libraries like @joystream/utils or @joystream/js (which was already planned for a long time).

I think the best moment to do this would be once all the parts all already merged, so we can clearly spot and refactor duplicated code hopefully without any major conflicts.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.