Skip to content

Commit

Permalink
Reduce EVM library dependencies (hyperledger#3832)
Browse files Browse the repository at this point in the history
* Reduce EVM library dependencies

Reduce the runtime dependencies of the EVM module by moving a
class used by a single class out of util to the owned module (QosTimer)
and them removing un-used dependencies from EVM and dependant modules.

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
  • Loading branch information
shemnon authored May 16, 2022
1 parent 0173ad3 commit daf680c
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 20 deletions.
3 changes: 0 additions & 3 deletions crypto/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ jar {

dependencies {
api project(':plugin-api')
api project(':util')

api 'org.bouncycastle:bcprov-jdk15on'
api 'org.slf4j:slf4j-api'

implementation 'com.google.guava:guava'
implementation 'net.java.dev.jna:jna'
implementation 'org.apache.tuweni:tuweni-bytes'
implementation 'org.apache.tuweni:tuweni-units'
Expand All @@ -44,7 +42,6 @@ dependencies {
testImplementation 'junit:junit'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.mockito:mockito-core'

testRuntimeOnly 'org.junit.vintage:junit-vintage-engine'
}
Expand Down
3 changes: 0 additions & 3 deletions datatypes/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ dependencies {
implementation project(':crypto')
implementation project(':ethereum:rlp')

implementation 'org.apache.tuweni:tuweni-bytes'
implementation 'org.apache.tuweni:tuweni-units'

testImplementation 'junit:junit'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.hyperledger.besu.util;
package org.hyperledger.besu.ethereum.api.jsonrpc.internal;

import java.util.concurrent.atomic.AtomicLong;
import java.util.function.Consumer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
import org.hyperledger.besu.datatypes.Hash;
import org.hyperledger.besu.ethereum.ProtocolContext;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequestContext;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.QosTimer;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.ExecutionEngineJsonRpcMethod;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters.EngineExchangeTransitionConfigurationParameter;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcSuccessResponse;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.EngineExchangeTransitionConfigurationResult;
import org.hyperledger.besu.ethereum.core.BlockHeader;
import org.hyperledger.besu.util.QosTimer;

import java.util.Optional;
import java.util.concurrent.atomic.AtomicReference;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.hyperledger.besu.util;
package org.hyperledger.besu.ethereum.api.jsonrpc.internal;

import java.util.concurrent.atomic.AtomicInteger;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.hyperledger.besu.ethereum.api.jsonrpc.RpcMethod;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequest;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequestContext;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.QosTimer;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters.EngineExchangeTransitionConfigurationParameter;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters.UnsignedLongParameter;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcResponse;
Expand All @@ -41,7 +42,6 @@
import org.hyperledger.besu.ethereum.core.Difficulty;
import org.hyperledger.besu.ethereum.core.ParsedExtraData;
import org.hyperledger.besu.evm.log.LogsBloomFilter;
import org.hyperledger.besu.util.QosTimer;

import java.util.Map;
import java.util.Optional;
Expand Down
1 change: 1 addition & 0 deletions ethereum/p2p/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ dependencies {
implementation project(':pki')
implementation project(':metrics:core')
implementation project(':nat')
implementation project(':util')

implementation 'com.google.guava:guava'
implementation 'dnsjava:dnsjava'
Expand Down
4 changes: 0 additions & 4 deletions ethereum/rlp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ jar {
dependencies {
annotationProcessor 'org.openjdk.jmh:jmh-generator-annprocess'

api project(':plugin-api')
api project(':util')

implementation 'com.google.guava:guava'
implementation 'org.apache.tuweni:tuweni-bytes'
implementation 'org.apache.tuweni:tuweni-units'

Expand Down
6 changes: 0 additions & 6 deletions util/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,11 @@ jar {
dependencies {
api 'org.slf4j:slf4j-api'

implementation project(':plugin-api')

implementation 'com.google.guava:guava'
implementation 'io.vertx:vertx-core'
implementation 'org.apache.logging.log4j:log4j-core'
implementation 'org.apache.logging.log4j:log4j-slf4j-impl'
implementation 'org.apache.tuweni:tuweni-bytes'
implementation 'org.apache.tuweni:tuweni-units'
implementation 'org.xerial.snappy:snappy-java'

testImplementation 'io.vertx:vertx-unit'
testImplementation 'junit:junit'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter'
Expand Down

0 comments on commit daf680c

Please sign in to comment.