Skip to content

Commit

Permalink
Merge branch 'main' into zkbesu
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/artifacts.yml
#	.github/workflows/docker.yml
#	.github/workflows/nightly.yml
#	.github/workflows/release.yml
#	acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/ThreadBesuNodeRunner.java
#	besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
#	besu/src/main/java/org/hyperledger/besu/controller/BesuControllerBuilder.java
#	besu/src/main/java/org/hyperledger/besu/controller/ConsensusScheduleBesuControllerBuilder.java
#	besu/src/main/java/org/hyperledger/besu/controller/TransitionBesuControllerBuilder.java
#	besu/src/test/java/org/hyperledger/besu/cli/CommandTestAbstract.java
#	consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/CliqueDifficultyCalculatorTest.java
#	consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/NodeCanProduceNextBlockTest.java
#	consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/blockcreation/CliqueBlockCreatorTest.java
#	consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/blockcreation/CliqueBlockMinerTest.java
#	consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/blockcreation/CliqueMinerExecutorTest.java
#	consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/headervalidationrules/CliqueDifficultyValidationRuleTest.java
#	consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/headervalidationrules/CliqueExtraDataValidationRuleTest.java
#	consensus/common/src/main/java/org/hyperledger/besu/consensus/common/MigratingProtocolContext.java
#	consensus/common/src/test/java/org/hyperledger/besu/consensus/common/MigratingProtocolContextTest.java
#	consensus/common/src/test/java/org/hyperledger/besu/consensus/common/bft/headervalidationrules/BftCoinbaseValidationRuleTest.java
#	consensus/common/src/test/java/org/hyperledger/besu/consensus/common/bft/headervalidationrules/BftCommitSealsValidationRuleTest.java
#	consensus/common/src/test/java/org/hyperledger/besu/consensus/common/bft/headervalidationrules/BftValidatorsValidationRuleTest.java
#	consensus/common/src/test/java/org/hyperledger/besu/consensus/common/bft/headervalidationrules/BftVanityDataValidationRuleTest.java
#	consensus/ibft/src/integration-test/java/org/hyperledger/besu/consensus/ibft/support/TestContextBuilder.java
#	consensus/ibft/src/integration-test/java/org/hyperledger/besu/consensus/ibft/tests/round/IbftRoundIntegrationTest.java
#	consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/IbftBlockHeaderValidationRulesetFactoryTest.java
#	consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/IbftProtocolScheduleTest.java
#	consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/blockcreation/BftBlockCreatorTest.java
#	consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/statemachine/IbftBlockHeightManagerTest.java
#	consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/statemachine/IbftRoundTest.java
#	consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/validation/MessageValidatorTest.java
#	consensus/merge/src/test/java/org/hyperledger/besu/consensus/merge/blockcreation/MergeCoordinatorTest.java
#	consensus/merge/src/test/java/org/hyperledger/besu/consensus/merge/blockcreation/MergeReorgTest.java
#	consensus/qbft/src/integration-test/java/org/hyperledger/besu/consensus/qbft/support/TestContextBuilder.java
#	consensus/qbft/src/integration-test/java/org/hyperledger/besu/consensus/qbft/test/round/QbftRoundIntegrationTest.java
#	consensus/qbft/src/test/java/org/hyperledger/besu/consensus/qbft/QbftBlockHeaderValidationRulesetFactoryTest.java
#	consensus/qbft/src/test/java/org/hyperledger/besu/consensus/qbft/QbftProtocolScheduleTest.java
#	consensus/qbft/src/test/java/org/hyperledger/besu/consensus/qbft/headervalidationrules/QbftValidatorsValidationRuleTest.java
#	consensus/qbft/src/test/java/org/hyperledger/besu/consensus/qbft/statemachine/QbftBlockHeightManagerTest.java
#	consensus/qbft/src/test/java/org/hyperledger/besu/consensus/qbft/statemachine/QbftRoundTest.java
#	consensus/qbft/src/test/java/org/hyperledger/besu/consensus/qbft/validation/ProposalPayloadValidatorTest.java
#	consensus/qbft/src/test/java/org/hyperledger/besu/consensus/qbft/validation/ProposalValidatorTest.java
#	consensus/qbft/src/test/java/org/hyperledger/besu/consensus/qbft/validation/RoundChangeMessageValidatorTest.java
#	ethereum/api/src/integration-test/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcTestMethodsFactory.java
#	ethereum/api/src/integration-test/java/org/hyperledger/besu/ethereum/api/jsonrpc/methods/EthGetBlockByNumberLatestDesyncIntegrationTest.java
#	ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/graphql/AbstractEthGraphQLHttpServiceTest.java
#	ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/AbstractBlockCreator.java
#	ethereum/blockcreation/src/test/java/org/hyperledger/besu/ethereum/blockcreation/BlockMinerTest.java
#	ethereum/core/src/main/java/org/hyperledger/besu/ethereum/ProtocolContext.java
#	ethereum/core/src/test-support/java/org/hyperledger/besu/ethereum/core/BlockchainSetupUtil.java
#	ethereum/core/src/test-support/java/org/hyperledger/besu/ethereum/core/ExecutionContextTestFixture.java
#	ethereum/core/src/test/java/org/hyperledger/besu/ethereum/trie/bonsai/AbstractIsolationTests.java
#	ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/EthProtocolManagerTest.java
#	ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/ethtaskutils/AbstractMessageTaskTest.java
#	ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/AbstractBlockPropagationManagerTest.java
#	ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fullsync/FullSyncTargetManagerTest.java
#	ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/tasks/DetermineCommonAncestorTaskParameterizedTest.java
#	ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/tasks/DetermineCommonAncestorTaskTest.java
#	ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TestNode.java
#	ethereum/referencetests/src/main/java/org/hyperledger/besu/ethereum/referencetests/BlockchainReferenceTestCaseSpec.java
#	ethereum/retesteth/src/main/java/org/hyperledger/besu/ethereum/retesteth/RetestethContext.java
#	plugin-api/build.gradle
  • Loading branch information
