-
Notifications
You must be signed in to change notification settings - Fork 107
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] Unit Tests to validate Block Size increases + minor improvements #1538
Conversation
559d042
to
10c3556
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For first round, LGTM. I ran it locally and got succeeding tests as well.
I don't see the initial dangers of increasing the block size from the code perspective, but at the same time, my tendermint knowledge is not as vast as I'd like. A lot of increasing block size implications has to deal with gossiping and consensus, so in the testnet, we should ensure that we have a distributed set of validators from multiple node providers (my suggestion at least 5 different parties).
--- PASS: TestBlockSize_ChangeParams (5.80s)
=== RUN TestBlockSize_MaximumSize
tx_test.go:1110: Transactions accumulated at height=5: totalTxBytes=1018, len(res.Txs)=5, TotalTxCount=5, blockSize=2000
tx_test.go:1110: Transactions accumulated at height=6: totalTxBytes=1018, len(res.Txs)=5, TotalTxCount=5, blockSize=2000
tx_test.go:1110: Transactions accumulated at height=7: totalTxBytes=1017, len(res.Txs)=5, TotalTxCount=5, blockSize=2000
tx_test.go:1110: Transactions accumulated at height=8: totalTxBytes=1028, len(res.Txs)=5, TotalTxCount=5, blockSize=4000
tx_test.go:1110: Transactions accumulated at height=9: totalTxBytes=3063, len(res.Txs)=15, TotalTxCount=15, blockSize=8000
tx_test.go:1110: Transactions accumulated at height=10: totalTxBytes=6930, len(res.Txs)=34, TotalTxCount=34, blockSize=16000
tx_test.go:1110: Transactions accumulated at height=11: totalTxBytes=14894, len(res.Txs)=73, TotalTxCount=73, blockSize=128000
tx_test.go:1110: Transactions accumulated at height=12: totalTxBytes=14254, len(res.Txs)=70, TotalTxCount=70, blockSize=256000
tx_test.go:1110: Transactions accumulated at height=13: totalTxBytes=7127, len(res.Txs)=35, TotalTxCount=35, blockSize=512000
tx_test.go:1110: Transactions accumulated at height=14: totalTxBytes=7338, len(res.Txs)=36, TotalTxCount=36, blockSize=1024000
tx_test.go:1110: Transactions accumulated at height=15: totalTxBytes=7138, len(res.Txs)=35, TotalTxCount=35, blockSize=2048000
tx_test.go:1110: Transactions accumulated at height=16: totalTxBytes=7143, len(res.Txs)=35, TotalTxCount=35, blockSize=4096000
tx_test.go:1110: Transactions accumulated at height=17: totalTxBytes=7537, len(res.Txs)=37, TotalTxCount=37, blockSize=8192000
tx_test.go:1110: Transactions accumulated at height=18: totalTxBytes=7335, len(res.Txs)=36, TotalTxCount=36, blockSize=16384000
tx_test.go:1110: Transactions accumulated at height=19: totalTxBytes=7344, len(res.Txs)=36, TotalTxCount=36, blockSize=32768000
--- PASS: TestBlockSize_MaximumSize (98.64s)
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables for this repo. you could follow readme for more information |
AI-Generated Pull Request Summary: This pull request includes changes across multiple files, focusing on improving code clarity, validation, error handling, and streamlining functions. Key updates include reorganizing import orders, adding new test functions, modifying existing tests, and implementing additional comments for clarification. The |
AI-Generated Pull Request Summary: This pull request includes changes across multiple files related to block sizes, consensus configuration, governance parameters, tests, and code formatting. Key updates include adding new tests, refactoring existing tests, updating function signatures and methods, improving error handling and logging, and adjusting context versions and parameters. The changes are intended to enhance code readability, maintainability, and overall functionality, while also ensuring consistency in settings related to Tendermint nodes during testing. |
@PoktBlade PTAL when you have time, I think this one should be okay to merge in. |
LGTM, look forward to testing this out in testnet 🚀 |
AI-Generated Summary: This pull request includes various changes across multiple files, mainly focused on improving code organization, readability, and maintainability, as well as enhancing test coverage. Some notable modifications include:
Overall, these changes aim to improve the quality and functionality of the codebase. |
1f3029f
to
f851170
Compare
AI-Generated Summary: This pull request includes changes across multiple files, focusing on the following aspects:
Overall, these changes aim to enhance the stability, functionality, and readability of the codebase. |
AI-Generated Summary: This pull request includes a variety of changes across multiple files. Key updates include adding a new parameter Some important modifications include the refactoring of the |
AI-Generated Summary: This pull request introduces a new function called |
AI-Generated Summary: This pull request includes various enhancements, refactors, and added test cases. Key changes include refactoring the |
AI-Generated Summary: This pull request includes numerous changes across multiple files, mostly focusing on improving code readability, test coverage, and refactoring for better maintainability. Key updates include the introduction of a |
AI-Generated Summary: This pull request includes changes to several files, primarily focusing on refactoring functions, updating test cases, and improving code readability. Major changes consist of refactoring |
AI-Generated Summary: This pull request introduces various changes across multiple files, focusing mainly on improving code readability, functionality, and test cases. The significant changes include:
Notable changes are made to |
AI-Generated Summary: This pull request introduces various updates across multiple files focusing on improving code organization, readability, and providing additional context to functions and parameters. Notable changes include adding a new parameter |
Going to merge this in. I reviewed the CircleCI build and confirmed none of the failures are related to this changes and are being handled in another PR at this point. |
Description
Add unit tests to verify that block size modifications work as expected
Fixes
Validation of the ability to increase block size to increase the throughput of the network.
For reference, the Tendermint block size is hardcoded to have a cap of 100MB; source.
Changes
Primary Changes
TestBlockSize_ChangeParamValue
to validate that the block size parameter is updated and set correctlyTestBlockSize_ChangeAndFillBlockSize
to verify that the block size parameter works as intendedSecondary Changes
app/common_test
;Tertiary Changes
v1/query/upgrade
endpoint to return a JSON stringTesting
See the comments in the code for complexity related to testing
TestBlockSize_MaximumSize
.As seen below:
64000
, the txs in the backlog are in the blockExecuted with:
go test -count=1 -v -run TestBlockSize_ChangeAndFillBlockSize ./app
The output of the test is as follows:
Next Steps
DISCUSS
items are left for the reviewer in the PR