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

feat!: square size independent message commitments #937

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Oct 30, 2022

Implementation for square size independent message commitments. Note this targets feat/square-size-independent-commitments per #941 so that we can unblock review.

@rootulp rootulp force-pushed the rp/square-size-independent-commitments-2 branch 2 times, most recently from ac52881 to c64ed25 Compare October 31, 2022 10:29
@@ -25,7 +25,7 @@ func TestFuzzPrepareProcessProposal(t *testing.T) {
encConf := encoding.MakeConfig(app.ModuleEncodingRegisters...)
signer := testutil.GenerateKeyringSigner(t, testAccName)
testApp := testutil.SetupTestAppWithGenesisValSet(t)
timer := time.After(time.Second * 30)
timer := time.After(time.Second * 10)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

[for reviewers] VSCode default test timeout is 30 seconds so this test would timeout prior to completing. Decreased to 10 seconds so that it's possible to run inside VSCode. Can revert if desired.

Screen Shot 2022-10-31 at 11 31 34 AM

This comment was marked as resolved.

proto/payment/tx.proto Outdated Show resolved Hide resolved
@rootulp rootulp force-pushed the rp/square-size-independent-commitments-2 branch from c64ed25 to 777b3c0 Compare October 31, 2022 11:16
@rootulp rootulp added C: Celestia app warn:api breaking item will be break an API and require a major bump labels Oct 31, 2022
@rootulp rootulp marked this pull request as ready for review October 31, 2022 11:24
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.

Awesome work 🔥
Added couple questions, would defer to Evan for approval.

.gitignore Outdated Show resolved Hide resolved
app/estimate_square_size.go Outdated Show resolved Hide resolved
@@ -25,7 +25,7 @@ func TestFuzzPrepareProcessProposal(t *testing.T) {
encConf := encoding.MakeConfig(app.ModuleEncodingRegisters...)
signer := testutil.GenerateKeyringSigner(t, testAccName)
testApp := testutil.SetupTestAppWithGenesisValSet(t)
timer := time.After(time.Second * 30)
timer := time.After(time.Second * 10)

This comment was marked as resolved.

@rootulp
Copy link
Collaborator Author

rootulp commented Nov 1, 2022

Sorry I can't comment on #937 (comment) but thanks for the tip! I reverted this test timeout decrease and changed my local VSCode go test timeout config.

@rootulp rootulp requested a review from rach-id November 1, 2022 10:40
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.

🔥
Deferring to Evan for final approval

@rootulp rootulp changed the base branch from main to feat/square-size-independent-commitments November 1, 2022 12:23
Copy link
Member

@evan-forbes evan-forbes left a comment

Choose a reason for hiding this comment

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

had one non-blocking question and a non-blocking comment. I'm really impressed, I don't think this could have been broken up into a smaller chunk! really great work!!

x/payment/types/wirepayfordata.go Outdated Show resolved Hide resolved
pkg/inclusion/paths.go Outdated Show resolved Hide resolved
- remove one type conversion by adopting generics
- remove unnecessary check
@musalbas
Copy link
Member

musalbas commented Nov 7, 2022

Does this PR preserve the current non-interactive default rules? As mentioned in #941 (comment), the current non-interactive default rules may be required to ensure that message inclusion proofs remain O(log(n)).

@evan-forbes
Copy link
Member

@musalbas good question and thanks for checking on this. This PR does not change the existing non-interactive defaults.

This function and its usage remains unmodified https://github.com/rootulp/celestia-app/blob/671bc800acecfdeef426db580811fc0baeeda037/pkg/shares/non_interactive_defaults.go#L39-L80

only code relating to which subtree roots are used to calculate the commitment has been changed.

@rootulp
Copy link
Collaborator Author

rootulp commented Nov 8, 2022

Will merge this to the feature branch feat/square-size-independent-commitments so that I can update docs in a separate PR.

@rootulp rootulp merged commit f6413f1 into celestiaorg:feat/square-size-independent-commitments Nov 8, 2022
@rootulp rootulp deleted the rp/square-size-independent-commitments-2 branch November 8, 2022 00:02
rootulp added a commit that referenced this pull request Nov 8, 2022
Implementation for square size independent message commitments. Note
this targets `feat/square-size-independent-commitments` per
#941 so that we can
unblock review.

<img
src="https://user-images.githubusercontent.com/3699047/198996002-f20086af-187d-4ccf-adff-8f73b834152f.png"
width="500">
rootulp added a commit that referenced this pull request Nov 9, 2022
If ADR 008 is adopted, only one message share commitment is signed so
this PR renames a plural function to be singular. This is a follow-up to
#937 and could've been
included in that PR.

Note: targets feature branch
rootulp added a commit that referenced this pull request Nov 11, 2022
Closes #941

## Description
This merges the feature branch
`feat/square-size-independent-commitments` to `main`. The feature branch
includes 3 already approved PRs:
- #937
- #983
- #982

and two additional commits that haven't been reviewed yet to resolve the
tasks below

## Tasks
- [x] Merge in `main` and resolve merge conflicts caused by renames:
    - `payForData` => `payForBlob`
    - `x/payment` => `x/blob`
- [x] Update ADR 008 to describe that it was implemented

Co-authored-by: CHAMI Rachid <chamirachid1@gmail.com>
Co-authored-by: Matthew Sevey <mjsevey@gmail.com>
rach-id added a commit to rach-id/celestia-app that referenced this pull request Nov 16, 2022
…elestiaorg#984)

Closes celestiaorg#941

## Description
This merges the feature branch
`feat/square-size-independent-commitments` to `main`. The feature branch
includes 3 already approved PRs:
- celestiaorg#937
- celestiaorg#983
- celestiaorg#982

and two additional commits that haven't been reviewed yet to resolve the
tasks below

## Tasks
- [x] Merge in `main` and resolve merge conflicts caused by renames:
    - `payForData` => `payForBlob`
    - `x/payment` => `x/blob`
- [x] Update ADR 008 to describe that it was implemented

Co-authored-by: CHAMI Rachid <chamirachid1@gmail.com>
Co-authored-by: Matthew Sevey <mjsevey@gmail.com>
rach-id added a commit to rach-id/celestia-app that referenced this pull request Nov 16, 2022
…elestiaorg#984)

Closes celestiaorg#941

## Description
This merges the feature branch
`feat/square-size-independent-commitments` to `main`. The feature branch
includes 3 already approved PRs:
- celestiaorg#937
- celestiaorg#983
- celestiaorg#982

and two additional commits that haven't been reviewed yet to resolve the
tasks below

## Tasks
- [x] Merge in `main` and resolve merge conflicts caused by renames:
    - `payForData` => `payForBlob`
    - `x/payment` => `x/blob`
- [x] Update ADR 008 to describe that it was implemented

Co-authored-by: CHAMI Rachid <chamirachid1@gmail.com>
Co-authored-by: Matthew Sevey <mjsevey@gmail.com>
@evan-forbes evan-forbes added this to the Incentivized Testnet milestone Jan 3, 2023
cmwaters pushed a commit to celestiaorg/go-square that referenced this pull request Dec 14, 2023
Closes celestiaorg/celestia-app#941

## Description
This merges the feature branch
`feat/square-size-independent-commitments` to `main`. The feature branch
includes 3 already approved PRs:
- celestiaorg/celestia-app#937
- celestiaorg/celestia-app#983
- celestiaorg/celestia-app#982

and two additional commits that haven't been reviewed yet to resolve the
tasks below

## Tasks
- [x] Merge in `main` and resolve merge conflicts caused by renames:
    - `payForData` => `payForBlob`
    - `x/payment` => `x/blob`
- [x] Update ADR 008 to describe that it was implemented

Co-authored-by: CHAMI Rachid <chamirachid1@gmail.com>
Co-authored-by: Matthew Sevey <mjsevey@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
warn:api breaking item will be break an API and require a major bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants