-
Notifications
You must be signed in to change notification settings - Fork 143
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
chore: Remove inexact-weight TSS implementation #17214
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Michael Tinker <[email protected]>
Signed-off-by: Michael Tinker <[email protected]>
Signed-off-by: Michael Tinker <[email protected]>
Signed-off-by: Michael Tinker <[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 |
Signed-off-by: Michael Tinker <[email protected]>
Signed-off-by: Michael Tinker <[email protected]>
Signed-off-by: Michael Tinker <[email protected]>
Signed-off-by: Michael Tinker <[email protected]>
Signed-off-by: Michael Tinker <[email protected]>
Signed-off-by: Michael Tinker <[email protected]>
/** | ||
* Schema removing the states added in {@code 0.56.0} and {@code 0.58.0} for the inexact weights TSS scheme. | ||
*/ | ||
@Deprecated(forRemoval = true, since = "0.59.0") |
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.
This is not deprecated right ?
...m-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/config/AddressBookConfig.java
Show resolved
Hide resolved
if (!Map.of().equals(stateMetadata)) { | ||
stateMetadata.remove(stateKey); |
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.
Why do we need this ?
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.
+1. The if
seems unnecessary. The remove
call should be unconditional.
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.
It's necessary because MerkleStateRoot.getWritableStates()
here returns the immutable Map.of()
singleton for a service that has not registered any states; and this singleton throws UnsupportedOperationException
on receiving remove()
.
I can go into more detail if you want; but either this or replacing Map.of()
with new HashMap<>()
at the linked method is necessary.
Signed-off-by: Michael Tinker <[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.
Overall LGTM! Have two comments though. Thanks @tinker-michaelj
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.
Approval applies to version.txt
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, but there's a comment above from @Neeharika-Sompalli that I agree needs fixing.
Description:
V059TssSchema
that removes all T1 states. #17205BlockStreamManager
to useBlockHashSigner
. #17216