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

Clear Technical Debt #217

Merged
merged 15 commits into from
Jan 2, 2025
Merged

Clear Technical Debt #217

merged 15 commits into from
Jan 2, 2025

Conversation

ryardley
Copy link
Contributor

@ryardley ryardley commented Dec 27, 2024

This branch can host a series of technical debt PRs we are trying to get done over the holidays. The goal is to make the patterns within the codebase more understandable and easier to follow and the codebase easier to debug.

Merging to this branch using clean commits is quicker and preferable to waiting for approvals whilst many folks are on holidays

Closes: #194
Closes: #215
Closes: #222
Closes: #216
Closes: #225
Closes: #220
Closes: #219
Closes: #221
Closes: #201
Closes: #200
Closes: #237

Copy link
Contributor

coderabbitai bot commented Dec 27, 2024

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

73 files out of 178 files are above the max files limit of 75. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

* Ensure that snapshotting is fallable and prepare for persistable container

* Formatting

* Fix failing test by ensuring when we read 0 as  bytes datastore returns None

* Add docs

* Add comments and expose repositories

* Add Persistable to PlaintextAggregator

* Remove deref

* Add persistable to PublickeyAggregator

* Add persistable to EventReader

* Add persistable to KeyShare

* Remove KeyshareState

* Add persistable to Sortition

* Hook up StoreKeys in anticipation for extraction later
@ryardley ryardley changed the title Technical Debt Clear Technical Debt Dec 27, 2024
* Extract all repositories to separate crates

* Fix tests

* Extract keyshare and aggregator features to crates

* Fix test imports

* Remove comments

* Add helpful comments

* Use HetrogenousMap

* Extract features out of router

* Tidy up

* Add docs
* router -> e3_request

* E3RequestContextSnapshot -> ContextSnapshot

* ContextSnapshot -> E3ContextSnapshot

* E3RequestRouter -> E3Router

* e3_request_router.rs -> router.rs

* CommitteeMeta -> E3Meta

* Rename file

* Rename property

* Add docs and warnings
* Flatten CLI

* Flatten CLI

* Refactor

* Use datastore module

* Extract main functions from password_delete
* Rename `enclave_node` -> `runtime`

* Rename `runtime` -> `enclave_core`

* Revert poor replace

* Use workspace paths
* Fix dockerfile issues and set packages to inherit from workspace

* Add toolchain file to ensure we dont redownload tools
* Extract events

* Use a macro to add From traits

* Expose TestEvent
* Remove tag

* Update docs

* Update comment

* Use binaries instead of running through cargo

* Extract logs to separate files

* Update warnings
* Tidy up tests and logfiles

* Split off prebuild from tests

* Try running tests in parallel

* Add typechain bindings

* Dont run all tests in prebuild
@ryardley ryardley marked this pull request as ready for review January 2, 2025 01:35
@ryardley
Copy link
Contributor Author

ryardley commented Jan 2, 2025

Couple of things we have not done yet that we may have talked about:

  1. Extract a "types" crate
    I think I am ok with this the way it is - extracting out a types crate is only going to have a couple of things in it and they are currently close to where they are predominantly used
  2. Rename "Features" (and hence feature.rs) to something else.
    This is probably more of a thing that needs to be worked on quickly
  3. Using actors within the net package.
    After talking about this with @hmzakhalid this will be a bit more work as we should really look to replace actix with tactix. Waiting on this branch for this to be done is probably counter productive and we should probably merge the current work here first as the migration will be a longer project which will take time and can do in the next cycle

@ryardley
Copy link
Contributor Author

ryardley commented Jan 2, 2025

Added #237 to this PR as a TODO item

* Feature -> Extension

* feature.rs -> ext.rs

* Grammatical error

* Update docs

* Grammer
@ryardley
Copy link
Contributor Author

ryardley commented Jan 2, 2025

Ok this is ready for review @hmzakhalid

Copy link
Member

@hmzakhalid hmzakhalid left a comment

Choose a reason for hiding this comment

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

Lgtm!

@hmzakhalid hmzakhalid merged commit e5837f5 into main Jan 2, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment