Add integration tests on block processing#7378
Conversation
… parallel execution have the same behaviour Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
…for information. Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
siladu
left a comment
There was a problem hiding this comment.
Since it's a large test class, I think readability would be improved if it was a parameterized test with sequentialBlockProcessor and parallelBlockProcessor as the two parameters - what you do think?
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
To be honest, I believe that using parameterized tests may reduce readability. This is because the same test will be executed twice with identical names for both sequential and parallel block processing. At present, each test has a distinct name that clearly indicates its purpose. |
macfarla
left a comment
There was a problem hiding this comment.
think renaming the keyPair variables to match the corresponding accounts would help readability
That's true and it's personal preference whether you like parameterized tests or not. IMO, reducing 20 methods -> 10 methods in a big file is worth it. Also the framework allows you to make the distinction clear, e.g. you can label each processor... and it appears in the test results as such... Might we end up with more variants of BlockProcessors as we develop new strategies for parallel processing/conflict detection? |
siladu
left a comment
There was a problem hiding this comment.
LGTM, all comments are non-blocking regarding naming and style.
Ah nice, I haven't tried before, in this case, it makes sens. |
Co-authored-by: Simon Dudley <simon.dudley@consensys.net> Signed-off-by: ahamlat <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Add a block processing integration test to verify that sequential and parallel execution have the same behaviour Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net> Co-authored-by: Simon Dudley <simon.dudley@consensys.net> Signed-off-by: gconnect <agatevureglory@gmail.com>
PR description
This PR aims to enhance block processing testing, inspired by this comment from @garyschulte regarding test coverage. The goal is to develop unit tests that focus on executing block transactions without concerning header and body validations. For each scenario specified by @matkt, we test both sequential and parallel processing to ensure state changes remain consistent.
The tested cases are:
Test 1
Test 2
Test 3
Test 4
Test 5
Test 6
Test 7
Test 8 (Slots)
Test 9 (Slots)
Test 10 (Slots)
The Solidity contract file has been added for reference. It represents the smart contract that the bytecode is included in the genesis file. Including this file in the PR helps in understanding the tests.
Fixed Issue(s)
Thanks for sending a pull request! Have you done the following?
doc-change-requiredlabel to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew build./gradlew acceptanceTest./gradlew integrationTest./gradlew ethereum:referenceTests:referenceTests