fab-10 committed Feb 27, 2024
2 parents 29ad708 + 2c1733c commit a6cd693
Show file tree
Hide file tree
Showing 145 changed files with 1,714 additions and 1,355 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# Changelog

## 24.2.1-SNAPSHOT
## Next Release

### Breaking Changes
- RocksDB database metadata format has changed to be more expressive, the migration of an existing metadata file to the new format is automatic at startup. Before performing a downgrade to a previous version it is mandatory to revert to the original format using the subcommand `besu --data-path=/path/to/besu/datadir storage revert-metadata v2-to-v1`.

### Upcoming Breaking Changes

### Deprecations

### Additions and Improvements
- Extend `Blockchain` service [#6592](https://github.com/hyperledger/besu/pull/6592)
- RocksDB database metadata refactoring [#6555](https://github.com/hyperledger/besu/pull/6555)

### Bug fixes

### Download Links

## 24.2.0-SNAPSHOT

### Breaking Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.hyperledger.besu.ethereum.GasLimitCalculator;
import org.hyperledger.besu.ethereum.api.ApiConfiguration;
import org.hyperledger.besu.ethereum.api.graphql.GraphQLConfiguration;
import org.hyperledger.besu.ethereum.core.ImmutableMiningParameters;
import org.hyperledger.besu.ethereum.eth.EthProtocolConfiguration;
import org.hyperledger.besu.ethereum.eth.sync.SynchronizerConfiguration;
import org.hyperledger.besu.ethereum.eth.transactions.ImmutableTransactionPoolConfiguration;
Expand Down Expand Up @@ -164,11 +165,16 @@ public void startNode(final BesuNode node) {
final RpcEndpointServiceImpl rpcEndpointServiceImpl = new RpcEndpointServiceImpl();
final Path dataDir = node.homeDirectory();
final BesuConfigurationImpl commonPluginConfiguration = new BesuConfigurationImpl();
final var miningParameters =
ImmutableMiningParameters.builder()
.from(node.getMiningParameters())
.transactionSelectionService(transactionSelectionServiceImpl)
.build();
commonPluginConfiguration.init(
dataDir,
dataDir.resolve(DATABASE_PATH),
node.getDataStorageConfiguration(),
node.getMiningParameters());
miningParameters);
final BesuPluginContextImpl besuPluginContext =
besuPluginContextMap.computeIfAbsent(
node,
Expand Down Expand Up @@ -219,15 +225,12 @@ public void startNode(final BesuNode node) {

final int maxPeers = 25;

final TransactionSelectionService transactionSelectorService =
getTransactionSelectorService(besuPluginContext);

final PluginTransactionValidatorService pluginTransactionValidatorService =
getPluginTransactionValidatorService(besuPluginContext);
builder
.synchronizerConfiguration(new SynchronizerConfiguration.Builder().build())
.dataDirectory(node.homeDirectory())
.miningParameters(node.getMiningParameters())
.miningParameters(miningParameters)
.privacyParameters(node.getPrivacyParameters())
.nodeKey(new NodeKey(new KeyPairSecurityModule(KeyPairUtil.loadKeyPair(dataDir))))
.metricsSystem(metricsSystem)
Expand All @@ -246,7 +249,6 @@ public void startNode(final BesuNode node) {
.maxRemotelyInitiatedPeers(15)
.networkConfiguration(node.getNetworkingConfiguration())
.randomPeerPriority(false)
.transactionSelectorService(transactionSelectorService)
.pluginTransactionValidatorService(pluginTransactionValidatorService);

node.getGenesisConfig()
Expand Down Expand Up @@ -381,11 +383,6 @@ public String getConsoleContents() {
throw new RuntimeException("Console contents can only be captured in process execution");
}

private TransactionSelectionService getTransactionSelectorService(
final BesuPluginContextImpl besuPluginContext) {
return besuPluginContext.getService(TransactionSelectionService.class).orElseThrow();
}

private PluginTransactionValidatorService getPluginTransactionValidatorService(
final BesuPluginContextImpl besuPluginContext) {
return besuPluginContext
Expand Down
8 changes: 2 additions & 6 deletions besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@
import org.hyperledger.besu.ethereum.transaction.TransactionSimulator;
import org.hyperledger.besu.ethereum.trie.forest.pruner.PrunerConfiguration;
import org.hyperledger.besu.ethereum.worldstate.DataStorageConfiguration;
import org.hyperledger.besu.ethereum.worldstate.DataStorageFormat;
import org.hyperledger.besu.evm.precompile.AbstractAltBnPrecompiledContract;
import org.hyperledger.besu.evm.precompile.BigIntegerModularExponentiationPrecompiledContract;
import org.hyperledger.besu.evm.precompile.KZGPointEvalPrecompiledContract;
Expand Down Expand Up @@ -174,6 +173,7 @@
import org.hyperledger.besu.plugin.services.metrics.MetricCategory;
import org.hyperledger.besu.plugin.services.metrics.MetricCategoryRegistry;
import org.hyperledger.besu.plugin.services.securitymodule.SecurityModule;
import org.hyperledger.besu.plugin.services.storage.DataStorageFormat;
import org.hyperledger.besu.plugin.services.storage.PrivacyKeyValueStorageFactory;
import org.hyperledger.besu.plugin.services.storage.rocksdb.RocksDBPlugin;
import org.hyperledger.besu.services.BesuConfigurationImpl;
Expand Down Expand Up @@ -1807,7 +1807,6 @@ public BesuControllerBuilder getControllerBuilder() {
.synchronizerConfiguration(buildSyncConfig())
.ethProtocolConfiguration(unstableEthProtocolOptions.toDomainObject())
.networkConfiguration(unstableNetworkingOptions.toDomainObject())
.transactionSelectorService(getTransactionSelectorService())
.pluginTransactionValidatorService(getPluginTransactionValidatorService())
.dataDirectory(dataDir())
.dataStorageConfiguration(getDataStorageConfiguration())
Expand Down Expand Up @@ -1839,10 +1838,6 @@ public BesuControllerBuilder getControllerBuilder() {
.cacheLastBlocks(numberOfblocksToCache);
}

private TransactionSelectionService getTransactionSelectorService() {
return besuPluginContext.getService(TransactionSelectionService.class).orElseThrow();
}

private PluginTransactionValidatorService getPluginTransactionValidatorService() {
return besuPluginContext.getService(PluginTransactionValidatorService.class).orElseThrow();
}
Expand Down Expand Up @@ -2156,6 +2151,7 @@ private MiningParameters getMiningParameters() {
if (miningParameters == null) {
miningOptions.setGenesisBlockPeriodSeconds(
getGenesisBlockPeriodSeconds(getActualGenesisConfigOptions()));
miningOptions.setTransactionSelectionService(transactionSelectionServiceImpl);
miningParameters = miningOptions.toDomainObject();
initMiningParametersMetrics(miningParameters);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
package org.hyperledger.besu.cli.options;

import static com.google.common.base.Preconditions.checkNotNull;
import static java.util.Arrays.asList;
import static java.util.Collections.singletonList;
import static org.hyperledger.besu.ethereum.core.MiningParameters.DEFAULT_NON_POA_BLOCK_TXS_SELECTION_MAX_TIME;
Expand All @@ -37,6 +38,7 @@
import org.hyperledger.besu.ethereum.core.ImmutableMiningParameters;
import org.hyperledger.besu.ethereum.core.ImmutableMiningParameters.MutableInitValues;
import org.hyperledger.besu.ethereum.core.MiningParameters;
import org.hyperledger.besu.plugin.services.TransactionSelectionService;
import org.hyperledger.besu.util.number.PositiveNumber;

import java.util.List;
Expand Down Expand Up @@ -190,6 +192,7 @@ static class Unstable {
}

private OptionalInt maybeGenesisBlockPeriodSeconds;
private TransactionSelectionService transactionSelectionService;

private MiningOptions() {}

Expand All @@ -212,6 +215,16 @@ public void setGenesisBlockPeriodSeconds(final OptionalInt genesisBlockPeriodSec
maybeGenesisBlockPeriodSeconds = genesisBlockPeriodSeconds;
}

/**
* Set the transaction selection service
*
* @param transactionSelectionService the transaction selection service
*/
public void setTransactionSelectionService(
final TransactionSelectionService transactionSelectionService) {
this.transactionSelectionService = transactionSelectionService;
}

/**
* Validate that there are no inconsistencies in the specified options. For example that the
* options are valid for the selected implementation.
Expand Down Expand Up @@ -300,6 +313,7 @@ public void validate(
static MiningOptions fromConfig(final MiningParameters miningParameters) {
final MiningOptions miningOptions = MiningOptions.create();
miningOptions.setGenesisBlockPeriodSeconds(miningParameters.getGenesisBlockPeriodSeconds());
miningOptions.setTransactionSelectionService(miningParameters.getTransactionSelectionService());
miningOptions.isMiningEnabled = miningParameters.isMiningEnabled();
miningOptions.iStratumMiningEnabled = miningParameters.isStratumMiningEnabled();
miningOptions.stratumNetworkInterface = miningParameters.getStratumNetworkInterface();
Expand Down Expand Up @@ -334,10 +348,12 @@ static MiningOptions fromConfig(final MiningParameters miningParameters) {

@Override
public MiningParameters toDomainObject() {
if (maybeGenesisBlockPeriodSeconds == null) {
throw new IllegalStateException(
"genesisBlockPeriodSeconds must be set before using this object");
}
checkNotNull(
maybeGenesisBlockPeriodSeconds,
"genesisBlockPeriodSeconds must be set before using this object");
checkNotNull(
transactionSelectionService,
"transactionSelectionService must be set before using this object");

final var updatableInitValuesBuilder =
MutableInitValues.builder()
Expand All @@ -356,6 +372,7 @@ public MiningParameters toDomainObject() {

return ImmutableMiningParameters.builder()
.genesisBlockPeriodSeconds(maybeGenesisBlockPeriodSeconds)
.transactionSelectionService(transactionSelectionService)
.mutableInitValues(updatableInitValuesBuilder.build())
.isStratumMiningEnabled(iStratumMiningEnabled)
.stratumNetworkInterface(stratumNetworkInterface)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import org.hyperledger.besu.cli.options.CLIOptions;
import org.hyperledger.besu.cli.util.CommandLineUtils;
import org.hyperledger.besu.ethereum.worldstate.DataStorageConfiguration;
import org.hyperledger.besu.ethereum.worldstate.DataStorageFormat;
import org.hyperledger.besu.ethereum.worldstate.ImmutableDataStorageConfiguration;
import org.hyperledger.besu.plugin.services.storage.DataStorageFormat;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
/*
* Copyright Hyperledger Besu Contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.hyperledger.besu.cli.subcommands.storage;

import org.hyperledger.besu.cli.util.VersionProvider;
import org.hyperledger.besu.plugin.services.storage.DataStorageFormat;

import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.util.OptionalInt;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import picocli.CommandLine;
import picocli.CommandLine.Command;
import picocli.CommandLine.ParentCommand;

/** The revert metadata to v1 subcommand. */
@Command(
name = "revert-metadata",
description = "Revert database metadata to previous format",
mixinStandardHelpOptions = true,
versionProvider = VersionProvider.class,
subcommands = RevertMetadataSubCommand.v2ToV1.class)
public class RevertMetadataSubCommand implements Runnable {
private static final Logger LOG = LoggerFactory.getLogger(RevertMetadataSubCommand.class);
private static final String METADATA_FILENAME = "DATABASE_METADATA.json";
private static final ObjectMapper MAPPER =
new ObjectMapper()
.registerModule(new Jdk8Module())
.setSerializationInclusion(JsonInclude.Include.NON_ABSENT)
.enable(SerializationFeature.INDENT_OUTPUT);

@SuppressWarnings("unused")
@ParentCommand
private StorageSubCommand parentCommand;

@SuppressWarnings("unused")
@CommandLine.Spec
private CommandLine.Model.CommandSpec spec;

@Override
public void run() {
spec.commandLine().usage(System.out);
}

@Command(
name = "v2-to-v1",
description = "Revert a database metadata v2 format to v1 format",
mixinStandardHelpOptions = true,
versionProvider = VersionProvider.class)
static class v2ToV1 implements Runnable {

@SuppressWarnings("unused")
@CommandLine.Spec
private CommandLine.Model.CommandSpec spec;

@SuppressWarnings("unused")
@ParentCommand
private RevertMetadataSubCommand parentCommand;

@Override
public void run() {

final Path dataDir = parentCommand.parentCommand.besuCommand.dataDir();

final File dbMetadata = dataDir.resolve(METADATA_FILENAME).toFile();
if (!dbMetadata.exists()) {
String errMsg =
String.format(
"Could not find database metadata file %s, check your data dir %s",
dbMetadata, dataDir);
LOG.error(errMsg);
throw new IllegalArgumentException(errMsg);
}
try {
final var root = MAPPER.readTree(dbMetadata);
if (!root.has("v2")) {
String errMsg =
String.format("Database metadata file %s is not in v2 format", dbMetadata);
LOG.error(errMsg);
throw new IllegalArgumentException(errMsg);
}

final var v2Obj = root.get("v2");
if (!v2Obj.has("format")) {
String errMsg =
String.format(
"Database metadata file %s is malformed, \"format\" field not found", dbMetadata);
LOG.error(errMsg);
throw new IllegalArgumentException(errMsg);
}

final var formatField = v2Obj.get("format").asText();
final OptionalInt maybePrivacyVersion =
v2Obj.has("privacyVersion")
? OptionalInt.of(v2Obj.get("privacyVersion").asInt())
: OptionalInt.empty();

final DataStorageFormat dataStorageFormat = DataStorageFormat.valueOf(formatField);
final int v1Version =
switch (dataStorageFormat) {
case FOREST -> 1;
case BONSAI -> 2;
};

@JsonSerialize
record V1(int version, OptionalInt privacyVersion) {}

MAPPER.writeValue(dbMetadata, new V1(v1Version, maybePrivacyVersion));
LOG.info("Successfully reverted database metadata from v2 to v1 in {}", dbMetadata);
} catch (IOException ioe) {
throw new RuntimeException(ioe);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import org.hyperledger.besu.cli.BesuCommand;
import org.hyperledger.besu.cli.util.VersionProvider;
import org.hyperledger.besu.controller.BesuController;
import org.hyperledger.besu.ethereum.rlp.RLP;
import org.hyperledger.besu.ethereum.storage.StorageProvider;
import org.hyperledger.besu.ethereum.storage.keyvalue.KeyValueSegmentIdentifier;
Expand All @@ -48,7 +49,8 @@
subcommands = {
StorageSubCommand.RevertVariablesStorage.class,
RocksDbSubCommand.class,
TrieLogSubCommand.class
TrieLogSubCommand.class,
RevertMetadataSubCommand.class
})
public class StorageSubCommand implements Runnable {

Expand Down Expand Up @@ -97,21 +99,19 @@ static class RevertVariablesStorage implements Runnable {
public void run() {
checkNotNull(parentCommand);

final var storageProvider = getStorageProvider();
final var storageProvider = createBesuController().getStorageProvider();

revert(storageProvider);
}

private StorageProvider getStorageProvider() {
// init collection of ignorable segments
parentCommand.besuCommand.setIgnorableStorageSegments();
return parentCommand.besuCommand.getStorageProvider();
private BesuController createBesuController() {
return parentCommand.besuCommand.buildController();
}

private void revert(final StorageProvider storageProvider) {
final var variablesStorage = storageProvider.createVariablesStorage();
final var blockchainStorage =
getStorageProvider().getStorageBySegmentIdentifier(KeyValueSegmentIdentifier.BLOCKCHAIN);
storageProvider.getStorageBySegmentIdentifier(KeyValueSegmentIdentifier.BLOCKCHAIN);
final var blockchainUpdater = blockchainStorage.startTransaction();
final var variablesUpdater = variablesStorage.updater();

Expand Down
Loading

0 comments on commit a6cd693

Please sign in to comment.