Skip to content

Commit

Permalink
Merge branch 'main' into pectra-devnet-4
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
  • Loading branch information
daniellehrner committed Oct 24, 2024
2 parents 8ab3aac + f16d352 commit 9ebc32b
Show file tree
Hide file tree
Showing 86 changed files with 2,058 additions and 1,750 deletions.
31 changes: 20 additions & 11 deletions .github/ISSUE_TEMPLATE/release-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,34 @@ assignees: ''
- [ ] Notify maintainers about updating changelog for in-flight PRs
- [ ] Optional: for hotfixes, create a release branch and cherry-pick, e.g. `release-<version>-hotfix`
- [ ] Optional: for hotfixes, create a PR into main from the hotfix branch to see the CI checks pass
- [ ] On the appropriate branch/commit, create a calver tag for the release candidate, format example: `24.4.0-RC2`
- [ ] git tag 24.4.0-RC2
- [ ] git push upstream 24.4.0-RC2
- [ ] On the appropriate branch/commit, create a calver tag for the release candidate, format example: `24.4.0-RC1`
- [ ] git tag 24.4.0-RC1
- [ ] git push upstream 24.4.0-RC1
- [ ] Sign-off with team; announce the tag in #besu-release in Discord
- [ ] Targeting this tag for the burn-in: https://github.com/hyperledger/besu/releases/tag/24.4.0-RC2
- [ ] Targeting this tag for the burn-in: https://github.com/hyperledger/besu/releases/tag/24.4.0-RC1
- [ ] Consensys staff start burn-in using this tag
- [ ] Seek sign off for burn-in
- [ ] Pass? Go ahead and complete the release process
- [ ] Fail? Put a message in #besu-release in Discord indicating the release will be aborted because it failed burn-in
- [ ] Using the same git sha, create a calver tag for the FULL RELEASE, example format `24.4.0`
- [ ] Using the FULL RELEASE tag, create a release in github to trigger the workflows. Once published:
- [ ] Optional: Perform a dry run with https://github.com/consensys/protocols-release-sandbox to test the workflows
- [ ] Sync fork
- [ ] git checkout <sha of 24.4.0-RC1>
- [ ] git tag 24.4.0
- [ ] git push origin 24.4.0
- [ ] Manually run https://github.com/Consensys/protocols-release-sandbox/actions/workflows/draft-release.yml using `main` branch and `24.4.0` tag
- [ ] Back on besu, using the same git sha as 24.4.0-RC1, create a calver tag for the FULL RELEASE, example format `24.4.0`
- [ ] git checkout 24.4.0-RC1
- [ ] git tag 24.4.0
- [ ] git push upstream 24.4.0
- [ ] Manually run https://github.com/hyperledger/besu/actions/workflows/draft-release.yml using `main` branch` and the FULL RELEASE tag name, i.e. `24.4.0`. Note, this workflow should always be run from `main` branch (hotfix tags will still be released even if they were created based on another branch)
- publishes artefacts and version-specific docker tags but does not fully publish the GitHub release so subscribers are not yet notified
- [ ] Check all draft-release workflow jobs went green
- [ ] Check binary SHAs are correct on the release page
- [ ] Update release notes in the GitHub draft release, save draft and sign-off with team
- [ ] Publish draft release ensuring it is marked as latest release (if appropriate)
- this is now public and notifies subscribed users
- makes the release "latest" in github
- publishes artefacts and version-specific docker tags
- publishes the docker `latest` tag variants
- [ ] Check binary SHAs are correct on the release page
- [ ] Check "Container Verify" GitHub workflow has run successfully
- [ ] Update the besu-docs version [update-version workflow](https://github.com/hyperledger/besu-docs/actions/workflows/update-version.yml)
- If the PR has not been automatically created, create the PR manually using the created branch `besu-version-<version>`
- [ ] Create homebrew release using [update-version workflow](https://github.com/hyperledger/homebrew-besu/actions/workflows/update-version.yml)
- If the PR has not been automatically created, create the PR manually using the created branch `update-<version>`
- Run commands `brew tap hyperledger/besu && brew install besu` on MacOSX and verify latest version has been installed
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

### Additions and Improvements
- Fine tune already seen txs tracker when a tx is removed from the pool [#7755](https://github.com/hyperledger/besu/pull/7755)
- Create and publish Besu BOM (Bill of Materials) [#7615](https://github.com/hyperledger/besu/pull/7615)
- Update Java dependencies [#7786](https://github.com/hyperledger/besu/pull/7786)

### Bug fixes

Expand Down
1 change: 0 additions & 1 deletion acceptance-tests/dsl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ dependencies {
implementation 'info.picocli:picocli'
implementation 'io.reactivex.rxjava2:rxjava'
implementation 'io.vertx:vertx-core'
implementation 'junit:junit'
implementation 'io.opentelemetry:opentelemetry-api'
implementation 'io.tmio:tuweni-bytes'
implementation 'io.tmio:tuweni-io'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
package org.hyperledger.besu.tests.acceptance.dsl.condition.blockchain;

import static junit.framework.TestCase.fail;
import static org.junit.jupiter.api.Assertions.fail;

import org.hyperledger.besu.tests.acceptance.dsl.condition.Condition;
import org.hyperledger.besu.tests.acceptance.dsl.node.Node;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import org.hyperledger.besu.ethereum.worldstate.DataStorageConfiguration;
import org.hyperledger.besu.ethereum.worldstate.WorldStateArchive;
import org.hyperledger.besu.evm.internal.EvmConfiguration;
import org.hyperledger.besu.metrics.MetricCategoryRegistryImpl;
import org.hyperledger.besu.metrics.MetricsSystemModule;
import org.hyperledger.besu.metrics.ObservableMetricsSystem;
import org.hyperledger.besu.metrics.prometheus.MetricsConfiguration;
Expand All @@ -71,6 +72,7 @@
import org.hyperledger.besu.plugin.services.TransactionPoolValidatorService;
import org.hyperledger.besu.plugin.services.TransactionSelectionService;
import org.hyperledger.besu.plugin.services.TransactionSimulationService;
import org.hyperledger.besu.plugin.services.metrics.MetricCategoryRegistry;
import org.hyperledger.besu.plugin.services.storage.rocksdb.RocksDBPlugin;
import org.hyperledger.besu.services.BesuConfigurationImpl;
import org.hyperledger.besu.services.BesuEventsImpl;
Expand Down Expand Up @@ -396,6 +398,12 @@ TransactionSimulationServiceImpl provideTransactionSimulationService(
retval.init(blockchain, transactionSimulator);
return retval;
}

@Provides
@Singleton
MetricCategoryRegistryImpl provideMetricCategoryRegistry() {
return new MetricCategoryRegistryImpl();
}
}

@Module
Expand Down Expand Up @@ -476,6 +484,8 @@ public BesuPluginContextImpl providePluginContext(
final RpcEndpointServiceImpl rpcEndpointServiceImpl,
final BesuConfiguration commonPluginConfiguration,
final PermissioningServiceImpl permissioningService,
final MetricCategoryRegistryImpl metricCategoryRegistry,
final MetricsSystem metricsSystem,
final @Named("ExtraCLIOptions") List<String> extraCLIOptions,
final @Named("RequestedPlugins") List<String> requestedPlugins) {
final CommandLine commandLine = new CommandLine(CommandSpec.create());
Expand All @@ -492,6 +502,8 @@ public BesuPluginContextImpl providePluginContext(
TransactionSimulationService.class, transactionSimulationServiceImpl);
besuPluginContext.addService(BlockchainService.class, blockchainServiceImpl);
besuPluginContext.addService(BesuConfiguration.class, commonPluginConfiguration);
besuPluginContext.addService(MetricCategoryRegistry.class, metricCategoryRegistry);
besuPluginContext.addService(MetricsSystem.class, metricsSystem);

final Path pluginsPath;
final String pluginDir = System.getProperty("besu.plugins.dir");
Expand Down
2 changes: 0 additions & 2 deletions acceptance-tests/test-plugins/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ dependencies {

testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter'

testRuntimeOnly 'org.junit.vintage:junit-vintage-engine'
}

task testPluginsJar(type: Jar) {
Expand Down
18 changes: 10 additions & 8 deletions acceptance-tests/tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ dependencies {
testImplementation 'io.opentracing:opentracing-api'
testImplementation 'io.opentracing:opentracing-util'
testImplementation 'io.vertx:vertx-core'
testImplementation 'junit:junit'
testImplementation 'org.apache.commons:commons-compress'
testImplementation 'org.apache.logging.log4j:log4j-core'
testImplementation 'io.tmio:tuweni-crypto'
Expand All @@ -81,8 +80,6 @@ dependencies {
testImplementation 'org.web3j:core'
testImplementation 'org.wiremock:wiremock'
testImplementation project(path: ':acceptance-tests:tests:shanghai')

testRuntimeOnly 'org.junit.vintage:junit-vintage-engine'
}

test.enabled = false
Expand All @@ -106,7 +103,8 @@ task acceptanceTest(type: Test) {
setSystemProperties(test.getSystemProperties())
systemProperty 'acctests.runBesuAsProcess', 'true'
systemProperty 'java.security.properties', "${buildDir}/resources/test/acceptanceTesting.security"
mustRunAfter rootProject.subprojects*.test
def javaProjects = rootProject.subprojects - project(':platform')
mustRunAfter javaProjects.test
description = 'Runs ALL Besu acceptance tests (mainnet and non-mainnet).'
group = 'verification'

Expand Down Expand Up @@ -135,7 +133,8 @@ task acceptanceTestNotPrivacy(type: Test) {
setSystemProperties(test.getSystemProperties())
systemProperty 'acctests.runBesuAsProcess', 'true'
systemProperty 'java.security.properties', "${buildDir}/resources/test/acceptanceTesting.security"
mustRunAfter rootProject.subprojects*.test
def javaProjects = rootProject.subprojects - project(':platform')
mustRunAfter javaProjects.test
description = 'Runs MAINNET Besu acceptance tests (excluding specific non-mainnet suites).'
group = 'verification'

Expand Down Expand Up @@ -163,7 +162,8 @@ task acceptanceTestCliqueBft(type: Test) {
setSystemProperties(test.getSystemProperties())
systemProperty 'acctests.runBesuAsProcess', 'true'
systemProperty 'java.security.properties', "${buildDir}/resources/test/acceptanceTesting.security"
mustRunAfter rootProject.subprojects*.test
def javaProjects = rootProject.subprojects - project(':platform')
mustRunAfter javaProjects.test
description = 'Runs Clique and BFT Besu acceptance tests.'
group = 'verification'

Expand Down Expand Up @@ -192,7 +192,8 @@ task acceptanceTestBftSoak(type: Test) {
// Set to any time > 60 minutes to run the soak test for longer
// systemProperty 'acctests.soakTimeMins', '120'
systemProperty 'java.security.properties', "${buildDir}/resources/test/acceptanceTesting.security"
mustRunAfter rootProject.subprojects*.test
def javaProjects = rootProject.subprojects - project(':platform')
mustRunAfter javaProjects.test
description = 'Runs BFT soak test.'
group = 'verification'

Expand All @@ -219,7 +220,8 @@ task acceptanceTestPermissioning(type: Test) {
setSystemProperties(test.getSystemProperties())
systemProperty 'acctests.runBesuAsProcess', 'true'
systemProperty 'java.security.properties', "${buildDir}/resources/test/acceptanceTesting.security"
mustRunAfter rootProject.subprojects*.test
def javaProjects = rootProject.subprojects - project(':platform')
mustRunAfter javaProjects.test
description = 'Runs Permissioning Besu acceptance tests.'
group = 'verification'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package org.hyperledger.besu.tests.acceptance.crypto;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assumptions.assumeThat;
import static org.junit.jupiter.api.Assumptions.assumeTrue;

import org.hyperledger.besu.crypto.KeyPair;
import org.hyperledger.besu.crypto.SECP256R1;
Expand Down Expand Up @@ -80,7 +80,7 @@ public void transactionShouldBeSuccessful() {
// the signature algorithm instance to SECP256R1 as it could influence other tests running at
// the same time. So we only execute the test when ProcessBesuNodeRunner is used, as there is
// not conflict because we use separate processes.
assumeThat(BesuNodeRunner.isProcessBesuNodeRunner()).isTrue();
assumeTrue(BesuNodeRunner.isProcessBesuNodeRunner());

minerNode.verify(net.awaitPeerCount(1));
otherNode.verify(net.awaitPeerCount(1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
import java.io.IOException;
import java.util.Optional;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import okhttp3.Call;
import okhttp3.MediaType;
Expand Down Expand Up @@ -74,17 +76,15 @@ public void buildNewBlock() throws IOException {
final Call getPayloadRequest = createEngineCall(createGetPayloadRequest(payloadId));

final ObjectNode executionPayload;
final ArrayNode executionRequests;
final String newBlockHash;
final String parentBeaconBlockRoot;
try (final Response getPayloadResponse = getPayloadRequest.execute()) {
assertThat(getPayloadResponse.code()).isEqualTo(200);

executionPayload =
(ObjectNode)
mapper
.readTree(getPayloadResponse.body().string())
.get("result")
.get("executionPayload");
JsonNode result = mapper.readTree(getPayloadResponse.body().string()).get("result");
executionPayload = (ObjectNode) result.get("executionPayload");
executionRequests = (ArrayNode) result.get("executionRequests");

newBlockHash = executionPayload.get("blockHash").asText();
parentBeaconBlockRoot = executionPayload.remove("parentBeaconBlockRoot").asText();
Expand All @@ -94,7 +94,8 @@ public void buildNewBlock() throws IOException {

final Call newPayloadRequest =
createEngineCall(
createNewPayloadRequest(executionPayload.toString(), parentBeaconBlockRoot));
createNewPayloadRequest(
executionPayload.toString(), parentBeaconBlockRoot, executionRequests.toString()));
try (final Response newPayloadResponse = newPayloadRequest.execute()) {
assertThat(newPayloadResponse.code()).isEqualTo(200);
}
Expand Down Expand Up @@ -168,7 +169,9 @@ private String createGetPayloadRequest(final String payloadId) {
}

private String createNewPayloadRequest(
final String executionPayload, final String parentBeaconBlockRoot) {
final String executionPayload,
final String parentBeaconBlockRoot,
final String executionRequests) {
return "{"
+ " \"jsonrpc\": \"2.0\","
+ " \"method\": \"engine_newPayloadV4\","
Expand All @@ -178,6 +181,8 @@ private String createNewPayloadRequest(
+ "\""
+ parentBeaconBlockRoot
+ "\""
+ ","
+ executionRequests
+ "],"
+ " \"id\": 67"
+ "}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@
import org.hyperledger.besu.tests.acceptance.dsl.account.Account;
import org.hyperledger.besu.tests.acceptance.dsl.node.Node;

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

public class MiningAcceptanceTest extends AcceptanceTestBase {
class MiningAcceptanceTest extends AcceptanceTestBase {

private Node minerNode;

@Before
@BeforeEach
public void setUp() throws Exception {
minerNode = besu.createMinerNode("miner1");
cluster.start(minerNode);
}

@Test
public void shouldMineTransactions() {
void shouldMineTransactions() {
final Account sender = accounts.createAccount("account1");
final Account receiver = accounts.createAccount("account2");
minerNode.execute(accountTransactions.createTransfer(sender, 50));
Expand Down
12 changes: 7 additions & 5 deletions acceptance-tests/tests/src/test/resources/dev/dev_prague.json

Large diffs are not rendered by default.

Loading

0 comments on commit 9ebc32b

Please sign in to comment.