Skip to content

Commit

Permalink
Merge branch 'main' of github.com:hyperledger/besu into pki-junit-5
Browse files Browse the repository at this point in the history
  • Loading branch information
macfarla committed Dec 7, 2023
2 parents ae64d72 + 1774b4e commit deaff95
Show file tree
Hide file tree
Showing 28 changed files with 83 additions and 51 deletions.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,11 @@ workflows:
- acceptanceTestsCliqueBft:
requires:
- assemble
- acceptanceTests
- acceptanceTestsPermissioning:
requires:
- assemble
- acceptanceTestsCliqueBft
- buildDocker:
requires:
- assemble
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 23.10.4

### Breaking Changes

### Deprecations
- Forest pruning (`pruning-enabled` options) is deprecated and will be removed soon. To save disk space consider switching to Bonsai data storage format [#6230](https://github.com/hyperledger/besu/pull/6230)

### Additions and Improvements
- Add error messages on authentication failures with username and password [#6212](https://github.com/hyperledger/besu/pull/6212)

### Bug fixes


## 23.10.3

### Breaking Changes
Expand Down
5 changes: 5 additions & 0 deletions besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -2059,6 +2059,11 @@ private void issueOptionWarnings() {
"--privacy-onchain-groups-enabled",
"--privacy-flexible-groups-enabled");
}

if (isPruningEnabled()) {
logger.warn(
"Forest pruning is deprecated and will be removed soon. To save disk space consider switching to Bonsai data storage format.");
}
}

private void configure() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ private List<TransactionProcessingResult> trace(
.orElse(BlobGas.ZERO));

final WorldUpdater worldUpdater = chainUpdater.getNextUpdater();
tracer.traceStartTransaction(worldUpdater, transaction);
final TransactionProcessingResult result =
transactionProcessor.processTransaction(
blockchain,
Expand All @@ -225,16 +224,6 @@ private List<TransactionProcessingResult> trace(
false,
blobGasPrice);

long transactionGasUsed = transaction.getGasLimit() - result.getGasRemaining();
tracer.traceEndTransaction(
worldUpdater,
transaction,
result.isSuccessful(),
result.getOutput(),
result.getLogs(),
transactionGasUsed,
0);

results.add(result);
});

