Skip to content

Commit

Permalink
merg main
Browse files Browse the repository at this point in the history
Signed-off-by: Danno Ferrin <[email protected]>
  • Loading branch information
shemnon committed Jun 24, 2024
2 parents c1fadf1 + af80e53 commit adf2d64
Show file tree
Hide file tree
Showing 12 changed files with 911 additions and 27 deletions.
14 changes: 9 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
## Next Release

### 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)
- Improve genesis state performance at startup [#6977](https://github.com/hyperledger/besu/pull/6977)
- Enable continuous profiling with default setting [#7006](https://github.com/hyperledger/besu/pull/7006)
- 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)

### Bug fixes
Expand Down Expand Up @@ -2745,7 +2749,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 @@ -2968,7 +2972,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 @@ -3022,7 +3026,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 @@ -3155,7 +3159,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 @@ -4216,7 +4220,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
4 changes: 0 additions & 4 deletions besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import static java.util.Collections.singletonList;
import static org.hyperledger.besu.cli.DefaultCommandValues.getDefaultBesuDataPath;
import static org.hyperledger.besu.cli.config.NetworkName.MAINNET;
import static org.hyperledger.besu.cli.options.unstable.NetworkingOptions.PEER_LOWER_BOUND_FLAG;
import static org.hyperledger.besu.cli.util.CommandLineUtils.DEPENDENCY_WARNING_MSG;
import static org.hyperledger.besu.cli.util.CommandLineUtils.isOptionSet;
import static org.hyperledger.besu.controller.BesuController.DATABASE_PATH;
Expand Down Expand Up @@ -1659,9 +1658,6 @@ private void ensureValidPeerBoundParams() {
maxPeers = p2PDiscoveryOptionGroup.maxPeers;
final Boolean isLimitRemoteWireConnectionsEnabled =
p2PDiscoveryOptionGroup.isLimitRemoteWireConnectionsEnabled;
if (isOptionSet(commandLine, PEER_LOWER_BOUND_FLAG)) {
logger.warn(PEER_LOWER_BOUND_FLAG + " is deprecated and will be removed soon.");
}
if (isLimitRemoteWireConnectionsEnabled) {
final float fraction =
Fraction.fromPercentage(p2PDiscoveryOptionGroup.maxRemoteConnectionsPercentage)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public enum NetworkName {
SEPOLIA("/sepolia.json", BigInteger.valueOf(11155111)),
/** Holešky network name. */
HOLESKY("/holesky.json", BigInteger.valueOf(17000)),
/** LUKSO mainnet network name. */
LUKSO("/lukso.json", BigInteger.valueOf(42)),

/** Dev network name. */
DEV("/dev.json", BigInteger.valueOf(2018), false),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*/
package org.hyperledger.besu.cli.options.unstable;

import org.hyperledger.besu.cli.DefaultCommandValues;
import org.hyperledger.besu.cli.options.CLIOptions;
import org.hyperledger.besu.cli.options.OptionParser;
import org.hyperledger.besu.ethereum.p2p.config.NetworkingConfiguration;
Expand All @@ -27,9 +26,6 @@

/** The Networking Cli options. */
public class NetworkingOptions implements CLIOptions<NetworkingConfiguration> {
/** The constant PEER_LOWER_BOUND_FLAG */
public static final String PEER_LOWER_BOUND_FLAG = "--Xp2p-peer-lower-bound";

private final String INITIATE_CONNECTIONS_FREQUENCY_FLAG =
"--Xp2p-initiate-connections-frequency";
private final String CHECK_MAINTAINED_CONNECTIONS_FREQUENCY_FLAG =
Expand Down Expand Up @@ -77,13 +73,6 @@ public class NetworkingOptions implements CLIOptions<NetworkingConfiguration> {
description = "Whether to enable filtering of peers based on the ENR field ForkId)")
private final Boolean filterOnEnrForkId = NetworkingConfiguration.DEFAULT_FILTER_ON_ENR_FORK_ID;

@CommandLine.Option(
hidden = true,
names = PEER_LOWER_BOUND_FLAG,
description =
"(Deprecated) Lower bound on the target number of P2P connections (default: ${DEFAULT-VALUE})")
private final Integer peerLowerBoundConfig = DefaultCommandValues.DEFAULT_MAX_PEERS;

private NetworkingOptions() {}

/**
Expand Down Expand Up @@ -130,9 +119,7 @@ public List<String> getCLIOptions() {
CHECK_MAINTAINED_CONNECTIONS_FREQUENCY_FLAG,
OptionParser.format(checkMaintainedConnectionsFrequencySec),
INITIATE_CONNECTIONS_FREQUENCY_FLAG,
OptionParser.format(initiateConnectionsFrequencySec),
PEER_LOWER_BOUND_FLAG,
OptionParser.format((peerLowerBoundConfig)));
OptionParser.format(initiateConnectionsFrequencySec));

if (dnsDiscoveryServerOverride.isPresent()) {
retval.add(DNS_DISCOVERY_SERVER_OVERRIDE_FLAG);
Expand Down
17 changes: 17 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 @@ -22,6 +22,7 @@
import static org.hyperledger.besu.cli.config.NetworkName.EXPERIMENTAL_EIPS;
import static org.hyperledger.besu.cli.config.NetworkName.FUTURE_EIPS;
import static org.hyperledger.besu.cli.config.NetworkName.HOLESKY;
import static org.hyperledger.besu.cli.config.NetworkName.LUKSO;
import static org.hyperledger.besu.cli.config.NetworkName.MAINNET;
import static org.hyperledger.besu.cli.config.NetworkName.MORDOR;
import static org.hyperledger.besu.cli.config.NetworkName.SEPOLIA;
Expand Down Expand Up @@ -1747,6 +1748,22 @@ public void holeskyValuesAreUsed() {
verify(mockLogger, never()).warn(contains("Holesky is deprecated and will be shutdown"));
}

@Test
public void luksoValuesAreUsed() {
parseCommand("--network", "lukso");

final ArgumentCaptor<EthNetworkConfig> networkArg =
ArgumentCaptor.forClass(EthNetworkConfig.class);

verify(mockControllerBuilderFactory).fromEthNetworkConfig(networkArg.capture(), any());
verify(mockControllerBuilder).build();

assertThat(networkArg.getValue()).isEqualTo(EthNetworkConfig.getNetworkConfig(LUKSO));

assertThat(commandOutput.toString(UTF_8)).isEmpty();
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
}

@Test
public void classicValuesAreUsed() {
parseCommand("--network", "classic");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void shouldGenerateDeprecationMessageForDeprecatedNetworks(final NetworkName net
@EnumSource(
value = NetworkName.class,
names = {
"MAINNET", "SEPOLIA", "DEV", "CLASSIC", "MORDOR", "HOLESKY",
"MAINNET", "SEPOLIA", "DEV", "CLASSIC", "MORDOR", "HOLESKY", "LUKSO",
})
void shouldThrowErrorForNonDeprecatedNetworks(final NetworkName network) {
assertThatThrownBy(() -> NetworkDeprecationMessage.generate(network))
Expand Down
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,10 @@ def calculateVersion() {
def calVerPattern = ~/\d+\.\d+(\.\d+)?(-.*)?/

if (project.hasProperty('version') && (project.version =~ calVerPattern)) {
if (project.hasProperty('versionappendcommit') && project.versionappendcommit == "true") {
def gitDetails = getGitCommitDetails(7) // Adjust length as needed
return "${project.version}-${gitDetails.hash}"
}
return "${project.version}"
} else {
// If no version is supplied or it doesn't match the semantic versioning, calculate from git
Expand Down
Loading

0 comments on commit adf2d64

Please sign in to comment.