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: add Bytes support for transaction iteration in ConsensusEvent and its ancestors #16844

Merged
merged 70 commits into from
Jan 10, 2025

Conversation

IvanKavaldzhiev
Copy link
Collaborator

@IvanKavaldzhiev IvanKavaldzhiev commented Dec 2, 2024

Description:
This PR enhances partially ISSTestingTool to work with the incoming transaction representation of Bytes only. Additional filtering and changes should be added when SwirldState API is adapted to handle the new transaction type.

To do so, ConsensusEvent was adapted to return such bytes, since ISSTestingTool and most of the platform testing apps use this interface when handling rounds/transactions.

Additionally, some of the methods connected with the current EventTransaction protobuf wrapper and checks for system transactions are marked as Deprecated, so that they are adapted for the incoming changes of using only Bytes for transactions.

Related issue(s):

Fixes #16840

Notes for reviewer:
The current logic for ISSTestingTool is working as expected.
The new transaction format with Bytes is not tested, since protobuf changes are not adapted and the SwirldState API changes including registering callback for getting back system transactions is not done yet.

Checklist

  • Documented (Code comments, README, etc.)
  • [] Tested (unit, integration, etc.)

@IvanKavaldzhiev IvanKavaldzhiev added the Platform Tickets pertaining to the platform label Dec 2, 2024
@IvanKavaldzhiev IvanKavaldzhiev self-assigned this Dec 2, 2024
@IvanKavaldzhiev IvanKavaldzhiev requested review from a team as code owners December 2, 2024 15:51
@IvanKavaldzhiev IvanKavaldzhiev added this to the v0.58 milestone Dec 2, 2024
Copy link

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 51.28205% with 19 lines in your changes missing coverage. Please review.

Project coverage is 67.29%. Comparing base (70c450e) to head (f71ea96).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
...java/com/swirlds/demo/iss/ISSTestingToolState.java 62.50% 11 Missing and 1 partial ⚠️
...latform/system/transaction/TransactionWrapper.java 0.00% 5 Missing ⚠️
.../java/com/swirlds/demo/iss/ISSTestingToolMain.java 0.00% 1 Missing ⚠️
...n/java/com/swirlds/platform/system/SwirldMain.java 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #16844      +/-   ##
============================================
+ Coverage     67.24%   67.29%   +0.04%     
- Complexity    21991    22008      +17     
============================================
  Files          2583     2583              
  Lines         96307    96334      +27     
  Branches      10054    10056       +2     
============================================
+ Hits          64763    64828      +65     
+ Misses        27839    27795      -44     
- Partials       3705     3711       +6     
Files with missing lines Coverage Δ
...irlds/platform/system/transaction/Transaction.java 50.00% <ø> (ø)
.../java/com/swirlds/demo/iss/ISSTestingToolMain.java 33.33% <0.00%> (+33.33%) ⬆️
...n/java/com/swirlds/platform/system/SwirldMain.java 0.00% <0.00%> (ø)
...latform/system/transaction/TransactionWrapper.java 60.00% <0.00%> (-12.00%) ⬇️
...java/com/swirlds/demo/iss/ISSTestingToolState.java 31.25% <62.50%> (+31.25%) ⬆️

... and 5 files with indirect coverage changes

Impacted file tree graph

Copy link

codacy-production bot commented Dec 3, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.05% (target: -1.00%) 53.85%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (70c450e) 96090 68316 71.10%
Head commit (f71ea96) 96117 (+27) 68387 (+71) 71.15% (+0.05%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#16844) 39 21 53.85%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

rbarkerSL
rbarkerSL previously approved these changes Jan 2, 2025
Copy link
Contributor

@rbarkerSL rbarkerSL left a comment

Choose a reason for hiding this comment

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

LGTM

@IvanKavaldzhiev IvanKavaldzhiev dismissed stale reviews from rbarkerSL and lpetrovic05 via ee0819c January 3, 2025 10:42
…usEvent

# Conflicts:
#	platform-sdk/platform-apps/tests/ISSTestingTool/src/main/java/com/swirlds/demo/iss/ISSTestingToolMain.java
#	platform-sdk/platform-apps/tests/ISSTestingTool/src/main/java/com/swirlds/demo/iss/ISSTestingToolState.java

Signed-off-by: Ivan Kavaldzhiev <[email protected]>
Copy link
Member

@poulok poulok left a comment

Choose a reason for hiding this comment

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

Approved, assuming the ISS Testing Tool nightly tests pass.

@IvanKavaldzhiev IvanKavaldzhiev merged commit be1981d into main Jan 10, 2025
72 of 74 checks passed
@IvanKavaldzhiev IvanKavaldzhiev deleted the 16840-enhance-ConsensusEvent branch January 10, 2025 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform Tickets pertaining to the platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend ConsensusEvent to support transaction in Bytes format
6 participants