[refactor] Make JSON-RPC and GraphQL share parent module (#1929)

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
Ratan Rai Sur 5 years ago committed by GitHub
parent 8e08ebc43f
commit dedd6416ed
  1. 6
      acceptance-tests/build.gradle
  2. 4
      acceptance-tests/src/test-support/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/PantheonNode.java
  3. 4
      acceptance-tests/src/test-support/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/ProcessPantheonNodeRunner.java
  4. 2
      acceptance-tests/src/test-support/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/ThreadPantheonNodeRunner.java
  5. 8
      acceptance-tests/src/test-support/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/configuration/NodeConfigurationFactory.java
  6. 4
      acceptance-tests/src/test-support/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/configuration/PantheonNodeConfiguration.java
  7. 6
      acceptance-tests/src/test-support/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/configuration/PantheonNodeConfigurationBuilder.java
  8. 6
      acceptance-tests/src/test-support/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/configuration/PantheonNodeFactory.java
  9. 6
      acceptance-tests/src/test-support/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/configuration/permissioning/PermissionedNodeBuilder.java
  10. 2
      acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/RpcApisTogglesAcceptanceTest.java
  11. 2
      acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/web3j/privacy/EnclaveErrorAcceptanceTest.java
  12. 2
      consensus/clique/build.gradle
  13. 10
      consensus/clique/src/main/java/tech/pegasys/pantheon/consensus/clique/jsonrpc/CliqueJsonRpcMethodsFactory.java
  14. 2
      consensus/clique/src/main/java/tech/pegasys/pantheon/consensus/clique/jsonrpc/CliqueRpcApis.java
  15. 8
      consensus/clique/src/main/java/tech/pegasys/pantheon/consensus/clique/jsonrpc/methods/CliqueGetSignerMetrics.java
  16. 22
      consensus/clique/src/main/java/tech/pegasys/pantheon/consensus/clique/jsonrpc/methods/CliqueGetSigners.java
  17. 20
      consensus/clique/src/main/java/tech/pegasys/pantheon/consensus/clique/jsonrpc/methods/CliqueGetSignersAtHash.java
  18. 4
      consensus/clique/src/main/java/tech/pegasys/pantheon/consensus/clique/jsonrpc/methods/CliqueProposals.java
  19. 12
      consensus/clique/src/main/java/tech/pegasys/pantheon/consensus/clique/jsonrpc/methods/Discard.java
  20. 16
      consensus/clique/src/main/java/tech/pegasys/pantheon/consensus/clique/jsonrpc/methods/Propose.java
  21. 12
      consensus/clique/src/test/java/tech/pegasys/pantheon/consensus/clique/jsonrpc/methods/CliqueGetSignerMetricsTest.java
  22. 18
      consensus/clique/src/test/java/tech/pegasys/pantheon/consensus/clique/jsonrpc/methods/CliqueGetSignersAtHashTest.java
  23. 16
      consensus/clique/src/test/java/tech/pegasys/pantheon/consensus/clique/jsonrpc/methods/CliqueGetSignersTest.java
  24. 12
      consensus/clique/src/test/java/tech/pegasys/pantheon/consensus/clique/jsonrpc/methods/DiscardTest.java
  25. 14
      consensus/clique/src/test/java/tech/pegasys/pantheon/consensus/clique/jsonrpc/methods/ProposeTest.java
  26. 2
      consensus/common/build.gradle
  27. 18
      consensus/common/src/main/java/tech/pegasys/pantheon/consensus/common/jsonrpc/AbstractGetSignerMetricsMethod.java
  28. 6
      consensus/common/src/main/java/tech/pegasys/pantheon/consensus/common/jsonrpc/AbstractVoteProposerMethod.java
  29. 6
      consensus/common/src/test/java/tech/pegasys/pantheon/consensus/common/jsonrpc/AbstractVoteProposerMethodTest.java
  30. 2
      consensus/ibft/build.gradle
  31. 10
      consensus/ibft/src/main/java/tech/pegasys/pantheon/consensus/ibft/jsonrpc/IbftJsonRpcMethodsFactory.java
  32. 2
      consensus/ibft/src/main/java/tech/pegasys/pantheon/consensus/ibft/jsonrpc/IbftRpcApis.java
  33. 12
      consensus/ibft/src/main/java/tech/pegasys/pantheon/consensus/ibft/jsonrpc/methods/IbftDiscardValidatorVote.java
  34. 4
      consensus/ibft/src/main/java/tech/pegasys/pantheon/consensus/ibft/jsonrpc/methods/IbftGetPendingVotes.java
  35. 8
      consensus/ibft/src/main/java/tech/pegasys/pantheon/consensus/ibft/jsonrpc/methods/IbftGetSignerMetrics.java
  36. 12
      consensus/ibft/src/main/java/tech/pegasys/pantheon/consensus/ibft/jsonrpc/methods/IbftGetValidatorsByBlockHash.java
  37. 14
      consensus/ibft/src/main/java/tech/pegasys/pantheon/consensus/ibft/jsonrpc/methods/IbftGetValidatorsByBlockNumber.java
  38. 12
      consensus/ibft/src/main/java/tech/pegasys/pantheon/consensus/ibft/jsonrpc/methods/IbftProposeValidatorVote.java
  39. 10
      consensus/ibft/src/test/java/tech/pegasys/pantheon/consensus/ibft/jsonrpc/methods/IbftDiscardValidatorVoteTest.java
  40. 12
      consensus/ibft/src/test/java/tech/pegasys/pantheon/consensus/ibft/jsonrpc/methods/IbftGetSignerMetricsTest.java
  41. 6
      consensus/ibft/src/test/java/tech/pegasys/pantheon/consensus/ibft/jsonrpc/methods/IbftGetValidatorsByBlockHashTest.java
  42. 8
      consensus/ibft/src/test/java/tech/pegasys/pantheon/consensus/ibft/jsonrpc/methods/IbftGetValidatorsByBlockNumberTest.java
  43. 10
      consensus/ibft/src/test/java/tech/pegasys/pantheon/consensus/ibft/jsonrpc/methods/IbftProposeValidatorVoteTest.java
  44. 2
      consensus/ibftlegacy/build.gradle
  45. 30
      ethereum/api/build.gradle
  46. 2
      ethereum/api/src/integration-test/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/BlockchainImporter.java
  47. 2
      ethereum/api/src/integration-test/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/JsonRpcResponseKey.java
  48. 52
      ethereum/api/src/integration-test/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/JsonRpcResponseUtils.java
  49. 14
      ethereum/api/src/integration-test/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/JsonRpcTestMethodsFactory.java
  50. 22
      ethereum/api/src/integration-test/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/methods/EthCallIntegrationTest.java
  51. 16
      ethereum/api/src/integration-test/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/methods/EthEstimateGasIntegrationTest.java
  52. 56
      ethereum/api/src/integration-test/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/methods/EthGetBlockByHashIntegrationTest.java
  53. 56
      ethereum/api/src/integration-test/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/methods/EthGetBlockByNumberIntegrationTest.java
  54. 24
      ethereum/api/src/integration-test/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/methods/EthGetFilterChangesIntegrationTest.java
  55. 52
      ethereum/api/src/integration-test/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/methods/EthGetUncleByBlockHashAndIndexIntegrationTest.java
  56. 52
      ethereum/api/src/integration-test/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/methods/EthGetUncleByBlockNumberAndIndexIntegrationTest.java
  57. 16
      ethereum/api/src/integration-test/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/methods/PrivGetPrivateTransactionIntegrationTest.java
  58. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/BlockWithMetadata.java
  59. 4
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/LogWithMetadata.java
  60. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/LogsQuery.java
  61. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/TopicsParameter.java
  62. 4
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/TransactionWithMetadata.java
  63. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/GraphQLConfiguration.java
  64. 4
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/GraphQLDataFetcherContext.java
  65. 29
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/GraphQLDataFetchers.java
  66. 4
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/GraphQLException.java
  67. 26
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/GraphQLHttpService.java
  68. 11
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/GraphQLProvider.java
  69. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/GraphQLServiceException.java
  70. 6
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/BlockchainQuery.java
  71. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/Scalars.java
  72. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/TransactionReceiptWithMetadata.java
  73. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/pojoadapter/AccountAdapter.java
  74. 6
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/pojoadapter/AdapterBase.java
  75. 16
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/pojoadapter/BlockAdapterBase.java
  76. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/pojoadapter/CallResult.java
  77. 8
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/pojoadapter/LogAdapter.java
  78. 8
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/pojoadapter/NormalBlockAdapter.java
  79. 8
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/pojoadapter/PendingStateAdapter.java
  80. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/pojoadapter/SyncStateAdapter.java
  81. 10
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/pojoadapter/TransactionAdapter.java
  82. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/pojoadapter/UncleBlockAdapter.java
  83. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/response/GraphQLError.java
  84. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/response/GraphQLErrorResponse.java
  85. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/response/GraphQLJsonRequest.java
  86. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/response/GraphQLNoResponse.java
  87. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/response/GraphQLResponse.java
  88. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/response/GraphQLResponseType.java
  89. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/graphql/internal/response/GraphQLSuccessResponse.java
  90. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/JsonRpcConfiguration.java
  91. 4
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/JsonRpcEnclaveErrorConverter.java
  92. 4
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/JsonRpcErrorConverter.java
  93. 33
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/JsonRpcHttpService.java
  94. 184
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/JsonRpcMethodsFactory.java
  95. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/JsonRpcServiceException.java
  96. 4
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/LatestNonceProvider.java
  97. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/RpcApi.java
  98. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/RpcApis.java
  99. 2
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/RpcMethod.java
  100. 4
      ethereum/api/src/main/java/tech/pegasys/pantheon/ethereum/api/jsonrpc/RpcMethods.java
  101. Some files were not shown because too many files have changed in this diff Show More

@ -25,8 +25,7 @@ dependencies {
testSupportImplementation project(':ethereum:core')
testSupportImplementation project(path: ':ethereum:core', configuration: 'testSupportArtifacts')
testSupportImplementation project(':ethereum:eth')
testSupportImplementation project(':ethereum:graphql')
testSupportImplementation project(':ethereum:jsonrpc')
testSupportImplementation project(':ethereum:api')
testSupportImplementation project(':ethereum:p2p')
testSupportImplementation project(':ethereum:permissioning')
testSupportImplementation project(':ethereum:rlp')
@ -57,13 +56,12 @@ dependencies {
testSupportImplementation 'tech.pegasys.ethsigner.internal:file-based'
testSupportImplementation 'tech.pegasys.ethsigner.internal:signing-api'
testImplementation 'junit:junit'
testImplementation 'net.consensys:orion'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.web3j:abi'
testImplementation 'org.web3j:pantheon'
testImplementation project(':ethereum:jsonrpc')
testImplementation project(':ethereum:api')
testImplementation project(':enclave')
testImplementation 'org.awaitility:awaitility'
testImplementation project(':consensus:clique')

@ -18,12 +18,12 @@ import static org.apache.logging.log4j.LogManager.getLogger;
import tech.pegasys.pantheon.controller.KeyPairUtil;
import tech.pegasys.pantheon.crypto.SECP256K1.KeyPair;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcConfiguration;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.websocket.WebSocketConfiguration;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.core.MiningParameters;
import tech.pegasys.pantheon.ethereum.core.PrivacyParameters;
import tech.pegasys.pantheon.ethereum.core.Util;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcConfiguration;
import tech.pegasys.pantheon.ethereum.jsonrpc.websocket.WebSocketConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.config.NetworkingConfiguration;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;
import tech.pegasys.pantheon.metrics.prometheus.MetricsConfiguration;

@ -15,8 +15,8 @@ package tech.pegasys.pantheon.tests.acceptance.dsl.node;
import static java.nio.charset.StandardCharsets.UTF_8;
import tech.pegasys.pantheon.cli.options.NetworkingOptions;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcApi;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcApis;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcApi;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcApis;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;
import tech.pegasys.pantheon.metrics.prometheus.MetricsConfiguration;
import tech.pegasys.pantheon.plugin.services.metrics.MetricCategory;

@ -20,10 +20,10 @@ import tech.pegasys.pantheon.cli.config.EthNetworkConfig;
import tech.pegasys.pantheon.controller.KeyPairUtil;
import tech.pegasys.pantheon.controller.PantheonController;
import tech.pegasys.pantheon.controller.PantheonControllerBuilder;
import tech.pegasys.pantheon.ethereum.api.graphql.GraphQLConfiguration;
import tech.pegasys.pantheon.ethereum.eth.EthProtocolConfiguration;
import tech.pegasys.pantheon.ethereum.eth.sync.SynchronizerConfiguration;
import tech.pegasys.pantheon.ethereum.eth.transactions.TransactionPoolConfiguration;
import tech.pegasys.pantheon.ethereum.graphql.GraphQLConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.peers.EnodeURL;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;
import tech.pegasys.pantheon.ethereum.storage.keyvalue.KeyValueStorageProvider;

@ -17,10 +17,10 @@ import static java.util.stream.Collectors.toList;
import static tech.pegasys.pantheon.consensus.clique.jsonrpc.CliqueRpcApis.CLIQUE;
import static tech.pegasys.pantheon.consensus.ibft.jsonrpc.IbftRpcApis.IBFT;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcConfiguration;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcApi;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcApis;
import tech.pegasys.pantheon.ethereum.jsonrpc.websocket.WebSocketConfiguration;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcConfiguration;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcApi;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcApis;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.websocket.WebSocketConfiguration;
import tech.pegasys.pantheon.tests.acceptance.dsl.node.RunnableNode;
import tech.pegasys.pantheon.tests.acceptance.dsl.node.configuration.genesis.GenesisConfigurationProvider;

@ -12,9 +12,9 @@
*/
package tech.pegasys.pantheon.tests.acceptance.dsl.node.configuration;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcConfiguration;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.websocket.WebSocketConfiguration;
import tech.pegasys.pantheon.ethereum.core.MiningParameters;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcConfiguration;
import tech.pegasys.pantheon.ethereum.jsonrpc.websocket.WebSocketConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.config.NetworkingConfiguration;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;
import tech.pegasys.pantheon.metrics.prometheus.MetricsConfiguration;

@ -14,11 +14,11 @@ package tech.pegasys.pantheon.tests.acceptance.dsl.node.configuration;
import static java.util.Collections.singletonList;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcConfiguration;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcApis;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.websocket.WebSocketConfiguration;
import tech.pegasys.pantheon.ethereum.core.MiningParameters;
import tech.pegasys.pantheon.ethereum.core.MiningParametersTestBuilder;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcConfiguration;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcApis;
import tech.pegasys.pantheon.ethereum.jsonrpc.websocket.WebSocketConfiguration;
import tech.pegasys.pantheon.ethereum.p2p.config.NetworkingConfiguration;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;
import tech.pegasys.pantheon.metrics.prometheus.MetricsConfiguration;

@ -15,9 +15,9 @@ package tech.pegasys.pantheon.tests.acceptance.dsl.node.configuration;
import static java.util.Arrays.asList;
import static java.util.stream.Collectors.toList;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcConfiguration;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcApi;
import tech.pegasys.pantheon.ethereum.jsonrpc.websocket.WebSocketConfiguration;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcConfiguration;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcApi;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.websocket.WebSocketConfiguration;
import tech.pegasys.pantheon.tests.acceptance.dsl.node.Node;
import tech.pegasys.pantheon.tests.acceptance.dsl.node.PantheonNode;
import tech.pegasys.pantheon.tests.acceptance.dsl.node.RunnableNode;

@ -15,10 +15,10 @@ package tech.pegasys.pantheon.tests.acceptance.dsl.node.configuration.permission
import static java.util.Collections.singletonList;
import static java.util.stream.Collectors.toList;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcConfiguration;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcApi;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcApis;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcConfiguration;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcApi;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcApis;
import tech.pegasys.pantheon.ethereum.permissioning.LocalPermissioningConfiguration;
import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration;
import tech.pegasys.pantheon.ethereum.permissioning.SmartContractPermissioningConfiguration;

@ -15,7 +15,7 @@ package tech.pegasys.pantheon.tests.acceptance;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.catchThrowable;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcApis;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcApis;
import tech.pegasys.pantheon.tests.acceptance.dsl.AcceptanceTestBase;
import tech.pegasys.pantheon.tests.acceptance.dsl.node.PantheonNode;

@ -15,7 +15,7 @@ package tech.pegasys.pantheon.tests.web3j.privacy;
import static org.assertj.core.api.Assertions.catchThrowable;
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.tests.acceptance.dsl.privacy.PrivacyAcceptanceTestBase;
import tech.pegasys.pantheon.tests.acceptance.dsl.privacy.PrivacyNode;
import tech.pegasys.pantheon.tests.web3j.generated.EventEmitter;

@ -34,7 +34,7 @@ dependencies {
implementation project(':ethereum:core')
implementation project(':ethereum:blockcreation')
implementation project(':ethereum:eth')
implementation project(':ethereum:jsonrpc')
implementation project(':ethereum:api')
implementation project(':ethereum:rlp')
implementation project(':ethereum:p2p')
implementation project(':services:kvstore')

@ -25,12 +25,12 @@ import tech.pegasys.pantheon.consensus.common.VoteProposer;
import tech.pegasys.pantheon.consensus.common.VoteTallyCache;
import tech.pegasys.pantheon.consensus.common.VoteTallyUpdater;
import tech.pegasys.pantheon.ethereum.ProtocolContext;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcApi;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethodFactory;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.chain.MutableBlockchain;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcApi;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethodFactory;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive;
import java.util.Collection;

@ -12,7 +12,7 @@
*/
package tech.pegasys.pantheon.consensus.clique.jsonrpc;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcApi;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcApi;
import java.util.Optional;

@ -14,10 +14,10 @@ package tech.pegasys.pantheon.consensus.clique.jsonrpc.methods;
import tech.pegasys.pantheon.consensus.common.BlockInterface;
import tech.pegasys.pantheon.consensus.common.jsonrpc.AbstractGetSignerMetricsMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.queries.BlockchainQueries;
public class CliqueGetSignerMetrics extends AbstractGetSignerMetricsMethod
implements JsonRpcMethod {

@ -13,18 +13,18 @@
package tech.pegasys.pantheon.consensus.clique.jsonrpc.methods;
import tech.pegasys.pantheon.consensus.common.VoteTallyCache;
import tech.pegasys.pantheon.ethereum.api.BlockWithMetadata;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.BlockParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.core.BlockHeader;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.BlockParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockWithMetadata;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import java.util.Objects;
import java.util.Optional;

@ -13,18 +13,18 @@
package tech.pegasys.pantheon.consensus.clique.jsonrpc.methods;
import tech.pegasys.pantheon.consensus.common.VoteTallyCache;
import tech.pegasys.pantheon.ethereum.api.BlockWithMetadata;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.core.BlockHeader;
import tech.pegasys.pantheon.ethereum.core.Hash;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockWithMetadata;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import java.util.Objects;
import java.util.Optional;

@ -14,8 +14,8 @@ package tech.pegasys.pantheon.consensus.clique.jsonrpc.methods;
import tech.pegasys.pantheon.consensus.common.VoteProposer;
import tech.pegasys.pantheon.consensus.common.jsonrpc.AbstractVoteProposerMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
public class CliqueProposals extends AbstractVoteProposerMethod implements JsonRpcMethod {

@ -13,13 +13,13 @@
package tech.pegasys.pantheon.consensus.clique.jsonrpc.methods;
import tech.pegasys.pantheon.consensus.common.VoteProposer;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
public class Discard implements JsonRpcMethod {
private final VoteProposer proposer;

@ -15,15 +15,15 @@ package tech.pegasys.pantheon.consensus.clique.jsonrpc.methods;
import static tech.pegasys.pantheon.consensus.clique.CliqueBlockInterface.NO_VOTE_SUBJECT;
import tech.pegasys.pantheon.consensus.common.VoteProposer;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
public class Propose implements JsonRpcMethod {
private final VoteProposer proposer;

@ -20,15 +20,15 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import tech.pegasys.pantheon.consensus.common.BlockInterface;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.exception.InvalidJsonRpcParameters;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.results.SignerMetricResult;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.core.BlockHeader;
import tech.pegasys.pantheon.ethereum.core.BlockHeaderTestFixture;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.exception.InvalidJsonRpcParameters;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.results.SignerMetricResult;
import java.util.ArrayList;
import java.util.Collection;

@ -22,19 +22,19 @@ import static tech.pegasys.pantheon.ethereum.core.Address.fromHexString;
import tech.pegasys.pantheon.consensus.clique.CliqueBlockHeaderFunctions;
import tech.pegasys.pantheon.consensus.common.VoteTally;
import tech.pegasys.pantheon.consensus.common.VoteTallyCache;
import tech.pegasys.pantheon.ethereum.api.BlockWithMetadata;
import tech.pegasys.pantheon.ethereum.api.TransactionWithMetadata;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.exception.InvalidJsonRpcParameters;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.core.BlockHeader;
import tech.pegasys.pantheon.ethereum.core.BlockHeaderTestFixture;
import tech.pegasys.pantheon.ethereum.core.Hash;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.exception.InvalidJsonRpcParameters;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockWithMetadata;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.TransactionWithMetadata;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.util.bytes.BytesValue;
import java.util.List;

@ -21,18 +21,18 @@ import static tech.pegasys.pantheon.ethereum.core.Address.fromHexString;
import tech.pegasys.pantheon.consensus.common.VoteTally;
import tech.pegasys.pantheon.consensus.common.VoteTallyCache;
import tech.pegasys.pantheon.ethereum.api.BlockWithMetadata;
import tech.pegasys.pantheon.ethereum.api.TransactionWithMetadata;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.core.BlockHeader;
import tech.pegasys.pantheon.ethereum.core.BlockHeaderTestFixture;
import tech.pegasys.pantheon.ethereum.core.Hash;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockWithMetadata;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.TransactionWithMetadata;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.util.bytes.BytesValue;
import java.util.List;

@ -17,13 +17,13 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
import tech.pegasys.pantheon.consensus.common.VoteProposer;
import tech.pegasys.pantheon.consensus.common.VoteType;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.exception.InvalidJsonRpcParameters;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponseType;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.exception.InvalidJsonRpcParameters;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponseType;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import java.util.Optional;

@ -16,14 +16,14 @@ import static org.assertj.core.api.Assertions.assertThat;
import tech.pegasys.pantheon.consensus.common.VoteProposer;
import tech.pegasys.pantheon.consensus.common.VoteType;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponseType;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponseType;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import java.util.Optional;

@ -29,7 +29,7 @@ dependencies {
api project(':plugin-api')
implementation project(':ethereum:core')
implementation project(':ethereum:jsonrpc')
implementation project(':ethereum:api')
implementation project(':util')
implementation 'com.fasterxml.jackson.core:jackson-databind'

@ -13,17 +13,17 @@
package tech.pegasys.pantheon.consensus.common.jsonrpc;
import tech.pegasys.pantheon.consensus.common.BlockInterface;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.BlockParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.results.SignerMetricResult;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.core.BlockHeader;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.BlockParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.results.SignerMetricResult;
import java.util.ArrayList;
import java.util.HashMap;

@ -14,9 +14,9 @@ package tech.pegasys.pantheon.consensus.common.jsonrpc;
import tech.pegasys.pantheon.consensus.common.VoteProposer;
import tech.pegasys.pantheon.consensus.common.VoteType;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import java.util.Map;
import java.util.stream.Collectors;

@ -18,10 +18,10 @@ import static org.mockito.Mockito.when;
import tech.pegasys.pantheon.consensus.common.VoteProposer;
import tech.pegasys.pantheon.consensus.common.VoteType;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import com.google.common.collect.ImmutableMap;
import org.junit.Test;

@ -32,7 +32,7 @@ dependencies {
implementation project(':ethereum:blockcreation')
implementation project(':ethereum:core')
implementation project(':ethereum:eth')
implementation project(':ethereum:jsonrpc')
implementation project(':ethereum:api')
implementation project(':ethereum:rlp')
implementation project(':ethereum:p2p')
implementation project(':services:kvstore')

@ -23,11 +23,11 @@ import tech.pegasys.pantheon.consensus.ibft.jsonrpc.methods.IbftGetValidatorsByB
import tech.pegasys.pantheon.consensus.ibft.jsonrpc.methods.IbftGetValidatorsByBlockNumber;
import tech.pegasys.pantheon.consensus.ibft.jsonrpc.methods.IbftProposeValidatorVote;
import tech.pegasys.pantheon.ethereum.ProtocolContext;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcApi;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethodFactory;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcApi;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethodFactory;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.queries.BlockchainQueries;
import java.util.Collection;
import java.util.HashMap;

@ -12,7 +12,7 @@
*/
package tech.pegasys.pantheon.consensus.ibft.jsonrpc;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcApi;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcApi;
import java.util.Optional;

@ -13,13 +13,13 @@
package tech.pegasys.pantheon.consensus.ibft.jsonrpc.methods;
import tech.pegasys.pantheon.consensus.common.VoteProposer;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

@ -14,8 +14,8 @@ package tech.pegasys.pantheon.consensus.ibft.jsonrpc.methods;
import tech.pegasys.pantheon.consensus.common.VoteProposer;
import tech.pegasys.pantheon.consensus.common.jsonrpc.AbstractVoteProposerMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
public class IbftGetPendingVotes extends AbstractVoteProposerMethod implements JsonRpcMethod {

@ -14,10 +14,10 @@ package tech.pegasys.pantheon.consensus.ibft.jsonrpc.methods;
import tech.pegasys.pantheon.consensus.common.BlockInterface;
import tech.pegasys.pantheon.consensus.common.jsonrpc.AbstractGetSignerMetricsMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.queries.BlockchainQueries;
public class IbftGetSignerMetrics extends AbstractGetSignerMetricsMethod implements JsonRpcMethod {

@ -13,15 +13,15 @@
package tech.pegasys.pantheon.consensus.ibft.jsonrpc.methods;
import tech.pegasys.pantheon.consensus.common.BlockInterface;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.chain.Blockchain;
import tech.pegasys.pantheon.ethereum.core.BlockHeader;
import tech.pegasys.pantheon.ethereum.core.Hash;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import java.util.Optional;
import java.util.stream.Collectors;

@ -13,14 +13,14 @@
package tech.pegasys.pantheon.consensus.ibft.jsonrpc.methods;
import tech.pegasys.pantheon.consensus.common.BlockInterface;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.AbstractBlockParameterMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.BlockParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.core.BlockHeader;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.AbstractBlockParameterMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.BlockParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockchainQueries;
import java.util.Optional;
import java.util.stream.Collectors;

@ -14,13 +14,13 @@ package tech.pegasys.pantheon.consensus.ibft.jsonrpc.methods;
import tech.pegasys.pantheon.consensus.common.VoteProposer;
import tech.pegasys.pantheon.consensus.common.VoteType;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.jsonrpc.RpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

@ -17,12 +17,12 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import tech.pegasys.pantheon.consensus.common.VoteProposer;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.exception.InvalidJsonRpcParameters;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.exception.InvalidJsonRpcParameters;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import org.junit.Before;
import org.junit.Rule;

@ -20,15 +20,15 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import tech.pegasys.pantheon.consensus.common.BlockInterface;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.exception.InvalidJsonRpcParameters;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.results.SignerMetricResult;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.core.BlockHeader;
import tech.pegasys.pantheon.ethereum.core.BlockHeaderTestFixture;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.exception.InvalidJsonRpcParameters;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.results.SignerMetricResult;
import java.util.ArrayList;
import java.util.Collection;

@ -15,13 +15,13 @@ package tech.pegasys.pantheon.consensus.ibft.jsonrpc.methods;
import static org.mockito.Mockito.when;
import tech.pegasys.pantheon.consensus.ibft.IbftBlockInterface;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.chain.Blockchain;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.core.BlockHeader;
import tech.pegasys.pantheon.ethereum.core.Hash;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import java.util.Collections;
import java.util.List;

@ -16,12 +16,12 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.when;
import tech.pegasys.pantheon.consensus.ibft.IbftBlockInterface;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.BlockParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.core.BlockHeader;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.BlockParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockchainQueries;
import java.util.Collections;
import java.util.List;

@ -17,12 +17,12 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import tech.pegasys.pantheon.consensus.common.VoteProposer;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.exception.InvalidJsonRpcParameters;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.exception.InvalidJsonRpcParameters;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import org.junit.Before;
import org.junit.Rule;

@ -20,7 +20,7 @@ dependencies {
implementation project(':ethereum:blockcreation')
implementation project(':ethereum:core')
implementation project(':ethereum:eth')
implementation project(':ethereum:jsonrpc')
implementation project(':ethereum:api')
implementation project(':ethereum:rlp')
implementation project(':ethereum:p2p')
implementation project(':metrics:core')

@ -14,7 +14,7 @@
apply plugin: 'java-library'
jar {
baseName 'pantheon-json-rpc'
baseName 'pantheon-api'
manifest {
attributes(
'Specification-Title': baseName,
@ -26,9 +26,6 @@ jar {
}
dependencies {
implementation project(':config')
implementation project(':crypto')
implementation project(':enclave')
implementation project(':ethereum:blockcreation')
implementation project(':ethereum:core')
implementation project(':ethereum:eth')
@ -37,20 +34,20 @@ dependencies {
implementation project(':ethereum:permissioning')
implementation project(':metrics:core')
implementation project(':nat')
implementation project(':plugin-api')
implementation project(':enclave')
implementation project(':util')
implementation project(':config')
implementation project(':crypto')
implementation 'org.springframework.security:spring-security-crypto'
implementation 'net.consensys.cava:cava-toml'
implementation 'com.graphql-java:graphql-java'
implementation 'com.google.guava:guava'
implementation 'io.vertx:vertx-core'
implementation 'io.vertx:vertx-web'
implementation 'net.consensys.cava:cava-toml'
implementation 'org.springframework.security:spring-security-crypto'
implementation 'io.vertx:vertx-auth-jwt'
testImplementation project(':config')
testImplementation project(path: ':config', configuration: 'testSupportArtifacts')
testImplementation project(path: ':ethereum:core', configuration: 'testArtifacts')
testImplementation project(path: ':ethereum:core', configuration: 'testSupportArtifacts')
testImplementation project(':services:kvstore')
testImplementation project(':testutil')
implementation 'io.vertx:vertx-unit'
testImplementation 'com.squareup.okhttp3:okhttp'
testImplementation 'junit:junit'
@ -59,6 +56,13 @@ dependencies {
testImplementation 'io.vertx:vertx-codegen'
testImplementation 'io.vertx:vertx-unit'
testImplementation project(path: ':ethereum:core', configuration: 'testSupportArtifacts')
testImplementation project(':testutil')
testImplementation project(':config')
testImplementation project(path: ':config', configuration: 'testSupportArtifacts')
testImplementation project(path: ':ethereum:core', configuration: 'testArtifacts')
testImplementation project(':services:kvstore')
integrationTestImplementation project(':config')
integrationTestImplementation project(path: ':config', configuration: 'testSupportArtifacts')
integrationTestImplementation project(path: ':ethereum:core', configuration: 'testSupportArtifacts')

@ -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.ethereum.jsonrpc;
package tech.pegasys.pantheon.ethereum.api.jsonrpc;
import tech.pegasys.pantheon.config.GenesisConfigFile;
import tech.pegasys.pantheon.ethereum.chain.GenesisState;

@ -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.ethereum.jsonrpc;
package tech.pegasys.pantheon.ethereum.api.jsonrpc;
public enum JsonRpcResponseKey {
COINBASE,

@ -10,28 +10,35 @@
* 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.ethereum.jsonrpc;
package tech.pegasys.pantheon.ethereum.api.jsonrpc;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.COINBASE;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.EXTRA_DATA;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.GAS_LIMIT;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.GAS_USED;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.LOGS_BLOOM;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.MIX_HASH;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.NONCE;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.NUMBER;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.OMMERS_HASH;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.PARENT_HASH;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.RECEIPTS_ROOT;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.SIZE;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.STATE_ROOT;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.TIMESTAMP;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.TOTAL_DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.TRANSACTION_ROOT;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.COINBASE;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.EXTRA_DATA;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.GAS_LIMIT;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.GAS_USED;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.LOGS_BLOOM;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.MIX_HASH;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.NONCE;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.NUMBER;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.OMMERS_HASH;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.PARENT_HASH;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.RECEIPTS_ROOT;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.SIZE;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.STATE_ROOT;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.TIMESTAMP;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.TOTAL_DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.TRANSACTION_ROOT;
import tech.pegasys.pantheon.ethereum.api.TransactionWithMetadata;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.results.BlockResult;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.results.TransactionCompleteResult;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.results.TransactionHashResult;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.results.TransactionResult;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.core.BlockHeader;
import tech.pegasys.pantheon.ethereum.core.BlockHeaderFunctions;
@ -39,13 +46,6 @@ import tech.pegasys.pantheon.ethereum.core.Hash;
import tech.pegasys.pantheon.ethereum.core.LogsBloomFilter;
import tech.pegasys.pantheon.ethereum.core.Transaction;
import tech.pegasys.pantheon.ethereum.core.Wei;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.TransactionWithMetadata;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.results.BlockResult;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.results.TransactionCompleteResult;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.results.TransactionHashResult;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.results.TransactionResult;
import tech.pegasys.pantheon.ethereum.mainnet.MainnetBlockHeaderFunctions;
import tech.pegasys.pantheon.util.bytes.BytesValue;
import tech.pegasys.pantheon.util.uint.UInt256;

@ -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.ethereum.jsonrpc;
package tech.pegasys.pantheon.ethereum.api.jsonrpc;
import static org.mockito.Mockito.mock;
import static tech.pegasys.pantheon.ethereum.core.InMemoryStorageProvider.createInMemoryBlockchain;
@ -18,6 +18,12 @@ import static tech.pegasys.pantheon.ethereum.core.InMemoryStorageProvider.create
import tech.pegasys.pantheon.config.StubGenesisConfigOptions;
import tech.pegasys.pantheon.ethereum.ProtocolContext;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.filter.FilterIdGenerator;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.filter.FilterManager;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.filter.FilterRepository;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.websocket.WebSocketConfiguration;
import tech.pegasys.pantheon.ethereum.blockcreation.EthHashMiningCoordinator;
import tech.pegasys.pantheon.ethereum.chain.MutableBlockchain;
import tech.pegasys.pantheon.ethereum.core.Block;
@ -25,12 +31,6 @@ import tech.pegasys.pantheon.ethereum.core.BlockImporter;
import tech.pegasys.pantheon.ethereum.core.PrivacyParameters;
import tech.pegasys.pantheon.ethereum.core.Synchronizer;
import tech.pegasys.pantheon.ethereum.eth.transactions.TransactionPool;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.filter.FilterIdGenerator;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.filter.FilterManager;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.filter.FilterRepository;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.jsonrpc.websocket.WebSocketConfiguration;
import tech.pegasys.pantheon.ethereum.mainnet.HeaderValidationMode;
import tech.pegasys.pantheon.ethereum.mainnet.MainnetProtocolSchedule;
import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule;

@ -10,21 +10,21 @@
* 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.ethereum.jsonrpc.methods;
package tech.pegasys.pantheon.ethereum.api.jsonrpc.methods;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.catchThrowable;
import tech.pegasys.pantheon.ethereum.jsonrpc.BlockchainImporter;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcTestMethodsFactory;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.exception.InvalidJsonRpcParameters;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonCallParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.BlockchainImporter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcTestMethodsFactory;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.exception.InvalidJsonRpcParameters;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonCallParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.transaction.CallParameter;
import tech.pegasys.pantheon.testutil.BlockTestUtil;

@ -10,17 +10,17 @@
* 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.ethereum.jsonrpc.methods;
package tech.pegasys.pantheon.ethereum.api.jsonrpc.methods;
import static org.assertj.core.api.Assertions.assertThat;
import tech.pegasys.pantheon.ethereum.jsonrpc.BlockchainImporter;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcTestMethodsFactory;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonCallParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.BlockchainImporter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcTestMethodsFactory;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonCallParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.transaction.CallParameter;
import tech.pegasys.pantheon.testutil.BlockTestUtil;

@ -10,37 +10,37 @@
* 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.ethereum.jsonrpc.methods;
package tech.pegasys.pantheon.ethereum.api.jsonrpc.methods;
import static org.assertj.core.api.Assertions.assertThat;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.COINBASE;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.EXTRA_DATA;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.GAS_LIMIT;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.GAS_USED;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.LOGS_BLOOM;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.MIX_HASH;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.NONCE;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.NUMBER;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.OMMERS_HASH;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.PARENT_HASH;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.RECEIPTS_ROOT;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.SIZE;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.STATE_ROOT;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.TIMESTAMP;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.TOTAL_DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.TRANSACTION_ROOT;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.COINBASE;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.EXTRA_DATA;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.GAS_LIMIT;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.GAS_USED;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.LOGS_BLOOM;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.MIX_HASH;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.NONCE;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.NUMBER;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.OMMERS_HASH;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.PARENT_HASH;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.RECEIPTS_ROOT;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.SIZE;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.STATE_ROOT;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.TIMESTAMP;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.TOTAL_DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.TRANSACTION_ROOT;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.BlockchainImporter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseUtils;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcTestMethodsFactory;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.results.TransactionResult;
import tech.pegasys.pantheon.ethereum.core.Hash;
import tech.pegasys.pantheon.ethereum.jsonrpc.BlockchainImporter;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseUtils;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcTestMethodsFactory;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.results.TransactionResult;
import tech.pegasys.pantheon.testutil.BlockTestUtil;
import java.util.EnumMap;

@ -10,37 +10,37 @@
* 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.ethereum.jsonrpc.methods;
package tech.pegasys.pantheon.ethereum.api.jsonrpc.methods;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.catchThrowable;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.COINBASE;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.EXTRA_DATA;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.GAS_LIMIT;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.GAS_USED;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.LOGS_BLOOM;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.MIX_HASH;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.NONCE;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.NUMBER;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.OMMERS_HASH;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.PARENT_HASH;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.RECEIPTS_ROOT;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.SIZE;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.STATE_ROOT;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.TIMESTAMP;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.TOTAL_DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.TRANSACTION_ROOT;
import tech.pegasys.pantheon.ethereum.jsonrpc.BlockchainImporter;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseUtils;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcTestMethodsFactory;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.exception.InvalidJsonRpcParameters;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.results.TransactionResult;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.COINBASE;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.EXTRA_DATA;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.GAS_LIMIT;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.GAS_USED;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.LOGS_BLOOM;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.MIX_HASH;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.NONCE;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.NUMBER;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.OMMERS_HASH;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.PARENT_HASH;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.RECEIPTS_ROOT;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.SIZE;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.STATE_ROOT;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.TIMESTAMP;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.TOTAL_DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.TRANSACTION_ROOT;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.BlockchainImporter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseUtils;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcTestMethodsFactory;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.exception.InvalidJsonRpcParameters;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.results.TransactionResult;
import tech.pegasys.pantheon.testutil.BlockTestUtil;
import java.util.EnumMap;

@ -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.ethereum.jsonrpc.methods;
package tech.pegasys.pantheon.ethereum.api.jsonrpc.methods;
import static java.util.Arrays.asList;
import static java.util.Collections.emptyList;
@ -21,6 +21,17 @@ import static org.mockito.Mockito.when;
import tech.pegasys.pantheon.crypto.SECP256K1.KeyPair;
import tech.pegasys.pantheon.ethereum.ProtocolContext;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.filter.FilterIdGenerator;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.filter.FilterManager;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.filter.FilterRepository;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetFilterChanges;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.chain.MutableBlockchain;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.core.Block;
@ -39,17 +50,6 @@ import tech.pegasys.pantheon.ethereum.eth.transactions.PendingTransactions;
import tech.pegasys.pantheon.ethereum.eth.transactions.TransactionPool;
import tech.pegasys.pantheon.ethereum.eth.transactions.TransactionPool.TransactionBatchAddedListener;
import tech.pegasys.pantheon.ethereum.eth.transactions.TransactionPoolConfiguration;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.filter.FilterIdGenerator;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.filter.FilterManager;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.filter.FilterRepository;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetFilterChanges;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem;
import tech.pegasys.pantheon.plugin.services.MetricsSystem;
import tech.pegasys.pantheon.testutil.TestClock;

@ -10,35 +10,35 @@
* 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.ethereum.jsonrpc.methods;
package tech.pegasys.pantheon.ethereum.api.jsonrpc.methods;
import static org.assertj.core.api.Assertions.assertThat;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.COINBASE;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.EXTRA_DATA;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.GAS_LIMIT;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.GAS_USED;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.LOGS_BLOOM;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.MIX_HASH;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.NONCE;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.NUMBER;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.OMMERS_HASH;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.PARENT_HASH;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.RECEIPTS_ROOT;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.SIZE;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.STATE_ROOT;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.TIMESTAMP;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.TOTAL_DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.TRANSACTION_ROOT;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.COINBASE;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.EXTRA_DATA;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.GAS_LIMIT;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.GAS_USED;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.LOGS_BLOOM;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.MIX_HASH;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.NONCE;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.NUMBER;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.OMMERS_HASH;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.PARENT_HASH;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.RECEIPTS_ROOT;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.SIZE;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.STATE_ROOT;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.TIMESTAMP;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.TOTAL_DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.TRANSACTION_ROOT;
import tech.pegasys.pantheon.ethereum.jsonrpc.BlockchainImporter;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseUtils;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcTestMethodsFactory;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.BlockchainImporter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseUtils;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcTestMethodsFactory;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.testutil.BlockTestUtil;
import java.util.EnumMap;

@ -10,35 +10,35 @@
* 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.ethereum.jsonrpc.methods;
package tech.pegasys.pantheon.ethereum.api.jsonrpc.methods;
import static org.assertj.core.api.Assertions.assertThat;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.COINBASE;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.EXTRA_DATA;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.GAS_LIMIT;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.GAS_USED;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.LOGS_BLOOM;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.MIX_HASH;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.NONCE;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.NUMBER;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.OMMERS_HASH;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.PARENT_HASH;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.RECEIPTS_ROOT;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.SIZE;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.STATE_ROOT;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.TIMESTAMP;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.TOTAL_DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey.TRANSACTION_ROOT;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.COINBASE;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.EXTRA_DATA;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.GAS_LIMIT;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.GAS_USED;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.LOGS_BLOOM;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.MIX_HASH;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.NONCE;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.NUMBER;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.OMMERS_HASH;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.PARENT_HASH;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.RECEIPTS_ROOT;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.SIZE;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.STATE_ROOT;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.TIMESTAMP;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.TOTAL_DIFFICULTY;
import static tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey.TRANSACTION_ROOT;
import tech.pegasys.pantheon.ethereum.jsonrpc.BlockchainImporter;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseKey;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcResponseUtils;
import tech.pegasys.pantheon.ethereum.jsonrpc.JsonRpcTestMethodsFactory;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.BlockchainImporter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseKey;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcResponseUtils;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.JsonRpcTestMethodsFactory;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.testutil.BlockTestUtil;
import java.util.EnumMap;

@ -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.ethereum.jsonrpc.methods;
package tech.pegasys.pantheon.ethereum.api.jsonrpc.methods;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.assertj.core.api.Assertions.assertThat;
@ -26,18 +26,18 @@ import tech.pegasys.pantheon.enclave.Enclave;
import tech.pegasys.pantheon.enclave.types.SendRequest;
import tech.pegasys.pantheon.enclave.types.SendRequestLegacy;
import tech.pegasys.pantheon.enclave.types.SendResponse;
import tech.pegasys.pantheon.ethereum.api.TransactionWithMetadata;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.privacy.methods.priv.PrivGetPrivateTransaction;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.results.privacy.PrivateTransactionLegacyResult;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.core.Hash;
import tech.pegasys.pantheon.ethereum.core.PrivacyParameters;
import tech.pegasys.pantheon.ethereum.core.Transaction;
import tech.pegasys.pantheon.ethereum.core.Wei;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.privacy.methods.priv.PrivGetPrivateTransaction;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.TransactionWithMetadata;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.results.privacy.PrivateTransactionLegacyResult;
import tech.pegasys.pantheon.ethereum.privacy.PrivateTransaction;
import tech.pegasys.pantheon.ethereum.privacy.Restriction;
import tech.pegasys.pantheon.ethereum.rlp.BytesValueRLPOutput;

@ -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.ethereum.graphql.internal;
package tech.pegasys.pantheon.ethereum.api;
import tech.pegasys.pantheon.ethereum.core.BlockHeader;
import tech.pegasys.pantheon.util.uint.UInt256;

@ -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.ethereum.graphql.internal;
package tech.pegasys.pantheon.ethereum.api;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.core.Hash;
@ -33,7 +33,7 @@ public class LogWithMetadata {
private final List<LogTopic> topics;
private final boolean removed;
LogWithMetadata(
public LogWithMetadata(
final int logIndex,
final long blockNumber,
final Hash blockHash,

@ -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.ethereum.graphql.internal;
package tech.pegasys.pantheon.ethereum.api;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.core.Log;

@ -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.ethereum.jsonrpc.internal.parameters;
package tech.pegasys.pantheon.ethereum.api;
import tech.pegasys.pantheon.ethereum.core.LogTopic;
import tech.pegasys.pantheon.util.bytes.BytesValue;

@ -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.ethereum.graphql.internal;
package tech.pegasys.pantheon.ethereum.api;
import tech.pegasys.pantheon.ethereum.core.Hash;
import tech.pegasys.pantheon.ethereum.core.Transaction;
@ -31,7 +31,7 @@ public class TransactionWithMetadata {
this.transactionIndex = Optional.empty();
}
TransactionWithMetadata(
public TransactionWithMetadata(
final Transaction transaction,
final long blockNumber,
final Hash blockHash,

@ -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.ethereum.graphql;
package tech.pegasys.pantheon.ethereum.api.graphql;
import static com.google.common.base.Preconditions.checkNotNull;

@ -10,13 +10,13 @@
* 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.ethereum.graphql;
package tech.pegasys.pantheon.ethereum.api.graphql;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.BlockchainQuery;
import tech.pegasys.pantheon.ethereum.blockcreation.MiningCoordinator;
import tech.pegasys.pantheon.ethereum.chain.Blockchain;
import tech.pegasys.pantheon.ethereum.core.Synchronizer;
import tech.pegasys.pantheon.ethereum.eth.transactions.TransactionPool;
import tech.pegasys.pantheon.ethereum.graphql.internal.BlockchainQuery;
import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule;
import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive;

@ -10,10 +10,19 @@
* 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.ethereum.graphql;
package tech.pegasys.pantheon.ethereum.api.graphql;
import static com.google.common.base.Preconditions.checkArgument;
import tech.pegasys.pantheon.ethereum.api.BlockWithMetadata;
import tech.pegasys.pantheon.ethereum.api.TransactionWithMetadata;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.BlockchainQuery;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.pojoadapter.AccountAdapter;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.pojoadapter.NormalBlockAdapter;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.pojoadapter.PendingStateAdapter;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.pojoadapter.SyncStateAdapter;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.pojoadapter.TransactionAdapter;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.response.GraphQLError;
import tech.pegasys.pantheon.ethereum.blockcreation.MiningCoordinator;
import tech.pegasys.pantheon.ethereum.core.Account;
import tech.pegasys.pantheon.ethereum.core.Address;
@ -23,15 +32,6 @@ import tech.pegasys.pantheon.ethereum.core.Transaction;
import tech.pegasys.pantheon.ethereum.core.WorldState;
import tech.pegasys.pantheon.ethereum.eth.EthProtocol;
import tech.pegasys.pantheon.ethereum.eth.transactions.TransactionPool;
import tech.pegasys.pantheon.ethereum.graphql.internal.BlockWithMetadata;
import tech.pegasys.pantheon.ethereum.graphql.internal.BlockchainQuery;
import tech.pegasys.pantheon.ethereum.graphql.internal.TransactionWithMetadata;
import tech.pegasys.pantheon.ethereum.graphql.internal.pojoadapter.AccountAdapter;
import tech.pegasys.pantheon.ethereum.graphql.internal.pojoadapter.NormalBlockAdapter;
import tech.pegasys.pantheon.ethereum.graphql.internal.pojoadapter.PendingStateAdapter;
import tech.pegasys.pantheon.ethereum.graphql.internal.pojoadapter.SyncStateAdapter;
import tech.pegasys.pantheon.ethereum.graphql.internal.pojoadapter.TransactionAdapter;
import tech.pegasys.pantheon.ethereum.graphql.internal.response.GraphQLError;
import tech.pegasys.pantheon.ethereum.mainnet.TransactionValidator.TransactionInvalidReason;
import tech.pegasys.pantheon.ethereum.mainnet.ValidationResult;
import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.Capability;
@ -48,6 +48,7 @@ import java.util.Optional;
import java.util.OptionalInt;
import java.util.Set;
import com.google.common.base.Preconditions;
import graphql.schema.DataFetcher;
public class GraphQLDataFetchers {
@ -157,7 +158,7 @@ public class GraphQLDataFetchers {
checkArgument(block.isPresent(), "Block number %s was not found", number);
} else if (hash != null) {
block = blockchain.blockByHash(Hash.wrap(hash));
checkArgument(block.isPresent(), "Block hash %s was not found", hash);
Preconditions.checkArgument(block.isPresent(), "Block hash %s was not found", hash);
} else {
block = blockchain.latestBlock();
}
@ -175,7 +176,8 @@ public class GraphQLDataFetchers {
final Optional<WorldState> ws = blockchainQuery.getWorldState(bn);
if (ws.isPresent()) {
final Account account = ws.get().get(addr);
checkArgument(account != null, "Account with address %s does not exist", addr);
Preconditions.checkArgument(
account != null, "Account with address %s does not exist", addr);
return Optional.of(new AccountAdapter(account));
} else if (bn > blockchainQuery.getBlockchain().getChainHeadBlockNumber()) {
// block is past chainhead
@ -191,7 +193,8 @@ public class GraphQLDataFetchers {
return ows.flatMap(
ws -> {
Account account = ws.get(addr);
checkArgument(account != null, "Account with address %s does not exist", addr);
Preconditions.checkArgument(
account != null, "Account with address %s does not exist", addr);
return Optional.ofNullable(account);
})
.map(AccountAdapter::new);

@ -10,9 +10,9 @@
* 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.ethereum.graphql;
package tech.pegasys.pantheon.ethereum.api.graphql;
import tech.pegasys.pantheon.ethereum.graphql.internal.response.GraphQLError;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.response.GraphQLError;
import java.util.LinkedHashMap;
import java.util.List;

@ -10,17 +10,18 @@
* 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.ethereum.graphql;
package tech.pegasys.pantheon.ethereum.api.graphql;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.collect.Streams.stream;
import static tech.pegasys.pantheon.util.NetworkUtility.urlForSocketAddress;
import tech.pegasys.pantheon.ethereum.graphql.internal.response.GraphQLErrorResponse;
import tech.pegasys.pantheon.ethereum.graphql.internal.response.GraphQLJsonRequest;
import tech.pegasys.pantheon.ethereum.graphql.internal.response.GraphQLResponse;
import tech.pegasys.pantheon.ethereum.graphql.internal.response.GraphQLResponseType;
import tech.pegasys.pantheon.ethereum.graphql.internal.response.GraphQLSuccessResponse;
import static io.vertx.core.http.HttpMethod.GET;
import static io.vertx.core.http.HttpMethod.POST;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.response.GraphQLErrorResponse;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.response.GraphQLJsonRequest;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.response.GraphQLResponse;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.response.GraphQLResponseType;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.response.GraphQLSuccessResponse;
import tech.pegasys.pantheon.util.NetworkUtility;
import java.net.InetSocketAddress;
@ -46,7 +47,6 @@ import io.netty.handler.codec.http.HttpResponseStatus;
import io.vertx.core.Handler;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpHeaders;
import io.vertx.core.http.HttpMethod;
import io.vertx.core.http.HttpServer;
import io.vertx.core.http.HttpServerOptions;
import io.vertx.core.http.HttpServerRequest;
@ -138,11 +138,11 @@ public class GraphQLHttpService {
BodyHandler.create()
.setUploadsDirectory(dataDir.resolve("uploads").toString())
.setDeleteUploadedFilesOnEnd(true));
router.route("/").method(HttpMethod.GET).handler(this::handleEmptyRequest);
router.route("/").method(GET).handler(this::handleEmptyRequest);
router
.route("/graphql")
.method(HttpMethod.GET)
.method(HttpMethod.POST)
.method(GET)
.method(POST)
.produces(APPLICATION_JSON)
.handler(this::handleGraphQLRequest);
@ -238,7 +238,7 @@ public class GraphQLHttpService {
if (httpServer == null) {
return "";
}
return urlForSocketAddress("http", socketAddress());
return NetworkUtility.urlForSocketAddress("http", socketAddress());
}
// Facilitate remote health-checks in AWS, inter alia.

@ -10,11 +10,9 @@
* 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.ethereum.graphql;
package tech.pegasys.pantheon.ethereum.api.graphql;
import static graphql.schema.idl.TypeRuntimeWiring.newTypeWiring;
import tech.pegasys.pantheon.ethereum.graphql.internal.Scalars;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.Scalars;
import java.io.IOException;
import java.net.URL;
@ -27,6 +25,7 @@ import graphql.schema.idl.RuntimeWiring;
import graphql.schema.idl.SchemaGenerator;
import graphql.schema.idl.SchemaParser;
import graphql.schema.idl.TypeDefinitionRegistry;
import graphql.schema.idl.TypeRuntimeWiring;
public class GraphQLProvider {
@ -56,7 +55,7 @@ public class GraphQLProvider {
.scalar(Scalars.bytes32Scalar())
.scalar(Scalars.longScalar())
.type(
newTypeWiring("Query")
TypeRuntimeWiring.newTypeWiring("Query")
.dataFetcher("account", graphQLDataFetchers.getAccountDataFetcher())
.dataFetcher("block", graphQLDataFetchers.getBlockDataFetcher())
.dataFetcher("blocks", graphQLDataFetchers.getRangeBlockDataFetcher())
@ -67,7 +66,7 @@ public class GraphQLProvider {
.dataFetcher(
"protocolVersion", graphQLDataFetchers.getProtocolVersionDataFetcher()))
.type(
newTypeWiring("Mutation")
TypeRuntimeWiring.newTypeWiring("Mutation")
.dataFetcher(
"sendRawTransaction", graphQLDataFetchers.getSendRawTransactionDataFetcher()))
.build();

@ -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.ethereum.graphql;
package tech.pegasys.pantheon.ethereum.api.graphql;
class GraphQLServiceException extends RuntimeException {

@ -10,8 +10,12 @@
* 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.ethereum.graphql.internal;
package tech.pegasys.pantheon.ethereum.api.graphql.internal;
import tech.pegasys.pantheon.ethereum.api.BlockWithMetadata;
import tech.pegasys.pantheon.ethereum.api.LogWithMetadata;
import tech.pegasys.pantheon.ethereum.api.LogsQuery;
import tech.pegasys.pantheon.ethereum.api.TransactionWithMetadata;
import tech.pegasys.pantheon.ethereum.chain.Blockchain;
import tech.pegasys.pantheon.ethereum.chain.TransactionLocation;
import tech.pegasys.pantheon.ethereum.core.Block;

@ -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.ethereum.graphql.internal;
package tech.pegasys.pantheon.ethereum.api.graphql.internal;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.util.bytes.Bytes32;

@ -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.ethereum.graphql.internal;
package tech.pegasys.pantheon.ethereum.api.graphql.internal;
import tech.pegasys.pantheon.ethereum.core.Hash;
import tech.pegasys.pantheon.ethereum.core.Transaction;

@ -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.ethereum.graphql.internal.pojoadapter;
package tech.pegasys.pantheon.ethereum.api.graphql.internal.pojoadapter;
import tech.pegasys.pantheon.ethereum.core.Account;
import tech.pegasys.pantheon.ethereum.core.Address;

@ -10,10 +10,10 @@
* 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.ethereum.graphql.internal.pojoadapter;
package tech.pegasys.pantheon.ethereum.api.graphql.internal.pojoadapter;
import tech.pegasys.pantheon.ethereum.graphql.GraphQLDataFetcherContext;
import tech.pegasys.pantheon.ethereum.graphql.internal.BlockchainQuery;
import tech.pegasys.pantheon.ethereum.api.graphql.GraphQLDataFetcherContext;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.BlockchainQuery;
import graphql.schema.DataFetchingEnvironment;

@ -10,20 +10,20 @@
* 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.ethereum.graphql.internal.pojoadapter;
package tech.pegasys.pantheon.ethereum.api.graphql.internal.pojoadapter;
import tech.pegasys.pantheon.ethereum.api.BlockWithMetadata;
import tech.pegasys.pantheon.ethereum.api.LogWithMetadata;
import tech.pegasys.pantheon.ethereum.api.LogsQuery;
import tech.pegasys.pantheon.ethereum.api.TransactionWithMetadata;
import tech.pegasys.pantheon.ethereum.api.graphql.GraphQLDataFetcherContext;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.BlockchainQuery;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.core.BlockHeader;
import tech.pegasys.pantheon.ethereum.core.Hash;
import tech.pegasys.pantheon.ethereum.core.LogTopic;
import tech.pegasys.pantheon.ethereum.core.Wei;
import tech.pegasys.pantheon.ethereum.core.WorldState;
import tech.pegasys.pantheon.ethereum.graphql.GraphQLDataFetcherContext;
import tech.pegasys.pantheon.ethereum.graphql.internal.BlockWithMetadata;
import tech.pegasys.pantheon.ethereum.graphql.internal.BlockchainQuery;
import tech.pegasys.pantheon.ethereum.graphql.internal.LogWithMetadata;
import tech.pegasys.pantheon.ethereum.graphql.internal.LogsQuery;
import tech.pegasys.pantheon.ethereum.graphql.internal.TransactionWithMetadata;
import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule;
import tech.pegasys.pantheon.ethereum.transaction.CallParameter;
import tech.pegasys.pantheon.ethereum.transaction.TransactionSimulator;

@ -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.ethereum.graphql.internal.pojoadapter;
package tech.pegasys.pantheon.ethereum.api.graphql.internal.pojoadapter;
import tech.pegasys.pantheon.util.bytes.BytesValue;

@ -10,13 +10,13 @@
* 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.ethereum.graphql.internal.pojoadapter;
package tech.pegasys.pantheon.ethereum.api.graphql.internal.pojoadapter;
import tech.pegasys.pantheon.ethereum.api.LogWithMetadata;
import tech.pegasys.pantheon.ethereum.api.TransactionWithMetadata;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.BlockchainQuery;
import tech.pegasys.pantheon.ethereum.core.Hash;
import tech.pegasys.pantheon.ethereum.core.LogTopic;
import tech.pegasys.pantheon.ethereum.graphql.internal.BlockchainQuery;
import tech.pegasys.pantheon.ethereum.graphql.internal.LogWithMetadata;
import tech.pegasys.pantheon.ethereum.graphql.internal.TransactionWithMetadata;
import tech.pegasys.pantheon.util.bytes.Bytes32;
import tech.pegasys.pantheon.util.bytes.BytesValue;

@ -10,13 +10,13 @@
* 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.ethereum.graphql.internal.pojoadapter;
package tech.pegasys.pantheon.ethereum.api.graphql.internal.pojoadapter;
import tech.pegasys.pantheon.ethereum.api.BlockWithMetadata;
import tech.pegasys.pantheon.ethereum.api.TransactionWithMetadata;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.BlockchainQuery;
import tech.pegasys.pantheon.ethereum.core.BlockHeader;
import tech.pegasys.pantheon.ethereum.core.Hash;
import tech.pegasys.pantheon.ethereum.graphql.internal.BlockWithMetadata;
import tech.pegasys.pantheon.ethereum.graphql.internal.BlockchainQuery;
import tech.pegasys.pantheon.ethereum.graphql.internal.TransactionWithMetadata;
import tech.pegasys.pantheon.util.uint.UInt256;
import java.util.ArrayList;

@ -10,15 +10,15 @@
* 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.ethereum.graphql.internal.pojoadapter;
package tech.pegasys.pantheon.ethereum.api.graphql.internal.pojoadapter;
import tech.pegasys.pantheon.ethereum.api.TransactionWithMetadata;
import tech.pegasys.pantheon.ethereum.api.graphql.GraphQLDataFetcherContext;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.BlockchainQuery;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.core.Wei;
import tech.pegasys.pantheon.ethereum.core.WorldState;
import tech.pegasys.pantheon.ethereum.eth.transactions.PendingTransactions;
import tech.pegasys.pantheon.ethereum.graphql.GraphQLDataFetcherContext;
import tech.pegasys.pantheon.ethereum.graphql.internal.BlockchainQuery;
import tech.pegasys.pantheon.ethereum.graphql.internal.TransactionWithMetadata;
import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule;
import tech.pegasys.pantheon.ethereum.transaction.CallParameter;
import tech.pegasys.pantheon.ethereum.transaction.TransactionSimulator;

@ -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.ethereum.graphql.internal.pojoadapter;
package tech.pegasys.pantheon.ethereum.api.graphql.internal.pojoadapter;
import tech.pegasys.pantheon.plugin.data.SyncStatus;

@ -10,17 +10,17 @@
* 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.ethereum.graphql.internal.pojoadapter;
package tech.pegasys.pantheon.ethereum.api.graphql.internal.pojoadapter;
import tech.pegasys.pantheon.ethereum.api.LogWithMetadata;
import tech.pegasys.pantheon.ethereum.api.TransactionWithMetadata;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.BlockchainQuery;
import tech.pegasys.pantheon.ethereum.api.graphql.internal.TransactionReceiptWithMetadata;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.core.Hash;
import tech.pegasys.pantheon.ethereum.core.Transaction;
import tech.pegasys.pantheon.ethereum.core.TransactionReceipt;
import tech.pegasys.pantheon.ethereum.core.WorldState;
import tech.pegasys.pantheon.ethereum.graphql.internal.BlockchainQuery;
import tech.pegasys.pantheon.ethereum.graphql.internal.LogWithMetadata;
import tech.pegasys.pantheon.ethereum.graphql.internal.TransactionReceiptWithMetadata;
import tech.pegasys.pantheon.ethereum.graphql.internal.TransactionWithMetadata;
import tech.pegasys.pantheon.util.bytes.BytesValue;
import tech.pegasys.pantheon.util.uint.UInt256;

@ -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.ethereum.graphql.internal.pojoadapter;
package tech.pegasys.pantheon.ethereum.api.graphql.internal.pojoadapter;
import tech.pegasys.pantheon.ethereum.core.BlockHeader;
import tech.pegasys.pantheon.util.uint.UInt256;

@ -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.ethereum.graphql.internal.response;
package tech.pegasys.pantheon.ethereum.api.graphql.internal.response;
import tech.pegasys.pantheon.ethereum.mainnet.TransactionValidator.TransactionInvalidReason;

@ -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.ethereum.graphql.internal.response;
package tech.pegasys.pantheon.ethereum.api.graphql.internal.response;
import com.fasterxml.jackson.annotation.JsonIgnore;

@ -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.ethereum.graphql.internal.response;
package tech.pegasys.pantheon.ethereum.api.graphql.internal.response;
import java.util.Map;

@ -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.ethereum.graphql.internal.response;
package tech.pegasys.pantheon.ethereum.api.graphql.internal.response;
public class GraphQLNoResponse extends GraphQLResponse {

@ -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.ethereum.graphql.internal.response;
package tech.pegasys.pantheon.ethereum.api.graphql.internal.response;
import java.util.Objects;

@ -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.ethereum.graphql.internal.response;
package tech.pegasys.pantheon.ethereum.api.graphql.internal.response;
/** Various types of responses that the JSON-RPC component may produce. */
public enum GraphQLResponseType {

@ -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.ethereum.graphql.internal.response;
package tech.pegasys.pantheon.ethereum.api.graphql.internal.response;
import com.fasterxml.jackson.annotation.JsonIgnore;

@ -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.ethereum.jsonrpc;
package tech.pegasys.pantheon.ethereum.api.jsonrpc;
import java.util.ArrayList;
import java.util.Arrays;

@ -10,9 +10,9 @@
* 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.ethereum.jsonrpc;
package tech.pegasys.pantheon.ethereum.api.jsonrpc;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcError;
import java.util.Arrays;
import java.util.List;

@ -10,9 +10,9 @@
* 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.ethereum.jsonrpc;
package tech.pegasys.pantheon.ethereum.api.jsonrpc;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.mainnet.TransactionValidator.TransactionInvalidReason;
public class JsonRpcErrorConverter {

@ -10,26 +10,25 @@
* 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.ethereum.jsonrpc;
package tech.pegasys.pantheon.ethereum.api.jsonrpc;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.collect.Streams.stream;
import static java.util.stream.Collectors.toList;
import static tech.pegasys.pantheon.util.NetworkUtility.urlForSocketAddress;
import tech.pegasys.pantheon.ethereum.jsonrpc.authentication.AuthenticationService;
import tech.pegasys.pantheon.ethereum.jsonrpc.authentication.AuthenticationUtils;
import tech.pegasys.pantheon.ethereum.jsonrpc.health.HealthService;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequestId;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.exception.InvalidJsonRpcParameters;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcNoResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponseType;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcUnauthorizedResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.authentication.AuthenticationService;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.authentication.AuthenticationUtils;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.health.HealthService;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.JsonRpcRequestId;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.exception.InvalidJsonRpcParameters;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcError;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcErrorResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcNoResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcResponseType;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.response.JsonRpcUnauthorizedResponse;
import tech.pegasys.pantheon.metrics.PantheonMetricCategory;
import tech.pegasys.pantheon.nat.upnp.UpnpNatManager;
import tech.pegasys.pantheon.plugin.services.MetricsSystem;
@ -321,7 +320,7 @@ public class JsonRpcHttpService {
if (httpServer == null) {
return "";
}
return urlForSocketAddress("http", socketAddress());
return NetworkUtility.urlForSocketAddress("http", socketAddress());
}
private void handleJsonRPCRequest(final RoutingContext routingContext) {

@ -10,10 +10,101 @@
* 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.ethereum.jsonrpc;
package tech.pegasys.pantheon.ethereum.api.jsonrpc;
import tech.pegasys.pantheon.config.GenesisConfigOptions;
import tech.pegasys.pantheon.enclave.Enclave;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.filter.FilterManager;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.AdminAddPeer;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.AdminChangeLogLevel;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.AdminNodeInfo;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.AdminPeers;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.AdminRemovePeer;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.DebugAccountRange;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.DebugMetrics;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.DebugStorageRangeAt;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.DebugTraceBlock;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.DebugTraceBlockByHash;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.DebugTraceBlockByNumber;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.DebugTraceTransaction;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthAccounts;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthBlockNumber;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthCall;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthChainId;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthCoinbase;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthEstimateGas;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGasPrice;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetBalance;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetBlockByHash;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetBlockByNumber;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetBlockTransactionCountByHash;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetBlockTransactionCountByNumber;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetCode;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetFilterChanges;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetFilterLogs;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetLogs;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetProof;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetStorageAt;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetTransactionByBlockHashAndIndex;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetTransactionByBlockNumberAndIndex;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetTransactionByHash;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetTransactionCount;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetTransactionReceipt;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetUncleByBlockHashAndIndex;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetUncleByBlockNumberAndIndex;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetUncleCountByBlockHash;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetUncleCountByBlockNumber;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthGetWork;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthHashrate;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthMining;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthNewBlockFilter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthNewFilter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthNewPendingTransactionFilter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthProtocolVersion;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthSendRawTransaction;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthSendTransaction;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthSyncing;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.EthUninstallFilter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.NetEnode;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.NetListening;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.NetPeerCount;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.NetServices;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.NetVersion;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.RpcModules;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.TraceReplayBlockTransactions;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.TxPoolPantheonStatistics;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.TxPoolPantheonTransactions;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.Web3ClientVersion;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.Web3Sha3;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.miner.MinerSetCoinbase;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.miner.MinerSetEtherbase;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.miner.MinerStart;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.miner.MinerStop;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.permissioning.PermAddAccountsToWhitelist;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.permissioning.PermAddNodesToWhitelist;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.permissioning.PermGetAccountsWhitelist;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.permissioning.PermGetNodesWhitelist;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.permissioning.PermReloadPermissionsFromFile;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.permissioning.PermRemoveAccountsFromWhitelist;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.permissioning.PermRemoveNodesFromWhitelist;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.privacy.methods.eea.EeaGetTransactionCount;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.privacy.methods.eea.EeaGetTransactionReceipt;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.privacy.methods.eea.EeaPrivateNonceProvider;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.privacy.methods.eea.EeaSendRawTransaction;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.privacy.methods.priv.PrivCreatePrivacyGroup;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.privacy.methods.priv.PrivDeletePrivacyGroup;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.privacy.methods.priv.PrivFindPrivacyGroup;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.privacy.methods.priv.PrivGetPrivacyPrecompileAddress;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.privacy.methods.priv.PrivGetPrivateTransaction;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.privacy.methods.priv.PrivGetTransactionCount;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.processor.BlockReplay;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.processor.BlockTracer;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.processor.TransactionTracer;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.results.BlockResultFactory;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.websocket.WebSocketConfiguration;
import tech.pegasys.pantheon.ethereum.blockcreation.MiningCoordinator;
import tech.pegasys.pantheon.ethereum.chain.Blockchain;
import tech.pegasys.pantheon.ethereum.core.Address;
@ -21,97 +112,6 @@ import tech.pegasys.pantheon.ethereum.core.PrivacyParameters;
import tech.pegasys.pantheon.ethereum.core.Synchronizer;
import tech.pegasys.pantheon.ethereum.eth.transactions.PendingTransactions;
import tech.pegasys.pantheon.ethereum.eth.transactions.TransactionPool;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.filter.FilterManager;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.AdminAddPeer;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.AdminChangeLogLevel;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.AdminNodeInfo;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.AdminPeers;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.AdminRemovePeer;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.DebugAccountRange;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.DebugMetrics;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.DebugStorageRangeAt;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.DebugTraceBlock;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.DebugTraceBlockByHash;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.DebugTraceBlockByNumber;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.DebugTraceTransaction;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthAccounts;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthBlockNumber;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthCall;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthChainId;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthCoinbase;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthEstimateGas;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGasPrice;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetBalance;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetBlockByHash;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetBlockByNumber;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetBlockTransactionCountByHash;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetBlockTransactionCountByNumber;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetCode;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetFilterChanges;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetFilterLogs;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetLogs;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetProof;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetStorageAt;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetTransactionByBlockHashAndIndex;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetTransactionByBlockNumberAndIndex;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetTransactionByHash;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetTransactionCount;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetTransactionReceipt;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetUncleByBlockHashAndIndex;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetUncleByBlockNumberAndIndex;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetUncleCountByBlockHash;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetUncleCountByBlockNumber;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthGetWork;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthHashrate;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthMining;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthNewBlockFilter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthNewFilter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthNewPendingTransactionFilter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthProtocolVersion;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthSendRawTransaction;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthSendTransaction;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthSyncing;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.EthUninstallFilter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.NetEnode;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.NetListening;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.NetPeerCount;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.NetServices;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.NetVersion;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.RpcModules;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.TraceReplayBlockTransactions;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.TxPoolPantheonStatistics;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.TxPoolPantheonTransactions;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.Web3ClientVersion;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.Web3Sha3;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.miner.MinerSetCoinbase;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.miner.MinerSetEtherbase;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.miner.MinerStart;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.miner.MinerStop;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.permissioning.PermAddAccountsToWhitelist;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.permissioning.PermAddNodesToWhitelist;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.permissioning.PermGetAccountsWhitelist;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.permissioning.PermGetNodesWhitelist;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.permissioning.PermReloadPermissionsFromFile;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.permissioning.PermRemoveAccountsFromWhitelist;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.permissioning.PermRemoveNodesFromWhitelist;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.parameters.JsonRpcParameter;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.privacy.methods.eea.EeaGetTransactionCount;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.privacy.methods.eea.EeaGetTransactionReceipt;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.privacy.methods.eea.EeaPrivateNonceProvider;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.privacy.methods.eea.EeaSendRawTransaction;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.privacy.methods.priv.PrivCreatePrivacyGroup;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.privacy.methods.priv.PrivDeletePrivacyGroup;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.privacy.methods.priv.PrivFindPrivacyGroup;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.privacy.methods.priv.PrivGetPrivacyPrecompileAddress;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.privacy.methods.priv.PrivGetPrivateTransaction;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.privacy.methods.priv.PrivGetTransactionCount;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.processor.BlockReplay;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.processor.BlockTracer;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.processor.TransactionTracer;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.results.BlockResultFactory;
import tech.pegasys.pantheon.ethereum.jsonrpc.websocket.WebSocketConfiguration;
import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule;
import tech.pegasys.pantheon.ethereum.mainnet.ScheduleBasedBlockHeaderFunctions;
import tech.pegasys.pantheon.ethereum.p2p.network.P2PNetwork;

@ -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.ethereum.jsonrpc;
package tech.pegasys.pantheon.ethereum.api.jsonrpc;
public class JsonRpcServiceException extends RuntimeException {

@ -10,11 +10,11 @@
* 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.ethereum.jsonrpc;
package tech.pegasys.pantheon.ethereum.api.jsonrpc;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.core.Address;
import tech.pegasys.pantheon.ethereum.eth.transactions.PendingTransactions;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.queries.BlockchainQueries;
import tech.pegasys.pantheon.ethereum.util.NonceProvider;
import java.util.OptionalLong;

@ -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.ethereum.jsonrpc;
package tech.pegasys.pantheon.ethereum.api.jsonrpc;
import java.util.Objects;

@ -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.ethereum.jsonrpc;
package tech.pegasys.pantheon.ethereum.api.jsonrpc;
import java.util.Arrays;
import java.util.List;

@ -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.ethereum.jsonrpc;
package tech.pegasys.pantheon.ethereum.api.jsonrpc;
import java.util.ArrayList;
import java.util.Collection;

@ -10,9 +10,9 @@
* 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.ethereum.jsonrpc;
package tech.pegasys.pantheon.ethereum.api.jsonrpc;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.JsonRpcMethod;
import tech.pegasys.pantheon.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import java.util.Map;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save