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: rename share to chunk #299

Closed
wants to merge 1 commit into from

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Feb 21, 2024

Closes #215

I opted to use chunk instead of share because @musalbas preferred it and chunk already appears in the exported API of this library (e.g. ValidateChunkSize, MaxChunks).

Technically Shares is in the public API too (it's a field of ErrByzantineData) but this PR doesn't introduce any breaking changes b/c IMO it's not worth breaking API over this name change.

@rootulp rootulp self-assigned this Feb 21, 2024
Copy link

codecov bot commented Feb 21, 2024

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (d6c118c) 80.89% compared to head (5223ae4) 82.24%.
Report is 7 commits behind head on main.

Files Patch % Lines
extendeddatacrossword.go 80.95% 7 Missing and 1 partial ⚠️
leopard.go 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #299      +/-   ##
==========================================
+ Coverage   80.89%   82.24%   +1.34%     
==========================================
  Files           8        7       -1     
  Lines         869      614     -255     
==========================================
- Hits          703      505     -198     
+ Misses        119       66      -53     
+ Partials       47       43       -4     

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

@musalbas
Copy link
Member

What about celestia-node, celestia-app, and other repos?
Cc @renaynay @Wondertan

@rootulp
Copy link
Collaborator Author

rootulp commented Feb 21, 2024

celestia-node has ~183 occurrences of share and ~4 for chunk. celestia-app almost always uses shares and not chunk. I had a preference for share but you preferred chunk. See #262 (comment).

@musalbas
Copy link
Member

If share is overwhelmingly used more than chunk then I'm not against using share

@musalbas
Copy link
Member

But in this repo it seems that chunk is used more than share?

@rootulp
Copy link
Collaborator Author

rootulp commented Feb 21, 2024

This repo is split. 188 occurrences of chunk and 300 occurrences of share. I still lean slightly towards share because usage in downstream repos but not strongly opinionated on it. Can do whichever reviewers prefer.

@musalbas
Copy link
Member

musalbas commented Feb 21, 2024 via email

@rootulp
Copy link
Collaborator Author

rootulp commented Feb 21, 2024

celestia-node API uses share: https://node-rpc-docs.celestia.org/?version=v0.13.0#share. I don't see instances of chunk in those docs.

@musalbas
Copy link
Member

musalbas commented Feb 21, 2024 via email

@rootulp
Copy link
Collaborator Author

rootulp commented Feb 21, 2024

Agreed, can do.

@rootulp rootulp closed this Feb 21, 2024
@rootulp rootulp deleted the rp/consistent-naming branch February 21, 2024 22:00
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.

Consistent naming: shard, chunk, buffer, share
2 participants