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/optional homomorphic hashing #1365

Merged
merged 11 commits into from
May 6, 2022
Merged

Feat/optional homomorphic hashing #1365

merged 11 commits into from
May 6, 2022

Conversation

carpawell
Copy link
Member

@carpawell carpawell commented May 5, 2022

Related to #1300.

@carpawell carpawell added the enhancement Improving existing functionality label May 5, 2022
@carpawell carpawell self-assigned this May 5, 2022
@carpawell carpawell marked this pull request as ready for review May 5, 2022 16:31
Marshalling does not return errors anymore.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Do not use homomorphic hash in storage group for containers that have
`homomorphic_hashing_disabled` set to `true`.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Do not perform that check if it was turned off for the container being
checked.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Do not calculate and do not write homomorphic hash for containers that were
configured to store objects without hash.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Add container to the `PutContainerPrm` only after sync to allow change
container's parameters.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
@carpawell
Copy link
Member Author

@fyrchik, please, check d892d04 changes in neofs-adm

@carpawell
Copy link
Member Author

carpawell commented May 6, 2022

@cthulhu-rider, @fyrchik added 3826a44 that makes it possible for "new" nodes to work in "old" chains that do not have any info about the new holomorphic key in the config.

Added a default value only for HomomorphicHashDisabled: it seems that only that method is optional in cfg for now.

Comment on lines 582 to 585
{Type: smartcontract.IntegerType, Value: viper.GetInt64(withdrawFeeInitFlag)},
{Type: smartcontract.BoolType, Value: viper.GetBool(homomorphicHashDisabledInitFlag)},
Copy link
Contributor

Choose a reason for hiding this comment

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

Here we should first have key (string), next its value. I see only value here.

Copy link
Member Author

Choose a reason for hiding this comment

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

oh, forgot that, thanks, fixed

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Return default values instead of casting errors in `HomomorphicHashDisabled`
method.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
@cthulhu-rider cthulhu-rider merged commit 98525c0 into nspcc-dev:feat/optional-homomorphic-hashing May 6, 2022
cthulhu-rider pushed a commit that referenced this pull request May 6, 2022
Marshalling does not return errors anymore.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
cthulhu-rider pushed a commit that referenced this pull request May 6, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
cthulhu-rider pushed a commit that referenced this pull request May 6, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
cthulhu-rider pushed a commit that referenced this pull request May 6, 2022
Do not use homomorphic hash in storage group for containers that have
`homomorphic_hashing_disabled` set to `true`.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
cthulhu-rider pushed a commit that referenced this pull request May 6, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
cthulhu-rider pushed a commit that referenced this pull request May 6, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
cthulhu-rider pushed a commit that referenced this pull request May 6, 2022
Do not perform that check if it was turned off for the container being
checked.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
cthulhu-rider pushed a commit that referenced this pull request May 6, 2022
Do not calculate and do not write homomorphic hash for containers that were
configured to store objects without hash.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
cthulhu-rider pushed a commit that referenced this pull request May 6, 2022
Add container to the `PutContainerPrm` only after sync to allow change
container's parameters.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
cthulhu-rider pushed a commit that referenced this pull request May 6, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
@carpawell carpawell deleted the feat/optional-homomorphic-hashing branch May 6, 2022 20:32
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
…ient

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Do not use homomorphic hash in storage group for containers that have
`homomorphic_hashing_disabled` set to `true`.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Do not perform that check if it was turned off for the container being
checked.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Do not calculate and do not write homomorphic hash for containers that were
configured to store objects without hash.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Return default values instead of casting errors in `HomomorphicHashDisabled`
method.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants