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 prepare proposal to efficiently fill the square #224

Merged
merged 25 commits into from
May 16, 2022

Conversation

evan-forbes
Copy link
Member

@evan-forbes evan-forbes commented Feb 25, 2022

Description

This PR

  • moves the data root generation step to PrepareProposal
  • estimates a square size in PrepareProposal based on the block data (errors on the side of over estimating)
  • efficiently fills the square in an atomic and lazy fashion (only adds a pfd if its message can also fit, uses new lazy share writer from core)

@evan-forbes evan-forbes self-assigned this Feb 25, 2022
@evan-forbes evan-forbes mentioned this pull request Mar 3, 2022
Base automatically changed from evan/message-inclusion to master May 5, 2022 21:34
@codecov-commenter
Copy link

codecov-commenter commented May 10, 2022

Codecov Report

Merging #224 (a063a95) into master (adfdb1c) will not change coverage.
The diff coverage is 75.00%.

@@           Coverage Diff           @@
##           master     #224   +/-   ##
=======================================
  Coverage   26.12%   26.12%           
=======================================
  Files          14       14           
  Lines        1860     1860           
=======================================
  Hits          486      486           
  Misses       1336     1336           
  Partials       38       38           
Impacted Files Coverage Δ
x/payment/types/wirepayfordata.go 69.44% <0.00%> (ø)
x/payment/types/payfordata.go 59.02% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update adfdb1c...a063a95. Read the comment docs.

@evan-forbes evan-forbes marked this pull request as ready for review May 10, 2022 16:08
@evan-forbes evan-forbes added C: Celestia app ABCI modifies an ABCI method labels May 10, 2022
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.

cosmetics

app/split_shares.go Outdated Show resolved Hide resolved
app/split_shares.go Outdated Show resolved Hide resolved
app/test/split_shares_test.go Outdated Show resolved Hide resolved
evan-forbes and others added 3 commits May 10, 2022 13:49
Co-authored-by: CHAMI Rachid <chamirachid1@gmail.com>
Co-authored-by: CHAMI Rachid <chamirachid1@gmail.com>
Co-authored-by: CHAMI Rachid <chamirachid1@gmail.com>
}

dah := da.NewDataAvailabilityHeader(eds)
data.Hash = dah.Hash()
Copy link
Member

Choose a reason for hiding this comment

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

Nice. So this is not done in core at all anymore, right? I'm wondering if we should move some of the code that is currently in core to this repo actually 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

I looked into this, but atm I think its best to keep it there. This is mainly because it makes it easier to test things. This could be a good goal for our next upgrade tho.

app/process_proposal.go Outdated Show resolved Hide resolved
x/payment/client/testutil/integration_test.go Show resolved Hide resolved
app/split_shares.go Outdated Show resolved Hide resolved
app/split_shares.go Outdated Show resolved Hide resolved
app/split_shares.go Outdated Show resolved Hide resolved
app/split_shares.go Show resolved Hide resolved
app/split_shares.go Outdated Show resolved Hide resolved
evan-forbes and others added 2 commits May 11, 2022 04:28
Co-authored-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>
app/prepare_proposal.go Outdated Show resolved Hide resolved
app/split_shares.go Outdated Show resolved Hide resolved
app/prepare_proposal.go Show resolved Hide resolved
app/prepare_proposal.go Outdated Show resolved Hide resolved
evan-forbes and others added 4 commits May 12, 2022 18:06
Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
adlerjohn
adlerjohn previously approved these changes May 12, 2022
Co-authored-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ABCI modifies an ABCI method
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants