diff --git a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/AcceptanceTestBase.java b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/AcceptanceTestBase.java
index 6021afe0f5..dd45057e2c 100644
--- a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/AcceptanceTestBase.java
+++ b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/AcceptanceTestBase.java
@@ -18,7 +18,7 @@ import tech.pegasys.pantheon.tests.acceptance.dsl.contract.ContractVerifier;
import tech.pegasys.pantheon.tests.acceptance.dsl.jsonrpc.Admin;
import tech.pegasys.pantheon.tests.acceptance.dsl.jsonrpc.Clique;
import tech.pegasys.pantheon.tests.acceptance.dsl.jsonrpc.Eth;
-import tech.pegasys.pantheon.tests.acceptance.dsl.jsonrpc.Ibft;
+import tech.pegasys.pantheon.tests.acceptance.dsl.jsonrpc.Ibft2;
import tech.pegasys.pantheon.tests.acceptance.dsl.jsonrpc.Login;
import tech.pegasys.pantheon.tests.acceptance.dsl.jsonrpc.Net;
import tech.pegasys.pantheon.tests.acceptance.dsl.jsonrpc.Perm;
@@ -29,7 +29,7 @@ import tech.pegasys.pantheon.tests.acceptance.dsl.node.factory.PermissionedNodeB
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.Transactions;
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.clique.CliqueTransactions;
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.eth.EthTransactions;
-import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ibft.IbftTransactions;
+import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ibft2.Ibft2Transactions;
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.net.NetTransactions;
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.web3.Web3Transactions;
import tech.pegasys.pantheon.tests.acceptance.dsl.waitcondition.WaitConditions;
@@ -42,10 +42,10 @@ public class AcceptanceTestBase {
protected final Blockchain blockchain;
protected final Cluster cluster;
protected final CliqueTransactions cliqueTransactions;
- protected final IbftTransactions ibftTransactions;
+ protected final Ibft2Transactions ibftTwoTransactions;
protected final Transactions transactions;
protected final Clique clique;
- protected final Ibft ibft;
+ protected final Ibft2 ibftTwo;
protected final Web3 web3;
protected final Eth eth;
protected final Login login;
@@ -63,10 +63,10 @@ public class AcceptanceTestBase {
blockchain = new Blockchain(ethTransactions);
eth = new Eth(ethTransactions);
cliqueTransactions = new CliqueTransactions();
- ibftTransactions = new IbftTransactions();
+ ibftTwoTransactions = new Ibft2Transactions();
clique = new Clique(ethTransactions, cliqueTransactions);
- ibft = new Ibft(ibftTransactions);
+ ibftTwo = new Ibft2(ibftTwoTransactions);
login = new Login();
net = new Net(new NetTransactions());
cluster = new Cluster(net);
@@ -76,7 +76,7 @@ public class AcceptanceTestBase {
web3 = new Web3(new Web3Transactions());
pantheon = new PantheonNodeFactory();
contractVerifier = new ContractVerifier(accounts.getPrimaryBenefactor());
- wait = new WaitConditions(ethTransactions, cliqueTransactions, ibftTransactions);
+ wait = new WaitConditions(ethTransactions, cliqueTransactions, ibftTwoTransactions);
permissionedNodeBuilder = new PermissionedNodeBuilder();
}
diff --git a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/condition/ibft/ExpectProposals.java b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/condition/ibft/ExpectProposals.java
index 0443e018c8..81fc3c7a94 100644
--- a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/condition/ibft/ExpectProposals.java
+++ b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/condition/ibft/ExpectProposals.java
@@ -18,21 +18,21 @@ import static tech.pegasys.pantheon.tests.acceptance.dsl.WaitUtils.waitFor;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.tests.acceptance.dsl.condition.Condition;
import tech.pegasys.pantheon.tests.acceptance.dsl.node.Node;
-import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ibft.IbftTransactions;
+import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ibft2.Ibft2Transactions;
import java.util.Map;
public class ExpectProposals implements Condition {
- private final IbftTransactions ibft;
+ private final Ibft2Transactions ibftTwo;
private final Map
proposers;
- public ExpectProposals(final IbftTransactions ibft, final Map proposers) {
- this.ibft = ibft;
+ public ExpectProposals(final Ibft2Transactions ibftTwo, final Map proposers) {
+ this.ibftTwo = ibftTwo;
this.proposers = proposers;
}
@Override
public void verify(final Node node) {
- waitFor(() -> assertThat(node.execute(ibft.createProposals())).isEqualTo(proposers));
+ waitFor(() -> assertThat(node.execute(ibftTwo.createProposals())).isEqualTo(proposers));
}
}
diff --git a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/condition/ibft/ExpectValidators.java b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/condition/ibft/ExpectValidators.java
index a398d592e5..936f46748d 100644
--- a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/condition/ibft/ExpectValidators.java
+++ b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/condition/ibft/ExpectValidators.java
@@ -14,18 +14,18 @@ package tech.pegasys.pantheon.tests.acceptance.dsl.condition.ibft;
import static org.assertj.core.api.Assertions.assertThat;
import static tech.pegasys.pantheon.tests.acceptance.dsl.WaitUtils.waitFor;
-import static tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ibft.IbftTransactions.LATEST;
+import static tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ibft2.Ibft2Transactions.LATEST;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.tests.acceptance.dsl.condition.Condition;
import tech.pegasys.pantheon.tests.acceptance.dsl.node.Node;
-import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ibft.IbftTransactions;
+import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ibft2.Ibft2Transactions;
public class ExpectValidators implements Condition {
- private final IbftTransactions ibft;
+ private final Ibft2Transactions ibft;
private final Address[] validators;
- public ExpectValidators(final IbftTransactions ibft, final Address... validators) {
+ public ExpectValidators(final Ibft2Transactions ibft, final Address... validators) {
this.ibft = ibft;
this.validators = validators;
}
diff --git a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/jsonrpc/Ibft.java b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/jsonrpc/Ibft2.java
similarity index 86%
rename from acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/jsonrpc/Ibft.java
rename to acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/jsonrpc/Ibft2.java
index 450ffe5137..04e1fafc23 100644
--- a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/jsonrpc/Ibft.java
+++ b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/jsonrpc/Ibft2.java
@@ -17,7 +17,7 @@ import tech.pegasys.pantheon.tests.acceptance.dsl.condition.Condition;
import tech.pegasys.pantheon.tests.acceptance.dsl.condition.ibft.ExpectProposals;
import tech.pegasys.pantheon.tests.acceptance.dsl.condition.ibft.ExpectValidators;
import tech.pegasys.pantheon.tests.acceptance.dsl.node.PantheonNode;
-import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ibft.IbftTransactions;
+import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ibft2.Ibft2Transactions;
import java.util.Arrays;
import java.util.Comparator;
@@ -29,12 +29,12 @@ import java.util.stream.Collectors;
import com.google.common.collect.ImmutableMap;
-public class Ibft {
+public class Ibft2 {
- private final IbftTransactions ibft;
+ private final Ibft2Transactions ibftTwo;
- public Ibft(final IbftTransactions ibft) {
- this.ibft = ibft;
+ public Ibft2(final Ibft2Transactions ibftTwo) {
+ this.ibftTwo = ibftTwo;
}
public List validators(final PantheonNode[] nodes) {
@@ -46,7 +46,7 @@ public class Ibft {
}
public ExpectValidators validatorsEqual(final PantheonNode... validators) {
- return new ExpectValidators(ibft, validatorAddresses(validators));
+ return new ExpectValidators(ibftTwo, validatorAddresses(validators));
}
private Address[] validatorAddresses(final PantheonNode[] validators) {
@@ -54,18 +54,18 @@ public class Ibft {
}
public Condition noProposals() {
- return new ExpectProposals(ibft, ImmutableMap.of());
+ return new ExpectProposals(ibftTwo, ImmutableMap.of());
}
public PendingVotesConfig pendingVotesEqual() {
- return new PendingVotesConfig(ibft);
+ return new PendingVotesConfig(ibftTwo);
}
public static class PendingVotesConfig {
private final Map proposals = new HashMap<>();
- private final IbftTransactions ibft;
+ private final Ibft2Transactions ibft;
- public PendingVotesConfig(final IbftTransactions ibft) {
+ private PendingVotesConfig(final Ibft2Transactions ibft) {
this.ibft = ibft;
}
diff --git a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/PantheonNode.java b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/PantheonNode.java
index 7a4aff473e..d28a51d33f 100644
--- a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/PantheonNode.java
+++ b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/PantheonNode.java
@@ -33,7 +33,7 @@ import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.AdminJsonRpcReques
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.CliqueJsonRpcRequestFactory;
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.CustomNetJsonRpcRequestFactory;
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.EeaJsonRpcRequestFactory;
-import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.IbftJsonRpcRequestFactory;
+import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.Ibft2JsonRpcRequestFactory;
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.JsonRequestFactories;
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.PermissioningJsonRpcRequestFactory;
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.Transaction;
@@ -279,7 +279,7 @@ public class PantheonNode implements NodeConfiguration, RunnableNode, AutoClosea
new JsonRequestFactories(
new JsonRpc2_0Web3j(web3jService, 2000, Async.defaultExecutorService()),
new CliqueJsonRpcRequestFactory(web3jService),
- new IbftJsonRpcRequestFactory(web3jService),
+ new Ibft2JsonRpcRequestFactory(web3jService),
new PermissioningJsonRpcRequestFactory(web3jService),
new AdminJsonRpcRequestFactory(web3jService),
new EeaJsonRpcRequestFactory(web3jService),
diff --git a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/factory/PantheonNodeFactory.java b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/factory/PantheonNodeFactory.java
index e1e306136f..31cba21969 100644
--- a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/factory/PantheonNodeFactory.java
+++ b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/factory/PantheonNodeFactory.java
@@ -140,15 +140,6 @@ public class PantheonNodeFactory extends PantheonNodeFactoryUtils {
.build());
}
- public PantheonNode createNodeWithP2pDisabledAndAdmin(final String name) throws IOException {
- return create(
- new PantheonFactoryConfigurationBuilder()
- .name(name)
- .p2pEnabled(false)
- .jsonRpcConfiguration(jsonRpcConfigWithAdmin())
- .build());
- }
-
public PantheonNode createArchiveNodeWithRpcDisabled(final String name) throws IOException {
return create(new PantheonFactoryConfigurationBuilder().name(name).build());
}
@@ -189,22 +180,22 @@ public class PantheonNodeFactory extends PantheonNodeFactoryUtils {
new PantheonFactoryConfigurationBuilder()
.name(name)
.miningEnabled()
- .jsonRpcConfiguration(createJsonRpcConfigWithClique())
+ .jsonRpcConfiguration(createJsonRpcWithCliqueEnabledConfig())
.webSocketConfiguration(createWebSocketEnabledConfig())
.devMode(false)
.genesisConfigProvider(this::createCliqueGenesisConfig)
.build());
}
- public PantheonNode createIbftNode(final String name) throws IOException {
+ public PantheonNode createIbft2Node(final String name) throws IOException {
return create(
new PantheonFactoryConfigurationBuilder()
.name(name)
.miningEnabled()
- .jsonRpcConfiguration(createJsonRpcConfigWithIbft())
+ .jsonRpcConfiguration(createJsonRpcWithIbft2EnabledConfig())
.webSocketConfiguration(createWebSocketEnabledConfig())
.devMode(false)
- .genesisConfigProvider(this::createIbftGenesisConfig)
+ .genesisConfigProvider(this::createIbft2GenesisConfig)
.build());
}
@@ -229,7 +220,7 @@ public class PantheonNodeFactory extends PantheonNodeFactoryUtils {
new PantheonFactoryConfigurationBuilder()
.name(name)
.miningEnabled()
- .jsonRpcConfiguration(createJsonRpcConfigWithClique())
+ .jsonRpcConfiguration(createJsonRpcWithCliqueEnabledConfig())
.webSocketConfiguration(createWebSocketEnabledConfig())
.devMode(false)
.genesisConfigProvider(
@@ -239,20 +230,20 @@ public class PantheonNodeFactory extends PantheonNodeFactoryUtils {
.build());
}
- public PantheonNode createIbftNodeWithValidators(final String name, final String... validators)
+ public PantheonNode createIbft2NodeWithValidators(final String name, final String... validators)
throws IOException {
return create(
new PantheonFactoryConfigurationBuilder()
.name(name)
.miningEnabled()
- .jsonRpcConfiguration(createJsonRpcConfigWithIbft())
+ .jsonRpcConfiguration(createJsonRpcWithIbft2EnabledConfig())
.webSocketConfiguration(createWebSocketEnabledConfig())
.devMode(false)
.genesisConfigProvider(
nodes ->
createGenesisConfigForValidators(
- asList(validators), nodes, this::createIbftGenesisConfig))
+ asList(validators), nodes, this::createIbft2GenesisConfig))
.build());
}
}
diff --git a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/factory/PantheonNodeFactoryUtils.java b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/factory/PantheonNodeFactoryUtils.java
index c58c5974e8..3646fcee39 100644
--- a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/factory/PantheonNodeFactoryUtils.java
+++ b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/factory/PantheonNodeFactoryUtils.java
@@ -49,7 +49,7 @@ public class PantheonNodeFactoryUtils {
validators, template, CliqueExtraData::createGenesisExtraDataString);
}
- public Optional createIbftGenesisConfig(
+ public Optional createIbft2GenesisConfig(
final Collection extends RunnableNode> validators) {
final String template = readGenesisFile("/ibft/ibft.json");
return updateGenesisExtraData(
@@ -85,12 +85,12 @@ public class PantheonNodeFactoryUtils {
return genesisConfigProvider.createGenesisConfig(nodes);
}
- public JsonRpcConfiguration createJsonRpcConfigWithClique() {
- return createJsonRpcConfigWithRpcApiEnabled(CLIQUE);
+ public JsonRpcConfiguration createJsonRpcWithCliqueEnabledConfig() {
+ return createJsonRpcWithRpcApiEnabledConfig(CLIQUE);
}
- public JsonRpcConfiguration createJsonRpcConfigWithIbft() {
- return createJsonRpcConfigWithRpcApiEnabled(IBFT);
+ public JsonRpcConfiguration createJsonRpcWithIbft2EnabledConfig() {
+ return createJsonRpcWithRpcApiEnabledConfig(IBFT);
}
public JsonRpcConfiguration createJsonRpcEnabledConfig() {
@@ -109,10 +109,10 @@ public class PantheonNodeFactoryUtils {
}
public JsonRpcConfiguration jsonRpcConfigWithAdmin() {
- return createJsonRpcConfigWithRpcApiEnabled(RpcApis.ADMIN);
+ return createJsonRpcWithRpcApiEnabledConfig(RpcApis.ADMIN);
}
- public JsonRpcConfiguration createJsonRpcConfigWithRpcApiEnabled(final RpcApi... rpcApi) {
+ public JsonRpcConfiguration createJsonRpcWithRpcApiEnabledConfig(final RpcApi... rpcApi) {
final JsonRpcConfiguration jsonRpcConfig = createJsonRpcEnabledConfig();
final List rpcApis = new ArrayList<>(jsonRpcConfig.getRpcApis());
rpcApis.addAll(Arrays.asList(rpcApi));
diff --git a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/privacy/PrivacyAcceptanceTestBase.java b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/privacy/PrivacyAcceptanceTestBase.java
index f0bc828083..1b9863dd6f 100644
--- a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/privacy/PrivacyAcceptanceTestBase.java
+++ b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/privacy/PrivacyAcceptanceTestBase.java
@@ -25,7 +25,7 @@ public class PrivacyAcceptanceTestBase extends AcceptanceTestBase {
protected final Eea eea;
protected final PrivateTransactions privateTransactions;
- protected static PrivateTransactionBuilder.Builder privateTransactionBuilder;
+ protected final PrivateTransactionBuilder.Builder privateTransactionBuilder;
protected final PrivateTransactionVerifier privateTransactionVerifier;
protected final PrivacyPantheonNodeFactory privacyPantheon;
diff --git a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/privacy/PrivacyNet.java b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/privacy/PrivacyNet.java
index 50b7916cef..ee0f1e8f25 100644
--- a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/privacy/PrivacyNet.java
+++ b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/privacy/PrivacyNet.java
@@ -228,7 +228,7 @@ public class PrivacyNet {
name, generatePrivacyParameters(orion), keyFilePath, orion);
} else {
node =
- pantheonNodeFactory.createIbftNodePrivacyEnabled(
+ pantheonNodeFactory.createIbft2NodePrivacyEnabled(
name, generatePrivacyParameters(orion), keyFilePath, orion);
}
diff --git a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/privacy/PrivacyPantheonNodeFactory.java b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/privacy/PrivacyPantheonNodeFactory.java
index df2e8015e1..037f020bdd 100644
--- a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/privacy/PrivacyPantheonNodeFactory.java
+++ b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/privacy/PrivacyPantheonNodeFactory.java
@@ -83,7 +83,7 @@ public class PrivacyPantheonNodeFactory extends PantheonNodeFactoryUtils {
.build());
}
- public PrivacyNode createIbftNodePrivacyEnabled(
+ public PrivacyNode createIbft2NodePrivacyEnabled(
final String name,
final PrivacyParameters privacyParameters,
final String keyFilePath,
@@ -95,10 +95,10 @@ public class PrivacyPantheonNodeFactory extends PantheonNodeFactoryUtils {
new PantheonFactoryConfigurationBuilder()
.name(name)
.miningEnabled()
- .jsonRpcConfiguration(createJsonRpcConfigWithIbft())
+ .jsonRpcConfiguration(createJsonRpcWithIbft2EnabledConfig())
.webSocketConfiguration(createWebSocketEnabledConfig())
.devMode(false)
- .genesisConfigProvider(this::createIbftGenesisConfig)
+ .genesisConfigProvider(this::createIbft2GenesisConfig)
.keyFilePath(keyFilePath)
.enablePrivateTransactions(privacyParameters)
.build())
diff --git a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/IbftJsonRpcRequestFactory.java b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/Ibft2JsonRpcRequestFactory.java
similarity index 81%
rename from acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/IbftJsonRpcRequestFactory.java
rename to acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/Ibft2JsonRpcRequestFactory.java
index 05635c0d15..b330ad0934 100644
--- a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/IbftJsonRpcRequestFactory.java
+++ b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/Ibft2JsonRpcRequestFactory.java
@@ -26,15 +26,15 @@ import java.util.Arrays;
import org.web3j.protocol.Web3jService;
import org.web3j.protocol.core.Request;
-public class IbftJsonRpcRequestFactory {
+public class Ibft2JsonRpcRequestFactory {
private final Web3jService web3jService;
- public IbftJsonRpcRequestFactory(final Web3jService web3jService) {
+ public Ibft2JsonRpcRequestFactory(final Web3jService web3jService) {
this.web3jService = web3jService;
}
- public Request, ProposeResponse> ibftPropose(final String address, final Boolean auth) {
+ public Request, ProposeResponse> propose(final String address, final Boolean auth) {
return new Request<>(
"ibft_proposeValidatorVote",
Arrays.asList(address, auth.toString()),
@@ -42,17 +42,17 @@ public class IbftJsonRpcRequestFactory {
ProposeResponse.class);
}
- public Request, DiscardResponse> ibftDiscard(final String address) {
+ public Request, DiscardResponse> discard(final String address) {
return new Request<>(
"ibft_discardValidatorVote", singletonList(address), web3jService, DiscardResponse.class);
}
- public Request, ProposalsResponse> ibftProposals() {
+ public Request, ProposalsResponse> proposals() {
return new Request<>(
"ibft_getPendingVotes", emptyList(), web3jService, ProposalsResponse.class);
}
- public Request, SignersBlockResponse> ibftGetValidators(final String blockNumber) {
+ public Request, SignersBlockResponse> validatorsAtBlock(final String blockNumber) {
return new Request<>(
"ibft_getValidatorsByBlockNumber",
singletonList(blockNumber),
@@ -60,7 +60,7 @@ public class IbftJsonRpcRequestFactory {
SignersBlockResponse.class);
}
- public Request, SignersBlockResponse> ibftGetSignersAtHash(final Hash hash) {
+ public Request, SignersBlockResponse> signersAtHash(final Hash hash) {
return new Request<>(
"ibft_getValidatorsByBlockHash",
singletonList(hash.toString()),
diff --git a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/JsonRequestFactories.java b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/JsonRequestFactories.java
index 6efaf7b865..57d8e37837 100644
--- a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/JsonRequestFactories.java
+++ b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/JsonRequestFactories.java
@@ -21,7 +21,7 @@ public class JsonRequestFactories {
private final JsonRpc2_0Web3j netEth;
private final CliqueJsonRpcRequestFactory clique;
- private final IbftJsonRpcRequestFactory ibft;
+ private final Ibft2JsonRpcRequestFactory ibft;
private final PermissioningJsonRpcRequestFactory perm;
private final AdminJsonRpcRequestFactory admin;
private final EeaJsonRpcRequestFactory eea;
@@ -31,7 +31,7 @@ public class JsonRequestFactories {
public JsonRequestFactories(
final JsonRpc2_0Web3j netEth,
final CliqueJsonRpcRequestFactory clique,
- final IbftJsonRpcRequestFactory ibft,
+ final Ibft2JsonRpcRequestFactory ibft,
final PermissioningJsonRpcRequestFactory perm,
final AdminJsonRpcRequestFactory admin,
final EeaJsonRpcRequestFactory eea,
@@ -59,7 +59,7 @@ public class JsonRequestFactories {
return clique;
}
- public IbftJsonRpcRequestFactory ibft() {
+ public Ibft2JsonRpcRequestFactory ibft() {
return ibft;
}
diff --git a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft/IbftDiscard.java b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft2/Ibft2Discard.java
similarity index 87%
rename from acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft/IbftDiscard.java
rename to acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft2/Ibft2Discard.java
index 58f5b497b4..dfc56f3c62 100644
--- a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft/IbftDiscard.java
+++ b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft2/Ibft2Discard.java
@@ -10,7 +10,7 @@
* 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.
*/
-package tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ibft;
+package tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ibft2;
import static org.assertj.core.api.Assertions.assertThat;
@@ -20,17 +20,17 @@ import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.Transaction;
import java.io.IOException;
-public class IbftDiscard implements Transaction {
+public class Ibft2Discard implements Transaction {
private final String address;
- public IbftDiscard(final String address) {
+ public Ibft2Discard(final String address) {
this.address = address;
}
@Override
public Boolean execute(final JsonRequestFactories node) {
try {
- final DiscardResponse result = node.ibft().ibftDiscard(address).send();
+ final DiscardResponse result = node.ibft().discard(address).send();
assertThat(result).isNotNull();
assertThat(result.hasError()).isFalse();
return result.getResult();
diff --git a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft/IbftGetValidators.java b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft2/Ibft2GetValidators.java
similarity index 86%
rename from acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft/IbftGetValidators.java
rename to acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft2/Ibft2GetValidators.java
index d773ece7b1..b55be6338d 100644
--- a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft/IbftGetValidators.java
+++ b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft2/Ibft2GetValidators.java
@@ -10,7 +10,7 @@
* 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.
*/
-package tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ibft;
+package tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ibft2;
import static org.assertj.core.api.Assertions.assertThat;
@@ -22,17 +22,17 @@ import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.Transaction;
import java.io.IOException;
import java.util.List;
-public class IbftGetValidators implements Transaction> {
+public class Ibft2GetValidators implements Transaction> {
private final String blockNumber;
- public IbftGetValidators(final String blockNumber) {
+ public Ibft2GetValidators(final String blockNumber) {
this.blockNumber = blockNumber;
}
@Override
public List execute(final JsonRequestFactories node) {
try {
- final SignersBlockResponse result = node.ibft().ibftGetValidators(blockNumber).send();
+ final SignersBlockResponse result = node.ibft().validatorsAtBlock(blockNumber).send();
assertThat(result).isNotNull();
assertThat(result.hasError()).isFalse();
return result.getResult();
diff --git a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft/IbftGetValidatorsAtHash.java b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft2/Ibft2GetValidatorsAtHash.java
similarity index 86%
rename from acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft/IbftGetValidatorsAtHash.java
rename to acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft2/Ibft2GetValidatorsAtHash.java
index 1a9caf4e54..404975a9d5 100644
--- a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft/IbftGetValidatorsAtHash.java
+++ b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft2/Ibft2GetValidatorsAtHash.java
@@ -10,7 +10,7 @@
* 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.
*/
-package tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ibft;
+package tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ibft2;
import static org.assertj.core.api.Assertions.assertThat;
@@ -23,17 +23,17 @@ import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.Transaction;
import java.io.IOException;
import java.util.List;
-public class IbftGetValidatorsAtHash implements Transaction> {
+public class Ibft2GetValidatorsAtHash implements Transaction> {
private final Hash hash;
- public IbftGetValidatorsAtHash(final Hash hash) {
+ public Ibft2GetValidatorsAtHash(final Hash hash) {
this.hash = hash;
}
@Override
public List execute(final JsonRequestFactories node) {
try {
- final SignersBlockResponse result = node.ibft().ibftGetSignersAtHash(hash).send();
+ final SignersBlockResponse result = node.ibft().signersAtHash(hash).send();
assertThat(result).isNotNull();
assertThat(result.hasError()).isFalse();
return result.getResult();
diff --git a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft/IbftProposals.java b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft2/Ibft2Proposals.java
similarity index 89%
rename from acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft/IbftProposals.java
rename to acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft2/Ibft2Proposals.java
index 6724ac964d..dc5cc5a281 100644
--- a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft/IbftProposals.java
+++ b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/ibft2/Ibft2Proposals.java
@@ -10,7 +10,7 @@
* 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.
*/
-package tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ibft;
+package tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ibft2;
import static org.assertj.core.api.Assertions.assertThat;
@@ -22,12 +22,12 @@ import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.Transaction;
import java.io.IOException;
import java.util.Map;
-public class IbftProposals implements Transaction