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

(internal) Refactor 'onchain' to 'flexible' where applicable #3075

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
77629ee
CLI option name change
frankisawesome Nov 17, 2021
3357e92
refactor privacyparameters.java and add deprecation warning
frankisawesome Nov 18, 2021
12d6778
more refactoring
frankisawesome Nov 18, 2021
ca58f21
add to everything.toml
frankisawesome Nov 18, 2021
6384585
merge conflicts
frankisawesome Nov 18, 2021
d619278
bugs
frankisawesome Nov 18, 2021
a062c9a
more missing variable names
frankisawesome Nov 19, 2021
63e7ba5
more classes
frankisawesome Nov 19, 2021
dbb63f1
more classes
frankisawesome Nov 19, 2021
34d76be
fix compile error
frankisawesome Nov 19, 2021
50fc8f4
add new test to invalidate passing both commands
frankisawesome Nov 22, 2021
315c68c
Merge branch 'main' into internal/flexible-privacy-group-naming-cleanup
frankisawesome Nov 22, 2021
1ddfdfb
Merge branch 'main' into internal/flexible-privacy-group-naming-cleanup
frankisawesome Nov 22, 2021
f22d811
more refactoring + more tests
frankisawesome Nov 22, 2021
841cf8d
new batch
frankisawesome Nov 22, 2021
3c33abc
final batch?
frankisawesome Nov 22, 2021
12d916b
failing unit test
frankisawesome Nov 23, 2021
7210ce7
Merge branch 'main' into internal/flexible-privacy-group-naming-cleanup
frankisawesome Nov 23, 2021
ee64864
revert incorrect refactoring back to onchain
frankisawesome Nov 23, 2021
59f4f1a
fix unit test
frankisawesome Nov 23, 2021
8963ad8
comment
frankisawesome Nov 23, 2021
59032dd
comment
frankisawesome Nov 23, 2021
e43a8ca
support both privx methods
frankisawesome Nov 24, 2021
6aa9ad4
add to changelog
frankisawesome Nov 24, 2021
9415ecf
Merge branch 'main' into internal/flexible-privacy-group-naming-cleanup
frankisawesome Nov 24, 2021
4b9192a
address comment
frankisawesome Nov 24, 2021
9c36f8b
Merge branch 'main' into internal/flexible-privacy-group-naming-cleanup
frankisawesome Nov 24, 2021
8d6d5f4
add plugin privacy
frankisawesome Nov 25, 2021
1836609
Merge branch 'internal/flexible-privacy-group-naming-cleanup' of gith…
frankisawesome Nov 25, 2021
ab7b54f
Merge branch 'main' into internal/flexible-privacy-group-naming-cleanup
frankisawesome Nov 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more refactoring
Signed-off-by: Frank Li <b439988l@gmail.com>
  • Loading branch information
frankisawesome committed Nov 18, 2021
commit 12d67788ff9601bc234f59577543ca21c6b16954
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public void startNode(final BesuNode node) {
params.add(node.homeDirectory().resolve("key").toString());
}

