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

Flexible Privacy Groups feature - Support to Tessera's EC encryptor #4282

Merged

Conversation

freemanzMrojo
Copy link
Contributor

@freemanzMrojo freemanzMrojo commented Aug 19, 2022

PR description

Flexible privacy contracts are modified so they allow the use of enclave public keys longer than 32 bytes. This way the feature will now support the EC encryptor mode of Tessera. Java classes adapted as well so they could encode/decode Solidity bytes properly.

Since there were bytes32 parameters in the method signatures of the proxy contract, I could not just upgrade the implementation. This means that the changelog should warn about this change. I guess it is ok since in the actual documentation, this feature is referred to as an experimental one and changes like this might be expected.

Fixed Issue(s)

fixes #4262

Changelog

commit ce3b476
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Fri Aug 19 16:37:54 2022 +0100

    changelog

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit 606c53a
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Fri Aug 19 16:12:41 2022 +0100

    small refactor

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit 1441f72
Merge: b78403b 3a2aeab
Author: Miguel Angel Rojo <freemanz1486@gmail.com>
Date:   Fri Aug 19 15:32:51 2022 +0100

    Merge branch 'hyperledger:main' into flexible-privacy-ec-encryptor

commit b78403b
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Fri Aug 19 15:23:17 2022 +0100

    flexible multitenancy working as well

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit b68efc2
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Fri Aug 19 13:31:28 2022 +0100

    removed unused constructor

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit c6f7c48
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Fri Aug 19 13:21:23 2022 +0100

    fixed removeparticipant smart contract method

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit 09e51ef
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Fri Aug 19 11:22:17 2022 +0100

    added encryptor type to flexible method in the factory

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit 4a804fc
Author: Fabio Di Fabio <fabio.difabio@consensys.net>
Date:   Thu Aug 18 21:45:07 2022 +0200

    Refactor and fix retrying get block switching peer (hyperledger#4256)

    * Refactor retrying peer task switching peers at every try

    RetryingGetBlockFromPeersTask had a problem that prevented to complete
    when all the peers were tried without success, and that also had the
    consequence to not removing the failed requested block for the internal
    caches in BlockPropagationManager, that could cause a stall since that
    block will to be tried to be retrieved again.

    Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

commit 8d1de9e
Author: garyschulte <garyschulte@gmail.com>
Date:   Thu Aug 18 12:17:56 2022 -0700

    implement tentative mainnet TTD (hyperledger#4260)

    * implement tentative mainnet TTD
    * fix unit test breakage
    * add to change log

    Signed-off-by: garyschulte <garyschulte@gmail.com>

commit 95f95a1
Author: Justin Florentine <justin+github@florentine.us>
Date:   Thu Aug 18 14:51:37 2022 -0400

    Panda prove ments (hyperledger#4267)

    * breaks pandas up, test coverage

    Signed-off-by: Justin Florentine <justin+github@florentine.us>

commit 5bb9a30
Author: garyschulte <garyschulte@gmail.com>
Date:   Thu Aug 18 10:52:50 2022 -0700

    Bugfix/clique post merge fast sync (hyperledger#4276)

    * if merge enabled, wrap two clique rules in composed Attached rule to enable fast-sync to proceed normally for post-merge networks
    * move BlockPropagationManager warning to debug until hyperledger#4274

    Signed-off-by: garyschulte <garyschulte@gmail.com>

commit 95d0825
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Fri Aug 19 10:43:15 2022 +0100

    test fixed

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit 6c2f17a
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Thu Aug 18 19:07:39 2022 +0100

    reverted some logs

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit 57faef6
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Thu Aug 18 19:07:00 2022 +0100

    reverted some logs

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit ecde451
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Thu Aug 18 18:49:03 2022 +0100

    reverted some logs

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit d6625e7
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Thu Aug 18 18:43:43 2022 +0100

    reverted some logs

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit d554b7a
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Thu Aug 18 18:42:09 2022 +0100

    reverted some logs

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit e4663e7
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Thu Aug 18 18:38:20 2022 +0100

    fixed issue with decodelist and no elements

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit 2188c66
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Thu Aug 18 18:36:59 2022 +0100

    fixed issue with decodelist and no elements

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit 84881d7
Author: Danno Ferrin <danno.ferrin@gmail.com>
Date:   Wed Aug 17 22:40:26 2022 -0600

    Gradle repository maintenance (hyperledger#4273)

    Cleanup repository references and limit scope of non-mavenCentral
    repositories.

    Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>

commit 93cc7b7
Author: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Date:   Thu Aug 18 11:49:09 2022 +1000

    make obvious when a breach of protocol is logged, add peer in some places (hyperledger#4268)

    Signed-off-by: Stefan <stefan.pingel@consensys.net>
    Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>

commit d0283f4
Author: Justin Florentine <justin+github@florentine.us>
Date:   Wed Aug 17 15:48:53 2022 -0400

    Block prop on first final (hyperledger#4265)

    * start filtering peers after 1 finalized instead of 2
    * stops counting finalized, and starts filtering on first finalized
    * DefaultSynchronizer now listens to Forkhoice messages so it can stop block propagation at finalization, as opposed to TTD (previous behavior)

    Signed-off-by: Justin Florentine <justin+github@florentine.us>

commit 2e2ea1f
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Thu Aug 18 17:24:22 2022 +0100

    modified flexibleutil so it works with dynamic byte arrays, some logs to remove

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit 0464ccc
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Thu Aug 18 11:42:16 2022 +0100

    smart contracts adapted, changed bytecodes

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit 0cf4586
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Thu Aug 18 11:02:08 2022 +0100

    smart contracts adapted, changed bytecodes

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit 56a0ea3
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Thu Aug 18 10:36:45 2022 +0100

    added some logs, to be reverted

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit 952085d
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Wed Aug 17 17:52:09 2022 +0100

    solidity contracts changed so they use bytes instead of bytes32

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit 2d956f0
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Wed Aug 17 17:45:26 2022 +0100

    solidity contracts changed so they use bytes instead of bytes32

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit d91db9c
Author: garyschulte <garyschulte@gmail.com>
Date:   Tue Aug 16 11:35:07 2022 -0700

    getProof encoding fix for 4249 (hyperledger#4261)

    * getProof encoding fix for 4249

    Signed-off-by: garyschulte <garyschulte@gmail.com>

commit e154a47
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Wed Aug 17 17:38:27 2022 +0100

    solidity contracts changed so they use bytes instead of bytes32

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit 46e2e41
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Wed Aug 17 13:34:55 2022 +0100

    modified flexibleutil to support ec keys

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

commit 4159147
Author: Fabio Di Fabio <fabio.difabio@consensys.net>
Date:   Tue Aug 16 11:17:00 2022 +0200

    Fix off-by-one error in AbstractRetryingPeerTask (hyperledger#4254)

    Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

commit 2813ce7
Author: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Date:   Tue Aug 16 10:37:22 2022 +0100

    first commit with the flexible privacy tests adapted

    Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>

Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
@freemanzMrojo freemanzMrojo marked this pull request as draft August 19, 2022 16:22
Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
@freemanzMrojo freemanzMrojo marked this pull request as ready for review August 19, 2022 17:26
Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
@macfarla macfarla requested a review from pinges September 5, 2022 02:43
@macfarla
Copy link
Contributor

macfarla commented Sep 5, 2022

Thanks for this contribution @freemanzMrojo - we are pretty focused on The Merge right now but we will aim to review this in the next week or so.

Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

a few comments

Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
…frombytes

Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
… the expected slice

Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
@freemanzMrojo freemanzMrojo requested review from macfarla and removed request for pinges October 5, 2022 15:21
@macfarla macfarla self-assigned this Oct 6, 2022
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

LGTM - the changelog entry just needs moving

CHANGELOG.md Show resolved Hide resolved
@macfarla macfarla enabled auto-merge (squash) October 7, 2022 03:04
@macfarla macfarla merged commit 2bcd2a7 into hyperledger:main Oct 7, 2022
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
…yperledger#4282)

    modified flexibleutil so it works with dynamic byte arrays, some logs to remove
    smart contracts adapted, changed bytecodes
    solidity contracts changed so they use bytes instead of bytes32
    modified flexibleutil to support ec keys
    flexible privacy tests adapted

Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Signed-off-by: Miguel Angel Rojo <miguelangel.rojofernandez@mastercard.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking This can only be addressed/merged for a release that allows user-facing changes to be breaking. privacy private transactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend Flexible Privacy feature to support Tessera's EC encryptor
2 participants