Skip to content

Commit

Permalink
Merge branch 'main' into zkbesu
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/release.yml
#	besu/src/main/java/org/hyperledger/besu/controller/BesuController.java
#	ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthEstimateGas.java
#	ethereum/evmtool/build.gradle
#	evm/src/main/java/org/hyperledger/besu/evm/EvmSpecVersion.java
#	gradle/verification-metadata.xml
#	plugin-api/build.gradle
  • Loading branch information
fab-10 committed Jul 16, 2024
2 parents 752aeff + 465fd1c commit b19ae8c
Show file tree
Hide file tree
Showing 703 changed files with 12,711 additions and 7,687 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/BesuContainerVerify.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/bin/bash
##
## Copyright contributors to Hyperledger Besu.
##
## Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
## the License. You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
## 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.
##
## SPDX-License-Identifier: Apache-2.0
##

CONTAINER_NAME=${CONTAINER_NAME:-besu}
VERSION=${VERSION}
TAG=${TAG}
CHECK_LATEST=${CHECK_LATEST}
RETRY=${RETRY:-10}
SLEEP=${SLEEP:-5}

# Helper function to throw error
log_error() {
echo "::error $1"
exit 1
}

# Check container is in running state
_RUN_STATE=$(docker inspect --type=container -f={{.State.Status}} ${CONTAINER_NAME})
if [[ "${_RUN_STATE}" != "running" ]]
then
log_error "container is not running"
fi

# Check for specific log message in container logs to verify besu started
_SUCCESS=false
while [[ ${_SUCCESS} != "true" && $RETRY -gt 0 ]]
do
docker logs ${CONTAINER_NAME} | grep -q "Ethereum main loop is up" && {
_SUCCESS=true
continue
}
echo "Waiting for the besu to start. Remaining retries $RETRY ..."
RETRY=$(expr $RETRY - 1)
sleep $SLEEP
done

# Log entry does not present after all retries, fail the script with a message
if [[ ${_SUCCESS} != "true" ]]
then
docker logs --tail=100 ${CONTAINER_NAME}
log_error "could not find the log message 'Ethereum main loop is up'"
else
echo "Besu container started and entered main loop"
fi

# For the latest tag check the version match
if [[ ${TAG} == "latest" && ${CHECK_LATEST} == "true" ]]
then
_VERSION_IN_LOG=$(docker logs ${CONTAINER_NAME} | grep "#" | grep "Besu version" | cut -d " " -f 4 | sed 's/\s//g')
echo "Extracted version from logs [$_VERSION_IN_LOG]"
if [[ "$_VERSION_IN_LOG" != "${VERSION}" ]]
then
log_error "version [$_VERSION_IN_LOG] extracted from container logs does not match the expected version [${VERSION}]"
else
echo "Latest Besu container version matches"
fi
fi
5 changes: 4 additions & 1 deletion .github/workflows/container-security-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ on:
required: false
default: 'develop'
schedule:
# Start of the hour is the busy time. Scheule it to run 8:17am UTC
# Start of the hour is the busy time. Schedule it to run 8:17am UTC
- cron: '17 8 * * *'

jobs:
scan-sarif:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write

steps:
- name: Checkout
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/container-verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: container verify

on:
workflow_dispatch:
inputs:
version:
description: 'Besu version'
required: true
verify-latest-version:
description: 'Check latest container version'
required: false
type: choice
default: "true"
options:
- "true"
- "false"

jobs:
verify:
timeout-minutes: 4
strategy:
matrix:
combination:
- tag: ${{ inputs.version }}
platform: ''
runner: ubuntu-latest
- tag: ${{ inputs.version }}-amd64
platform: 'linux/amd64'
runner: ubuntu-latest
- tag: latest
platform: ''
runner: ubuntu-latest
- tag: ${{ inputs.version }}-arm64
platform: ''
runner: besu-arm64
runs-on: ${{ matrix.combination.runner }}
env:
CONTAINER_NAME: besu-check
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Start container
run: |
PLATFORM_OPT=""
[[ x${{ matrix.combination.platform }} != 'x' ]] && PLATFORM_OPT="--platform ${{ matrix.combination.platform }}"
docker run -d $PLATFORM_OPT --name ${{ env.CONTAINER_NAME }} hyperledger/besu:${{ matrix.combination.tag }}
- name: Verify besu container
run: bash .github/workflows/BesuContainerVerify.sh
env:
TAG: ${{ matrix.combination.tag }}
VERSION: ${{ inputs.version }}
CHECK_LATEST: ${{ inputs.verify-latest-version }}

