Joystream / Joystream/joystream

Content directory smart contracts: Splitting the logic

Open
#1,922 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

smart-contract-content-directory
Dominant language
Rust
Stars
1.4k
Forks
116
PR merge metrics
No merged PRs in 30d

Description

Currently (https://github.com/Joystream/joystream/pull/1752) ContentDirectory.sol is is a very big contract that costs a lot of gas to deploy (exceeds the default ETH gas limit) and requires compiler optimalization specifically for deployment in order to prevent other issues related to its size.

It needs to either be split into libraries / other contracts or further optimalized, though splitting seems like the most reasonable approach, since we probably can't avoid it at some point anyway, once we introduce concepts like playlists and series, lead-manageable entities (languages, categories, licenses) etc.

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.

Research direction

Start by reviewing ContentDirectory.sol and the implementation context in pull request #1752. Measure the contract's deployment size and gas usage, then determine whether splitting the logic into libraries or other contracts addresses the stated deployment-limit problem; done means the contract can be deployed without the reported gas-limit and size issues.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
blockchain
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.