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

Rename appconsts to use Compact and Sparse terminology #710

Merged
merged 5 commits into from
Sep 15, 2022

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Sep 15, 2022

  • Rename ShareReservedBytes => CompactShareReservedBytes
  • Rename TxShareSize => CompactShareContentSize
  • Rename MsgShareSize => SparseShareContentSize
  • Improve doc comments

@rootulp rootulp self-assigned this Sep 15, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #710 (e2d3858) into main (f67bb6b) will not change coverage.
The diff coverage is 82.35%.

@@           Coverage Diff           @@
##             main     #710   +/-   ##
=======================================
  Coverage   44.52%   44.52%           
=======================================
  Files          32       32           
  Lines        3189     3189           
=======================================
  Hits         1420     1420           
  Misses       1666     1666           
  Partials      103      103           
Impacted Files Coverage Δ
pkg/shares/utils.go 0.00% <0.00%> (ø)
pkg/shares/split_compact_shares.go 70.40% <75.00%> (ø)
pkg/prove/proof.go 83.82% <100.00%> (ø)
pkg/shares/parse_compact_shares.go 77.77% <100.00%> (ø)
pkg/shares/parse_sparse_shares.go 88.60% <100.00%> (ø)
pkg/shares/split_sparse_shares.go 69.51% <100.00%> (ø)
x/payment/types/square_sizes.go 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@rootulp rootulp marked this pull request as ready for review September 15, 2022 01:19
@rootulp rootulp enabled auto-merge (squash) September 15, 2022 01:19
Copy link
Member

@rach-id rach-id left a comment

Choose a reason for hiding this comment

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

🚀

pkg/appconsts/appconsts.go Show resolved Hide resolved
@evan-forbes
Copy link
Member

I would approve, but I want to ensure that Rachid's question or suggestion has a chance to be addressed before automerging, even if its non-blocking/orthogonal

@rootulp rootulp enabled auto-merge (squash) September 15, 2022 15:57
Copy link
Member

@rach-id rach-id left a comment

Choose a reason for hiding this comment

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

:shipit:

@rootulp rootulp merged commit 70ef349 into celestiaorg:main Sep 15, 2022
@rootulp rootulp deleted the rp/rename-constants branch September 15, 2022 16:36
rootulp added a commit to rootulp/celestia-app that referenced this pull request Sep 15, 2022
…rg#710)

* feat: move share consts from celestia-core

* feat: new consts for universal share encoding

* remove universal share constants

* address @sweexordious feedback
rootulp added a commit to rootulp/celestia-app that referenced this pull request Sep 15, 2022
rootulp added a commit that referenced this pull request Sep 16, 2022
* Add ParseInfoReservedByte

* Update split contiguous shares to account for info byte

* Fix TestContigShareWriter test

* Improve names in parseDataLength

* Remove unused function parseDataLength

* revert local celestia-core replace

* docs: improve docs

* docs: fix doc comments

* feat: move share consts from celestia-core

* feat: new consts for universal share encoding

* remove universal share constants

* fix: pass Test_parseSparseShares

* Rename appconsts to use `Compact` and `Sparse` terminology (#710)

* feat: move share consts from celestia-core

* feat: new consts for universal share encoding

* remove universal share constants

* address @sweexordious feedback

* Revert "Rename appconsts to use `Compact` and `Sparse` terminology (#710)"

This reverts commit 75e2b9d.

* revert change to exactMsgShareSize

* fix: add info byte to namespace padded shares

Makes `TestParsePaddedMsg` pass

* pass first two test cases of TestMerge

* pass: TestMerge

* pass: TestTxInclusion by updating proof to use share pkg

* pass: TestTxSharePosition

* pass: Test_genRowShares

* pass: Test_genOrigRowShares

* use share package over types

* pass: TestPrepareMessagesWithReservedNamespaces

* pass: TestCreateCommitment by updating expected bytes

* extract doc comments to separate PR

* extract separate PR for specifying square size in shares_test.go

* test: add TestMsgShareContainsInfoByte

* test: add TestContiguousMsgShareContainsInfoByte

* test: add compact share tests

* throw error if isMessageStart != isNewMessage

* throw error if compact share does not start with a share with isMessageStart=true
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