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

Use a single name for each variable that references square size #687

Closed
evan-forbes opened this issue Sep 6, 2022 · 2 comments · Fixed by #705 or #774
Closed

Use a single name for each variable that references square size #687

evan-forbes opened this issue Sep 6, 2022 · 2 comments · Fixed by #705 or #774
Assignees

Comments

@evan-forbes
Copy link
Member

This repo uses three names for the same thing: origSquareSize, squareSize, k. Is it safe to assume they are all interchangeable? If so, would it aid readability to standardize on one? My impression is that readers who are familiar with https://celestiaorg.github.io/celestia-specs/latest/rationale/message_block_layout.html#non-interactive-default-rules are able to infer k == squareSize so this may not be confusing for other readers but may be helpful for new readers who aren't as familiar with the specs.

Originally posted by @rootulp in #680 (comment)

We should use a single reference to square size for the entire repo.

@rootulp
Copy link
Collaborator

rootulp commented Sep 12, 2022

If we opt to use SquareSize and squareSize, this implies a breaking change to protobuf types: https://github.com/rootulp/celestia-core/blob/114375ab4f4e2976ff3f6dde1caeddb430a14f4e/types/block.go#L1034

@rootulp
Copy link
Collaborator

rootulp commented Sep 16, 2022

I found another instance in

uint64 k = 1;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants