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

refactor(share/availability): simplify light availability #3895

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

walldiss
Copy link
Member

  • simplification refactoring of Samples selection code
  • remove squareSampler
  • remove binary encode/decode in favour of json
  • removal of no longer relevant TODOs
  • rename "cache" naming artefacts from the past
  • use height in logs instead of root hash

@walldiss walldiss added the kind:refactor Attached to refactoring PRs label Oct 28, 2024
@walldiss walldiss self-assigned this Oct 28, 2024
@walldiss walldiss changed the title refactor(share/availability): and simplify light availability refactor(share/availability): simplify light availability Oct 29, 2024
Copy link
Member

@renaynay renaynay left a comment

Choose a reason for hiding this comment

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

Additional request is to move dah validation check in availability.go earlier in the SharesAvailability function -- ideally in the beginning. It doesn't make sense where it currently is.

share/availability/light/availability.go Outdated Show resolved Hide resolved
share/availability/light/availability.go Show resolved Hide resolved
share/availability/light/sample.go Outdated Show resolved Hide resolved
@renaynay renaynay added the kind:break! Attached to breaking PRs label Oct 29, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 29, 2024

Codecov Report

Attention: Patch coverage is 79.16667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 45.33%. Comparing base (2469e7a) to head (8874842).
Report is 369 commits behind head on main.

Files with missing lines Patch % Lines
share/availability/light/availability.go 75.00% 2 Missing and 1 partial ⚠️
share/availability/light/sample.go 83.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3895      +/-   ##
==========================================
+ Coverage   44.83%   45.33%   +0.50%     
==========================================
  Files         265      308      +43     
  Lines       14620    21764    +7144     
==========================================
+ Hits         6555     9867    +3312     
- Misses       7313    10844    +3531     
- Partials      752     1053     +301     

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

@walldiss
Copy link
Member Author

Had to rebase the PR on main, and commit history is lost. Here is what changed after last reviews

  • Removed uneccesary dah validation from both light and full availability
  • clean up remaining logs to use height.
  • changed uint -> int for Row and Col in Sample

renaynay
renaynay previously approved these changes Oct 30, 2024
# Conflicts:
#	share/availability/light/availability.go
@walldiss walldiss enabled auto-merge (squash) October 31, 2024 13:31
@walldiss walldiss merged commit 816f46e into celestiaorg:main Oct 31, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:break! Attached to breaking PRs kind:refactor Attached to refactoring PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants