@ -32,7 +32,9 @@ import org.hyperledger.besu.ethereum.core.MiningParameters;
import org.hyperledger.besu.ethereum.core.PrivacyParameters ;
import org.hyperledger.besu.ethereum.permissioning.LocalPermissioningConfiguration ;
import org.hyperledger.besu.ethereum.permissioning.PermissioningConfiguration ;
import org.hyperledger.besu.ethereum.worldstate.DataStorageConfiguration ;
import org.hyperledger.besu.pki.keystore.KeyStoreWrapper ;
import org.hyperledger.besu.plugin.services.storage.DataStorageFormat ;
import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode ;
import org.hyperledger.besu.tests.acceptance.dsl.node.Node ;
import org.hyperledger.besu.tests.acceptance.dsl.node.RunnableNode ;
@ -476,7 +478,9 @@ public class BesuNodeFactory {
. build ( ) ) ;
}
public BesuNode createIbft2Node ( final String name , final boolean fixedPort ) throws IOException {
public BesuNode createIbft2Node (
final String name , final boolean fixedPort , final DataStorageFormat storageFormat )
throws IOException {
JsonRpcConfiguration rpcConfig = node . createJsonRpcWithIbft2EnabledConfig ( false ) ;
rpcConfig . addRpcApi ( "ADMIN,TXPOOL" ) ;
if ( fixedPort ) {
@ -484,6 +488,7 @@ public class BesuNodeFactory {
Math . abs ( name . hashCode ( ) % 60000 )
+ 1024 ) ; // Generate a consistent port for p2p based on node name
}
BesuNodeConfigurationBuilder builder =
new BesuNodeConfigurationBuilder ( )
. name ( name )
@ -491,6 +496,10 @@ public class BesuNodeFactory {
. jsonRpcConfiguration ( rpcConfig )
. webSocketConfiguration ( node . createWebSocketEnabledConfig ( ) )
. devMode ( false )
. dataStorageConfiguration (
storageFormat = = DataStorageFormat . FOREST
? DataStorageConfiguration . DEFAULT_FOREST_CONFIG
: DataStorageConfiguration . DEFAULT_BONSAI_CONFIG )
. genesisConfigProvider ( GenesisConfigurationFactory : : createIbft2GenesisConfig ) ;
if ( fixedPort ) {
builder . p2pPort (
@ -527,7 +536,9 @@ public class BesuNodeFactory {
return createQbftNodeWithTLS ( name , KeyStoreWrapper . KEYSTORE_TYPE_PKCS11 ) ;
}
public BesuNode createQbftNode ( final String name , final boolean fixedPort ) throws IOException {
public BesuNode createQbftNode (
final String name , final boolean fixedPort , final DataStorageFormat storageFormat )
throws IOException {
JsonRpcConfiguration rpcConfig = node . createJsonRpcWithQbftEnabledConfig ( false ) ;
rpcConfig . addRpcApi ( "ADMIN,TXPOOL" ) ;
if ( fixedPort ) {
@ -543,6 +554,10 @@ public class BesuNodeFactory {
. jsonRpcConfiguration ( rpcConfig )
. webSocketConfiguration ( node . createWebSocketEnabledConfig ( ) )
. devMode ( false )
. dataStorageConfiguration (
storageFormat = = DataStorageFormat . FOREST
? DataStorageConfiguration . DEFAULT_FOREST_CONFIG
: DataStorageConfiguration . DEFAULT_BONSAI_CONFIG )
. genesisConfigProvider ( GenesisConfigurationFactory : : createQbftGenesisConfig ) ;
if ( fixedPort ) {
builder . p2pPort (