- name: Stop container
run: docker stop ${{ env.CONTAINER_NAME }}
46 changes: 40 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
# Changelog

## Next Release
## Next release

### Breaking Changes
- Remove deprecated sync modes (X_SNAP and X_CHECKPOINT). Use SNAP and CHECKPOINT instead [#7309](https://github.com/hyperledger/besu/pull/7309)
- Remove PKI-backed QBFT (deprecated in 24.5.1) Other forms of QBFT remain unchanged. [#7293](https://github.com/hyperledger/besu/pull/7293)

### Additions and Improvements
- `--Xsnapsync-bft-enabled` option enables experimental support for snap sync with IBFT/QBFT permissioned Bonsai-DB chains [#7140](https://github.com/hyperledger/besu/pull/7140)
- Add support to load external profiles using `--profile` [#7265](https://github.com/hyperledger/besu/issues/7265)
- `privacy-nonce-always-increments` option enables private transactions to always increment the nonce, even if the transaction is invalid [#6593](https://github.com/hyperledger/besu/pull/6593)
- Add `block-test` subcommand to the evmtool which runs blockchain reference tests [#7310](https://github.com/hyperledger/besu/pull/7310)
- Implement gnark-crypto for eip-2537 [#7316](https://github.com/hyperledger/besu/pull/7316)

### Bug fixes
- Fix `eth_call` deserialization to correctly ignore unknown fields in the transaction object. [#7323](https://github.com/hyperledger/besu/pull/7323)

## 24.7.0

### Upcoming Breaking Changes
- Receipt compaction will be enabled by default in a future version of Besu. After this change it will not be possible to downgrade to the previous Besu version.
- PKI-backed QBFT will be removed in a future version of Besu. Other forms of QBFT will remain unchanged.
- --Xbonsai-limit-trie-logs-enabled is deprecated, use --bonsai-limit-trie-logs-enabled instead
- --Xbonsai-trie-logs-pruning-window-size is deprecated, use --bonsai-trie-logs-pruning-window-size instead
- `besu storage x-trie-log` subcommand is deprecated, use `besu storage trie-log` instead

### Breaking Changes
- `Xp2p-peer-lower-bound` has been removed. [#7247](https://github.com/hyperledger/besu/pull/7247)

### Additions and Improvements
- Support for eth_maxPriorityFeePerGas [#5658](https://github.com/hyperledger/besu/issues/5658)
Expand All @@ -11,10 +35,20 @@
- A full and up to date implementation of EOF for Prague [#7169](https://github.com/hyperledger/besu/pull/7169)
- Add Subnet-Based Peer Permissions. [#7168](https://github.com/hyperledger/besu/pull/7168)
- Reduce lock contention on transaction pool when building a block [#7180](https://github.com/hyperledger/besu/pull/7180)
- Update Docker base image to Ubuntu 24.04 [#7251](https://github.com/hyperledger/besu/pull/7251)
- Add LUKSO as predefined network name [#7223](https://github.com/hyperledger/besu/pull/7223)
- Refactored how code, initcode, and max stack size are configured in forks. [#7245](https://github.com/hyperledger/besu/pull/7245)
- Nodes in a permissioned chain maintain (and retry) connections to bootnodes [#7257](https://github.com/hyperledger/besu/pull/7257)
- Promote experimental `besu storage x-trie-log` subcommand to production-ready [#7278](https://github.com/hyperledger/besu/pull/7278)
- Enhanced BFT round-change diagnostics [#7271](https://github.com/hyperledger/besu/pull/7271)

### Bug fixes
- Validation errors ignored in accounts-allowlist and empty list [#7138](https://github.com/hyperledger/besu/issues/7138)
- Fix "Invalid block detected" for BFT chains using Bonsai DB [#7204](https://github.com/hyperledger/besu/pull/7204)
- Fix "Could not confirm best peer had pivot block" [#7109](https://github.com/hyperledger/besu/issues/7109)
- Fix "Chain Download Halt" [#6884](https://github.com/hyperledger/besu/issues/6884)



## 24.6.0

Expand Down Expand Up @@ -2743,7 +2777,7 @@ If you have existing private transactions, see [migration details](docs/Private-

This can be enabled using the `--rpc-http-api TRACE` CLI flag. There are some philosophical differences between Besu and other implementations that are outlined in [trace_rpc_apis](docs/trace_rpc_apis.md).

- Ability to automatically detect Docker NAT settings from inside the conainter.
- Ability to automatically detect Docker NAT settings from inside the container.

The default NAT method (AUTO) can detect this so no user intervention is required to enable this.

Expand Down Expand Up @@ -2966,7 +3000,7 @@ For compatibility with ETC Agharta upgrade, use 1.3.7 or later.

- Update Governance and Code of Conduct verbiage [\#120](https://github.com/hyperledger/besu/pull/120)
- Fix private transaction root mismatch [\#118](https://github.com/hyperledger/besu/pull/118)
- Programatically enforce plugin CLI variable names [\#117](https://github.com/hyperledger/besu/pull/117)
- Programmatically enforce plugin CLI variable names [\#117](https://github.com/hyperledger/besu/pull/117)
- Additional unit test for selecting replaced pending transactions [\#116](https://github.com/hyperledger/besu/pull/116)
- Only set sync targets that have an estimated height value [\#115](https://github.com/hyperledger/besu/pull/115)
- Fix rlpx startup [\#114](https://github.com/hyperledger/besu/pull/114)
Expand Down Expand Up @@ -3020,7 +3054,7 @@ For compatibility with ETC Agharta upgrade, use 1.3.7 or later.

### Technical Improvements

- Less verbose synching subscriptions [\#59](https://github.com/hyperledger/besu/pull/59)
- Less verbose syncing subscriptions [\#59](https://github.com/hyperledger/besu/pull/59)
- Return enclave key instead of private transaction hash [\#53](https://github.com/hyperledger/besu/pull/53)
- Fix mark sweep pruner bugs where nodes that should be kept were being swept [\#50](https://github.com/hyperledger/besu/pull/50)
- Clean up BesuConfiguration construction [\#51](https://github.com/hyperledger/besu/pull/51)
Expand Down Expand Up @@ -3153,7 +3187,7 @@ For compatibility with ETC Agharta upgrade, use 1.3.7 or later.
- Updating Orion to v1.3.2 [#1805](https://github.com/PegaSysEng/pantheon/pull/1805)
- Updaated newHeads subscription to emit events only for canonical blocks [#1798](https://github.com/PegaSysEng/pantheon/pull/1798)
- Repricing for trie-size-dependent opcodes [#1795](https://github.com/PegaSysEng/pantheon/pull/1795)
- Revised Istanbul Versioning assignemnts [#1794](https://github.com/PegaSysEng/pantheon/pull/1794)
- Revised Istanbul Versioning assignments [#1794](https://github.com/PegaSysEng/pantheon/pull/1794)
- Updated RevertReason to return BytesValue [#1793](https://github.com/PegaSysEng/pantheon/pull/1793)
- Updated way priv_getPrivacyPrecompileAddress source [#1786](https://github.com/PegaSysEng/pantheon/pull/1786) (thanks to [iikirilov](https://github.com/iikirilov))
- Updated Chain ID opcode to return 0 as default [#1785](https://github.com/PegaSysEng/pantheon/pull/1785)
Expand Down Expand Up @@ -4214,7 +4248,7 @@ has been updated to use the moved quickstart.
- Fixed deprecation warnings [\#596](https://github.com/PegaSysEng/pantheon/pull/596)
- IBFT Integration Tests - Future Height [\#591](https://github.com/PegaSysEng/pantheon/pull/591)
- Added `getNodeData` to `EthPeer` to enable requesting node data [\#589](https://github.com/PegaSysEng/pantheon/pull/589)
- `Blockcreator` to use `parentblock` specified at constuction [\#588](https://github.com/PegaSysEng/pantheon/pull/588)
- `Blockcreator` to use `parentblock` specified at construction [\#588](https://github.com/PegaSysEng/pantheon/pull/588)
- Support responding to `GetNodeData` requests [\#587](https://github.com/PegaSysEng/pantheon/pull/587)
- IBFT validates block on proposal reception [\#583](https://github.com/PegaSysEng/pantheon/pull/583)
- Rework `NewRoundValidator` tests [\#582](https://github.com/PegaSysEng/pantheon/pull/582)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Besu Ethereum Client
[![CircleCI](https://circleci.com/gh/hyperledger/besu/tree/main.svg?style=svg)](https://circleci.com/gh/hyperledger/besu/tree/main)
[![Documentation Status](https://readthedocs.org/projects/hyperledger-besu/badge/?version=latest)](https://besu.hyperledger.org/en/latest/?badge=latest)
[![Documentation](https://img.shields.io/github/actions/workflow/status/hyperledger/besu-docs/publish-main-docs.yml?branch=main&label=docs)](https://github.com/hyperledger/besu-docs/actions/workflows/publish-main-docs.yml)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3174/badge)](https://bestpractices.coreinfrastructure.org/projects/3174)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/hyperledger/besu/blob/main/LICENSE)
[![Discord](https://img.shields.io/discord/905194001349627914?logo=Hyperledger&style=plastic)](https://discord.gg/hyperledger)
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 org.assertj.core.api.Java6Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;

import org.hyperledger.besu.tests.acceptance.dsl.WaitUtils;
import org.hyperledger.besu.tests.acceptance.dsl.condition.Condition;
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 org.assertj.core.api.Java6Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;

import org.hyperledger.besu.tests.acceptance.dsl.WaitUtils;
import org.hyperledger.besu.tests.acceptance.dsl.condition.Condition;
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.clique;

import static org.assertj.core.api.Java6Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hyperledger.besu.tests.acceptance.dsl.condition.clique.ExpectNonceVote.CLIQUE_NONCE_VOTE.AUTH;

import org.hyperledger.besu.tests.acceptance.dsl.WaitUtils;
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.clique;

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

import org.hyperledger.besu.consensus.clique.CliqueBlockHeaderFunctions;
import org.hyperledger.besu.consensus.clique.CliqueExtraData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ public void startNode(final BesuNode node) {
if (node.getPrivacyParameters().isPrivacyPluginEnabled()) {
params.add("--Xprivacy-plugin-enabled");
}
if (node.getPrivacyParameters().isPrivateNonceAlwaysIncrementsEnabled()) {
params.add("privacy-nonce-always-increments");
}
}

if (!node.getBootnodes().isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.hyperledger.besu.ethereum.permissioning.PermissioningConfiguration;
import org.hyperledger.besu.ethereum.worldstate.DataStorageConfiguration;
import org.hyperledger.besu.metrics.prometheus.MetricsConfiguration;
import org.hyperledger.besu.pki.config.PkiKeyStoreConfiguration;
import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.genesis.GenesisConfigurationProvider;

import java.nio.file.Path;
Expand Down Expand Up @@ -72,7 +71,6 @@ public class BesuNodeConfiguration {
private final List<String> runCommand;
private final NetworkName network;
private final Optional<KeyPair> keyPair;
private final Optional<PkiKeyStoreConfiguration> pkiKeyStoreConfiguration;
private final boolean strictTxReplayProtectionEnabled;
private final Map<String, String> environment;

Expand Down Expand Up @@ -110,7 +108,6 @@ public class BesuNodeConfiguration {
final Optional<PrivacyParameters> privacyParameters,
final List<String> runCommand,
final Optional<KeyPair> keyPair,
final Optional<PkiKeyStoreConfiguration> pkiKeyStoreConfiguration,
final boolean strictTxReplayProtectionEnabled,
final Map<String, String> environment) {
this.name = name;
Expand Down Expand Up @@ -146,7 +143,6 @@ public class BesuNodeConfiguration {
this.privacyParameters = privacyParameters;
this.runCommand = runCommand;
this.keyPair = keyPair;
this.pkiKeyStoreConfiguration = pkiKeyStoreConfiguration;
this.strictTxReplayProtectionEnabled = strictTxReplayProtectionEnabled;
this.environment = environment;
}
Expand Down Expand Up @@ -283,10 +279,6 @@ public Optional<KeyPair> getKeyPair() {
return keyPair;
}

public Optional<PkiKeyStoreConfiguration> getPkiKeyStoreConfiguration() {
return pkiKeyStoreConfiguration;
}

public boolean isStrictTxReplayProtectionEnabled() {
return strictTxReplayProtectionEnabled;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import org.hyperledger.besu.ethereum.permissioning.PermissioningConfiguration;
import org.hyperledger.besu.ethereum.worldstate.DataStorageConfiguration;
import org.hyperledger.besu.metrics.prometheus.MetricsConfiguration;
import org.hyperledger.besu.pki.config.PkiKeyStoreConfiguration;
import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.genesis.GenesisConfigurationProvider;
import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.pki.PKCS11Utils;

Expand Down Expand Up @@ -100,7 +99,6 @@ public class BesuNodeConfigurationBuilder {
private Optional<PrivacyParameters> privacyParameters = Optional.empty();
private List<String> runCommand = new ArrayList<>();
private Optional<KeyPair> keyPair = Optional.empty();
private Optional<PkiKeyStoreConfiguration> pkiKeyStoreConfiguration = Optional.empty();
private Boolean strictTxReplayProtectionEnabled = false;
private Map<String, String> environment = new HashMap<>();

Expand Down Expand Up @@ -439,13 +437,6 @@ public BesuNodeConfigurationBuilder p2pTLSEnabled(final String name, final Strin
return this;
}

public BesuNodeConfigurationBuilder pkiBlockCreationEnabled(
final PkiKeyStoreConfiguration pkiKeyStoreConfiguration) {
this.pkiKeyStoreConfiguration = Optional.of(pkiKeyStoreConfiguration);

return this;
}

public BesuNodeConfigurationBuilder discoveryEnabled(final boolean discoveryEnabled) {
this.discoveryEnabled = discoveryEnabled;
return this;
Expand Down Expand Up @@ -560,7 +551,6 @@ public BesuNodeConfiguration build() {
privacyParameters,
runCommand,
keyPair,
pkiKeyStoreConfiguration,
strictTxReplayProtectionEnabled,
environment);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ public BesuNode createNodeWithMultiTenantedPrivacy(
final String enclaveUrl,
final String authFile,
final String privTransactionSigningKey,
final boolean enableFlexiblePrivacy)
final boolean enableFlexiblePrivacy,
final boolean enablePrivateNonceAlwaysIncrements)
throws IOException, URISyntaxException {
final PrivacyParameters.Builder privacyParametersBuilder = new PrivacyParameters.Builder();
final PrivacyParameters privacyParameters =
Expand All @@ -299,6 +300,7 @@ public BesuNode createNodeWithMultiTenantedPrivacy(
.setStorageProvider(new InMemoryPrivacyStorageProvider())
.setEnclaveFactory(new EnclaveFactory(Vertx.vertx()))
.setEnclaveUrl(URI.create(enclaveUrl))
.setPrivateNonceAlwaysIncrementsEnabled(enablePrivateNonceAlwaysIncrements)
.setPrivateKeyPath(
Paths.get(ClassLoader.getSystemResource(privTransactionSigningKey).toURI()))
.build();
Expand Down
Loading

0 comments on commit b19ae8c

Please sign in to comment.