Page tree
Skip to end of metadata
Go to start of metadata
public interface PrivacyPluginService
extends BesuService


A service that plugins can use to define how private transactions should be handled.

You must register a PrivacyPluginPayloadProvider when using this plugin and can optionally register a PrivateMarkerTransactionFactory and a PrivacyGroupGenesisProvider


Method Summar

Modifier and TypeMethodDescription
PrivacyPluginPayloadProvidergetPayloadProvider()
PrivacyGroupAuthProvidergetPrivacyGroupAuthProvider()
PrivacyGroupGenesisProvidergetPrivacyGroupGenesisProvider()
PrivateMarkerTransactionFactorygetPrivateMarkerTransactionFactory()
voidsetPayloadProvider​(PrivacyPluginPayloadProvider privacyPluginPayloadProvider)

Register a provider to use when handling privacy marker transactions.

voidsetPrivacyGroupAuthProvider​(PrivacyGroupAuthProvider privacyGroupAuthProvider)

Register a provider to use when auth requests for a multi-tenant environment.

voidsetPrivacyGroupGenesisProvider​(PrivacyGroupGenesisProvider privacyGroupAuthProvider)

Register a provider for initialising private state genesis

voidsetPrivateMarkerTransactionFactory​(PrivateMarkerTransactionFactory privateMarkerTransactionFactory)

Register a factory to specify your own method for signing and serializing privacy marker transactions.


Method Details

  • No labels

2 Comments

  1. Hi Antony Denyer,

    Thanks for this page. I am looking forward to implementing this plugin so we can override the signing part (PrivateMarkerTransactionFactory#create).

    As far as I see, we have to override as well the PrivacyPluginPayloadProvider. Is there any specific implementation that you would recommend for it? I am looking into this acceptance test (https://github.com/hyperledger/besu/blob/main/acceptance-tests/test-plugins/src/main/java/org/hyperledger/besu/tests/acceptance/plugins/privacy/TestPrivacyPluginPayloadProvider.java), but I am not sure if we should follow any specific guidelines to do it properly.

    About PrivacyGroupGenesisProvider, since in principle we would not like to override it (and it looks like it is optional), do you have any recommendations? Maybe just do nothing?

    Thanks in advance, Miguel.

  2. The use case for the plugin is to allow people to implement their own privacy models. So you need to manage how/where you're storing the private part of the transaction (generatePayload) and how you're getting back again (getPrivateTransactionFromPayload), that's up to you. Lots of options!


    With the PrivacyGroupGenesisProvider the idea with this is that you may wish to have a genesis for your privacy group! For example, with tessera onchain privacy groups we initiate the group with the management contract available. With the simple/basic privacy in besu it's empty.


    Would love to learn more about your use case.