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

test: transaction splitting #813

Merged
merged 3 commits into from
Sep 29, 2022

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Sep 28, 2022

Define unit tests for transaction splitting. These should be helpful when we tackle #802

@rootulp rootulp added the testing items that are strictly related to adding or extending test coverage label Sep 28, 2022
@rootulp rootulp self-assigned this Sep 28, 2022
@evan-forbes
Copy link
Member

ref: part of (and an improvement of!) #630 I think

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.

dope 🙏 very good tests as documentation.

0x0, // reserved byte
0x1, // unit length of first transaction
0xa, // data of first transaction
}, bytes.Repeat([]byte{0}, 244)...), // padding
Copy link
Member

Choose a reason for hiding this comment

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

[optional]
these will technically break when we increase share size, I think we could subtract from the constants here, but considering we are rarely doing that I'm 100% fine with leaving it.

having a test that breaks on purpose if the share size is changed might even be desirable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agreed, this test will definitely break when we increase share size because the bytes of padding will be incorrect and the reserved byte will likely be two bytes instead of one.

I'm on-board with having these tests break when we introduce share breaking changes.

@rootulp rootulp merged commit 5dc1fb8 into celestiaorg:main Sep 29, 2022
@rootulp rootulp deleted the rp/share-splitting-tests branch September 29, 2022 14:54
rootulp added a commit to rootulp/celestia-app that referenced this pull request Sep 29, 2022
Define unit tests for transaction splitting. These should be helpful
when we tackle celestiaorg#802
rach-id pushed a commit to rach-id/celestia-app that referenced this pull request Nov 16, 2022
Define unit tests for transaction splitting. These should be helpful
when we tackle celestiaorg#802
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing items that are strictly related to adding or extending test coverage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants