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
fix: clear "side-effect fields" after switch a child record from SUCCESS to REVERTED_SUCCESS #10385
fix: clear "side-effect fields" after switch a child record from SUCCESS to REVERTED_SUCCESS #10385
Conversation
@tinker-michaelj can you please take a look? |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #10385 +/- ##
=============================================
+ Coverage 63.02% 63.03% +0.01%
- Complexity 30803 30813 +10
=============================================
Files 3359 3361 +2
Lines 135279 135392 +113
Branches 14074 14086 +12
=============================================
+ Hits 85256 85347 +91
- Misses 46683 46690 +7
- Partials 3340 3355 +15 ☔ View full report in Codecov by Sentry. |
Node: HAPI Test (Misc) Results419 tests - 1 320 ✔️ ±0 27m 26s ⏱️ + 3m 23s Results for commit a4fd7a1. ± Comparison against base commit 6f00b68. This pull request removes 1 test.
This pull request skips 1 and un-skips 1 tests.
♻️ This comment has been updated with latest results. |
Node: E2E Test Results 1 files ± 0 1 suites ±0 23m 20s ⏱️ + 23m 20s Results for commit a4fd7a1. ± Comparison against base commit 6f00b68. This pull request removes 1 and adds 311 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
.../hedera-app/src/main/java/com/hedera/node/app/workflows/handle/record/RecordListBuilder.java
Outdated
Show resolved
Hide resolved
.../hedera-app/src/main/java/com/hedera/node/app/workflows/handle/record/RecordListBuilder.java
Outdated
Show resolved
Hide resolved
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 fields other than Bytes
, we want to reset values to null
instead of DEFAULT
since only null
will omit the field from the serialized message.
4ffac75
to
45e1092
Compare
…ESS to REVERTED_SUCCESS Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
45e1092
to
cc51672
Compare
…ESS to REVERTED_SUCCESS Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
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.
LGTM, ty @thenswan !
Description:
Clear "side-effect fields" after switch a child record from
SUCCESS
toREVERTED_SUCCESS
.Related issue(s):
Fixes #10308
Notes for reviewer:
At first, I followed this strategy to remove side-effect fields:
REVERTED_SUCCESS
What did I check:
ContractMintHTSSuite.rollbackOnFailedMintAfterFungibleTransfer()
— side-effect fields removed in prev PRContractDeleteSuite.cannotUseMoreThanChildContractLimit()
— checked records and didn’t find any side-effect fields underREVERTED_SUCCESS
LazyCreateThroughPrecompileSuite.erc20TransferLazyCreate()
— checked and removedautomatic_token_associations
underREVERTED_SUCCESS
LazyCreateThroughPrecompileSuite.erc721TransferFromLazyCreate()
— checked records and didn’t find any side-effect fields underREVERTED_SUCCESS
LazyCreateThroughPrecompileSuite.erc20TransferFromLazyCreate()
is still WIP and I can’t check itCreate2OperationSuite.canUseAliasesInPrecompilesAndContractKeys()
is still WIP and I can’t check itOther side-effect fields were mentioned in the issue (ones I that didnt encounter while did relevant spec fuzzy matching, like: transferList, created ids in the transactionReceipt, etc.) I added anyway from from mono
TxnReceipt#Builder.revert()
andExpirableTxnRecord#Builder.nullOutSideEffectFields()
.Checklist