-
Notifications
You must be signed in to change notification settings - Fork 147
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: Validate non-standard hedera.shard/hedera.realm configurations #17460
Conversation
Signed-off-by: Zhivko Kelchev <[email protected]>
Signed-off-by: Zhivko Kelchev <[email protected]>
Signed-off-by: Valentin Tronkov <[email protected]>
Signed-off-by: Valentin Tronkov <[email protected]>
Signed-off-by: ibankov <[email protected]>
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17460 +/- ##
============================================
- Coverage 69.01% 68.96% -0.05%
+ Complexity 23009 22981 -28
============================================
Files 2647 2646 -1
Lines 99465 99427 -38
Branches 10289 10280 -9
============================================
- Hits 68641 68569 -72
- Misses 26940 26971 +31
- Partials 3884 3887 +3
|
Signed-off-by: Valentin Tronkov <[email protected]>
Signed-off-by: Valentin Tronkov <[email protected]>
Signed-off-by: ibankov <[email protected]>
Signed-off-by: ibankov <[email protected]>
Signed-off-by: Valentin Tronkov <[email protected]>
Signed-off-by: Valentin Tronkov <[email protected]>
Signed-off-by: ibankov <[email protected]>
Signed-off-by: ibankov <[email protected]>
Signed-off-by: Valentin Tronkov <[email protected]>
Signed-off-by: Zhivko Kelchev <[email protected]>
Signed-off-by: ibankov <[email protected]>
Signed-off-by: ibankov <[email protected]>
Signed-off-by: ibankov <[email protected]>
Signed-off-by: ibankov <[email protected]>
Signed-off-by: Valentin Tronkov <[email protected]>
Signed-off-by: ibankov <[email protected]>
Signed-off-by: Valentin Tronkov <[email protected]>
Signed-off-by: Valentin Tronkov <[email protected]>
Signed-off-by: Valentin Tronkov <[email protected]>
Signed-off-by: Valentin Tronkov <[email protected]>
Signed-off-by: Valentin Tronkov <[email protected]>
Signed-off-by: Valentin Tronkov <[email protected]>
Signed-off-by: Valentin Tronkov <[email protected]>
# Conflicts: # hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/handlers/CryptoCreateHandler.java # hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/handlers/CryptoGetAccountBalanceHandlerTest.java # hedera-node/hedera-token-service/src/main/java/com/hedera/node/app/service/token/AliasUtils.java # hedera-node/test-clients/src/main/java/com/hedera/services/bdd/spec/HapiPropertySource.java # hedera-node/test-clients/src/main/java/com/hedera/services/bdd/spec/utilops/UtilVerbs.java # hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/contract/leaky/LeakyContractTestsSuite.java
Signed-off-by: Valentin Tronkov <[email protected]>
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.
2 very quick comments on first look at smart contracts impl. Better look to come soon. But there's a lot of potential changes in the smart contracts due to the behavior of the "long-zero" addresses (which are now going to be even more badly named than they were before - we should really be using the preferred term "account num alias" throughout our documentation and code ...) when treated as EVM addresses.
.../src/test/java/com/hedera/node/app/service/contract/impl/test/utils/ConversionUtilsTest.java
Outdated
Show resolved
Hide resolved
...vice-impl/src/main/java/com/hedera/node/app/service/contract/impl/utils/ConversionUtils.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.
On a second look: This important change really affects smart contracts, what with "long zero" addresses being used as EVM addresses, and our frequent need to distinguish "long zero" addresses from arbitrary EVM addresses. Yet the testing in this PR for smart contracts does not, in either unit tests or hapispec tests, test any non-zero shard/realm, or any other implications of that.
And that's totally understandable because the current tests assume shard.realm == 0.0
and to fix up even the current hapispec tests to test non-zero shard/realm is a lot of work. (Or to change the hapispec framework to do it automatically for contract tests ... or whatever the solution is.). And it's unreasonable to expect the author of this PR to do all that testing for smart contracts.
The smart contracts team has an issue on the board - #17711 - for the next sprint to look into this and other work needed to support non-zero shard/realm. I strongly suggest we wait for this analysis - which will undoubtedly include some kind of cooperative effort itself with the PR author (at least) - before this PR gets merged.
Signed-off-by: Valentin Tronkov <[email protected]>
# Conflicts: # hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/exec/systemcontracts/has/isauthorizedraw/IsAuthorizedRawCall.java
Signed-off-by: Valentin Tronkov <[email protected]>
I reverted all smart-contract changes 👍 |
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 - while knowing that the changes to smart contracts will happen later - see analysis task #17711 which is the start of that.
...ava/com/hedera/node/app/service/networkadmin/impl/handlers/ReadableFreezeUpgradeActions.java
Show resolved
Hide resolved
...ce-impl/src/main/java/com/hedera/node/app/service/token/impl/handlers/BaseCryptoHandler.java
Show resolved
Hide resolved
...mpl/src/main/java/com/hedera/node/app/service/token/impl/handlers/FinalizeRecordHandler.java
Show resolved
Hide resolved
hedera-node/test-clients/src/main/java/com/hedera/services/bdd/spec/HapiPropertySource.java
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.
Since there will be more PRs for these changes, we can make any review comment updates in next PRs. LGTM! Thanks @vtronkov
Description:
Changing the shard/realm from the default to the values from the configuration
Related issue(s):
Fixes #17726
Checklist