if (node.getPrivacyParameters().isOnchainPrivacyGroupsEnabled()) {
if (node.getPrivacyParameters().isFlexiblePrivacyGroupsEnabled()) {
params.add("--privacy-flexible-groups-enabled");
frankisawesome marked this conversation as resolved.
Show resolved Hide resolved
}

Expand Down
6 changes: 3 additions & 3 deletions besu/src/main/java/org/hyperledger/besu/RunnerBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import static java.util.function.Predicate.isEqual;
import static java.util.function.Predicate.not;
import static org.hyperledger.besu.controller.BesuController.CACHE_PATH;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.ONCHAIN_PRIVACY;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.FLEXIBLE_PRIVACY;

import org.hyperledger.besu.cli.config.EthNetworkConfig;
import org.hyperledger.besu.controller.BesuController;
Expand Down Expand Up @@ -926,15 +926,15 @@ private void createPrivateTransactionObserver(
final PrivateTransactionObserver privateTransactionObserver,
final PrivacyParameters privacyParameters) {
// register privateTransactionObserver as observer of events fired by the onchain precompile.
if (privacyParameters.isOnchainPrivacyGroupsEnabled()
if (privacyParameters.isFlexiblePrivacyGroupsEnabled()
&& privacyParameters.isMultiTenancyEnabled()) {
final OnchainPrivacyPrecompiledContract onchainPrivacyPrecompiledContract =
(OnchainPrivacyPrecompiledContract)
besuController
.getProtocolSchedule()
.getByBlockNumber(1)
.getPrecompileContractRegistry()
.get(ONCHAIN_PRIVACY);
.get(FLEXIBLE_PRIVACY);
onchainPrivacyPrecompiledContract.addPrivateTransactionObserver(privateTransactionObserver);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,7 @@ void setBannedNodeIds(final List<String> values) {
private final Boolean isFlexiblePrivacyGroupsEnabled = false;

@Option(
hidden = true,
names = {"--privacy-onchain-groups-enabled"},
description = "Enable flexible (onchain) privacy groups (default: ${DEFAULT-VALUE})")
frankisawesome marked this conversation as resolved.
Show resolved Hide resolved
private final Boolean isOnchainPrivacyGroupsEnabled = false;
Expand Down
4 changes: 2 additions & 2 deletions besu/src/test/java/org/hyperledger/besu/PrivacyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import static org.assertj.core.api.Assertions.assertThat;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.DEFAULT_PRIVACY;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.ONCHAIN_PRIVACY;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.FLEXIBLE_PRIVACY;

import org.hyperledger.besu.config.GenesisConfigFile;
import org.hyperledger.besu.controller.BesuController;
Expand Down Expand Up @@ -85,7 +85,7 @@ public void onchainEnabledPrivacy() throws IOException, URISyntaxException {
final BesuController besuController = setUpControllerWithPrivacyEnabled(true);

final PrecompiledContract onchainPrecompiledContract =
getPrecompile(besuController, ONCHAIN_PRIVACY);
getPrecompile(besuController, FLEXIBLE_PRIVACY);

assertThat(onchainPrecompiledContract.getName()).isEqualTo("OnchainPrivacy");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3455,7 +3455,7 @@ public void onchainPrivacyGroupEnabledFlagDefaultValueIsFalse() {
assertThat(commandErrorOutput.toString()).isEmpty();

final PrivacyParameters privacyParameters = privacyParametersArgumentCaptor.getValue();
assertThat(privacyParameters.isOnchainPrivacyGroupsEnabled()).isEqualTo(false);
assertThat(privacyParameters.isFlexiblePrivacyGroupsEnabled()).isEqualTo(false);
}

@Test
Expand All @@ -3478,7 +3478,7 @@ public void onchainPrivacyGroupEnabledFlagValueIsSet() {
assertThat(commandErrorOutput.toString()).isEmpty();

final PrivacyParameters privacyParameters = privacyParametersArgumentCaptor.getValue();
assertThat(privacyParameters.isOnchainPrivacyGroupsEnabled()).isEqualTo(true);
assertThat(privacyParameters.isFlexiblePrivacyGroupsEnabled()).isEqualTo(true);
}

@Test
Expand All @@ -3501,7 +3501,7 @@ public void flexiblePrivacyGroupEnabledFlagValueIsSet() {
assertThat(commandErrorOutput.toString()).isEmpty();

final PrivacyParameters privacyParameters = privacyParametersArgumentCaptor.getValue();
assertThat(privacyParameters.isOnchainPrivacyGroupsEnabled()).isEqualTo(true);
assertThat(privacyParameters.isFlexiblePrivacyGroupsEnabled()).isEqualTo(true);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
package org.hyperledger.besu.ethereum.api.jsonrpc.internal.privacy.methods.eea;

import static org.hyperledger.besu.ethereum.core.PrivacyParameters.ONCHAIN_PRIVACY;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.FLEXIBLE_PRIVACY;
import static org.hyperledger.besu.ethereum.privacy.PrivacyGroupUtil.findOnchainPrivacyGroup;

import org.hyperledger.besu.datatypes.Address;
Expand Down Expand Up @@ -99,7 +99,7 @@ protected Transaction createPrivateMarkerTransaction(
buildCompoundLookupId(privateTransactionLookupId, addPayloadPrivateTransactionLookupId);

return createPrivateMarkerTransaction(
sender, ONCHAIN_PRIVACY, pmtPayload, privateTransaction, privacyUserId);
sender, FLEXIBLE_PRIVACY, pmtPayload, privateTransaction, privacyUserId);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ protected Map<String, JsonRpcMethod> create(
privacyController,
getGasCalculator()),
new PrivGetEeaTransactionCount(privacyController, privacyIdProvider));
} else if (getPrivacyParameters().isOnchainPrivacyGroupsEnabled()) {
} else if (getPrivacyParameters().isFlexiblePrivacyGroupsEnabled()) {
return mapOf(
new RestrictedOnchainEeaSendRawTransaction(
transactionPool,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected Map<String, JsonRpcMethod> create(
new PrivDistributeRawTransaction(
privacyController,
privacyIdProvider,
getPrivacyParameters().isOnchainPrivacyGroupsEnabled()),
getPrivacyParameters().isFlexiblePrivacyGroupsEnabled()),
new PrivGetCode(getBlockchainQueries(), privacyController, privacyIdProvider),
new PrivGetLogs(
getBlockchainQueries(), getPrivacyQueries(), privacyController, privacyIdProvider),
Expand All @@ -91,7 +91,7 @@ protected Map<String, JsonRpcMethod> create(
new PrivNewFilter(filterManager, privacyController, privacyIdProvider),
new PrivUninstallFilter(filterManager, privacyController, privacyIdProvider));

if (!getPrivacyParameters().isOnchainPrivacyGroupsEnabled()) {
if (!getPrivacyParameters().isFlexiblePrivacyGroupsEnabled()) {
final Map<String, JsonRpcMethod> OFFCHAIN_METHODS =
mapOf(
new PrivCreatePrivacyGroup(privacyController, privacyIdProvider),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ private PrivacyController createPrivacyController() {
restrictedDefaultPrivacyController,
chainId,
privacyParameters.getEnclave(),
privacyParameters.isOnchainPrivacyGroupsEnabled())
privacyParameters.isFlexiblePrivacyGroupsEnabled())
: restrictedDefaultPrivacyController;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected Map<String, JsonRpcMethod> create(
final PrivacyController privacyController,
final PrivacyIdProvider privacyIdProvider,
final PrivateMarkerTransactionFactory privateMarkerTransactionFactory) {
if (getPrivacyParameters().isOnchainPrivacyGroupsEnabled()) {
if (getPrivacyParameters().isFlexiblePrivacyGroupsEnabled()) {
return mapOf(new PrivxFindOnchainPrivacyGroup(privacyController, privacyIdProvider));
} else {
return Map.of();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private PrivacyController createPrivacyController() {
restrictedDefaultPrivacyController,
chainId,
privacyParameters.getEnclave(),
privacyParameters.isOnchainPrivacyGroupsEnabled())
privacyParameters.isFlexiblePrivacyGroupsEnabled())
: restrictedDefaultPrivacyController;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package org.hyperledger.besu.ethereum.api.jsonrpc.internal.privacy.methods.eea;

import static org.hyperledger.besu.ethereum.core.PrivacyParameters.DEFAULT_PRIVACY;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.ONCHAIN_PRIVACY;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.FLEXIBLE_PRIVACY;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.PLUGIN_PRIVACY;

import org.hyperledger.besu.crypto.KeyPair;
Expand Down Expand Up @@ -72,7 +72,7 @@ public class BaseEeaSendRawTransaction {
0L,
Wei.of(1),
21000L,
Optional.of(ONCHAIN_PRIVACY),
Optional.of(FLEXIBLE_PRIVACY),
Wei.ZERO,
SIGNATURE_ALGORITHM_SUPPLIER
.get()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void setup() {

@Test
public void offchainPrivacyGroupMethodsAreDisabledWhenOnchainPrivacyGroupIsEnabled() {
when(privacyParameters.isOnchainPrivacyGroupsEnabled()).thenReturn(true);
when(privacyParameters.isFlexiblePrivacyGroupsEnabled()).thenReturn(true);
final Map<String, JsonRpcMethod> rpcMethods = privJsonRpcMethods.create();

assertThat(rpcMethods.get(PRIV_CREATE_PRIVACY_GROUP.getMethodName())).isNull();
Expand All @@ -68,7 +68,7 @@ public void offchainPrivacyGroupMethodsAreDisabledWhenOnchainPrivacyGroupIsEnabl

@Test
public void offchainPrivacyGroupMethodsAreEnabledWhenOnchainPrivacyGroupIsDisabled() {
when(privacyParameters.isOnchainPrivacyGroupsEnabled()).thenReturn(false);
when(privacyParameters.isFlexiblePrivacyGroupsEnabled()).thenReturn(false);
final Map<String, JsonRpcMethod> rpcMethods = privJsonRpcMethods.create();

assertThat(rpcMethods.get(PRIV_CREATE_PRIVACY_GROUP.getMethodName())).isNotNull();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void setup() {

@Test
public void privxFindPrivacyGroupMethodIsDisabledWhenOnchainPrivacyGroupIsDisabled() {
when(privacyParameters.isOnchainPrivacyGroupsEnabled()).thenReturn(false);
when(privacyParameters.isFlexiblePrivacyGroupsEnabled()).thenReturn(false);
final Map<String, JsonRpcMethod> rpcMethods = privxJsonRpcMethods.create();
final JsonRpcMethod method = rpcMethods.get(PRIVX_FIND_PRIVACY_GROUP.getMethodName());

Expand All @@ -64,7 +64,7 @@ public void privxFindPrivacyGroupMethodIsDisabledWhenOnchainPrivacyGroupIsDisabl

@Test
public void privxFindPrivacyGroupMethodIsEnabledWhenOnchainPrivacyGroupIsEnabled() {
when(privacyParameters.isOnchainPrivacyGroupsEnabled()).thenReturn(true);
when(privacyParameters.isFlexiblePrivacyGroupsEnabled()).thenReturn(true);
final Map<String, JsonRpcMethod> rpcMethods = privxJsonRpcMethods.create();
final JsonRpcMethod method = rpcMethods.get(PRIVX_FIND_PRIVACY_GROUP.getMethodName());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package org.hyperledger.besu.ethereum.mainnet;

import static org.hyperledger.besu.ethereum.core.PrivacyParameters.DEFAULT_PRIVACY;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.ONCHAIN_PRIVACY;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.FLEXIBLE_PRIVACY;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.PLUGIN_PRIVACY;
import static org.hyperledger.besu.evm.precompile.MainnetPrecompiledContracts.populateForBLS12;
import static org.hyperledger.besu.evm.precompile.MainnetPrecompiledContracts.populateForByzantium;
Expand Down Expand Up @@ -76,9 +76,9 @@ static void appendPrivacy(
precompiledContractConfiguration.getPrivacyParameters()));
} else if (precompiledContractConfiguration
.getPrivacyParameters()
.isOnchainPrivacyGroupsEnabled()) {
.isFlexiblePrivacyGroupsEnabled()) {
registry.put(
ONCHAIN_PRIVACY,
FLEXIBLE_PRIVACY,
new OnchainPrivacyPrecompiledContract(
precompiledContractConfiguration.getGasCalculator(),
precompiledContractConfiguration.getPrivacyParameters()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
package org.hyperledger.besu.ethereum.mainnet;

import static org.hyperledger.besu.ethereum.core.PrivacyParameters.ONCHAIN_PRIVACY;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.FLEXIBLE_PRIVACY;

import org.hyperledger.besu.datatypes.Hash;
import org.hyperledger.besu.enclave.Enclave;
Expand Down Expand Up @@ -161,7 +161,7 @@ void maybeRehydrate(

private boolean onchainAddToGroupPrivateMarkerTransactions(final Transaction t) {
return t.getTo().isPresent()
&& t.getTo().equals(Optional.of(ONCHAIN_PRIVACY))
&& t.getTo().equals(Optional.of(FLEXIBLE_PRIVACY))
&& t.getPayload().size() == 64;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import static com.google.common.base.Preconditions.checkNotNull;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.DEFAULT_PRIVACY;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.ONCHAIN_PRIVACY;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.FLEXIBLE_PRIVACY;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.PLUGIN_PRIVACY;

import org.hyperledger.besu.datatypes.Wei;
Expand Down Expand Up @@ -326,9 +326,9 @@ public ProtocolSpec build(final ProtocolSchedule protocolSchedule) {
(PrivacyPluginPrecompiledContract) precompileContractRegistry.get(PLUGIN_PRIVACY);
privacyPluginPrecompiledContract.setPrivateTransactionProcessor(
privateTransactionProcessor);
} else if (privacyParameters.isOnchainPrivacyGroupsEnabled()) {
} else if (privacyParameters.isFlexiblePrivacyGroupsEnabled()) {
final OnchainPrivacyPrecompiledContract onchainPrivacyPrecompiledContract =
(OnchainPrivacyPrecompiledContract) precompileContractRegistry.get(ONCHAIN_PRIVACY);
(OnchainPrivacyPrecompiledContract) precompileContractRegistry.get(FLEXIBLE_PRIVACY);
onchainPrivacyPrecompiledContract.setPrivateTransactionProcessor(
privateTransactionProcessor);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import static java.nio.charset.StandardCharsets.UTF_8;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.DEFAULT_PRIVACY;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.ONCHAIN_PRIVACY;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.FLEXIBLE_PRIVACY;

import org.hyperledger.besu.crypto.KeyPair;
import org.hyperledger.besu.crypto.SignatureAlgorithm;
Expand Down Expand Up @@ -90,12 +90,12 @@ public static Transaction privateMarkerTransaction() {
}

public static Transaction privateMarkerTransactionOnchain() {
return privateMarkerTransaction(VALID_BASE64_ENCLAVE_KEY, ONCHAIN_PRIVACY);
return privateMarkerTransaction(VALID_BASE64_ENCLAVE_KEY, FLEXIBLE_PRIVACY);
}

public static Transaction privateMarkerTransactionOnchainAdd() {
return privateMarkerTransaction(
Bytes.concatenate(VALID_BASE64_ENCLAVE_KEY, VALID_BASE64_ENCLAVE_KEY), ONCHAIN_PRIVACY);
Bytes.concatenate(VALID_BASE64_ENCLAVE_KEY, VALID_BASE64_ENCLAVE_KEY), FLEXIBLE_PRIVACY);
}

private static Transaction privateMarkerTransaction(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.DEFAULT_PRIVACY;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.ONCHAIN_PRIVACY;
import static org.hyperledger.besu.ethereum.core.PrivacyParameters.FLEXIBLE_PRIVACY;
import static org.hyperledger.besu.ethereum.mainnet.MainnetPrecompiledContractRegistries.appendPrivacy;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
Expand All @@ -42,27 +42,27 @@ public class MainnetPrecompiledContractRegistriesTest {

@Test
public void whenOnchainPrivacyGroupsNotEnabled_defaultPrivacyPrecompileIsInRegistry() {
when(privacyParameters.isOnchainPrivacyGroupsEnabled()).thenReturn(false);
when(privacyParameters.isFlexiblePrivacyGroupsEnabled()).thenReturn(false);
when(privacyParameters.isEnabled()).thenReturn(true);

appendPrivacy(reg, config);
verify(privacyParameters).isEnabled();
verify(privacyParameters).isOnchainPrivacyGroupsEnabled();
verify(privacyParameters).isFlexiblePrivacyGroupsEnabled();

assertThat(reg.get(DEFAULT_PRIVACY)).isInstanceOf(PrivacyPrecompiledContract.class);
assertThat(reg.get(ONCHAIN_PRIVACY)).isNull();
assertThat(reg.get(FLEXIBLE_PRIVACY)).isNull();
}

@Test
public void whenOnchainPrivacyGroupsEnabled_onchainPrivacyPrecompileIsInRegistry() {
when(privacyParameters.isOnchainPrivacyGroupsEnabled()).thenReturn(true);
when(privacyParameters.isFlexiblePrivacyGroupsEnabled()).thenReturn(true);
when(privacyParameters.isEnabled()).thenReturn(true);

appendPrivacy(reg, config);
verify(privacyParameters).isEnabled();
verify(privacyParameters).isOnchainPrivacyGroupsEnabled();
verify(privacyParameters).isFlexiblePrivacyGroupsEnabled();

assertThat(reg.get(ONCHAIN_PRIVACY)).isInstanceOf(OnchainPrivacyPrecompiledContract.class);
assertThat(reg.get(FLEXIBLE_PRIVACY)).isInstanceOf(OnchainPrivacyPrecompiledContract.class);
assertThat(reg.get(DEFAULT_PRIVACY)).isNull();
}

Expand All @@ -74,7 +74,7 @@ public void whenPrivacyNotEnabled_noPrivacyPrecompileInRegistry() {
verify(privacyParameters).isEnabled();
verifyNoMoreInteractions(privacyParameters);

assertThat(reg.get(ONCHAIN_PRIVACY)).isNull();
assertThat(reg.get(FLEXIBLE_PRIVACY)).isNull();
assertThat(reg.get(DEFAULT_PRIVACY)).isNull();
}
}