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

Added prune protocol action + ProtocolAuthorization refactoring #735

Merged
merged 10 commits into from
May 13, 2024

Conversation

thehenrytsai
Copy link
Member

  1. Added support for prune protocol action.
  2. Renamed "ancestor chain" to "record chain" because the chain often contains not just the ancestor records, but also record in concern which leads to confusion.
  3. Simplified context and implementation of constructRecordChain()
  4. Refactored authorizeAgainstAllowedActions() to make it more easily understood.

@codecov-commenter
Copy link

codecov-commenter commented May 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.53%. Comparing base (f42ba25) to head (cf7e4bb).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #735   +/-   ##
=======================================
  Coverage   98.52%   98.53%           
=======================================
  Files          71       71           
  Lines       10563    10628   +65     
  Branches     1539     1550   +11     
=======================================
+ Hits        10407    10472   +65     
  Misses        150      150           
  Partials        6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

csuwildcat
csuwildcat previously approved these changes May 9, 2024
Copy link
Member

@LiranCohen LiranCohen left a comment

Choose a reason for hiding this comment

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

Got through most of it and it looks good!

Just a couple of NITS wrt naming/comments, but code logic looks solid.

Want to have another look at authorizeAgainstAllowedActions to make sure I understood it correctly and also review the tests before I stamp, but looks good so far!

src/core/protocol-authorization.ts Outdated Show resolved Hide resolved
src/core/protocol-authorization.ts Outdated Show resolved Hide resolved
src/core/protocol-authorization.ts Outdated Show resolved Hide resolved
LiranCohen
LiranCohen previously approved these changes May 13, 2024
Copy link
Member

@LiranCohen LiranCohen left a comment

Choose a reason for hiding this comment

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

🚀 🚀

Copy link
Member

@LiranCohen LiranCohen left a comment

Choose a reason for hiding this comment

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

🚀

@thehenrytsai thehenrytsai merged commit c08fdd3 into main May 13, 2024
4 checks passed
@thehenrytsai thehenrytsai deleted the henrytsai/prune-action branch May 13, 2024 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants