diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b012761e5..dbd955c265 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,13 @@ # Changelog +## 20.10.1 + ### Additions and Improvements * `--random-peer-priority-enabled` flag added. Allows for incoming connections to be prioritized randomly. This will prevent (typically small, stable) networks from forming impenetrable peer cliques. [#1440](https://github.com/hyperledger/besu/pull/1440) * Hide deprecated `--host-whitelist` option. [\#1444](https://github.com/hyperledger/besu/pull/1444) * Prioritize high gas prices during mining. Previously we ordered only by the order in which the transactions were received. This will increase expected profit when mining. [\#1449](https://github.com/hyperledger/besu/pull/1449) * Added support for the updated smart contract-based [node permissioning EEA interface](https://entethalliance.github.io/client-spec/spec.html#dfn-connectionallowed). [\#1435](https://github.com/hyperledger/besu/pull/1435) +* Added EvmTool binary to the distribution. EvmTool is a CLI that can execute EVM bytecode and execute ethereum state tests. [\#1465](https://github.com/hyperledger/besu/pull/1465) ## Deprecated and Scheduled for removal in _Next_ Release diff --git a/build.gradle b/build.gradle index 6f2c9ed6dc..71a27a436d 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,6 @@ import groovy.transform.Memoized import net.ltgt.gradle.errorprone.CheckSeverity -import java.nio.file.Paths import java.text.SimpleDateFormat plugins { @@ -494,38 +493,59 @@ run { } } -startScripts { - +def tweakStartScript(createScriptTask) { def shortenWindowsClasspath = { line -> - line = line.replaceAll(/^set CLASSPATH=.*$/, "set CLASSPATH=%APP_HOME%/lib/*") + line.replaceAll(/^set CLASSPATH=.*$/, "set CLASSPATH=%APP_HOME%/lib/*") } - doLast { - unixScript.text = unixScript.text.replace('BESU_HOME', '\$APP_HOME') - windowsScript.text = windowsScript.text.replace('BESU_HOME', '%~dp0..') - // OpenTelemetry Wiring for unix scripts - def agentFileName = configurations.javaAgent.singleFile.toPath().getFileName() - def unixRegex = $/exec "$$JAVACMD" /$ - def forwardSlash = "/" - def unixReplacement = $/if [ -n "$$TRACING" ];then + createScriptTask.unixScript.text = createScriptTask.unixScript.text.replace('BESU_HOME', '\$APP_HOME') + createScriptTask.windowsScript.text = createScriptTask.windowsScript.text.replace('BESU_HOME', '%~dp0..') + // OpenTelemetry Wiring for unix scripts + def agentFileName = configurations.javaAgent.singleFile.toPath().getFileName() + def unixRegex = $/exec "$$JAVACMD" /$ + def forwardSlash = "/" + def unixReplacement = $/if [ -n "$$TRACING" ];then TRACING_AGENT="-javaagent:$$APP_HOME/agent${forwardSlash}${agentFileName}" fi exec "$$JAVACMD" $$TRACING_AGENT /$ - unixScript.text = unixScript.text.replace(unixRegex, unixReplacement) - // OpenTelemetry Wiring for windows scripts - def windowsRegex = $/"%JAVA_EXE%" %DEFAULT_JVM_OPTS%/$ - def windowsReplacement = $/if Defined TRACING (TRACING_AGENT="-javaagent:"%APP_HOME%\agent\/$ + agentFileName + '")\r\n"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %TRACING_AGENT%' - windowsScript.text = windowsScript.text.replace(windowsRegex, windowsReplacement) + createScriptTask.unixScript.text = createScriptTask.unixScript.text.replace(unixRegex, unixReplacement) + // OpenTelemetry Wiring for windows scripts + def windowsRegex = $/"%JAVA_EXE%" %DEFAULT_JVM_OPTS%/$ + def windowsReplacement = $/if Defined TRACING (TRACING_AGENT="-javaagent:"%APP_HOME%\agent\/$ + agentFileName + '")\r\n"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %TRACING_AGENT%' + createScriptTask.windowsScript.text = createScriptTask.windowsScript.text.replace(windowsRegex, windowsReplacement) + + // Prevent the error originating from the 8191 chars limit on Windows + createScriptTask.windowsScript.text = + createScriptTask.windowsScript + .readLines() + .collect(shortenWindowsClasspath) + .join('\r\n') +} - // Prevent the error originating from the 8191 chars limit on Windows - windowsScript.text = - windowsScript - .readLines() - .collect(shortenWindowsClasspath) - .join('\r\n') +startScripts { + doLast { + tweakStartScript(startScripts) } } +task evmToolStartScripts(type: CreateStartScripts) { + mainClassName = 'org.hyperledger.besu.evmtool.EvmTool' + classpath = startScripts.classpath + outputDir = startScripts.outputDir + applicationName = 'evm' + defaultJvmOpts = [ + "-Dsecp256k1.randomize=false" + ] + doLast { + tweakStartScript(evmToolStartScripts) + } +} + +// Include the additional start scripts in the distribution +applicationDistribution.into("bin") { + from(tasks.withType(CreateStartScripts)) + fileMode = 0755 +} installDist { dependsOn checkLicenses } @@ -777,6 +797,7 @@ configurations { dependencies { implementation project(':besu') + implementation project(':ethereum:evmtool') javaAgent group: 'io.opentelemetry.instrumentation.auto', name: 'opentelemetry-javaagent', classifier: 'all' errorprone 'com.google.errorprone:error_prone_core' } diff --git a/ethereum/evmtool/build.gradle b/ethereum/evmtool/build.gradle index 1d357ef2c1..b0eeaac830 100644 --- a/ethereum/evmtool/build.gradle +++ b/ethereum/evmtool/build.gradle @@ -60,6 +60,9 @@ mainClassName = 'org.hyperledger.besu.evmtool.EvmTool' startScripts { applicationName = 'evm' + defaultJvmOpts = [ + "-Dsecp256k1.randomize=false" + ] doLast { unixScript.text = unixScript.text.replace('BESU_HOME', '\$APP_HOME') windowsScript.text = windowsScript.text.replace('BESU_HOME', '%~dp0..')