PrivacyPluginService (deprecated)
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 Type | Method | Description |
|---|---|---|
| ||
| ||
| ||
| ||
| setPayloadProvider | Register a provider to use when handling privacy marker transactions. |
| setPrivacyGroupAuthProvider | Register a provider to use when auth requests for a multi-tenant environment. |
| setPrivacyGroupGenesisProvider | Register a provider for initialising private state genesis |
| setPrivateMarkerTransactionFactory | Register a factory to specify your own method for signing and serializing privacy marker transactions. |
Method Details
void setPayloadProvider(PrivacyPluginPayloadProvider privacyPluginPayloadProvider)
Register a provider to use when handling privacy marker transactions.Parameters: privacyPluginPayloadProvider - the provider to use for the privacy marker payload
PrivacyPluginPayloadProvider getPayloadProvider()setPrivateMarkerTransactionFactory
void setPrivateMarkerTransactionFactory(PrivateMarkerTransactionFactory privateMarkerTransactionFactory)
Register a factory to specify your own method for signing and serializing privacy marker transactions.Parameters: privateMarkerTransactionFactory - the factory to use to build the privacy marker transaction
getPrivateMarkerTransactionFactory
PrivateMarkerTransactionFactory getPrivateMarkerTransactionFactory()
void setPrivacyGroupAuthProvider(PrivacyGroupAuthProvider privacyGroupAuthProvider)
Register a provider to use when auth requests for a multi-tenant environment. If you are not using a multi-tenant environment you always return true.Parameters: privacyGroupAuthProvider - the provider to use to determine authz
PrivacyGroupAuthProvider getPrivacyGroupAuthProvider()setPrivacyGroupGenesisProvider
void setPrivacyGroupGenesisProvider(PrivacyGroupGenesisProvider privacyGroupAuthProvider)
Register a provider for initialising private state genesisParameters: privacyGroupAuthProvider - the provider for the initial private state
getPrivacyGroupGenesisProvider
PrivacyGroupGenesisProvider getPrivacyGroupGenesisProvider()
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.