Expand Down
2 changes: 1 addition & 1 deletion besu/src/test/java/org/hyperledger/besu/PrivacyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class PrivacyTest {

private final Vertx vertx = Vertx.vertx();

@TempDir private static Path dataDir;
@TempDir private Path dataDir;

@AfterEach
public void cleanUp() {
Expand Down
15 changes: 15 additions & 0 deletions besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3815,6 +3815,21 @@ public void pruningParametersAreCaptured() throws Exception {
assertThat(pruningArg.getValue().getBlockConfirmations()).isEqualTo(4);
}

@Test
public void pruningLogsDeprecationWarning() {
parseCommand("--pruning-enabled");

verify(mockControllerBuilder).isPruningEnabled(true);

assertThat(commandOutput.toString(UTF_8)).isEmpty();
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
verify(mockLogger)
.warn(
contains(
"Forest pruning is deprecated and will be removed soon."
+ " To save disk space consider switching to Bonsai data storage format."));
}

@Test
public void devModeOptionMustBeUsed() throws Exception {
parseCommand("--network", "dev");
Expand Down
1 change: 0 additions & 1 deletion crypto/algorithms/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ dependencies {
implementation 'org.hyperledger.besu:blake2bf'
implementation 'com.google.guava:guava'

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 @@ -20,7 +20,7 @@
import java.security.spec.ECPoint;

import org.apache.tuweni.bytes.Bytes;
import org.junit.Test;
import org.junit.jupiter.api.Test;

public class ECPointUtilTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import org.apache.tuweni.bytes.Bytes;
import org.bouncycastle.util.encoders.Hex;
import org.junit.Test;
import org.junit.jupiter.api.Test;

public class HashTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import org.bouncycastle.asn1.x9.X9ECParameters;
import org.bouncycastle.crypto.params.ECDomainParameters;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

public class KeyPairTest {
public static final String ALGORITHM = SignatureAlgorithm.ALGORITHM;
Expand All @@ -39,7 +39,7 @@ public class KeyPairTest {
public static KeyPairGenerator keyPairGenerator;
public static ECDomainParameters curve;

@BeforeClass
@BeforeAll
public static void setUp() {
Security.addProvider(new BouncyCastleProvider());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import java.io.File;

import org.junit.Test;
import org.junit.jupiter.api.Test;

public class KeyPairUtilTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

import org.apache.tuweni.bytes.Bytes;
import org.apache.tuweni.bytes.Bytes32;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

public class SECP256K1Test {

Expand All @@ -39,15 +39,15 @@ public class SECP256K1Test {
protected static String suiteStartTime = null;
protected static String suiteName = null;

@BeforeClass
@BeforeAll
public static void setTestSuiteStartTime() {
suiteStartTime =
LocalDateTime.now(ZoneId.systemDefault())
.format(DateTimeFormatter.ofPattern("yyyyMMdd-HHmmss"));
suiteName(SECP256K1Test.class);
}

@Before
@BeforeEach
public void setUp() {
secp256K1 = new SECP256K1();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@

import org.apache.tuweni.bytes.Bytes;
import org.apache.tuweni.bytes.Bytes32;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

public class SECP256R1Test {

Expand Down Expand Up @@ -103,7 +103,7 @@ public class SECP256R1Test {
protected static String suiteStartTime = null;
protected static String suiteName = null;

@BeforeClass
@BeforeAll
public static void setTestSuiteStartTime() {
suiteStartTime =
LocalDateTime.now(ZoneId.systemDefault())
Expand All @@ -113,7 +113,7 @@ public static void setTestSuiteStartTime() {
SignatureAlgorithmFactory.setInstance(SignatureAlgorithmType.create("secp256r1"));
}

@Before
@BeforeEach
public void setUp() {
secp256R1 = new SECP256R1();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
import org.bouncycastle.asn1.sec.SECNamedCurves;
import org.bouncycastle.asn1.x9.X9ECParameters;
import org.bouncycastle.crypto.params.ECDomainParameters;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

public class SECPPrivateKeyTest {
public static final String ALGORITHM = SignatureAlgorithm.ALGORITHM;
Expand All @@ -40,7 +40,7 @@ public class SECPPrivateKeyTest {
protected static String suiteName = null;
public static ECDomainParameters curve;

@BeforeClass
@BeforeAll
public static void setUp() {
suiteStartTime =
LocalDateTime.now(ZoneId.systemDefault())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@
import org.bouncycastle.asn1.sec.SECNamedCurves;
import org.bouncycastle.asn1.x9.X9ECParameters;
import org.bouncycastle.crypto.params.ECDomainParameters;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

public class SECPPublicKeyTest {
public static final String ALGORITHM = SignatureAlgorithm.ALGORITHM;
public static final String CURVE_NAME = "secp256k1";

public ECDomainParameters curve;

@Before
@BeforeEach
public void setUp() {
final X9ECParameters params = SECNamedCurves.getByName(CURVE_NAME);
curve = new ECDomainParameters(params.getCurve(), params.getG(), params.getN(), params.getH());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
import org.bouncycastle.asn1.sec.SECNamedCurves;
import org.bouncycastle.asn1.x9.X9ECParameters;
import org.bouncycastle.crypto.params.ECDomainParameters;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

public class SECPSignatureTest {
public static final String CURVE_NAME = "secp256k1";

public static BigInteger curveOrder;

@BeforeClass
@BeforeAll
public static void setUp() {
final X9ECParameters params = SECNamedCurves.getByName(CURVE_NAME);
final ECDomainParameters curve =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy;

import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

public class SignatureAlgorithmFactoryTest {

@Before
@BeforeEach
public void setUp() {
SignatureAlgorithmFactory.resetInstance();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;

import org.junit.Test;
import org.junit.jupiter.api.Test;

public class SignatureAlgorithmTypeTest {
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import java.math.BigInteger;

import org.junit.Test;
import org.junit.jupiter.api.Test;

/**
* Adapted from the pc_ecc (Apache 2 License) implementation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import java.math.BigInteger;

import org.junit.Test;
import org.junit.jupiter.api.Test;

/**
* Adapted from the pc_ecc (Apache 2 License) implementation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import java.math.BigInteger;

import org.junit.Test;
import org.junit.jupiter.api.Test;

/**
* Adapted from the pc_ecc (Apache 2 License) implementation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import java.math.BigInteger;

import org.junit.Test;
import org.junit.jupiter.api.Test;

/**
* Adapted from the pc_ecc (Apache 2 License) implementation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.Test;
import org.junit.jupiter.api.Test;

/**
* Adapted from the pc_ecc (Apache 2 License) implementation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import java.math.BigInteger;

import org.junit.Test;
import org.junit.jupiter.api.Test;

/**
* Adapted from the pc_ecc (Apache 2 License) implementation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import java.math.BigInteger;

import org.junit.Test;
import org.junit.jupiter.api.Test;

/**
* Adapted from the pc_ecc (Apache 2 License) implementation:
Expand Down
2 changes: 0 additions & 2 deletions docker/openjdk-17-debug/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ ENV BESU_GRAPHQL_HTTP_HOST 0.0.0.0
ENV BESU_METRICS_HOST 0.0.0.0
ENV BESU_JMX_HOST 0.0.0.0
ENV BESU_PID_PATH "/tmp/pid"
ENV BESU_HOST_ALLOWLIST "*"

#debug options for maximum observability
ENV BESU_LOGGING "INFO"
ENV BESU_RPC_HTTP_API "ETH,NET,TRACE,DEBUG,ADMIN,TXPOOL"
ENV JDWP_OPTS "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
ENV JAVA_OPTS "${JDWP_OPTS} "

Expand Down
10 changes: 10 additions & 0 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3989,6 +3989,11 @@
<sha256 value="5f7e01a94adbd52546c0d03af525697197165e36b73d914c6a05e3aab8905e6e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.eclipse.platform" name="org.eclipse.core.expressions" version="3.9.200">
<artifact name="org.eclipse.core.expressions-3.9.200.pom">
<sha256 value="74e5f0e9f0d7fc442396ca959e738d1ad9b622e945ad3cd9a323bb8cdfea9826" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.eclipse.platform" name="org.eclipse.core.filesystem" version="1.9.100">
<artifact name="org.eclipse.core.filesystem-1.9.100.jar">
<sha256 value="36e802c4d9a2c864e7d6b22b8d06f59927d113475ea04b3fd9bf6312d5a97ff6" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -4082,6 +4087,11 @@
<sha256 value="e6a79e8bc53281ecbe3433a52c713b75ba8fa06e03b9f279b027f68ba078085e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.eclipse.platform" name="org.eclipse.swt" version="3.124.200">
<artifact name="org.eclipse.swt-3.124.200.pom">
<sha256 value="4d87cb2d94dab15fba1564ae574b60988939c76176d86882847332dcea6a3f77" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.eclipse.platform" name="org.eclipse.text" version="3.12.0">
<artifact name="org.eclipse.text-3.12.0.jar">
<sha256 value="457c1f8af07e870acce65130a2d9aa1e0fd95c92a7667bbd2db5bf7f9f19dd31" origin="Generated by Gradle"/>
Expand Down
Loading

0 comments on commit deaff95

Please sign in to comment.