kubernetes and errorprone - update versions (#5013)

* update errorprone and kubernetes versions
* fixed errorprone issues in prod cod
* fixed errorprone issues in test code

---------

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
pull/5036/head
Sally MacFarlane 2 years ago committed by GitHub
parent a02caccb34
commit c9de473a3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      acceptance-tests/test-plugins/src/main/java/org/hyperledger/besu/tests/acceptance/plugins/TestPrivacyServicePlugin.java
  2. 2
      acceptance-tests/test-plugins/src/main/java/org/hyperledger/besu/tests/acceptance/plugins/privacy/TestSigningPrivateMarkerTransactionFactory.java
  3. 6
      besu/src/test/java/org/hyperledger/besu/PrivacyReorgTest.java
  4. 31
      besu/src/test/java/org/hyperledger/besu/RunnerBuilderTest.java
  5. 24
      besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java
  6. 15
      besu/src/test/java/org/hyperledger/besu/cli/util/ConfigOptionSearchAndRunHandlerTest.java
  7. 5
      consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/blockcreation/CliqueBlockCreatorTest.java
  8. 5
      consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/blockcreation/CliqueMiningCoordinatorTest.java
  9. 2
      consensus/common/src/main/java/org/hyperledger/besu/consensus/common/validator/blockbased/VoteTally.java
  10. 2
      consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/messagedata/CommitMessageTest.java
  11. 2
      consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/messagedata/PrepareMessageTest.java
  12. 2
      consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/messagedata/ProposalMessageTest.java
  13. 2
      consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/messagedata/RoundChangeMessageTest.java
  14. 3
      consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/statemachine/IbftBlockHeightManagerTest.java
  15. 2
      consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/statemachine/IbftControllerTest.java
  16. 6
      consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/statemachine/RoundChangeManagerTest.java
  17. 28
      consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/statemachine/RoundStateTest.java
  18. 6
      consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/validation/RoundChangeCertificateValidatorTest.java
  19. 1
      consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/validation/RoundChangeSignedDataValidatorTest.java
  20. 1
      consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/validation/SignedDataValidatorTest.java
  21. 3
      consensus/qbft/src/test/java/org/hyperledger/besu/consensus/qbft/statemachine/QbftBlockHeightManagerTest.java
  22. 5
      consensus/qbft/src/test/java/org/hyperledger/besu/consensus/qbft/statemachine/QbftControllerTest.java
  23. 30
      consensus/qbft/src/test/java/org/hyperledger/besu/consensus/qbft/statemachine/RoundStateTest.java
  24. 1
      ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/privacy/methods/priv/PrivFindPrivacyGroup.java
  25. 4
      ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/BlockResult.java
  26. 4
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/graphql/AbstractDataFetcherTest.java
  27. 1
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/authentication/EngineAuthServiceTest.java
  28. 49
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/AdminLogsRemoveCacheTest.java
  29. 4
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugTraceTransactionTest.java
  30. 10
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthCallTest.java
  31. 8
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthGetProofTest.java
  32. 4
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthGetTransactionCountTest.java
  33. 10
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthGetWorkTest.java
  34. 13
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/TxPoolBesuPendingTransactionsTest.java
  35. 5
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayloadTest.java
  36. 1
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/privacy/methods/goquorum/GoQuorumEthGetQuorumPayloadTest.java
  37. 1
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/privacy/methods/goquorum/GoQuorumSendRawPrivateTransactionTest.java
  38. 1
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/privacy/methods/priv/PrivCreatePrivacyGroupTest.java
  39. 6
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/privacy/methods/priv/PrivDeletePrivacyGroupTest.java
  40. 2
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/privacy/methods/priv/PrivDistributeRawTransactionTest.java
  41. 1
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/privacy/methods/priv/PrivFindPrivacyGroupTest.java
  42. 3
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/privacy/methods/priv/PrivGetEeaTransactionCountTest.java
  43. 8
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/privacy/methods/priv/PrivGetTransactionCountTest.java
  44. 6
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/privacy/methods/privx/PrivxFindFlexiblePrivacyGroupTest.java
  45. 10
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/processor/TransactionTracerTest.java
  46. 2
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/query/cache/GoQuorumPrivateTransactionLogBloomCacherTest.java
  47. 12
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/query/cache/TransactionLogBloomCacherTest.java
  48. 6
      ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/precompiles/privacy/PrivacyPluginPrecompiledContractTest.java
  49. 4
      ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/precompiles/privacy/PrivacyPrecompiledContractTest.java
  50. 2
      ethereum/core/src/test/java/org/hyperledger/besu/ethereum/privacy/storage/migration/PrivateStorageMigrationTest.java
  51. 3
      ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/worldstate/FastWorldStateDownloader.java
  52. 6
      ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/backwardsync/BackwardSyncContextTest.java
  53. 4
      ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/checkpointsync/CheckPointSyncChainDownloaderTest.java
  54. 5
      ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/FastSyncActionsTest.java
  55. 3
      ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/FastSyncChainDownloaderTest.java
  56. 2
      ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/snapsync/SnapWorldDownloadStateTest.java
  57. 6
      ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/worldstate/WorldStatePeerTrieNodeFinderTest.java
  58. 2
      ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TestNodeList.java
  59. 1
      ethereum/evmtool/src/main/java/org/hyperledger/besu/evmtool/DataStoreModule.java
  60. 1
      ethereum/evmtool/src/main/java/org/hyperledger/besu/evmtool/GenesisFileModule.java
  61. 2
      ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/rlpx/connections/netty/DeFramerTest.java
  62. 2
      ethereum/referencetests/src/reference-test/external-resources
  63. 4
      ethereum/rlp/src/main/java/org/hyperledger/besu/ethereum/rlp/RLPDecodingHelpers.java
  64. 262
      gradle/verification-metadata.xml
  65. 8
      gradle/versions.gradle
  66. 37
      plugins/rocksdb/src/test/java/org/hyperledger/besu/plugin/services/storage/rocksdb/RocksDBKeyValuePrivacyStorageFactoryTest.java
  67. 3
      plugins/rocksdb/src/test/java/org/hyperledger/besu/plugin/services/storage/rocksdb/RocksDBKeyValueStorageFactoryTest.java

@ -68,7 +68,7 @@ public class TestPrivacyServicePlugin implements BesuPlugin {
if (signingEnabled) {
pluginService.setPrivateMarkerTransactionFactory(privateMarkerTransactionFactory);
privateMarkerTransactionFactory.setSigningKeyEnbaled(signingKey);
privateMarkerTransactionFactory.setSigningKeyEnabled(signingKey);
}
}

@ -43,7 +43,7 @@ public class TestSigningPrivateMarkerTransactionFactory implements PrivateMarker
KeyPair aliceFixedSigningKey;
Address sender;
public void setSigningKeyEnbaled(final String privateMarkerTransactionSigningKey) {
public void setSigningKeyEnabled(final String privateMarkerTransactionSigningKey) {
final SignatureAlgorithm algorithm = SignatureAlgorithmFactory.getInstance();
final SECPPrivateKey privateKey =
algorithm.createPrivateKey(Bytes32.fromHexString(privateMarkerTransactionSigningKey));

@ -31,7 +31,6 @@ import org.hyperledger.besu.datatypes.Hash;
import org.hyperledger.besu.datatypes.Wei;
import org.hyperledger.besu.enclave.Enclave;
import org.hyperledger.besu.enclave.EnclaveFactory;
import org.hyperledger.besu.enclave.types.PrivacyGroup;
import org.hyperledger.besu.enclave.types.ReceiveResponse;
import org.hyperledger.besu.ethereum.GasLimitCalculator;
import org.hyperledger.besu.ethereum.ProtocolContext;
@ -51,7 +50,6 @@ import org.hyperledger.besu.ethereum.eth.transactions.TransactionPoolConfigurati
import org.hyperledger.besu.ethereum.mainnet.HeaderValidationMode;
import org.hyperledger.besu.ethereum.privacy.PrivateStateRootResolver;
import org.hyperledger.besu.ethereum.privacy.PrivateTransaction;
import org.hyperledger.besu.ethereum.privacy.RestrictedDefaultPrivacyController;
import org.hyperledger.besu.ethereum.privacy.storage.PrivacyGroupHeadBlockMap;
import org.hyperledger.besu.ethereum.privacy.storage.PrivacyStorageProvider;
import org.hyperledger.besu.ethereum.privacy.storage.PrivateStateStorage;
@ -134,7 +132,6 @@ public class PrivacyReorgTest {
private BesuController besuController;
private PrivateStateRootResolver privateStateRootResolver;
private PrivacyParameters privacyParameters;
private RestrictedDefaultPrivacyController privacyController;
private Enclave mockEnclave;
private Transaction privacyMarkerTransaction;
@ -176,9 +173,6 @@ public class PrivacyReorgTest {
.build();
privacyParameters.setPrivacyUserId(ENCLAVE_PUBLIC_KEY.toBase64String());
privacyController = mock(RestrictedDefaultPrivacyController.class);
when(privacyController.findPrivacyGroupByGroupId(any(), any()))
.thenReturn(Optional.of(new PrivacyGroup()));
privateStateRootResolver =
new PrivateStateRootResolver(privacyParameters.getPrivateStateStorage());

@ -95,16 +95,17 @@ public final class RunnerBuilderTest {
@Rule public TemporaryFolder dataDir = new TemporaryFolder();
@Mock BesuController besuController;
@Mock ProtocolSchedule protocolSchedule;
@Mock ProtocolContext protocolContext;
@Mock Vertx vertx;
private NodeKey nodeKey;
@Before
public void setup() {
final SubProtocolConfiguration subProtocolConfiguration = mock(SubProtocolConfiguration.class);
final EthProtocolManager ethProtocolManager = mock(EthProtocolManager.class);
final EthContext ethContext = mock(EthContext.class);
final ProtocolContext protocolContext = mock(ProtocolContext.class);
final NodeKey nodeKey =
new NodeKey(new KeyPairSecurityModule(new SECP256K1().generateKeyPair()));
nodeKey = new NodeKey(new KeyPairSecurityModule(new SECP256K1().generateKeyPair()));
when(subProtocolConfiguration.getProtocolManagers())
.thenReturn(
@ -127,7 +128,7 @@ public final class RunnerBuilderTest {
when(besuController.getProtocolManager()).thenReturn(ethProtocolManager);
when(besuController.getSubProtocolConfiguration()).thenReturn(subProtocolConfiguration);
when(besuController.getProtocolContext()).thenReturn(protocolContext);
when(besuController.getProtocolSchedule()).thenReturn(mock(ProtocolSchedule.class));
when(besuController.getProtocolSchedule()).thenReturn(protocolSchedule);
when(besuController.getNodeKey()).thenReturn(nodeKey);
when(besuController.getMiningParameters()).thenReturn(mock(MiningParameters.class));
when(besuController.getPrivacyParameters()).thenReturn(mock(PrivacyParameters.class));
@ -169,14 +170,14 @@ public final class RunnerBuilderTest {
.build();
runner.startEthereumMainLoop();
final EnodeURL expectedEodeURL =
final EnodeURL expectedEnodeURL =
EnodeURLImpl.builder()
.ipAddress(p2pAdvertisedHost)
.discoveryPort(0)
.listeningPort(p2pListenPort)
.nodeId(besuController.getNodeKey().getPublicKey().getEncoded())
.nodeId(nodeKey.getPublicKey().getEncoded())
.build();
assertThat(runner.getLocalEnode().orElseThrow()).isEqualTo(expectedEodeURL);
assertThat(runner.getLocalEnode().orElseThrow()).isEqualTo(expectedEnodeURL);
}
@Test
@ -186,9 +187,9 @@ public final class RunnerBuilderTest {
final int p2pListenPort = 30301;
final StorageProvider storageProvider = new InMemoryKeyValueStorageProvider();
final Block genesisBlock = gen.genesisBlock();
final MutableBlockchain blockchain =
final MutableBlockchain inMemoryBlockchain =
createInMemoryBlockchain(genesisBlock, new MainnetBlockHeaderFunctions());
when(besuController.getProtocolContext().getBlockchain()).thenReturn(blockchain);
when(protocolContext.getBlockchain()).thenReturn(inMemoryBlockchain);
final Runner runner =
new RunnerBuilder()
.discovery(true)
@ -212,15 +213,16 @@ public final class RunnerBuilderTest {
.rpcEndpointService(new RpcEndpointServiceImpl())
.build();
runner.startEthereumMainLoop();
when(besuController.getProtocolSchedule().streamMilestoneBlocks())
.thenAnswer(__ -> Stream.of(1L, 2L));
when(protocolSchedule.streamMilestoneBlocks()).thenAnswer(__ -> Stream.of(1L, 2L));
for (int i = 0; i < 2; ++i) {
final Block block =
gen.block(
BlockDataGenerator.BlockOptions.create()
.setBlockNumber(1 + i)
.setParentHash(blockchain.getChainHeadHash()));
blockchain.appendBlock(block, gen.receipts(block));
.setParentHash(inMemoryBlockchain.getChainHeadHash()));
inMemoryBlockchain.appendBlock(block, gen.receipts(block));
assertThat(
storageProvider
.getStorageBySegmentIdentifier(BLOCKCHAIN)
@ -400,7 +402,8 @@ public final class RunnerBuilderTest {
final EthNetworkConfig mockMainnet = mock(EthNetworkConfig.class);
when(mockMainnet.getNetworkId()).thenReturn(BigInteger.ONE);
MergeConfigOptions.setMergeEnabled(true);
final MiningParameters mockMiningParams = besuController.getMiningParameters();
final MiningParameters mockMiningParams = mock(MiningParameters.class);
when(besuController.getMiningParameters()).thenReturn(mockMiningParams);
when(mockMiningParams.isStratumMiningEnabled()).thenReturn(true);
final TransitionCoordinator mockTransitionCoordinator =
spy(

@ -1200,7 +1200,8 @@ public class BesuCommandTest extends CommandTestAbstract {
public void identityValueTrueMustBeUsed() {
parseCommand("--identity", "test");
verify(mockRunnerBuilder.identityString(eq(Optional.of("test")))).build();
verify(mockRunnerBuilder).identityString(eq(Optional.of("test")));
verify(mockRunnerBuilder).build();
assertThat(commandOutput.toString(UTF_8)).isEmpty();
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
@ -1210,7 +1211,8 @@ public class BesuCommandTest extends CommandTestAbstract {
public void p2pEnabledOptionValueTrueMustBeUsed() {
parseCommand("--p2p-enabled", "true");
verify(mockRunnerBuilder.p2pEnabled(eq(true))).build();
verify(mockRunnerBuilder).p2pEnabled(eq(true));
verify(mockRunnerBuilder).build();
assertThat(commandOutput.toString(UTF_8)).isEmpty();
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
@ -1220,7 +1222,8 @@ public class BesuCommandTest extends CommandTestAbstract {
public void p2pEnabledOptionValueFalseMustBeUsed() {
parseCommand("--p2p-enabled", "false");
verify(mockRunnerBuilder.p2pEnabled(eq(false))).build();
verify(mockRunnerBuilder).p2pEnabled(eq(false));
verify(mockRunnerBuilder).build();
assertThat(commandOutput.toString(UTF_8)).isEmpty();
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
@ -1301,7 +1304,8 @@ public class BesuCommandTest extends CommandTestAbstract {
public void discoveryOptionValueTrueMustBeUsed() {
parseCommand("--discovery-enabled", "true");
verify(mockRunnerBuilder.discovery(eq(true))).build();
verify(mockRunnerBuilder).discovery(eq(true));
verify(mockRunnerBuilder).build();
assertThat(commandOutput.toString(UTF_8)).isEmpty();
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
@ -1311,7 +1315,8 @@ public class BesuCommandTest extends CommandTestAbstract {
public void discoveryOptionValueFalseMustBeUsed() {
parseCommand("--discovery-enabled", "false");
verify(mockRunnerBuilder.discovery(eq(false))).build();
verify(mockRunnerBuilder).discovery(eq(false));
verify(mockRunnerBuilder).build();
assertThat(commandOutput.toString(UTF_8)).isEmpty();
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
@ -4397,8 +4402,8 @@ public class BesuCommandTest extends CommandTestAbstract {
public void
privateMarkerTransactionSigningKeyFileNotCanNotBeUsedWithPluginPrivateMarkerTransactionFactory()
throws IOException {
privacyPluginService.setPrivateMarkerTransactionFactory(
mock(PrivateMarkerTransactionFactory.class));
when(privacyPluginService.getPrivateMarkerTransactionFactory())
.thenReturn(mock(PrivateMarkerTransactionFactory.class));
final Path toml =
createTempFile(
"key",
@ -4412,7 +4417,10 @@ public class BesuCommandTest extends CommandTestAbstract {
toml.toString());
assertThat(commandOutput.toString(UTF_8)).isEmpty();
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
// assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
assertThat(commandErrorOutput.toString(UTF_8))
.startsWith(
"--privacy-marker-transaction-signing-key-file can not be used in conjunction with a plugin that specifies");
}
@Test

@ -43,7 +43,6 @@ import org.mockito.junit.MockitoJUnitRunner;
import picocli.CommandLine;
import picocli.CommandLine.IDefaultValueProvider;
import picocli.CommandLine.IExecutionStrategy;
import picocli.CommandLine.IParameterExceptionHandler;
import picocli.CommandLine.Model.CommandSpec;
import picocli.CommandLine.Model.IGetter;
import picocli.CommandLine.Model.OptionSpec;
@ -58,7 +57,6 @@ public class ConfigOptionSearchAndRunHandlerTest {
private LoggingLevelOption levelOption;
private final IExecutionStrategy resultHandler = new RunLast();
private IParameterExceptionHandler parameterExceptionHandler;
private final Map<String, String> environment = singletonMap("BESU_LOGGING", "ERROR");
private ConfigOptionSearchAndRunHandler configParsingHandler;
@ -80,12 +78,11 @@ public class ConfigOptionSearchAndRunHandlerTest {
when(mockParseResult.matchedOption(CONFIG_FILE_OPTION_NAME)).thenReturn(mockConfigOptionSpec);
when(mockParseResult.hasMatchedOption(CONFIG_FILE_OPTION_NAME)).thenReturn(true);
when(mockConfigOptionSpec.getter()).thenReturn(mockConfigOptionGetter);
when(mockCommandLine.getParameterExceptionHandler()).thenReturn(mockParameterExceptionHandler);
levelOption = new LoggingLevelOption();
levelOption.setLogLevel("INFO");
parameterExceptionHandler = mockCommandLine.getParameterExceptionHandler();
configParsingHandler =
new ConfigOptionSearchAndRunHandler(resultHandler, parameterExceptionHandler, environment);
new ConfigOptionSearchAndRunHandler(
resultHandler, mockParameterExceptionHandler, environment);
}
@Test
@ -94,7 +91,7 @@ public class ConfigOptionSearchAndRunHandlerTest {
final List<Object> result = configParsingHandler.handle(mockParseResult);
verify(mockCommandLine).setDefaultValueProvider(any(IDefaultValueProvider.class));
verify(mockCommandLine).setExecutionStrategy(eq(resultHandler));
verify(mockCommandLine).setParameterExceptionHandler(eq(parameterExceptionHandler));
verify(mockCommandLine).setParameterExceptionHandler(eq(mockParameterExceptionHandler));
verify(mockCommandLine).execute(anyString());
assertThat(result).isEmpty();
@ -107,7 +104,7 @@ public class ConfigOptionSearchAndRunHandlerTest {
final ConfigOptionSearchAndRunHandler environmentConfigFileParsingHandler =
new ConfigOptionSearchAndRunHandler(
resultHandler,
parameterExceptionHandler,
mockParameterExceptionHandler,
singletonMap("BESU_CONFIG_FILE", temp.newFile().getAbsolutePath()));
when(mockParseResult.hasMatchedOption(CONFIG_FILE_OPTION_NAME)).thenReturn(false);
@ -129,7 +126,7 @@ public class ConfigOptionSearchAndRunHandlerTest {
final ConfigOptionSearchAndRunHandler environmentConfigFileParsingHandler =
new ConfigOptionSearchAndRunHandler(
resultHandler,
parameterExceptionHandler,
mockParameterExceptionHandler,
singletonMap("BESU_CONFIG_FILE", "not_found.toml"));
when(mockParseResult.hasMatchedOption(CONFIG_FILE_OPTION_NAME)).thenReturn(false);
@ -162,7 +159,7 @@ public class ConfigOptionSearchAndRunHandlerTest {
final ConfigOptionSearchAndRunHandler environmentConfigFileParsingHandler =
new ConfigOptionSearchAndRunHandler(
resultHandler,
parameterExceptionHandler,
mockParameterExceptionHandler,
singletonMap("BESU_CONFIG_FILE", temp.newFile().getAbsolutePath()));
when(mockParseResult.hasMatchedOption(CONFIG_FILE_OPTION_NAME)).thenReturn(true);

@ -191,7 +191,10 @@ public class CliqueBlockCreatorTest {
CliqueExtraData.createWithoutProposerSeal(Bytes.wrap(new byte[32]), validatorList);
final Address a1 = Address.fromHexString("5");
final Address coinbase = AddressHelpers.ofValue(1);
when(validatorProvider.getVoteProviderAtHead().get().getVoteAfterBlock(any(), any()))
final VoteProvider mockVoteProvider = mock(VoteProvider.class);
when(validatorProvider.getVoteProviderAtHead()).thenReturn(Optional.of(mockVoteProvider));
when(mockVoteProvider.getVoteAfterBlock(any(), any()))
.thenReturn(Optional.of(new ValidatorVote(VoteType.ADD, coinbase, a1)));
final CliqueBlockCreator blockCreator =

@ -57,6 +57,7 @@ import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
@ExtendWith(MockitoExtension.class)
@SuppressWarnings("DirectInvocationOnMock")
public class CliqueMiningCoordinatorTest {
private static final Supplier<SignatureAlgorithm> SIGNATURE_ALGORITHM =
@ -80,10 +81,10 @@ public class CliqueMiningCoordinatorTest {
@Mock private CliqueBlockMiner blockMiner;
@Mock private SyncState syncState;
@Mock private ValidatorProvider validatorProvider;
@Mock private BlockHeader blockHeader;
@BeforeEach
public void setup() {
headerTestFixture.number(1);
Block genesisBlock = createEmptyBlock(0, Hash.ZERO, proposerKeys); // not normally signed but ok
blockChain = createInMemoryBlockchain(genesisBlock);
@ -101,7 +102,7 @@ public class CliqueMiningCoordinatorTest {
// As the head of the blockChain is 0 (which effectively doesn't have a signer, all validators
// are able to propose.
when(blockMiner.getParentHeader()).thenReturn(blockChain.getChainHeadHeader());
when(blockMiner.getParentHeader()).thenReturn(blockHeader);
// Note also - validators is an hard-ordered LIST, thus in-turn will follow said list - block_1
// should be created by proposer.

@ -110,6 +110,8 @@ class VoteTally {
}
/**
* The validator addresses
*
* @return The collection of validators after the voting at the most recent block has been
* finalised.
*/

@ -57,7 +57,7 @@ public class CommitMessageTest {
when(messageData.getCode()).thenReturn(IbftV2.COMMIT);
CommitMessageData commitMessage = CommitMessageData.fromMessageData(messageData);
assertThat(commitMessage.getData()).isEqualTo(messageData.getData());
assertThat(commitMessage.getData()).isEqualTo(messageBytes);
assertThat(commitMessage.getCode()).isEqualTo(IbftV2.COMMIT);
}

@ -57,7 +57,7 @@ public class PrepareMessageTest {
when(messageData.getCode()).thenReturn(IbftV2.PREPARE);
PrepareMessageData prepareMessage = PrepareMessageData.fromMessageData(messageData);
assertThat(prepareMessage.getData()).isEqualTo(messageData.getData());
assertThat(prepareMessage.getData()).isEqualTo(messageBytes);
assertThat(prepareMessage.getCode()).isEqualTo(IbftV2.PREPARE);
}

@ -57,7 +57,7 @@ public class ProposalMessageTest {
when(messageData.getData()).thenReturn(messageBytes);
final ProposalMessageData proposalMessage = ProposalMessageData.fromMessageData(messageData);
assertThat(proposalMessage.getData()).isEqualTo(messageData.getData());
assertThat(proposalMessage.getData()).isEqualTo(messageBytes);
assertThat(proposalMessage.getCode()).isEqualTo(IbftV2.PROPOSAL);
}

@ -57,7 +57,7 @@ public class RoundChangeMessageTest {
when(messageData.getCode()).thenReturn(IbftV2.ROUND_CHANGE);
RoundChangeMessageData roundChangeMessage = RoundChangeMessageData.fromMessageData(messageData);
assertThat(roundChangeMessage.getData()).isEqualTo(messageData.getData());
assertThat(roundChangeMessage.getData()).isEqualTo(messageBytes);
assertThat(roundChangeMessage.getCode()).isEqualTo(IbftV2.ROUND_CHANGE);
}

@ -159,8 +159,7 @@ public class IbftBlockHeightManagerTest {
invocation -> {
final int round = invocation.getArgument(1);
final ConsensusRoundIdentifier roundId = new ConsensusRoundIdentifier(1, round);
final RoundState createdRoundState =
new RoundState(roundId, finalState.getQuorum(), messageValidator);
final RoundState createdRoundState = new RoundState(roundId, 3, messageValidator);
return new IbftRound(
createdRoundState,
blockCreator,

@ -201,7 +201,7 @@ public class IbftControllerTest {
public void newBlockForCurrentOrPreviousHeightTriggersNoChange() {
constructIbftController();
ibftController.start();
long chainHeadHeight = chainHeadBlockHeader.getNumber();
long chainHeadHeight = 3;
when(nextBlock.getNumber()).thenReturn(chainHeadHeight);
when(nextBlock.getHash()).thenReturn(Hash.ZERO);
final NewChainHead sameHeightBlock = new NewChainHead(nextBlock);

@ -36,8 +36,6 @@ import org.hyperledger.besu.consensus.ibft.validation.SignedDataValidator;
import org.hyperledger.besu.crypto.NodeKey;
import org.hyperledger.besu.crypto.NodeKeyUtils;
import org.hyperledger.besu.datatypes.Address;
import org.hyperledger.besu.ethereum.BlockProcessingResult;
import org.hyperledger.besu.ethereum.BlockValidator;
import org.hyperledger.besu.ethereum.core.Block;
import org.hyperledger.besu.ethereum.core.Util;
@ -76,10 +74,6 @@ public class RoundChangeManagerTest {
validators.add(Util.publicKeyToAddress(validator1Key.getPublicKey()));
validators.add(Util.publicKeyToAddress(validator2Key.getPublicKey()));
final BlockValidator blockValidator = mock(BlockValidator.class);
when(blockValidator.validateAndProcessBlock(any(), any(), any(), any()))
.thenReturn(new BlockProcessingResult(Optional.empty()));
final RoundChangePayloadValidator.MessageValidatorForHeightFactory messageValidatorFactory =
mock(RoundChangePayloadValidator.MessageValidatorForHeightFactory.class);

@ -59,6 +59,8 @@ public class RoundStateTest {
private final List<Address> validators = Lists.newArrayList();
private final Hash blockHash = Hash.fromHexStringLenient("1");
@Mock private MessageValidator messageValidator;
@Mock private Block block;
@ -71,7 +73,7 @@ public class RoundStateTest {
validators.add(Util.publicKeyToAddress(newNodeKey.getPublicKey()));
validatorMessageFactories.add(new MessageFactory(newNodeKey));
}
when(block.getHash()).thenReturn(Hash.fromHexStringLenient("1"));
when(block.getHash()).thenReturn(blockHash);
}
@Test
@ -136,7 +138,7 @@ public class RoundStateTest {
.get(0)
.createCommit(
roundIdentifier,
block.getHash(),
blockHash,
SignatureAlgorithmFactory.getInstance()
.createSignature(BigInteger.ONE, BigInteger.ONE, (byte) 1));
@ -154,10 +156,10 @@ public class RoundStateTest {
final RoundState roundState = new RoundState(roundIdentifier, 3, messageValidator);
final Prepare firstPrepare =
validatorMessageFactories.get(1).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(1).createPrepare(roundIdentifier, blockHash);
final Prepare secondPrepare =
validatorMessageFactories.get(2).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(2).createPrepare(roundIdentifier, blockHash);
roundState.addPrepareMessage(firstPrepare);
assertThat(roundState.isPrepared()).isFalse();
@ -180,10 +182,10 @@ public class RoundStateTest {
@Test
public void invalidPriorPrepareMessagesAreDiscardedUponSubsequentProposal() {
final Prepare firstPrepare =
validatorMessageFactories.get(1).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(1).createPrepare(roundIdentifier, blockHash);
final Prepare secondPrepare =
validatorMessageFactories.get(2).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(2).createPrepare(roundIdentifier, blockHash);
// RoundState has a quorum size of 3, meaning 1 proposal and 2 prepare are required to be
// 'prepared'.
@ -211,10 +213,10 @@ public class RoundStateTest {
final RoundState roundState = new RoundState(roundIdentifier, 2, messageValidator);
final Prepare firstPrepare =
validatorMessageFactories.get(1).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(1).createPrepare(roundIdentifier, blockHash);
final Prepare secondPrepare =
validatorMessageFactories.get(2).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(2).createPrepare(roundIdentifier, blockHash);
final Proposal proposal =
validatorMessageFactories.get(0).createProposal(roundIdentifier, block, Optional.empty());
@ -246,7 +248,7 @@ public class RoundStateTest {
.get(1)
.createCommit(
roundIdentifier,
block.getHash(),
blockHash,
signatureAlgorithm.createSignature(BigInteger.ONE, BigInteger.TEN, (byte) 1));
final Commit secondCommit =
@ -254,7 +256,7 @@ public class RoundStateTest {
.get(2)
.createCommit(
roundIdentifier,
block.getHash(),
blockHash,
signatureAlgorithm.createSignature(BigInteger.TEN, BigInteger.TEN, (byte) 1));
final Proposal proposal =
@ -275,13 +277,13 @@ public class RoundStateTest {
final RoundState roundState = new RoundState(roundIdentifier, 2, messageValidator);
final Prepare firstPrepare =
validatorMessageFactories.get(1).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(1).createPrepare(roundIdentifier, blockHash);
final Prepare secondPrepare =
validatorMessageFactories.get(2).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(2).createPrepare(roundIdentifier, blockHash);
final Prepare duplicatePrepare =
validatorMessageFactories.get(2).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(2).createPrepare(roundIdentifier, blockHash);
final Proposal proposal =
validatorMessageFactories.get(0).createProposal(roundIdentifier, block, Optional.empty());

@ -17,7 +17,6 @@ package org.hyperledger.besu.consensus.ibft.validation;
import static java.util.Collections.singletonList;
import static java.util.Optional.empty;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@ -47,6 +46,7 @@ import com.google.common.collect.Lists;
import org.junit.Before;
import org.junit.Test;
@SuppressWarnings("DirectInvocationOnMock")
public class RoundChangeCertificateValidatorTest {
private final NodeKey proposerKey = NodeKeyUtils.generate();
@ -62,7 +62,6 @@ public class RoundChangeCertificateValidatorTest {
private final MessageValidatorForHeightFactory validatorFactory =
mock(MessageValidatorForHeightFactory.class);
private final SignedDataValidator signedDataValidator = mock(SignedDataValidator.class);
final IbftExtraDataCodec bftExtraDataEncoder = new IbftExtraDataCodec();
final BftBlockInterface bftBlockInterface = new BftBlockInterface(bftExtraDataEncoder);
@ -125,9 +124,6 @@ public class RoundChangeCertificateValidatorTest {
validatorMessageFactory.createPrepare(
prevRound, proposedBlock.getHash()))))));
// The prepare Message in the RoundChange Cert will be deemed illegal.
when(signedDataValidator.validatePrepare(any())).thenReturn(false);
assertThat(
validator.validateRoundChangeMessagesAndEnsureTargetRoundMatchesRoot(
roundIdentifier, roundChangeBuilder.buildCertificate()))

@ -44,6 +44,7 @@ import com.google.common.collect.Lists;
import org.junit.Before;
import org.junit.Test;
@SuppressWarnings("DirectInvocationOnMock")
public class RoundChangeSignedDataValidatorTest {
private final NodeKey proposerKey = NodeKeyUtils.generate();

@ -42,6 +42,7 @@ import org.junit.runner.RunWith;
import org.mockito.junit.MockitoJUnitRunner;
@RunWith(MockitoJUnitRunner.class)
@SuppressWarnings("DirectInvocationOnMock")
public class SignedDataValidatorTest {
private final NodeKey proposerKey = NodeKeyUtils.generate();

@ -165,8 +165,7 @@ public class QbftBlockHeightManagerTest {
invocation -> {
final int round = invocation.getArgument(1);
final ConsensusRoundIdentifier roundId = new ConsensusRoundIdentifier(1, round);
final RoundState createdRoundState =
new RoundState(roundId, finalState.getQuorum(), messageValidator);
final RoundState createdRoundState = new RoundState(roundId, 3, messageValidator);
return new QbftRound(
createdRoundState,
blockCreator,

@ -206,17 +206,16 @@ public class QbftControllerTest {
public void newBlockForCurrentOrPreviousHeightTriggersNoChange() {
constructQbftController();
qbftController.start();
long chainHeadHeight = chainHeadBlockHeader.getNumber();
long chainHeadHeight = 4;
when(nextBlock.getNumber()).thenReturn(chainHeadHeight);
when(nextBlock.getHash()).thenReturn(Hash.ZERO);
final NewChainHead sameHeightBlock = new NewChainHead(nextBlock);
qbftController.handleNewBlockEvent(sameHeightBlock);
verify(blockHeightManagerFactory, times(1)).create(any()); // initial creation
when(nextBlock.getNumber()).thenReturn(chainHeadHeight - 1);
final NewChainHead priorBlock = new NewChainHead(nextBlock);
qbftController.handleNewBlockEvent(priorBlock);
verify(blockHeightManagerFactory, times(1)).create(any());
verify(blockHeightManagerFactory, times(2)).create(any()); // 2 blocks created
}
@Test

@ -64,6 +64,7 @@ public class RoundStateTest {
private final ConsensusRoundIdentifier roundIdentifier = new ConsensusRoundIdentifier(1, 1);
private final List<Address> validators = Lists.newArrayList();
private final Hash blockHash = Hash.fromHexStringLenient("1");
@Mock private MessageValidator messageValidator;
@ -77,7 +78,6 @@ public class RoundStateTest {
validators.add(Util.publicKeyToAddress(newNodeKey.getPublicKey()));
validatorMessageFactories.add(new MessageFactory(newNodeKey));
}
when(block.getHash()).thenReturn(Hash.fromHexStringLenient("1"));
}
@Test
@ -128,7 +128,7 @@ public class RoundStateTest {
.get(0)
.createCommit(
roundIdentifier,
block.getHash(),
blockHash,
SIGNATURE_ALGORITHM
.get()
.createSignature(BigInteger.ONE, BigInteger.ONE, (byte) 1));
@ -147,13 +147,13 @@ public class RoundStateTest {
final RoundState roundState = new RoundState(roundIdentifier, 3, messageValidator);
final Prepare firstPrepare =
validatorMessageFactories.get(1).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(1).createPrepare(roundIdentifier, blockHash);
final Prepare secondPrepare =
validatorMessageFactories.get(2).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(2).createPrepare(roundIdentifier, blockHash);
final Prepare thirdPrepare =
validatorMessageFactories.get(0).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(0).createPrepare(roundIdentifier, blockHash);
roundState.addPrepareMessage(firstPrepare);
assertThat(roundState.isPrepared()).isFalse();
@ -184,10 +184,10 @@ public class RoundStateTest {
@Test
public void invalidPriorPrepareMessagesAreDiscardedUponSubsequentProposal() {
final Prepare firstPrepare =
validatorMessageFactories.get(1).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(1).createPrepare(roundIdentifier, blockHash);
final Prepare secondPrepare =
validatorMessageFactories.get(2).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(2).createPrepare(roundIdentifier, blockHash);
// RoundState has a quorum size of 3, meaning 1 proposal and 2 prepare are required to be
// 'prepared'.
@ -218,13 +218,13 @@ public class RoundStateTest {
final RoundState roundState = new RoundState(roundIdentifier, 2, messageValidator);
final Prepare firstPrepare =
validatorMessageFactories.get(1).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(1).createPrepare(roundIdentifier, blockHash);
final Prepare secondPrepare =
validatorMessageFactories.get(2).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(2).createPrepare(roundIdentifier, blockHash);
final Prepare thirdPrepare =
validatorMessageFactories.get(0).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(0).createPrepare(roundIdentifier, blockHash);
final Proposal proposal =
validatorMessageFactories
@ -262,7 +262,7 @@ public class RoundStateTest {
.get(1)
.createCommit(
roundIdentifier,
block.getHash(),
blockHash,
SIGNATURE_ALGORITHM
.get()
.createSignature(BigInteger.ONE, BigInteger.TEN, (byte) 1));
@ -272,7 +272,7 @@ public class RoundStateTest {
.get(2)
.createCommit(
roundIdentifier,
block.getHash(),
blockHash,
SIGNATURE_ALGORITHM
.get()
.createSignature(BigInteger.TEN, BigInteger.TEN, (byte) 1));
@ -298,13 +298,13 @@ public class RoundStateTest {
final RoundState roundState = new RoundState(roundIdentifier, 2, messageValidator);
final Prepare firstPrepare =
validatorMessageFactories.get(1).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(1).createPrepare(roundIdentifier, blockHash);
final Prepare secondPrepare =
validatorMessageFactories.get(2).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(2).createPrepare(roundIdentifier, blockHash);
final Prepare duplicatePrepare =
validatorMessageFactories.get(2).createPrepare(roundIdentifier, block.getHash());
validatorMessageFactories.get(2).createPrepare(roundIdentifier, blockHash);
final Proposal proposal =
validatorMessageFactories

@ -33,6 +33,7 @@ import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings("MockNotUsedInProduction")
public class PrivFindPrivacyGroup implements JsonRpcMethod {
private static final Logger LOG = LoggerFactory.getLogger(PrivFindPrivacyGroup.class);

@ -84,7 +84,7 @@ public class BlockResult implements JsonRpcResult {
private final String withdrawalsRoot;
private final List<WithdrawalParameter> withdrawals;
public <T extends TransactionResult> BlockResult(
public BlockResult(
final BlockHeader header,
final List<TransactionResult> transactions,
final List<JsonNode> ommers,
@ -93,7 +93,7 @@ public class BlockResult implements JsonRpcResult {
this(header, transactions, ommers, totalDifficulty, size, false, Optional.empty());
}
public <T extends TransactionResult> BlockResult(
public BlockResult(
final BlockHeader header,
final List<TransactionResult> transactions,
final List<JsonNode> ommers,

@ -17,7 +17,6 @@ package org.hyperledger.besu.ethereum.api.graphql;
import org.hyperledger.besu.ethereum.api.graphql.internal.pojoadapter.NormalBlockAdapter;
import org.hyperledger.besu.ethereum.api.query.BlockchainQueries;
import org.hyperledger.besu.ethereum.core.BlockHeader;
import org.hyperledger.besu.ethereum.core.MutableWorldState;
import org.hyperledger.besu.ethereum.p2p.rlpx.wire.Capability;
import java.util.Optional;
@ -44,13 +43,10 @@ public abstract class AbstractDataFetcherTest {
@Mock protected BlockHeader header;
@Mock protected MutableWorldState mutableWorldState;
@Before
public void before() {
final GraphQLDataFetchers fetchers = new GraphQLDataFetchers(supportedCapabilities);
fetcher = fetchers.getBlockDataFetcher();
graphQLContext.put(GraphQLContextType.BLOCKCHAIN_QUERIES, query);
Mockito.when(environment.getGraphQlContext()).thenReturn(graphQLContext);
}
}

@ -72,7 +72,6 @@ public class EngineAuthServiceTest {
@Override
public void handle(final Optional<User> event) {
assertThat(event).isPresent();
assertThat(event.get()).isNotNull();
}
};
auth.authenticate(token, authHandler);

@ -62,47 +62,24 @@ public class AdminLogsRemoveCacheTest {
@Test
public void testParameterized() {
when(blockchainQueries.headBlockNumber()).thenReturn(1000L);
long blockNumber = 1000L;
when(blockchainQueries.headBlockNumber()).thenReturn(blockNumber);
final Object[][] testVector = {
{new String[] {}, 0L, blockchainQueries.headBlockNumber()},
{new String[] {}, 0L, blockNumber},
{new String[] {"earliest"}, 0L, 0L},
{
new String[] {"latest"},
blockchainQueries.headBlockNumber(),
blockchainQueries.headBlockNumber()
},
{
new String[] {"pending"},
blockchainQueries.headBlockNumber(),
blockchainQueries.headBlockNumber()
},
{new String[] {"latest"}, blockNumber, blockNumber},
{new String[] {"pending"}, blockNumber, blockNumber},
{new String[] {"0x50"}, 0x50L, 0x50L},
{new String[] {"earliest", "earliest"}, 0L, 0L},
{new String[] {"earliest", "latest"}, 0L, blockchainQueries.headBlockNumber()},
{
new String[] {"latest", "latest"},
blockchainQueries.headBlockNumber(),
blockchainQueries.headBlockNumber()
},
{
new String[] {"pending", "latest"},
blockchainQueries.headBlockNumber(),
blockchainQueries.headBlockNumber()
},
{new String[] {"0x50", "latest"}, 0x50L, blockchainQueries.headBlockNumber()},
{new String[] {"earliest", "pending"}, 0L, blockchainQueries.headBlockNumber()},
{
new String[] {"latest", "pending"},
blockchainQueries.headBlockNumber(),
blockchainQueries.headBlockNumber()
},
{
new String[] {"pending", "pending"},
blockchainQueries.headBlockNumber(),
blockchainQueries.headBlockNumber()
},
{new String[] {"0x50", "pending"}, 0x50L, blockchainQueries.headBlockNumber()},
{new String[] {"earliest", "latest"}, 0L, blockNumber},
{new String[] {"latest", "latest"}, blockNumber, blockNumber},
{new String[] {"pending", "latest"}, blockNumber, blockNumber},
{new String[] {"0x50", "latest"}, 0x50L, blockNumber},
{new String[] {"earliest", "pending"}, 0L, blockNumber},
{new String[] {"latest", "pending"}, blockNumber, blockNumber},
{new String[] {"pending", "pending"}, blockNumber, blockNumber},
{new String[] {"0x50", "pending"}, 0x50L, blockNumber},
{new String[] {"earliest", "0x100"}, 0L, 0x100L},
{new String[] {"0x50", "0x100"}, 0x50L, 0x100L},
};

@ -31,7 +31,6 @@ import org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.DebugTraceTran
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.StructLog;
import org.hyperledger.besu.ethereum.api.query.BlockchainQueries;
import org.hyperledger.besu.ethereum.api.query.TransactionWithMetadata;
import org.hyperledger.besu.ethereum.core.BlockHeader;
import org.hyperledger.besu.ethereum.core.Transaction;
import org.hyperledger.besu.ethereum.debug.TraceFrame;
import org.hyperledger.besu.ethereum.processing.TransactionProcessingResult;
@ -56,7 +55,6 @@ public class DebugTraceTransactionTest {
new DebugTraceTransaction(blockchain, transactionTracer);
private final Transaction transaction = mock(Transaction.class);
private final BlockHeader blockHeader = mock(BlockHeader.class);
private final Hash blockHash =
Hash.fromHexString("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
private final Hash transactionHash =
@ -118,7 +116,6 @@ public class DebugTraceTransactionTest {
when(transaction.getGasLimit()).thenReturn(100L);
when(result.getGasRemaining()).thenReturn(27L);
when(result.getOutput()).thenReturn(Bytes.fromHexString("1234"));
when(blockHeader.getNumber()).thenReturn(12L);
when(blockchain.headBlockNumber()).thenReturn(12L);
when(blockchain.transactionByHash(transactionHash))
.thenReturn(Optional.of(transactionWithMetadata));
@ -183,7 +180,6 @@ public class DebugTraceTransactionTest {
when(transaction.getGasLimit()).thenReturn(100L);
when(result.getGasRemaining()).thenReturn(27L);
when(result.getOutput()).thenReturn(Bytes.fromHexString("1234"));
when(blockHeader.getNumber()).thenReturn(12L);
when(blockchain.headBlockNumber()).thenReturn(12L);
when(blockchain.transactionByHash(transactionHash)).thenReturn(Optional.empty());
when(transactionTracer.traceTransaction(

@ -86,7 +86,7 @@ public class EthCallTest {
final JsonRpcResponse expectedResponse = new JsonRpcErrorResponse(null, INTERNAL_ERROR);
when(blockchainQueries.getBlockchain()).thenReturn(blockchain);
when(blockchainQueries.getBlockchain().getChainHead()).thenReturn(chainHead);
when(blockchain.getChainHead()).thenReturn(chainHead);
when(transactionSimulator.process(any(), any(), any(), any())).thenReturn(Optional.empty());
final BlockHeader blockHeader = mock(BlockHeader.class);
@ -109,7 +109,7 @@ public class EthCallTest {
mockTransactionProcessorSuccessResult(Bytes.of());
when(blockchainQueries.getBlockchain()).thenReturn(blockchain);
when(blockchainQueries.getBlockchain().getChainHead()).thenReturn(chainHead);
when(blockchain.getChainHead()).thenReturn(chainHead);
final JsonRpcResponse response = method.response(request);
@ -124,7 +124,7 @@ public class EthCallTest {
new JsonRpcSuccessResponse(null, Bytes.of(1).toString());
mockTransactionProcessorSuccessResult(Bytes.of(1));
when(blockchainQueries.getBlockchain()).thenReturn(blockchain);
when(blockchainQueries.getBlockchain().getChainHead()).thenReturn(chainHead);
when(blockchain.getChainHead()).thenReturn(chainHead);
final BlockHeader blockHeader = mock(BlockHeader.class);
when(blockHeader.getBaseFee()).thenReturn(Optional.of(Wei.ZERO));
@ -142,7 +142,7 @@ public class EthCallTest {
public void shouldUseCorrectBlockNumberWhenLatest() {
final JsonRpcRequestContext request = ethCallRequest(callParameter(), "latest");
when(blockchainQueries.getBlockchain()).thenReturn(blockchain);
when(blockchainQueries.getBlockchain().getChainHead()).thenReturn(chainHead);
when(blockchain.getChainHead()).thenReturn(chainHead);
when(transactionSimulator.process(any(), any(), any(), any())).thenReturn(Optional.empty());
final BlockHeader blockHeader = mock(BlockHeader.class);
@ -266,7 +266,7 @@ public class EthCallTest {
final BlockHeader blockHeader = mock(BlockHeader.class);
when(blockHeader.getBaseFee()).thenReturn(baseFee);
when(blockchainQueries.getBlockchain()).thenReturn(blockchain);
when(blockchainQueries.getBlockchain().getChainHead()).thenReturn(chainHead);
when(blockchain.getChainHead()).thenReturn(chainHead);
when(chainHead.getBlockHeader()).thenReturn(blockHeader);
method.response(request);

@ -89,9 +89,9 @@ class EthGetProofTest {
void errorWhenNoAddressAccountSupplied() {
final JsonRpcRequestContext request = requestWithParams(null, null, "latest");
when(blockchainQueries.getBlockchain()).thenReturn(blockchain);
when(blockchainQueries.getBlockchain().getChainHead()).thenReturn(chainHead);
when(blockchain.getChainHead()).thenReturn(chainHead);
final BlockHeader blockHeader = mock(BlockHeader.class);
when(blockchainQueries.getBlockchain().getChainHead().getBlockHeader()).thenReturn(blockHeader);
when(chainHead.getBlockHeader()).thenReturn(blockHeader);
when(blockHeader.getBlockHash()).thenReturn(Hash.ZERO);
Assertions.assertThatThrownBy(() -> method.response(request))
@ -103,9 +103,9 @@ class EthGetProofTest {
void errorWhenNoStorageKeysSupplied() {
final JsonRpcRequestContext request = requestWithParams(address.toString(), null, "latest");
when(blockchainQueries.getBlockchain()).thenReturn(blockchain);
when(blockchainQueries.getBlockchain().getChainHead()).thenReturn(chainHead);
when(blockchain.getChainHead()).thenReturn(chainHead);
final BlockHeader blockHeader = mock(BlockHeader.class);
when(blockchainQueries.getBlockchain().getChainHead().getBlockHeader()).thenReturn(blockHeader);
when(chainHead.getBlockHeader()).thenReturn(blockHeader);
when(blockHeader.getBlockHash()).thenReturn(Hash.ZERO);
Assertions.assertThatThrownBy(() -> method.response(request))

@ -145,8 +145,8 @@ class EthGetTransactionCountTest {
private void mockGetTransactionCount(final Address address, final long transactionCount) {
when(blockchainQueries.getBlockchain()).thenReturn(blockchain);
when(blockchainQueries.getBlockchain().getChainHead()).thenReturn(chainHead);
when(blockchainQueries.getBlockchain().getChainHead().getHash()).thenReturn(Hash.ZERO);
when(blockchain.getChainHead()).thenReturn(chainHead);
when(chainHead.getHash()).thenReturn(Hash.ZERO);
when(blockchainQueries.getTransactionCount(address, Hash.ZERO)).thenReturn(transactionCount);
}
}

@ -92,7 +92,8 @@ public class EthGetWorkTest {
+ BaseEncoding.base16()
.lowerCase()
.encode(
DirectAcyclicGraphSeed.dagSeed(30000, miningCoordinator.getEpochCalculator())),
DirectAcyclicGraphSeed.dagSeed(
30000, new EpochCalculator.DefaultEpochCalculator())),
"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"0x7530"
};
@ -106,8 +107,8 @@ public class EthGetWorkTest {
@Test
public void shouldReturnCorrectResultOnHighBlockSeedEcip1099() {
when(miningCoordinator.getEpochCalculator())
.thenReturn(new EpochCalculator.Ecip1099EpochCalculator());
EpochCalculator epochCalculator = new EpochCalculator.Ecip1099EpochCalculator();
when(miningCoordinator.getEpochCalculator()).thenReturn(epochCalculator);
method = new EthGetWork(miningCoordinator);
final JsonRpcRequestContext request = requestWithParams();
final PoWSolverInputs values =
@ -118,8 +119,7 @@ public class EthGetWorkTest {
"0x"
+ BaseEncoding.base16()
.lowerCase()
.encode(
DirectAcyclicGraphSeed.dagSeed(60000, miningCoordinator.getEpochCalculator())),
.encode(DirectAcyclicGraphSeed.dagSeed(60000, epochCalculator)),
"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"0xea60"
};

@ -49,10 +49,11 @@ public class TxPoolBesuPendingTransactionsTest {
private TxPoolBesuPendingTransactions method;
private final String JSON_RPC_VERSION = "2.0";
private final String TXPOOL_PENDING_TRANSACTIONS_METHOD = "txpool_besuPendingTransactions";
private Set<PendingTransaction> listTrx;
@Before
public void setUp() {
final Set<PendingTransaction> listTrx = getPendingTransactions();
listTrx = getPendingTransactions();
method = new TxPoolBesuPendingTransactions(pendingTransactions);
when(this.pendingTransactions.getPendingTransactions()).thenReturn(listTrx);
}
@ -72,7 +73,7 @@ public class TxPoolBesuPendingTransactionsTest {
final JsonRpcSuccessResponse actualResponse = (JsonRpcSuccessResponse) method.response(request);
final Set<TransactionPendingResult> result =
(Set<TransactionPendingResult>) actualResponse.getResult();
assertThat(result.size()).isEqualTo(this.pendingTransactions.getPendingTransactions().size());
assertThat(result.size()).isEqualTo(getPendingTransactions().size());
}
@Test
@ -119,13 +120,7 @@ public class TxPoolBesuPendingTransactionsTest {
final Map<String, String> fromFilter = new HashMap<>();
fromFilter.put(
"eq",
pendingTransactions.getPendingTransactions().stream()
.findAny()
.get()
.getTransaction()
.getSender()
.toHexString());
"eq", listTrx.stream().findAny().get().getTransaction().getSender().toHexString());
final JsonRpcRequestContext request =
new JsonRpcRequestContext(

@ -73,6 +73,7 @@ import io.vertx.core.Vertx;
import org.apache.tuweni.bytes.Bytes32;
import org.jetbrains.annotations.NotNull;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@ -360,9 +361,11 @@ public abstract class AbstractEngineNewPayloadTest {
}
@Test
@Ignore
public void shouldRespondWithInvalidTerminalPowBlock() {
// TODO: implement this as part of https://github.com/hyperledger/besu/issues/3141
assertThat(mergeContext.getTerminalTotalDifficulty()).isNull();
// mergeContext is a mock
// assertThat(mergeContext.getTerminalTotalDifficulty()).isNull();
}
@Test

@ -38,6 +38,7 @@ import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
@RunWith(MockitoJUnitRunner.class)
@SuppressWarnings("DirectInvocationOnMock")
public class GoQuorumEthGetQuorumPayloadTest {
@Mock GoQuorumEthGetQuorumPayload method;

@ -59,6 +59,7 @@ import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
@RunWith(MockitoJUnitRunner.class)
@SuppressWarnings("DirectInvocationOnMock")
public class GoQuorumSendRawPrivateTransactionTest {
static final Supplier<SignatureAlgorithm> SIGNATURE_ALGORITHM =

@ -44,6 +44,7 @@ import org.assertj.core.util.Lists;
import org.junit.Before;
import org.junit.Test;
@SuppressWarnings("MockNotUsedInProduction")
public class PrivCreatePrivacyGroupTest {
private static final String FROM = "first participant";

@ -19,7 +19,6 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import org.hyperledger.besu.enclave.Enclave;
import org.hyperledger.besu.enclave.EnclaveClientException;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequestContext;
@ -28,7 +27,6 @@ import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcError;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import org.hyperledger.besu.ethereum.core.PrivacyParameters;
import org.hyperledger.besu.ethereum.privacy.MultiTenancyValidationException;
import org.hyperledger.besu.ethereum.privacy.PrivacyController;
@ -42,8 +40,6 @@ public class PrivDeletePrivacyGroupTest {
private static final String ENCLAVE_PUBLIC_KEY = "A1aVtMxLCUHmBVHXoZzzBgPbW/wj5axDpW9X8l91SGo=";
private static final String PRIVACY_GROUP_ID = "privacyGroupId";
private final Enclave enclave = mock(Enclave.class);
private final PrivacyParameters privacyParameters = mock(PrivacyParameters.class);
private final PrivacyController privacyController = mock(PrivacyController.class);
private final User user =
new UserImpl(new JsonObject().put("privacyPublicKey", ENCLAVE_PUBLIC_KEY), new JsonObject());
@ -52,8 +48,6 @@ public class PrivDeletePrivacyGroupTest {
@Before
public void setUp() {
when(privacyParameters.getEnclave()).thenReturn(enclave);
when(privacyParameters.isEnabled()).thenReturn(true);
request =
new JsonRpcRequestContext(
new JsonRpcRequest("1", "priv_deletePrivacyGroup", new Object[] {PRIVACY_GROUP_ID}),

@ -63,7 +63,7 @@ public class PrivDistributeRawTransactionTest {
new JsonObject().put("privacyPublicKey", ENCLAVE_PUBLIC_KEY), new JsonObject()) {};
private final PrivacyIdProvider privacyIdProvider = (user) -> ENCLAVE_PUBLIC_KEY;
@Mock private PrivDistributeRawTransaction method;
private PrivDistributeRawTransaction method;
@Mock private PrivacyController privacyController;
@Before

@ -43,6 +43,7 @@ import org.assertj.core.util.Lists;
import org.junit.Before;
import org.junit.Test;
@SuppressWarnings("MockNotUsedInProduction")
public class PrivFindPrivacyGroupTest {
private static final String ENCLAVE_PUBLIC_KEY = VALID_BASE64_ENCLAVE_KEY.toBase64String();
private static final List<String> ADDRESSES =

@ -30,7 +30,6 @@ import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcError;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import org.hyperledger.besu.ethereum.core.PrivacyParameters;
import org.hyperledger.besu.ethereum.privacy.MultiTenancyValidationException;
import org.hyperledger.besu.ethereum.privacy.PrivacyController;
@ -50,7 +49,6 @@ class PrivGetEeaTransactionCountTest {
"QzHuACXpfhoGAgrQriWJcDJ6MrUwcCvutKMoAn9KplQ="
};
private final PrivacyParameters privacyParameters = mock(PrivacyParameters.class);
private final PrivacyController privacyController = mock(PrivacyController.class);
private JsonRpcRequestContext request;
@ -60,7 +58,6 @@ class PrivGetEeaTransactionCountTest {
@BeforeEach
public void setup() {
when(privacyParameters.isEnabled()).thenReturn(true);
final Object[] jsonBody = new Object[] {address.toString(), ENCLAVE_PUBLIC_KEY, PRIVATE_FOR};
request =
new JsonRpcRequestContext(

@ -29,7 +29,6 @@ import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcError;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import org.hyperledger.besu.ethereum.core.PrivacyParameters;
import org.hyperledger.besu.ethereum.privacy.MultiTenancyValidationException;
import org.hyperledger.besu.ethereum.privacy.PrivacyController;
@ -38,7 +37,6 @@ import java.util.stream.Stream;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.auth.User;
import io.vertx.ext.auth.impl.UserImpl;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
@ -47,7 +45,6 @@ import org.junit.jupiter.params.provider.MethodSource;
class PrivGetTransactionCountTest {
private static final String ENCLAVE_PUBLIC_KEY = "A1aVtMxLCUHmBVHXoZzzBgPbW/wj5axDpW9X8l91SGo=";
private final PrivacyParameters privacyParameters = mock(PrivacyParameters.class);
private final PrivacyController privacyController = mock(PrivacyController.class);
private static final String PRIVACY_GROUP_ID = "DyAOiF/ynpc+JXa2YAGB0bCitSlOMNm+ShmB/7M6C4w=";
@ -59,11 +56,6 @@ class PrivGetTransactionCountTest {
new JsonObject().put("privacyPublicKey", ENCLAVE_PUBLIC_KEY), new JsonObject()) {};
private final PrivacyIdProvider privacyIdProvider = (user) -> ENCLAVE_PUBLIC_KEY;
@BeforeEach
public void setup() {
when(privacyParameters.isEnabled()).thenReturn(true);
}
@ParameterizedTest(name = "{index}: {1}")
@MethodSource({"provideNonces"})
void verifyTransactionCount(final long nonce, final String ignoredName) {

@ -19,7 +19,6 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import org.hyperledger.besu.enclave.Enclave;
import org.hyperledger.besu.enclave.EnclaveClientException;
import org.hyperledger.besu.enclave.types.PrivacyGroup;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequest;
@ -29,7 +28,6 @@ import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcError;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import org.hyperledger.besu.ethereum.core.PrivacyParameters;
import org.hyperledger.besu.ethereum.privacy.MultiTenancyValidationException;
import org.hyperledger.besu.ethereum.privacy.PrivacyController;
@ -49,8 +47,6 @@ public class PrivxFindFlexiblePrivacyGroupTest {
"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
"0x627306090abab3a6e1400e9345bc60c78a8bef57");
private final Enclave enclave = mock(Enclave.class);
private final PrivacyParameters privacyParameters = mock(PrivacyParameters.class);
private final PrivacyController privacyController = mock(PrivacyController.class);
private final User user =
@ -63,8 +59,6 @@ public class PrivxFindFlexiblePrivacyGroupTest {
@Before
public void setUp() {
when(privacyParameters.getEnclave()).thenReturn(enclave);
when(privacyParameters.isEnabled()).thenReturn(true);
request =
new JsonRpcRequestContext(
new JsonRpcRequest("1", "privx_findFlexiblePrivacyGroup", new Object[] {ADDRESSES}),

@ -20,7 +20,6 @@ import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import org.hyperledger.besu.datatypes.Address;
import org.hyperledger.besu.datatypes.Hash;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters.ImmutableTransactionTraceParams;
import org.hyperledger.besu.ethereum.chain.BadBlockManager;
@ -170,14 +169,14 @@ public class TransactionTracerTest {
when(blockBody.getTransactions()).thenReturn(Collections.singletonList(transaction));
when(blockchain.getBlockBody(blockHash)).thenReturn(Optional.of(blockBody));
final WorldUpdater updater = mutableWorldState.updater();
final Address coinbase = blockHeader.getCoinbase();
final WorldUpdater updater = mock(WorldUpdater.class);
when(mutableWorldState.updater()).thenReturn(updater);
when(transactionProcessor.processTransaction(
eq(blockchain),
eq(updater),
eq(blockHeader),
eq(transaction),
eq(coinbase),
eq(null),
eq(tracer),
any(),
any(),
@ -259,13 +258,12 @@ public class TransactionTracerTest {
when(mutableWorldState.updater()).thenReturn(updater);
final WorldUpdater stackedUpdater = mock(StackedUpdater.class);
when(updater.updater()).thenReturn(stackedUpdater);
final Address coinbase = blockHeader.getCoinbase();
when(transactionProcessor.processTransaction(
eq(blockchain),
eq(stackedUpdater),
eq(blockHeader),
eq(transaction),
eq(coinbase),
eq(null),
any(StandardJsonTracer.class),
any(),
any(),

@ -56,8 +56,8 @@ import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
@SuppressWarnings("unused")
@RunWith(MockitoJUnitRunner.class)
@SuppressWarnings({"unused", "DirectInvocationOnMock"})
public class GoQuorumPrivateTransactionLogBloomCacherTest {
private static final long NUMBER_3 = 3L;

@ -130,12 +130,12 @@ public class TransactionLogBloomCacherTest {
createLogBloomCache(logBloom);
createBlock(3L);
final BlockHeader header = createBlock(3L);
assertThat(logBloom.length()).isEqualTo(BLOOM_BITS_LENGTH * 3);
transactionLogBloomCacher.cacheLogsBloomForBlockHeader(
blockchain.getBlockHeader(3).get(), Optional.empty(), Optional.of(logBloom));
header, Optional.empty(), Optional.of(logBloom));
assertThat(logBloom.length()).isEqualTo(BLOOM_BITS_LENGTH * 4);
assertThat(cacheDir.getRoot().list().length).isEqualTo(1);
@ -154,7 +154,7 @@ public class TransactionLogBloomCacherTest {
}
transactionLogBloomCacher.cacheLogsBloomForBlockHeader(
blockchain.getBlockHeader(4).get(), Optional.empty(), Optional.of(logBloom));
blockHeaders.get(4), Optional.empty(), Optional.of(logBloom));
for (int i = 0; i < 5; i++) {
assertThat(blockHeaders.get(i).getLogsBloom().toArray())
@ -195,7 +195,7 @@ public class TransactionLogBloomCacherTest {
}
transactionLogBloomCacher.cacheLogsBloomForBlockHeader(
blockchain.getBlockHeader(4).get(), Optional.empty(), Optional.of(logBloom));
firstBranch.get(4), Optional.empty(), Optional.of(logBloom));
assertThat(logBloom.length()).isEqualTo(BLOOM_BITS_LENGTH * 5);
for (int i = 0; i < 5; i++) {
assertThat(firstBranch.get(i).getLogsBloom().toArray())
@ -210,7 +210,7 @@ public class TransactionLogBloomCacherTest {
}
transactionLogBloomCacher.cacheLogsBloomForBlockHeader(
blockchain.getBlockHeader(4).get(), blockchain.getBlockHeader(1), Optional.of(logBloom));
forkBranch.get(4), Optional.of(firstBranch.get(1)), Optional.of(logBloom));
assertThat(logBloom.length()).isEqualTo(BLOOM_BITS_LENGTH * 5);
for (int i = 0; i < 5; i++) {
assertThat(forkBranch.get(i).getLogsBloom().toArray())
@ -218,7 +218,7 @@ public class TransactionLogBloomCacherTest {
}
transactionLogBloomCacher.cacheLogsBloomForBlockHeader(
blockchain.getBlockHeader(1).get(), Optional.empty(), Optional.of(logBloom));
forkBranch.get(1), Optional.empty(), Optional.of(logBloom));
assertThat(logBloom.length()).isEqualTo(BLOOM_BITS_LENGTH * 2);
assertThat(cacheDir.getRoot().list().length).isEqualTo(1);

@ -21,7 +21,6 @@ import static org.hyperledger.besu.ethereum.mainnet.PrivateStateUtils.KEY_PRIVAT
import static org.hyperledger.besu.ethereum.mainnet.PrivateStateUtils.KEY_TRANSACTION;
import static org.hyperledger.besu.ethereum.privacy.PrivateTransaction.readFrom;
import static org.hyperledger.besu.ethereum.privacy.PrivateTransaction.serialize;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@ -40,7 +39,6 @@ import org.hyperledger.besu.ethereum.privacy.PrivateTransaction;
import org.hyperledger.besu.ethereum.privacy.PrivateTransactionProcessor;
import org.hyperledger.besu.ethereum.privacy.storage.PrivacyGroupHeadBlockMap;
import org.hyperledger.besu.ethereum.privacy.storage.PrivateMetadataUpdater;
import org.hyperledger.besu.ethereum.privacy.storage.PrivateStateStorage;
import org.hyperledger.besu.ethereum.processing.TransactionProcessingResult;
import org.hyperledger.besu.ethereum.rlp.BytesValueRLPInput;
import org.hyperledger.besu.ethereum.rlp.BytesValueRLPOutput;
@ -76,8 +74,6 @@ public class PrivacyPluginPrecompiledContractTest {
@Before
public void setup() {
final PrivateStateStorage privateStateStorage = mock(PrivateStateStorage.class);
messageFrame = mock(MessageFrame.class);
final BlockDataGenerator blockGenerator = new BlockDataGenerator();
@ -91,8 +87,6 @@ public class PrivacyPluginPrecompiledContractTest {
when(messageFrame.getContextVariable(KEY_PRIVATE_METADATA_UPDATER))
.thenReturn(mock(PrivateMetadataUpdater.class));
when(messageFrame.getBlockValues()).thenReturn(block.getHeader());
when(privateStateStorage.getPrivacyGroupHeadBlockMap(any()))
.thenReturn(Optional.of(PrivacyGroupHeadBlockMap.empty()));
final PrivateMetadataUpdater privateMetadataUpdater = mock(PrivateMetadataUpdater.class);
when(messageFrame.hasContextVariable(KEY_PRIVATE_METADATA_UPDATER)).thenReturn(true);

@ -71,12 +71,13 @@ import org.apache.tuweni.bytes.Bytes;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@SuppressWarnings("MockNotUsedInProduction")
public class PrivacyPrecompiledContractTest {
private final String actual = "Test String";
private final Bytes privateTransactionLookupId = Bytes.wrap(actual.getBytes(UTF_8));
private MessageFrame messageFrame;
private Blockchain blockchain;
private final Blockchain blockchain = mock(Blockchain.class);
private final String DEFAULT_OUTPUT = "0x01";
final String PAYLOAD_TEST_PRIVACY_GROUP_ID = "8lDVI66RZHIrBsolz6Kn88Rd+WsJ4hUjb4hsh29xW/o=";
private final WorldStateArchive worldStateArchive = mock(WorldStateArchive.class);
@ -121,7 +122,6 @@ public class PrivacyPrecompiledContractTest {
.thenReturn(new PrivateBlockMetadata(Collections.emptyList()));
messageFrame = mock(MessageFrame.class);
blockchain = mock(Blockchain.class);
final BlockDataGenerator blockGenerator = new BlockDataGenerator();
final Block genesis = blockGenerator.genesisBlock();
final Block block =

@ -127,6 +127,7 @@ public class PrivateStorageMigrationTest {
}
@Test
@SuppressWarnings("DirectInvocationOnMock")
public void privateGroupHeadBlocKMapIsCopiedFromPreviousBlocks() {
mockBlockchainWithZeroTransactions();
@ -186,6 +187,7 @@ public class PrivateStorageMigrationTest {
}
@Test
@SuppressWarnings("DirectInvocationOnMock")
public void migrationReprocessBlocksWithPMT() {
final Transaction privateMarkerTransaction = createPrivateMarkerTransaction();
mockBlockchainWithPrivateMarkerTransaction(privateMarkerTransaction);

@ -107,8 +107,7 @@ public class FastWorldStateDownloader implements WorldStateDownloader {
return failed;
}
Optional<BlockHeader> checkNull =
Optional.ofNullable(fastSyncState.getPivotBlockHeader().get());
Optional<BlockHeader> checkNull = Optional.of(fastSyncState.getPivotBlockHeader().get());
if (checkNull.isEmpty()) {
LOG.error("Pivot Block not present");
final CompletableFuture<Void> failed = new CompletableFuture<>();

@ -24,6 +24,7 @@ import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import org.hyperledger.besu.config.StubGenesisConfigOptions;
@ -273,7 +274,6 @@ public class BackwardSyncContextTest {
Block block = Mockito.mock(Block.class);
BlockHeader blockHeader = Mockito.mock(BlockHeader.class);
when(block.getHash()).thenReturn(Hash.fromHexStringLenient("0x42"));
when(block.getHeader()).thenReturn(blockHeader);
when(blockHeader.getHash()).thenReturn(Hash.fromHexStringLenient("0x42"));
BadChainListener badChainListener = Mockito.mock(BadChainListener.class);
context.subscribeBadChainListener(badChainListener);
@ -286,7 +286,7 @@ public class BackwardSyncContextTest {
backwardChain.clear();
backwardChain.prependAncestorsHeader(grandChildBlockHeader);
backwardChain.prependAncestorsHeader(childBlockHeader);
backwardChain.prependAncestorsHeader(block.getHeader());
backwardChain.prependAncestorsHeader(blockHeader);
doReturn(blockValidator).when(context).getBlockValidatorForBlock(any());
BlockProcessingResult result = new BlockProcessingResult("custom error");
@ -296,7 +296,7 @@ public class BackwardSyncContextTest {
.isInstanceOf(BackwardSyncException.class)
.hasMessageContaining("custom error");
Mockito.verify(badChainListener)
verify(badChainListener)
.onBadChain(
block, Collections.emptyList(), List.of(childBlockHeader, grandChildBlockHeader));
}

@ -15,7 +15,6 @@
package org.hyperledger.besu.ethereum.eth.sync.checkpointsync;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hyperledger.besu.ethereum.mainnet.HeaderValidationMode.LIGHT_SKIP_DETACHED;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@ -33,7 +32,6 @@ import org.hyperledger.besu.ethereum.eth.manager.RespondingEthPeer;
import org.hyperledger.besu.ethereum.eth.sync.ChainDownloader;
import org.hyperledger.besu.ethereum.eth.sync.SynchronizerConfiguration;
import org.hyperledger.besu.ethereum.eth.sync.fastsync.FastSyncState;
import org.hyperledger.besu.ethereum.eth.sync.fastsync.FastSyncValidationPolicy;
import org.hyperledger.besu.ethereum.eth.sync.fastsync.checkpoint.Checkpoint;
import org.hyperledger.besu.ethereum.eth.sync.fastsync.checkpoint.ImmutableCheckpoint;
import org.hyperledger.besu.ethereum.eth.sync.state.SyncState;
@ -57,7 +55,6 @@ import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class)
public class CheckPointSyncChainDownloaderTest {
private final FastSyncValidationPolicy validationPolicy = mock(FastSyncValidationPolicy.class);
private final WorldStateStorage worldStateStorage = mock(WorldStateStorage.class);
protected ProtocolSchedule protocolSchedule;
@ -84,7 +81,6 @@ public class CheckPointSyncChainDownloaderTest {
@Before
public void setup() {
when(validationPolicy.getValidationModeForNextBlock()).thenReturn(LIGHT_SKIP_DETACHED);
when(worldStateStorage.isWorldStateAvailable(any(), any())).thenReturn(true);
final BlockchainSetupUtil localBlockchainSetup = BlockchainSetupUtil.forTesting(storageFormat);
localBlockchain = localBlockchainSetup.getBlockchain();

@ -15,7 +15,6 @@
package org.hyperledger.besu.ethereum.eth.sync.fastsync;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@ -24,7 +23,6 @@ import org.hyperledger.besu.consensus.merge.ForkchoiceEvent;
import org.hyperledger.besu.ethereum.ProtocolContext;
import org.hyperledger.besu.ethereum.chain.MutableBlockchain;
import org.hyperledger.besu.ethereum.core.BlockHeader;
import org.hyperledger.besu.ethereum.core.BlockHeaderFunctions;
import org.hyperledger.besu.ethereum.core.BlockHeaderTestFixture;
import org.hyperledger.besu.ethereum.core.BlockchainSetupUtil;
import org.hyperledger.besu.ethereum.core.Difficulty;
@ -67,7 +65,6 @@ public class FastSyncActionsTest {
new SynchronizerConfiguration.Builder().syncMode(SyncMode.FAST).fastSyncPivotDistance(1000);
private final WorldStateStorage worldStateStorage = mock(WorldStateStorage.class);
private final FastSyncStateStorage fastSyncStateStorage = mock(FastSyncStateStorage.class);
private final AtomicInteger timeoutCount = new AtomicInteger(0);
private SynchronizerConfiguration syncConfig = syncConfigBuilder.build();
private FastSyncActions fastSyncActions;
@ -135,8 +132,6 @@ public class FastSyncActionsTest {
@Test
public void selectPivotBlockShouldUseExistingPivotBlockIfAvailable() {
final BlockHeader pivotHeader = new BlockHeaderTestFixture().number(1024).buildHeader();
when(fastSyncStateStorage.loadState(any(BlockHeaderFunctions.class)))
.thenReturn(new FastSyncState(pivotHeader));
EthProtocolManagerTestUtil.createPeer(ethProtocolManager, 5000);
final CompletableFuture<FastSyncState> result =

@ -15,7 +15,6 @@
package org.hyperledger.besu.ethereum.eth.sync.fastsync;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hyperledger.besu.ethereum.mainnet.HeaderValidationMode.LIGHT_SKIP_DETACHED;
import static org.hyperledger.besu.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason.TOO_MANY_PEERS;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
@ -55,7 +54,6 @@ import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class)
public class FastSyncChainDownloaderTest {
private final FastSyncValidationPolicy validationPolicy = mock(FastSyncValidationPolicy.class);
private final WorldStateStorage worldStateStorage = mock(WorldStateStorage.class);
protected ProtocolSchedule protocolSchedule;
@ -81,7 +79,6 @@ public class FastSyncChainDownloaderTest {
@Before
public void setup() {
when(validationPolicy.getValidationModeForNextBlock()).thenReturn(LIGHT_SKIP_DETACHED);
when(worldStateStorage.isWorldStateAvailable(any(), any())).thenReturn(true);
final BlockchainSetupUtil localBlockchainSetup = BlockchainSetupUtil.forTesting(storageFormat);
localBlockchain = localBlockchainSetup.getBlockchain();

@ -281,8 +281,6 @@ public class SnapWorldDownloadStateTest {
public void shouldWaitingBlockchainWhenTooBehind() {
when(snapSyncState.isHealInProgress()).thenReturn(true);
assertThat(snapSyncState.isWaitingBlockchain()).isFalse();
downloadState.setDynamicPivotBlockManager(dynamicPivotBlockManager);
when(dynamicPivotBlockManager.isBlockchainBehind()).thenReturn(true);

@ -15,7 +15,6 @@
package org.hyperledger.besu.ethereum.eth.sync.worldstate;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
@ -30,8 +29,6 @@ import org.hyperledger.besu.ethereum.eth.EthProtocolVersion;
import org.hyperledger.besu.ethereum.eth.manager.EthPeers;
import org.hyperledger.besu.ethereum.eth.manager.EthProtocolManager;
import org.hyperledger.besu.ethereum.eth.manager.EthProtocolManagerTestUtil;
import org.hyperledger.besu.ethereum.eth.manager.PeerRequest;
import org.hyperledger.besu.ethereum.eth.manager.RequestManager;
import org.hyperledger.besu.ethereum.eth.manager.RespondingEthPeer;
import org.hyperledger.besu.ethereum.eth.manager.snap.SnapProtocolManager;
import org.hyperledger.besu.ethereum.eth.manager.task.SnapProtocolManagerTestUtil;
@ -66,9 +63,6 @@ public class WorldStatePeerTrieNodeFinderTest {
private EthProtocolManager ethProtocolManager;
private SnapProtocolManager snapProtocolManager;
private EthPeers ethPeers;
private final PeerRequest peerRequest = mock(PeerRequest.class);
private final RequestManager.ResponseStream responseStream =
mock(RequestManager.ResponseStream.class);
@Before
public void setup() throws Exception {

@ -176,7 +176,7 @@ public class TestNodeList implements Closeable {
checkNotNull(expected);
checkArgument(
expected.length == nodes.size(),
"Expected values for sd nodes, but got %s.",
"Expected values for %s nodes, but got %s.",
expected.length,
nodes.size());
int errCnt = 0;

@ -84,6 +84,7 @@ public class DataStoreModule {
@Provides
@Singleton
@Named("worldStatePreimage")
@SuppressWarnings("UnusedVariable")
KeyValueStorage provideWorldStatePreimageKeyValueStorage(
@Named("KeyValueStorageName") final String keyValueStorageName,
final BesuConfiguration commonConfiguration,

@ -63,6 +63,7 @@ public class GenesisFileModule {
@Singleton
@Provides
@SuppressWarnings("UnusedVariable")
HeaderBasedProtocolSchedule provideProtocolSchedule(
final GenesisConfigOptions configOptions,
@Named("Fork") final Optional<String> fork,

@ -353,7 +353,7 @@ public class DeFramerTest {
when(framer.deframe(any()))
.thenReturn(new RawMessage(helloMessage.getCode(), helloMessage.getData()))
.thenReturn(null);
when(ctx.channel().remoteAddress()).thenReturn(null);
when(channel.remoteAddress()).thenReturn(null);
final ChannelFuture future = NettyMocks.channelFuture(true);
when(ctx.writeAndFlush(any())).thenReturn(future);
final List<Object> out = new ArrayList<>();

@ -1 +1 @@
Subproject commit 69c4c2a98dc8a712d4c6f5a817da4f21ff719006
Subproject commit 638da7ca7b2ca371ebb33d7d7d2562981aafd9b2

@ -171,7 +171,7 @@ class RLPDecodingHelpers {
final Kind kind; // The type of rlp element
final long elementStart; // The index at which this element starts
final long payloadStart; // The index at which the payload of this element starts
final int payloadSize; // The size of the paylod
final int payloadSize; // The size of the payload
RLPElementMetadata(
final Kind kind, final long elementStart, final long payloadStart, final int payloadSize) {
@ -182,6 +182,8 @@ class RLPDecodingHelpers {
}
/**
* The size of the byte string holding the rlp-encoded value and metadata
*
* @return the size of the byte string holding the rlp-encoded value and metadata
*/
int getEncodedSize() {

@ -133,6 +133,11 @@
<sha256 value="e5585cc1c37079b2e3817a8997945736f158831844d59d0e4d3a45b27611f926" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml" name="oss-parent" version="48">
<artifact name="oss-parent-48.pom">
<sha256 value="11bba22d8631816e09b623a200747453d6491a66eac8f5c089c73da2b749014f" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson" name="jackson-base" version="2.11.0">
<artifact name="jackson-base-2.11.0.pom">
<sha256 value="a4306f903647322bbba0054937b89a0c6424756a7fa029c85f2cbd756fde80ca" origin="Generated by Gradle"/>
@ -158,6 +163,11 @@
<sha256 value="98b08346fa922deb37afb02713d50a6c56848250374c64198153a3f9dcb79879" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson" name="jackson-base" version="2.14.1">
<artifact name="jackson-base-2.14.1.pom">
<sha256 value="18015d1bacba9a14625a8bf19411f5bfad82d0060df37b27bd02e78132c4676e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson" name="jackson-bom" version="2.11.0">
<artifact name="jackson-bom-2.11.0.pom">
<sha256 value="5c90fb02e96e8bab2f32eb9492dd350968e294558431ac5a9a10afa6726133cb" origin="Generated by Gradle"/>
@ -193,6 +203,11 @@
<sha256 value="435e9493ddaa96e51995be83b31376ebffd2b37361d8567e1ea14e1c64c3f0d7" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson" name="jackson-bom" version="2.14.1">
<artifact name="jackson-bom-2.14.1.pom">
<sha256 value="78fdf99e5050fc485f4117dab8cccbfb6fa6c68385eb5f38a09b655371d4a6cc" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson" name="jackson-bom" version="2.9.0">
<artifact name="jackson-bom-2.9.0.pom">
<sha256 value="0e8117802e82c29fea7d9488b4dc0a8e429c700a38c698195ff2a278cee95ffc" origin="Generated by Gradle"/>
@ -218,6 +233,11 @@
<sha256 value="2bba89978172af1effcb4d143d09921a3f3082ca4dcf122b1ded98bf55b2ad57" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson" name="jackson-parent" version="2.14">
<artifact name="jackson-parent-2.14.pom">
<sha256 value="0906add855ae39f92357d63f485889b08fca4c43a5fe433522d75344e0757b19" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson" name="jackson-parent" version="2.9.0">
<artifact name="jackson-parent-2.9.0.pom">
<sha256 value="000508b61dd124387e58199fb9e2113c1b5d8b386c5bf7a891b2de6041eb1d52" origin="Generated by Gradle"/>
@ -255,6 +275,17 @@
<sha256 value="5266a52dc739e3213e1c4cc2d5657baec8ef7453f2ebdbe835f7b056e8c27643" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.core" name="jackson-annotations" version="2.14.1">
<artifact name="jackson-annotations-2.14.1.jar">
<sha256 value="d255b4b863ff8ec714a8f96fa55c34621d43dbb82b82d3f57476496a4c09e1e7" origin="Generated by Gradle"/>
</artifact>
<artifact name="jackson-annotations-2.14.1.module">
<sha256 value="267a680bb72cbd752c76b79eb908ae0c0abeb114fcb1c20a9678f0378898b9eb" origin="Generated by Gradle"/>
</artifact>
<artifact name="jackson-annotations-2.14.1.pom">
<sha256 value="89df162386b1ede83a8804e9083970d1a62bdf5d1c69e9e9914761b467f80883" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.core" name="jackson-core" version="2.12.6">
<artifact name="jackson-core-2.12.6.jar">
<sha256 value="0026cff293bdba389fbbbc67a20fdd5f73e091554ab46671efa654c25c807ee6" origin="Generated by Gradle"/>
@ -285,6 +316,17 @@
<sha256 value="27b6a64288546e298641ec8a13e267faee67f2d8a1133cda4ee347def2b2bbba" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.core" name="jackson-core" version="2.14.1">
<artifact name="jackson-core-2.14.1.jar">
<sha256 value="0114187e296b34c931c1bf9e5a84152b62bfab7d182f5623f3982dc2da35e526" origin="Generated by Gradle"/>
</artifact>
<artifact name="jackson-core-2.14.1.module">
<sha256 value="7c8b8035f900f3f1cbdb06b8c79dc2b18b11f6afa13b0b74719cee349ff4c329" origin="Generated by Gradle"/>
</artifact>
<artifact name="jackson-core-2.14.1.pom">
<sha256 value="747b1eebcb8b6def28faeedc0923748f1c153fc6a4b0d8e3b0bca8de5fda637f" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.core" name="jackson-databind" version="2.12.6.1">
<artifact name="jackson-databind-2.12.6.1.jar">
<sha256 value="eb60e494ba8c23e653da4db8e29af0342927fc7e1c60501bf99e93145738c696" origin="Generated by Gradle"/>
@ -317,6 +359,17 @@
<sha256 value="5026062f36c6ad718dae4f024d1cd89f98df3146dc1e8cf2e4c2bcbf978185be" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.core" name="jackson-databind" version="2.14.1">
<artifact name="jackson-databind-2.14.1.jar">
<sha256 value="423a0c806de4b3fa5eb4a28698305e3a3777c731e1bcfa1b2f3a3760c7b6e773" origin="Generated by Gradle"/>
</artifact>
<artifact name="jackson-databind-2.14.1.module">
<sha256 value="d817977c8a6b0aaeda519fb2a7b8dcba02b38c3c272024fada32c5cce7e3d3cb" origin="Generated by Gradle"/>
</artifact>
<artifact name="jackson-databind-2.14.1.pom">
<sha256 value="7adb23d6d746edcf946d1c062b198ff9a026c0e22b307b8d5d79c1e08538c635" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.dataformat" name="jackson-dataformat-yaml" version="2.13.4">
<artifact name="jackson-dataformat-yaml-2.13.4.jar">
<sha256 value="f2992595378c0dd81c317afa788e06dcb5ef24e1c825191251818f5c892ed3c5" origin="Generated by Gradle"/>
@ -328,11 +381,27 @@
<sha256 value="fa117aa8e4198ba2c66d7d79c89aa3f4495c7abb41e25a9190c4d5f55e1c57e2" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.dataformat" name="jackson-dataformat-yaml" version="2.14.1">
<artifact name="jackson-dataformat-yaml-2.14.1.jar">
<sha256 value="9e157e2625ed855ab73af7915e256f6823993a30982f4923c9ca82bb752a0303" origin="Generated by Gradle"/>
</artifact>
<artifact name="jackson-dataformat-yaml-2.14.1.module">
<sha256 value="55a9f205d9cc81e8a54a381835bb296e7885591d03c7404677a12e12f2497a8a" origin="Generated by Gradle"/>
</artifact>
<artifact name="jackson-dataformat-yaml-2.14.1.pom">
<sha256 value="30b957e72e09da4b97227e00165b8e4e6ba98174cadc97091c34652e2862e1c2" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.dataformat" name="jackson-dataformats-text" version="2.13.4">
<artifact name="jackson-dataformats-text-2.13.4.pom">
<sha256 value="ab93d380ec64ba6632775446cf2428aa755d905e11cf8cb02ec04989aab8b6d5" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.dataformat" name="jackson-dataformats-text" version="2.14.1">
<artifact name="jackson-dataformats-text-2.14.1.pom">
<sha256 value="fa323f9c3f2c26d7cccd4e2136091045154d45dc1c1661d4f876a471f562c759" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.datatype" name="jackson-datatype-jdk8" version="2.11.0">
<artifact name="jackson-datatype-jdk8-2.11.0.pom">
<sha256 value="873fdf685cb31ee03b419972f3c4ad5ddb03c3186d5b7c6405792699af9d305d" origin="Generated by Gradle"/>
@ -349,6 +418,17 @@
<sha256 value="df66852ac78c345d6ac27ba0ff1f14ee236a964b6d0d3d9d54439b118f9f33b2" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.datatype" name="jackson-datatype-jdk8" version="2.14.1">
<artifact name="jackson-datatype-jdk8-2.14.1.jar">
<sha256 value="f1996914d4beb21fb12486127d8ff118e28af9866cf1724638478f30f9948b18" origin="Generated by Gradle"/>
</artifact>
<artifact name="jackson-datatype-jdk8-2.14.1.module">
<sha256 value="6788d77f0794bb643dea4c44cc9b3c135eb24aad5bef364cff74f7818cc901fc" origin="Generated by Gradle"/>
</artifact>
<artifact name="jackson-datatype-jdk8-2.14.1.pom">
<sha256 value="1e692bbb5bd18a5551ef641ca940b5b9f495547ce5a30fdfb4f6f5918988b8f1" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.module" name="jackson-module-kotlin" version="2.13.4">
<artifact name="jackson-module-kotlin-2.13.4.jar">
<sha256 value="11259eac19533c0cf6d1ed29c8f4df725d8dfe8dd614156aaa43bfc81e990fe2" origin="Generated by Gradle"/>
@ -375,6 +455,11 @@
<sha256 value="15d7bd18a1f0ff684adff2cfd60339a07a15f4aaada68970be6a097fe98c2b23" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.fasterxml.jackson.module" name="jackson-modules-java8" version="2.14.1">
<artifact name="jackson-modules-java8-2.14.1.pom">
<sha256 value="0b27c1ee58120c51f2a38717c2c794affa9af75c1234d7297b9ce42e87fc225e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.github.ben-manes" name="gradle-versions-plugin" version="0.42.0">
<artifact name="gradle-versions-plugin-0.42.0.jar">
<sha256 value="961151777479ec6a0a3de1426154cd2e89a346b45a51488fc8a620f47e3af9f0" origin="Generated by Gradle"/>
@ -725,6 +810,14 @@
<sha256 value="19889dbdf1b254b2601a5ee645b8147a974644882297684c798afe5d63d78dfe" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.code.gson" name="gson" version="2.10">
<artifact name="gson-2.10.jar">
<sha256 value="0cdd163ce3598a20fc04eee71b140b24f6f2a3b35f0a499dbbdd9852e83fbfaf" origin="Generated by Gradle"/>
</artifact>
<artifact name="gson-2.10.pom">
<sha256 value="ac69d9f254260caeab3998eaad60f355599c25121e195156bfdffc8a355fc6bd" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.code.gson" name="gson" version="2.9.0">
<artifact name="gson-2.9.0.jar">
<sha256 value="c96d60551331a196dac54b745aa642cd078ef89b6f267146b705f2c2cbef052d" origin="Generated by Gradle"/>
@ -733,6 +826,11 @@
<sha256 value="7190d0b07f278e9f4c603f44e543940f81cf1a2559f851c6f298c9bb2be2978c" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.code.gson" name="gson-parent" version="2.10">
<artifact name="gson-parent-2.10.pom">
<sha256 value="fb53ac0b06c19116ca61ac344b4dfe8a7c29cc4f81b353ce889493a5039004fb" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.code.gson" name="gson-parent" version="2.9.0">
<artifact name="gson-parent-2.9.0.pom">
<sha256 value="af781c9a5766ffea311a0df0536576a64decc661aa110c4de5c73ac8bf434424" origin="Generated by Gradle"/>
@ -789,6 +887,14 @@
<sha256 value="89a61a79f4a59527791809567f5cd6ceafde9d089771d07ee774dc88c8bd3f5e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.errorprone" name="error_prone_annotation" version="2.18.0">
<artifact name="error_prone_annotation-2.18.0.jar">
<sha256 value="6e5c594971265b03d39b8fb40a5d92f073ae1d98e47d37a3a3f2702e4e31f267" origin="Generated by Gradle"/>
</artifact>
<artifact name="error_prone_annotation-2.18.0.pom">
<sha256 value="53a3d53b014e33fd773bba6ae510343bcc1d11dabcaf1ae16c77f327b192c026" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.errorprone" name="error_prone_annotations" version="2.10.0">
<artifact name="error_prone_annotations-2.10.0.pom">
<sha256 value="d680dc9f578a77a6dcd992b2c3250eb168a7214cf27f8f0cac1f06526710c0cc" origin="Generated by Gradle"/>
@ -818,6 +924,14 @@
<sha256 value="7bae617e32681ebbb289c203c905f646c2a0397598af786d961a54aaa3d2b1e6" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.errorprone" name="error_prone_annotations" version="2.18.0">
<artifact name="error_prone_annotations-2.18.0.jar">
<sha256 value="9e6814cb71816988a4fd1b07a993a8f21bb7058d522c162b1de849e19bea54ae" origin="Generated by Gradle"/>
</artifact>
<artifact name="error_prone_annotations-2.18.0.pom">
<sha256 value="920135797dcca5917b5a5c017642a58d340a4cd1bcd12f56f892a5663bd7bddc" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.errorprone" name="error_prone_annotations" version="2.3.4">
<artifact name="error_prone_annotations-2.3.4.jar">
<sha256 value="baf7d6ea97ce606c53e11b6854ba5f2ce7ef5c24dddf0afa18d1260bd25b002c" origin="Generated by Gradle"/>
@ -834,6 +948,14 @@
<sha256 value="78a57c7435e511565cb220bfc3da74c7b03f2278ed0d7e17c2fb1fc8aad355f9" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.errorprone" name="error_prone_check_api" version="2.18.0">
<artifact name="error_prone_check_api-2.18.0.jar">
<sha256 value="6c34578691c4fae9bced50b2a3fe8b4e0420469fb0770655a3ea41ed2a9e40a4" origin="Generated by Gradle"/>
</artifact>
<artifact name="error_prone_check_api-2.18.0.pom">
<sha256 value="9dbd1a761a6bc137a842ea79c40a6a2276619c09f69b0553415a3436022dae18" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.errorprone" name="error_prone_core" version="2.14.0">
<artifact name="error_prone_core-2.14.0.jar">
<sha256 value="077a1a0b87a7989b67b12647db0cc6247bdcbb72bfca0c27e2d0d034885d28aa" origin="Generated by Gradle"/>
@ -842,6 +964,14 @@
<sha256 value="b30a0c4f733a7578293990fe9f3391205d77f0cd705210b0b260042b3d3e6412" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.errorprone" name="error_prone_core" version="2.18.0">
<artifact name="error_prone_core-2.18.0.jar">
<sha256 value="eabbecefbb40c8ab7c2f17b5ef1715a8065f6b9718d4a02cf91850e65bfcc241" origin="Generated by Gradle"/>
</artifact>
<artifact name="error_prone_core-2.18.0.pom">
<sha256 value="d6c9b956d12e9134ed7e01e82b715c5fd2d6318c3cf803519edef27f6486b9c7" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.errorprone" name="error_prone_parent" version="2.10.0">
<artifact name="error_prone_parent-2.10.0.pom">
<sha256 value="07891a87c490f900c12097bee95ec1cb6e071c8a7df810666387e0c772f089fa" origin="Generated by Gradle"/>
@ -862,6 +992,11 @@
<sha256 value="11dcacd17aaac69a99405273badfdaa5f9661d60d179b8a44f503958baa55f88" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.errorprone" name="error_prone_parent" version="2.18.0">
<artifact name="error_prone_parent-2.18.0.pom">
<sha256 value="47f22e99c7bf466391def16f8377985e5d3ba6f5bbcf65853644805513e15fad" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.errorprone" name="error_prone_parent" version="2.3.4">
<artifact name="error_prone_parent-2.3.4.pom">
<sha256 value="40495b437a60d2398f0fdfc054b89d9c394a82347a274a0721c2e950a4302186" origin="Generated by Gradle"/>
@ -875,6 +1010,14 @@
<sha256 value="dee91520fb5196bcb17ef73dea2877e055691b0baae3fd11e6999449a1901a41" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.errorprone" name="error_prone_test_helpers" version="2.18.0">
<artifact name="error_prone_test_helpers-2.18.0.jar">
<sha256 value="595b2921ec2e826e4ce62e84cdcdbb185ee0fa829ab734cf01fedca205601806" origin="Generated by Gradle"/>
</artifact>
<artifact name="error_prone_test_helpers-2.18.0.pom">
<sha256 value="f93a6e237446bac057532fac9039b60530716fe34cd8bfa9abe9d675a729dcd4" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.errorprone" name="error_prone_type_annotations" version="2.14.0">
<artifact name="error_prone_type_annotations-2.14.0.jar">
<sha256 value="c982da51cb812c90c8b75283caf4d4ff870ea13338d766c7386aa5a81c1068b1" origin="Generated by Gradle"/>
@ -883,6 +1026,14 @@
<sha256 value="f0ef6d56fd06204293d228a29c6b5c9dc1ba43e83d74400c9a85676e1970c324" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.errorprone" name="error_prone_type_annotations" version="2.18.0">
<artifact name="error_prone_type_annotations-2.18.0.jar">
<sha256 value="d2ab73bc6807277f7463391504313e47bc3465ab1916339c8e82be633a9ab375" origin="Generated by Gradle"/>
</artifact>
<artifact name="error_prone_type_annotations-2.18.0.pom">
<sha256 value="758a84e0278c1f48414025020114c5610af999b1863fbf7add2df8122639a2ad" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.errorprone" name="javac-shaded" version="9-dev-r4023-3">
<artifact name="javac-shaded-9-dev-r4023-3.jar">
<sha256 value="65bfccf60986c47fbc17c9ebab0be626afc41741e0a6ec7109e0768817a36f30" origin="Generated by Gradle"/>
@ -1047,6 +1198,11 @@
<sha256 value="6e8029cc0474fc17a01cfe9e21167a0a33cb95807de893447d367d9e4298c4db" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.protobuf" name="protobuf-bom" version="3.21.10">
<artifact name="protobuf-bom-3.21.10.pom">
<sha256 value="70543163bce890e8b6a97c5a6d8051e08fdc7d739eef495374f7cbb06ac0ca44" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.protobuf" name="protobuf-java" version="3.19.2">
<artifact name="protobuf-java-3.19.2.jar">
<sha256 value="3446cbfa13795228bc6549b91a409f27cdf6913d1c8f03e0f99572988623a04b" origin="Generated by Gradle"/>
@ -1063,6 +1219,14 @@
<sha256 value="77c8d851cc762882af58530d23fb4a618260c12df02b4703e6f4e3ddcc8b923e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.protobuf" name="protobuf-java" version="3.21.10">
<artifact name="protobuf-java-3.21.10.jar">
<sha256 value="142a6531f08b77915d34bcdc9a70481a596611d86fe9604e44d0c4d6b21ac676" origin="Generated by Gradle"/>
</artifact>
<artifact name="protobuf-java-3.21.10.pom">
<sha256 value="028270a5a5aa805291c4cdcb3d7bd8cddad493853905ec7ad022a08011a7e879" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.protobuf" name="protobuf-java-util" version="3.19.2">
<artifact name="protobuf-java-util-3.19.2.jar">
<sha256 value="9588d67db391b19cffb4ec658d9365ac5362b2089661c157fd27f21380cdd1e8" origin="Generated by Gradle"/>
@ -1081,6 +1245,11 @@
<sha256 value="835819ca9989ff1de6e5406edbf21f88124bb64e37d3a15f12ba8dbdc7a118c3" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.protobuf" name="protobuf-parent" version="3.21.10">
<artifact name="protobuf-parent-3.21.10.pom">
<sha256 value="5f593898eb49922e0e16ca4976941229858ee48fbd68262c658fe9400320b88d" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.re2j" name="re2j" version="1.5">
<artifact name="re2j-1.5.jar">
<sha256 value="c062f67e5b11c66650e45c0f420b1d5768e8b8009b0b3b5daf9bcc5880a7894c" origin="Generated by Gradle"/>
@ -1248,6 +1417,17 @@
<sha256 value="6b9a5236226f9ea1f5a133f47759c002c5d54b286516b05df5b8895f8e46500e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.squareup.okhttp3" name="logging-interceptor" version="4.10.0">
<artifact name="logging-interceptor-4.10.0.jar">
<sha256 value="273ba218636c34f7a091c059d159600543e03ea8beef2c5fc56525b47396160e" origin="Generated by Gradle"/>
</artifact>
<artifact name="logging-interceptor-4.10.0.module">
<sha256 value="fccb0caed4c59ca5e31247adcf3f99bbd15e5a7f0d23c99ee146de31dd018522" origin="Generated by Gradle"/>
</artifact>
<artifact name="logging-interceptor-4.10.0.pom">
<sha256 value="b7fbf79dfa483050c4ca0653761a21d00d58581915507a3d9d519cb66260bfdf" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.squareup.okhttp3" name="logging-interceptor" version="4.9.0">
<artifact name="logging-interceptor-4.9.0.jar">
<sha256 value="b5848794b6a9cb74b87dac847e05e2de232be35c2a682e1704f65d57b1042fb6" origin="Generated by Gradle"/>
@ -1608,6 +1788,14 @@
<sha256 value="5017f44905965670b83f9fdd5fe6c7d11821ea6e40da29b99c0cc06c3ac0267d" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="io.kubernetes" name="client-java" version="17.0.0">
<artifact name="client-java-17.0.0.jar">
<sha256 value="fa24c50fca2ae6cd25f8d856ff0cf1c75c158726adda4ec4d53d2d10ab06b96a" origin="Generated by Gradle"/>
</artifact>
<artifact name="client-java-17.0.0.pom">
<sha256 value="f5aa9869ecfb865438df6a0ecd5fe8aac5b9b8fc1eae13006e928e5dee8537cb" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="io.kubernetes" name="client-java-api" version="15.0.1">
<artifact name="client-java-api-15.0.1.jar">
<sha256 value="febc5f02a8951c0a619b944bfd52ad24872260098aaac53a838248d158e849db" origin="Generated by Gradle"/>
@ -1616,11 +1804,24 @@
<sha256 value="e86ae99fca9a1bc52d7c374b9a8a6351b42edeac816ffa54180e47ad9b290fe4" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="io.kubernetes" name="client-java-api" version="17.0.0">
<artifact name="client-java-api-17.0.0.jar">
<sha256 value="658e94a450cc3ad43fe92d087a895ec44f45bf5f7d88b142d44856d13a990e10" origin="Generated by Gradle"/>
</artifact>
<artifact name="client-java-api-17.0.0.pom">
<sha256 value="d4f227fb1a51597a47ab0ac03f07c796cd3287a6b12133614c957079464e255c" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="io.kubernetes" name="client-java-parent" version="15.0.1">
<artifact name="client-java-parent-15.0.1.pom">
<sha256 value="8d134eca8c18dedb527c9b91afd1e69e03b562cc0b266610ad8add38246af89d" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="io.kubernetes" name="client-java-parent" version="17.0.0">
<artifact name="client-java-parent-17.0.0.pom">
<sha256 value="7abf9256a91f3081936d6d89ce69a121bb83bce60bcb5a889bd3d49fa56629b3" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="io.kubernetes" name="client-java-proto" version="15.0.1">
<artifact name="client-java-proto-15.0.1.jar">
<sha256 value="3071cb9525600858dd66897d5c20b0d11989d1b5b5f67a23af2cf56a0305b514" origin="Generated by Gradle"/>
@ -1629,6 +1830,14 @@
<sha256 value="78ca031b7f9e471d3888987e43b2bc53b2c785cbf62af99dab2c6af630760f8e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="io.kubernetes" name="client-java-proto" version="17.0.0">
<artifact name="client-java-proto-17.0.0.jar">
<sha256 value="b2e078d35b5e5466d6201508e90de33a1f24342d8c3b61ef04306c1926653899" origin="Generated by Gradle"/>
</artifact>
<artifact name="client-java-proto-17.0.0.pom">
<sha256 value="3788a88cd4f27d1027c397d0050cc22a99d5107cbfaafb2e92baed37ea6d8804" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="io.netty" name="netty-all" version="4.1.78.Final">
<artifact name="netty-all-4.1.78.Final.jar">
<sha256 value="3f9cde8ea183ed1f1375373e842274a48660b195d15eb0014a590668f0b9fe79" origin="Generated by Gradle"/>
@ -2470,11 +2679,24 @@
<sha256 value="d45a75ba34928e8e4f1209f39c3419a66d25bf07f2b2d1a6698e819d5fbf1718" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="io.swagger" name="swagger-annotations" version="1.6.9">
<artifact name="swagger-annotations-1.6.9.jar">
<sha256 value="7ef85974e5d82fcabd0dabd2c455cd80378b36d774de017ceac842a3a4fa64f8" origin="Generated by Gradle"/>
</artifact>
<artifact name="swagger-annotations-1.6.9.pom">
<sha256 value="e81b490775b50bab270fbb0b6fbc0aa1d6b4c074ba185bb052b8ec3131483e69" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="io.swagger" name="swagger-project" version="1.6.5">
<artifact name="swagger-project-1.6.5.pom">
<sha256 value="16041ffbf831549bf7ba498c48c41a5da1878f2dcf64caee3fd91371fe8e628f" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="io.swagger" name="swagger-project" version="1.6.9">
<artifact name="swagger-project-1.6.9.pom">
<sha256 value="6d2ab119502ad06f80a5ff0d741cf0b213c56170b51761fc5911aecd8f512441" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="io.vertx" name="vertx-auth" version="4.2.7">
<artifact name="vertx-auth-4.2.7.pom">
<sha256 value="2da913ca336952fbaa615aa49fdab6b6f7255f60b20c448c9a624822d57f7d4b" origin="Generated by Gradle"/>
@ -3388,6 +3610,14 @@
<sha256 value="25494edb99242415c1d58954c96206dffedc1b469a33d09d50fefff8727e8a39" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.bitbucket.b_c" name="jose4j" version="0.9.2">
<artifact name="jose4j-0.9.2.jar">
<sha256 value="eb77befd6cd74c5bd488a83ada1e1128bc2061b5bfc40c92b3623bd6df25c5c0" origin="Generated by Gradle"/>
</artifact>
<artifact name="jose4j-0.9.2.pom">
<sha256 value="94da62ffa0bf12474de7e12943c2744261c366de0a3fa7d25d517f72ec781bbb" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.bouncycastle" name="bcpkix-jdk15on" version="1.70">
<artifact name="bcpkix-jdk15on-1.70.jar">
<sha256 value="e5b9cb821df57f70b0593358e89c0e8d7266515da9d088af6c646f63d433c07c" origin="Generated by Gradle"/>
@ -3396,6 +3626,14 @@
<sha256 value="6ea5502b7eebec7018271bb8a82cb819bf4c1f2b6543549c5cfd84d6a13996bf" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.bouncycastle" name="bcpkix-jdk18on" version="1.72">
<artifact name="bcpkix-jdk18on-1.72.jar">
<sha256 value="56a054cb170d41fb1f8ba0b29568806258b7ffefdc5e98b77ef96d4740f3d6bc" origin="Generated by Gradle"/>
</artifact>
<artifact name="bcpkix-jdk18on-1.72.pom">
<sha256 value="285b8be595870f61d75e7881b0fb4edc2d1aa37d0a79c4fc8ff2dccf1d9c69fd" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.bouncycastle" name="bcprov-ext-jdk15on" version="1.70">
<artifact name="bcprov-ext-jdk15on-1.70.jar">
<sha256 value="5d819f3b88597ec680c94151a0ba0a3afff0c0c1c999b5b065a67c998a3e3e1b" origin="Generated by Gradle"/>
@ -3420,6 +3658,14 @@
<sha256 value="6df4b5b76d9062017664ad0ca285e57154ae803607cb89c970b39cc0e016abb0" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.bouncycastle" name="bcprov-jdk18on" version="1.72">
<artifact name="bcprov-jdk18on-1.72.jar">
<sha256 value="39287f2208a753db419f5ca529d6c80f094614aa74d790331126b3c9c6b85fda" origin="Generated by Gradle"/>
</artifact>
<artifact name="bcprov-jdk18on-1.72.pom">
<sha256 value="e3bb6d9e1346cfc230e0900f177e60a12b6dbe212a92e1cd2cfb1e48d4c04839" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.bouncycastle" name="bcutil-jdk15on" version="1.70">
<artifact name="bcutil-jdk15on-1.70.jar">
<sha256 value="52dc5551b0257666526c5095424567fed7dc7b00d2b1ba7bd52298411112b1d0" origin="Generated by Gradle"/>
@ -3428,6 +3674,14 @@
<sha256 value="9ebae71c25e0c9f2cd756003c01f1ad0fc398ca06fbcda0d175e71cac5840aad" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.bouncycastle" name="bcutil-jdk18on" version="1.72">
<artifact name="bcutil-jdk18on-1.72.jar">
<sha256 value="45377fdb6560a971eea725f507d91fd6b8fbd0797d61bfc86f2cb653c58186a4" origin="Generated by Gradle"/>
</artifact>
<artifact name="bcutil-jdk18on-1.72.pom">
<sha256 value="570104ccac0dfa29e46fb6402f7e6a721702c255def43be301c6acb18c25e76d" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.checkerframework" name="checker-compat-qual" version="2.5.5">
<artifact name="checker-compat-qual-2.5.5.jar">
<sha256 value="11d134b245e9cacc474514d2d66b5b8618f8039a1465cdc55bbc0b34e0008b7a" origin="Generated by Gradle"/>
@ -3479,6 +3733,14 @@
<sha256 value="e5f36a92afcbe6167cec9655235f40636bfcd91f75716a679c055ddf01007f7e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.checkerframework" name="dataflow-errorprone" version="3.27.0">
<artifact name="dataflow-errorprone-3.27.0.jar">
<sha256 value="fd40ebe6d514e56f8d8fac1b1a2afb1654b2053b571ddce1098b910f0bb395bd" origin="Generated by Gradle"/>
</artifact>
<artifact name="dataflow-errorprone-3.27.0.pom">
<sha256 value="a7dcf5c48370d0157b5272744d8cb7b0e13198b87b9c9210f31b980f178d9505" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.codehaus.groovy" name="groovy" version="3.0.10">
<artifact name="groovy-3.0.10.jar">
<sha256 value="dffefada8294865be5035515c0320fb679443d285f4a5f8adadcf00c1130e84c" origin="Generated by Gradle"/>

@ -21,8 +21,8 @@ dependencyManagement {
entry 'antlr4-runtime'
}
dependency 'com.fasterxml.jackson.core:jackson-databind:2.13.4.2'
dependencySet(group:'com.fasterxml.jackson.core', version:'2.13.4') {
dependencySet(group:'com.fasterxml.jackson.core', version:'2.14.1') {
entry 'jackson-databind'
entry 'jackson-datatype'
entry 'jackson-datatype-jdk8'
}
@ -41,7 +41,7 @@ dependencyManagement {
entry'dagger'
}
dependencySet(group: 'com.google.errorprone', version: '2.14.0') {
dependencySet(group: 'com.google.errorprone', version: '2.18.0') {
entry 'error_prone_annotation'
entry 'error_prone_check_api'
entry 'error_prone_core'
@ -71,7 +71,7 @@ dependencyManagement {
entry 'grpc-stub'
}
dependency 'io.kubernetes:client-java:15.0.1'
dependency 'io.kubernetes:client-java:17.0.0'
dependency 'io.netty:netty-all:4.1.78.Final'
dependency 'io.netty:netty-tcnative-boringssl-static:2.0.50.Final'

@ -67,17 +67,11 @@ public class RocksDBKeyValuePrivacyStorageFactoryTest {
// Side effect is creation of the Metadata version file
storageFactory.create(segment, commonConfiguration, metricsSystem);
assertThat(DatabaseMetadata.lookUpFrom(commonConfiguration.getDataPath()).maybePrivacyVersion())
.isNotEmpty();
assertThat(DatabaseMetadata.lookUpFrom(tempDataDir).maybePrivacyVersion()).isNotEmpty();
assertThat(DatabaseMetadata.lookUpFrom(commonConfiguration.getDataPath()).getVersion())
.isEqualTo(0);
assertThat(DatabaseMetadata.lookUpFrom(tempDataDir).getVersion()).isEqualTo(0);
assertThat(
DatabaseMetadata.lookUpFrom(commonConfiguration.getDataPath())
.maybePrivacyVersion()
.get())
.isEqualTo(0);
assertThat(DatabaseMetadata.lookUpFrom(tempDataDir).maybePrivacyVersion().get()).isEqualTo(0);
}
@Test
@ -98,16 +92,11 @@ public class RocksDBKeyValuePrivacyStorageFactoryTest {
// Side effect is creation of the Metadata version file
storageFactory.create(segment, commonConfiguration, metricsSystem);
assertThat(DatabaseMetadata.lookUpFrom(commonConfiguration.getDataPath()).maybePrivacyVersion())
.isNotEmpty();
assertThat(DatabaseMetadata.lookUpFrom(tempDataDir).maybePrivacyVersion()).isNotEmpty();
assertThat(DatabaseMetadata.lookUpFrom(commonConfiguration.getDataPath()).getVersion())
.isEqualTo(DEFAULT_VERSION);
assertThat(DatabaseMetadata.lookUpFrom(tempDataDir).getVersion()).isEqualTo(DEFAULT_VERSION);
assertThat(
DatabaseMetadata.lookUpFrom(commonConfiguration.getDataPath())
.maybePrivacyVersion()
.get())
assertThat(DatabaseMetadata.lookUpFrom(tempDataDir).maybePrivacyVersion().get())
.isEqualTo(DEFAULT_PRIVACY_VERSION);
}
@ -125,24 +114,18 @@ public class RocksDBKeyValuePrivacyStorageFactoryTest {
storageFactory.create(segment, commonConfiguration, metricsSystem);
assertThat(DatabaseMetadata.lookUpFrom(commonConfiguration.getDataPath()).maybePrivacyVersion())
.isEmpty();
assertThat(DatabaseMetadata.lookUpFrom(tempDataDir).maybePrivacyVersion()).isEmpty();
assertThat(DatabaseMetadata.lookUpFrom(commonConfiguration.getDataPath()).getVersion())
.isEqualTo(DEFAULT_VERSION);
assertThat(DatabaseMetadata.lookUpFrom(tempDataDir).getVersion()).isEqualTo(DEFAULT_VERSION);
final RocksDBKeyValuePrivacyStorageFactory privacyStorageFactory =
new RocksDBKeyValuePrivacyStorageFactory(storageFactory);
privacyStorageFactory.create(segment, commonConfiguration, metricsSystem);
assertThat(DatabaseMetadata.lookUpFrom(commonConfiguration.getDataPath()).maybePrivacyVersion())
.isNotEmpty();
assertThat(DatabaseMetadata.lookUpFrom(tempDataDir).maybePrivacyVersion()).isNotEmpty();
assertThat(
DatabaseMetadata.lookUpFrom(commonConfiguration.getDataPath())
.maybePrivacyVersion()
.get())
assertThat(DatabaseMetadata.lookUpFrom(tempDataDir).maybePrivacyVersion().get())
.isEqualTo(DEFAULT_PRIVACY_VERSION);
}
}

@ -67,8 +67,7 @@ public class RocksDBKeyValueStorageFactoryTest {
// Side effect is creation of the Metadata version file
storageFactory.create(segment, commonConfiguration, metricsSystem);
assertThat(DatabaseMetadata.lookUpFrom(commonConfiguration.getDataPath()).getVersion())
.isEqualTo(DEFAULT_VERSION);
assertThat(DatabaseMetadata.lookUpFrom(tempDataDir).getVersion()).isEqualTo(DEFAULT_VERSION);
}
@Test

Loading…
Cancel
Save