Merge branch 'main' into pectra-devnet-4

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
pectra-devnet-4
Daniel Lehrner 4 weeks ago
commit 9ebc32bf41
  1. 31
      .github/ISSUE_TEMPLATE/release-checklist.md
  2. 2
      CHANGELOG.md
  3. 1
      acceptance-tests/dsl/build.gradle
  4. 2
      acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/blockchain/ExpectBlockNotCreated.java
  5. 12
      acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/ThreadBesuNodeRunner.java
  6. 2
      acceptance-tests/test-plugins/build.gradle
  7. 18
      acceptance-tests/tests/build.gradle
  8. 4
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/crypto/SECP256R1AcceptanceTest.java
  9. 21
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/ethereum/PragueAcceptanceTestHelper.java
  10. 10
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/mining/MiningAcceptanceTest.java
  11. 12
      acceptance-tests/tests/src/test/resources/dev/dev_prague.json
  12. 23
      acceptance-tests/tests/src/test/resources/jsonrpc/engine/prague/genesis.json
  13. 4
      acceptance-tests/tests/src/test/resources/jsonrpc/engine/prague/test-cases/00_get_genesis_block_info.json
  14. 8
      acceptance-tests/tests/src/test/resources/jsonrpc/engine/prague/test-cases/01_cancun_prepare_payload.json
  15. 8
      acceptance-tests/tests/src/test/resources/jsonrpc/engine/prague/test-cases/02_cancun_getPayloadV3.json
  16. 14
      acceptance-tests/tests/src/test/resources/jsonrpc/engine/prague/test-cases/03_cancun_newPayloadV3.json
  17. 8
      acceptance-tests/tests/src/test/resources/jsonrpc/engine/prague/test-cases/04_cancun_forkchoiceUpdatedV3.json
  18. 10
      acceptance-tests/tests/src/test/resources/jsonrpc/engine/prague/test-cases/05_prague_forkchoiceUpdatedV3.json
  19. 26
      acceptance-tests/tests/src/test/resources/jsonrpc/engine/prague/test-cases/06_prague_getPayloadV4.json
  20. 0
      acceptance-tests/tests/src/test/resources/jsonrpc/engine/prague/test-cases/07_prague_send_raw_transaction_deposit_request.json
  21. 16
      acceptance-tests/tests/src/test/resources/jsonrpc/engine/prague/test-cases/08_prague_invalid_null_deposit_request_execute_payload.json
  22. 34
      acceptance-tests/tests/src/test/resources/jsonrpc/engine/prague/test-cases/09_prague_newPayloadV4.json
  23. 10
      acceptance-tests/tests/src/test/resources/jsonrpc/engine/prague/test-cases/10_prague_forkchoiceUpdatedV3.json
  24. 20
      acceptance-tests/tests/src/test/resources/jsonrpc/engine/prague/test-cases/11_prague_getPayloadV4.json
  25. 21
      acceptance-tests/tests/src/test/resources/jsonrpc/engine/prague/test-cases/12_cancun_newPayloadV3.json
  26. 10
      acceptance-tests/tests/src/test/resources/jsonrpc/engine/prague/test-cases/15_prague_forkchoiceUpdatedV3.json
  27. 40
      acceptance-tests/tests/src/test/resources/jsonrpc/engine/prague/test-cases/16_prague_getPayloadV4.json
  28. 9
      besu/build.gradle
  29. 14
      besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
  30. 2
      besu/src/main/java/org/hyperledger/besu/cli/subcommands/PasswordSubCommand.java
  31. 2
      besu/src/main/java/org/hyperledger/besu/cli/subcommands/blocks/BlocksSubCommand.java
  32. 2
      besu/src/main/java/org/hyperledger/besu/cli/subcommands/operator/BackupState.java
  33. 3
      besu/src/main/java/org/hyperledger/besu/cli/subcommands/operator/GenerateBlockchainConfig.java
  34. 2
      besu/src/main/java/org/hyperledger/besu/cli/subcommands/operator/RestoreState.java
  35. 2
      besu/src/main/java/org/hyperledger/besu/controller/BesuControllerBuilder.java
  36. 17
      besu/src/test/java/org/hyperledger/besu/ForkIdsNetworkConfigTest.java
  37. 7
      besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java
  38. 2
      besu/src/test/java/org/hyperledger/besu/cli/CommandTestAbstract.java
  39. 10
      besu/src/test/java/org/hyperledger/besu/cli/PrivacyOptionsTest.java
  40. 38
      build.gradle
  41. 5
      consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/blockcreation/MergeCoordinator.java
  42. 2
      consensus/merge/src/test/java/org/hyperledger/besu/consensus/merge/blockcreation/MergeCoordinatorTest.java
  43. 12
      datatypes/src/main/java/org/hyperledger/besu/datatypes/Hash.java
  44. 8
      datatypes/src/test/java/org/hyperledger/besu/datatypes/HashTest.java
  45. 1
      ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/execution/TracedJsonRpcProcessor.java
  46. 6
      ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayload.java
  47. 2
      ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV4.java
  48. 1
      ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/response/RpcErrorType.java
  49. 2
      ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/AbstractBlockCreator.java
  50. 6
      ethereum/blockcreation/src/test/java/org/hyperledger/besu/ethereum/blockcreation/AbstractBlockCreatorTest.java
  51. 10
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/BlockProcessingResult.java
  52. 11
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/MainnetBlockValidator.java
  53. 8
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/ProtocolContext.java
  54. 14
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/chain/GenesisState.java
  55. 13
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/BlockHeader.java
  56. 4
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/SealableBlockHeader.java
  57. 17
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/Synchronizer.java
  58. 2
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/AbstractBlockProcessor.java
  59. 2
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/BodyValidation.java
  60. 5
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/SystemCallProcessor.java
  61. 20
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/requests/MainnetRequestsValidator.java
  62. 23
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/requests/RequestProcessorCoordinator.java
  63. 3
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/requests/SystemCallRequestProcessor.java
  64. 1
      ethereum/core/src/test-support/java/org/hyperledger/besu/ethereum/core/BlockchainSetupUtil.java
  65. 13
      ethereum/core/src/test-support/java/org/hyperledger/besu/ethereum/core/DummySynchronizer.java
  66. 2
      ethereum/core/src/test/java/org/hyperledger/besu/ethereum/MainnetBlockValidatorTest.java
  67. 4
      ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/SystemCallProcessorTest.java
  68. 16
      ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/requests/MainnetRequestsValidatorTest.java
  69. 14
      ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/snap/SnapServer.java
  70. 2
      ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/DefaultSynchronizer.java
  71. 12
      ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/tasks/CompleteBlocksTask.java
  72. 2
      ethereum/evmtool/build.gradle
  73. 2
      ethereum/evmtool/src/main/java/org/hyperledger/besu/evmtool/T8nExecutor.java
  74. 1
      ethereum/referencetests/build.gradle
  75. 17
      ethereum/referencetests/src/reference-test/java/org/hyperledger/besu/ethereum/vm/BlockchainReferenceTestTools.java
  76. 1
      ethereum/retesteth/build.gradle
  77. 1
      ethereum/retesteth/src/main/java/org/hyperledger/besu/ethereum/retesteth/RetestethService.java
  78. 3
      evm/src/main/java/org/hyperledger/besu/evm/operation/CallFOperation.java
  79. 8
      evm/src/main/java/org/hyperledger/besu/evm/operation/JumpFOperation.java
  80. 6
      evm/src/test/java/org/hyperledger/besu/evm/operation/DataCopyOperationTest.java
  81. 2581
      gradle/verification-metadata.xml
  82. 249
      gradle/versions.gradle
  83. 2
      nat/src/main/java/org/hyperledger/besu/nat/kubernetes/KubernetesNatManager.java
  84. 214
      platform/build.gradle
  85. 2
      plugins/rocksdb/build.gradle
  86. 1
      settings.gradle

@ -12,25 +12,34 @@ assignees: ''
- [ ] Notify maintainers about updating changelog for in-flight PRs - [ ] 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 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 - [ ] 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` - [ ] On the appropriate branch/commit, create a calver tag for the release candidate, format example: `24.4.0-RC1`
- [ ] git tag 24.4.0-RC2 - [ ] git tag 24.4.0-RC1
- [ ] git push upstream 24.4.0-RC2 - [ ] git push upstream 24.4.0-RC1
- [ ] Sign-off with team; announce the tag in #besu-release in Discord - [ ] 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 - [ ] Consensys staff start burn-in using this tag
- [ ] Seek sign off for burn-in - [ ] Seek sign off for burn-in
- [ ] Pass? Go ahead and complete the release process - [ ] 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 - [ ] 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` - [ ] Optional: Perform a dry run with https://github.com/consensys/protocols-release-sandbox to test the workflows
- [ ] Using the FULL RELEASE tag, create a release in github to trigger the workflows. Once published: - [ ] 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 - this is now public and notifies subscribed users
- makes the release "latest" in github - makes the release "latest" in github
- publishes artefacts and version-specific docker tags
- publishes the docker `latest` tag variants - 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) - [ ] 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>` - 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 - Run commands `brew tap hyperledger/besu && brew install besu` on MacOSX and verify latest version has been installed

@ -9,6 +9,8 @@
### Additions and Improvements ### 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) - 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 ### Bug fixes

@ -33,7 +33,6 @@ dependencies {
implementation 'info.picocli:picocli' implementation 'info.picocli:picocli'
implementation 'io.reactivex.rxjava2:rxjava' implementation 'io.reactivex.rxjava2:rxjava'
implementation 'io.vertx:vertx-core' implementation 'io.vertx:vertx-core'
implementation 'junit:junit'
implementation 'io.opentelemetry:opentelemetry-api' implementation 'io.opentelemetry:opentelemetry-api'
implementation 'io.tmio:tuweni-bytes' implementation 'io.tmio:tuweni-bytes'
implementation 'io.tmio:tuweni-io' implementation 'io.tmio:tuweni-io'

@ -14,7 +14,7 @@
*/ */
package org.hyperledger.besu.tests.acceptance.dsl.condition.blockchain; 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.condition.Condition;
import org.hyperledger.besu.tests.acceptance.dsl.node.Node; import org.hyperledger.besu.tests.acceptance.dsl.node.Node;

@ -54,6 +54,7 @@ import org.hyperledger.besu.ethereum.trie.diffbased.bonsai.cache.BonsaiCachedMer
import org.hyperledger.besu.ethereum.worldstate.DataStorageConfiguration; import org.hyperledger.besu.ethereum.worldstate.DataStorageConfiguration;
import org.hyperledger.besu.ethereum.worldstate.WorldStateArchive; import org.hyperledger.besu.ethereum.worldstate.WorldStateArchive;
import org.hyperledger.besu.evm.internal.EvmConfiguration; import org.hyperledger.besu.evm.internal.EvmConfiguration;
import org.hyperledger.besu.metrics.MetricCategoryRegistryImpl;
import org.hyperledger.besu.metrics.MetricsSystemModule; import org.hyperledger.besu.metrics.MetricsSystemModule;
import org.hyperledger.besu.metrics.ObservableMetricsSystem; import org.hyperledger.besu.metrics.ObservableMetricsSystem;
import org.hyperledger.besu.metrics.prometheus.MetricsConfiguration; import org.hyperledger.besu.metrics.prometheus.MetricsConfiguration;
@ -71,6 +72,7 @@ import org.hyperledger.besu.plugin.services.StorageService;
import org.hyperledger.besu.plugin.services.TransactionPoolValidatorService; import org.hyperledger.besu.plugin.services.TransactionPoolValidatorService;
import org.hyperledger.besu.plugin.services.TransactionSelectionService; import org.hyperledger.besu.plugin.services.TransactionSelectionService;
import org.hyperledger.besu.plugin.services.TransactionSimulationService; 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.plugin.services.storage.rocksdb.RocksDBPlugin;
import org.hyperledger.besu.services.BesuConfigurationImpl; import org.hyperledger.besu.services.BesuConfigurationImpl;
import org.hyperledger.besu.services.BesuEventsImpl; import org.hyperledger.besu.services.BesuEventsImpl;
@ -396,6 +398,12 @@ public class ThreadBesuNodeRunner implements BesuNodeRunner {
retval.init(blockchain, transactionSimulator); retval.init(blockchain, transactionSimulator);
return retval; return retval;
} }
@Provides
@Singleton
MetricCategoryRegistryImpl provideMetricCategoryRegistry() {
return new MetricCategoryRegistryImpl();
}
} }
@Module @Module
@ -476,6 +484,8 @@ public class ThreadBesuNodeRunner implements BesuNodeRunner {
final RpcEndpointServiceImpl rpcEndpointServiceImpl, final RpcEndpointServiceImpl rpcEndpointServiceImpl,
final BesuConfiguration commonPluginConfiguration, final BesuConfiguration commonPluginConfiguration,
final PermissioningServiceImpl permissioningService, final PermissioningServiceImpl permissioningService,
final MetricCategoryRegistryImpl metricCategoryRegistry,
final MetricsSystem metricsSystem,
final @Named("ExtraCLIOptions") List<String> extraCLIOptions, final @Named("ExtraCLIOptions") List<String> extraCLIOptions,
final @Named("RequestedPlugins") List<String> requestedPlugins) { final @Named("RequestedPlugins") List<String> requestedPlugins) {
final CommandLine commandLine = new CommandLine(CommandSpec.create()); final CommandLine commandLine = new CommandLine(CommandSpec.create());
@ -492,6 +502,8 @@ public class ThreadBesuNodeRunner implements BesuNodeRunner {
TransactionSimulationService.class, transactionSimulationServiceImpl); TransactionSimulationService.class, transactionSimulationServiceImpl);
besuPluginContext.addService(BlockchainService.class, blockchainServiceImpl); besuPluginContext.addService(BlockchainService.class, blockchainServiceImpl);
besuPluginContext.addService(BesuConfiguration.class, commonPluginConfiguration); besuPluginContext.addService(BesuConfiguration.class, commonPluginConfiguration);
besuPluginContext.addService(MetricCategoryRegistry.class, metricCategoryRegistry);
besuPluginContext.addService(MetricsSystem.class, metricsSystem);
final Path pluginsPath; final Path pluginsPath;
final String pluginDir = System.getProperty("besu.plugins.dir"); final String pluginDir = System.getProperty("besu.plugins.dir");

@ -14,8 +14,6 @@ dependencies {
testImplementation 'org.assertj:assertj-core' testImplementation 'org.assertj:assertj-core'
testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine'
} }
task testPluginsJar(type: Jar) { task testPluginsJar(type: Jar) {

@ -68,7 +68,6 @@ dependencies {
testImplementation 'io.opentracing:opentracing-api' testImplementation 'io.opentracing:opentracing-api'
testImplementation 'io.opentracing:opentracing-util' testImplementation 'io.opentracing:opentracing-util'
testImplementation 'io.vertx:vertx-core' testImplementation 'io.vertx:vertx-core'
testImplementation 'junit:junit'
testImplementation 'org.apache.commons:commons-compress' testImplementation 'org.apache.commons:commons-compress'
testImplementation 'org.apache.logging.log4j:log4j-core' testImplementation 'org.apache.logging.log4j:log4j-core'
testImplementation 'io.tmio:tuweni-crypto' testImplementation 'io.tmio:tuweni-crypto'
@ -81,8 +80,6 @@ dependencies {
testImplementation 'org.web3j:core' testImplementation 'org.web3j:core'
testImplementation 'org.wiremock:wiremock' testImplementation 'org.wiremock:wiremock'
testImplementation project(path: ':acceptance-tests:tests:shanghai') testImplementation project(path: ':acceptance-tests:tests:shanghai')
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine'
} }
test.enabled = false test.enabled = false
@ -106,7 +103,8 @@ task acceptanceTest(type: Test) {
setSystemProperties(test.getSystemProperties()) setSystemProperties(test.getSystemProperties())
systemProperty 'acctests.runBesuAsProcess', 'true' systemProperty 'acctests.runBesuAsProcess', 'true'
systemProperty 'java.security.properties', "${buildDir}/resources/test/acceptanceTesting.security" 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).' description = 'Runs ALL Besu acceptance tests (mainnet and non-mainnet).'
group = 'verification' group = 'verification'
@ -135,7 +133,8 @@ task acceptanceTestNotPrivacy(type: Test) {
setSystemProperties(test.getSystemProperties()) setSystemProperties(test.getSystemProperties())
systemProperty 'acctests.runBesuAsProcess', 'true' systemProperty 'acctests.runBesuAsProcess', 'true'
systemProperty 'java.security.properties', "${buildDir}/resources/test/acceptanceTesting.security" 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).' description = 'Runs MAINNET Besu acceptance tests (excluding specific non-mainnet suites).'
group = 'verification' group = 'verification'
@ -163,7 +162,8 @@ task acceptanceTestCliqueBft(type: Test) {
setSystemProperties(test.getSystemProperties()) setSystemProperties(test.getSystemProperties())
systemProperty 'acctests.runBesuAsProcess', 'true' systemProperty 'acctests.runBesuAsProcess', 'true'
systemProperty 'java.security.properties', "${buildDir}/resources/test/acceptanceTesting.security" 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.' description = 'Runs Clique and BFT Besu acceptance tests.'
group = 'verification' group = 'verification'
@ -192,7 +192,8 @@ task acceptanceTestBftSoak(type: Test) {
// Set to any time > 60 minutes to run the soak test for longer // Set to any time > 60 minutes to run the soak test for longer
// systemProperty 'acctests.soakTimeMins', '120' // systemProperty 'acctests.soakTimeMins', '120'
systemProperty 'java.security.properties', "${buildDir}/resources/test/acceptanceTesting.security" 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.' description = 'Runs BFT soak test.'
group = 'verification' group = 'verification'
@ -219,7 +220,8 @@ task acceptanceTestPermissioning(type: Test) {
setSystemProperties(test.getSystemProperties()) setSystemProperties(test.getSystemProperties())
systemProperty 'acctests.runBesuAsProcess', 'true' systemProperty 'acctests.runBesuAsProcess', 'true'
systemProperty 'java.security.properties', "${buildDir}/resources/test/acceptanceTesting.security" 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.' description = 'Runs Permissioning Besu acceptance tests.'
group = 'verification' group = 'verification'

@ -15,7 +15,7 @@
package org.hyperledger.besu.tests.acceptance.crypto; package org.hyperledger.besu.tests.acceptance.crypto;
import static org.assertj.core.api.Assertions.assertThat; 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.KeyPair;
import org.hyperledger.besu.crypto.SECP256R1; import org.hyperledger.besu.crypto.SECP256R1;
@ -80,7 +80,7 @@ public class SECP256R1AcceptanceTest extends AcceptanceTestBase {
// the signature algorithm instance to SECP256R1 as it could influence other tests running at // 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 // the same time. So we only execute the test when ProcessBesuNodeRunner is used, as there is
// not conflict because we use separate processes. // not conflict because we use separate processes.
assumeThat(BesuNodeRunner.isProcessBesuNodeRunner()).isTrue(); assumeTrue(BesuNodeRunner.isProcessBesuNodeRunner());
minerNode.verify(net.awaitPeerCount(1)); minerNode.verify(net.awaitPeerCount(1));
otherNode.verify(net.awaitPeerCount(1)); otherNode.verify(net.awaitPeerCount(1));

@ -22,7 +22,9 @@ import org.hyperledger.besu.tests.acceptance.dsl.transaction.eth.EthTransactions
import java.io.IOException; import java.io.IOException;
import java.util.Optional; import java.util.Optional;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode; import com.fasterxml.jackson.databind.node.ObjectNode;
import okhttp3.Call; import okhttp3.Call;
import okhttp3.MediaType; import okhttp3.MediaType;
@ -74,17 +76,15 @@ public class PragueAcceptanceTestHelper {
final Call getPayloadRequest = createEngineCall(createGetPayloadRequest(payloadId)); final Call getPayloadRequest = createEngineCall(createGetPayloadRequest(payloadId));
final ObjectNode executionPayload; final ObjectNode executionPayload;
final ArrayNode executionRequests;
final String newBlockHash; final String newBlockHash;
final String parentBeaconBlockRoot; final String parentBeaconBlockRoot;
try (final Response getPayloadResponse = getPayloadRequest.execute()) { try (final Response getPayloadResponse = getPayloadRequest.execute()) {
assertThat(getPayloadResponse.code()).isEqualTo(200); assertThat(getPayloadResponse.code()).isEqualTo(200);
executionPayload = JsonNode result = mapper.readTree(getPayloadResponse.body().string()).get("result");
(ObjectNode) executionPayload = (ObjectNode) result.get("executionPayload");
mapper executionRequests = (ArrayNode) result.get("executionRequests");
.readTree(getPayloadResponse.body().string())
.get("result")
.get("executionPayload");
newBlockHash = executionPayload.get("blockHash").asText(); newBlockHash = executionPayload.get("blockHash").asText();
parentBeaconBlockRoot = executionPayload.remove("parentBeaconBlockRoot").asText(); parentBeaconBlockRoot = executionPayload.remove("parentBeaconBlockRoot").asText();
@ -94,7 +94,8 @@ public class PragueAcceptanceTestHelper {
final Call newPayloadRequest = final Call newPayloadRequest =
createEngineCall( createEngineCall(
createNewPayloadRequest(executionPayload.toString(), parentBeaconBlockRoot)); createNewPayloadRequest(
executionPayload.toString(), parentBeaconBlockRoot, executionRequests.toString()));
try (final Response newPayloadResponse = newPayloadRequest.execute()) { try (final Response newPayloadResponse = newPayloadRequest.execute()) {
assertThat(newPayloadResponse.code()).isEqualTo(200); assertThat(newPayloadResponse.code()).isEqualTo(200);
} }
@ -168,7 +169,9 @@ public class PragueAcceptanceTestHelper {
} }
private String createNewPayloadRequest( private String createNewPayloadRequest(
final String executionPayload, final String parentBeaconBlockRoot) { final String executionPayload,
final String parentBeaconBlockRoot,
final String executionRequests) {
return "{" return "{"
+ " \"jsonrpc\": \"2.0\"," + " \"jsonrpc\": \"2.0\","
+ " \"method\": \"engine_newPayloadV4\"," + " \"method\": \"engine_newPayloadV4\","
@ -178,6 +181,8 @@ public class PragueAcceptanceTestHelper {
+ "\"" + "\""
+ parentBeaconBlockRoot + parentBeaconBlockRoot
+ "\"" + "\""
+ ","
+ executionRequests
+ "]," + "],"
+ " \"id\": 67" + " \"id\": 67"
+ "}"; + "}";

@ -18,21 +18,21 @@ import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase;
import org.hyperledger.besu.tests.acceptance.dsl.account.Account; import org.hyperledger.besu.tests.acceptance.dsl.account.Account;
import org.hyperledger.besu.tests.acceptance.dsl.node.Node; import org.hyperledger.besu.tests.acceptance.dsl.node.Node;
import org.junit.Before; import org.junit.jupiter.api.BeforeEach;
import org.junit.Test; import org.junit.jupiter.api.Test;
public class MiningAcceptanceTest extends AcceptanceTestBase { class MiningAcceptanceTest extends AcceptanceTestBase {
private Node minerNode; private Node minerNode;
@Before @BeforeEach
public void setUp() throws Exception { public void setUp() throws Exception {
minerNode = besu.createMinerNode("miner1"); minerNode = besu.createMinerNode("miner1");
cluster.start(minerNode); cluster.start(minerNode);
} }
@Test @Test
public void shouldMineTransactions() { void shouldMineTransactions() {
final Account sender = accounts.createAccount("account1"); final Account sender = accounts.createAccount("account1");
final Account receiver = accounts.createAccount("account2"); final Account receiver = accounts.createAccount("account2");
minerNode.execute(accountTransactions.createTransfer(sender, 50)); minerNode.execute(accountTransactions.createTransfer(sender, 50));

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -12,14 +12,14 @@
"id": 67, "id": 67,
"result": { "result": {
"number": "0x0", "number": "0x0",
"hash" : "0x38d7daa68e8bac41a0a237b7cbfcef480cb9bd9adc7b282d7b0d23ff4eb8d6e5", "hash" : "0x01f5cbf33268c161f1526d704268db760bf82c9772a8f8ca412e0c6ce5684896",
"mixHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "mixHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce" : "0x0000000000000042", "nonce" : "0x0000000000000042",
"sha3Uncles" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "sha3Uncles" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"logsBloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "logsBloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"transactionsRoot" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "transactionsRoot" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"stateRoot" : "0x3ed8435adb5f3526144e6babdd3fc8c661a86097cf7e743441b41fda096fc4dd", "stateRoot" : "0x860be6ab5a8fc2003c3739bfe2cdbcd9dbb273c8ea42951b832a8e1f22fb3a60",
"receiptsRoot" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "receiptsRoot" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"miner" : "0x0000000000000000000000000000000000000000", "miner" : "0x0000000000000000000000000000000000000000",
"difficulty" : "0x400000000", "difficulty" : "0x400000000",

@ -4,8 +4,8 @@
"method": "engine_forkchoiceUpdatedV3", "method": "engine_forkchoiceUpdatedV3",
"params": [ "params": [
{ {
"headBlockHash": "0x38d7daa68e8bac41a0a237b7cbfcef480cb9bd9adc7b282d7b0d23ff4eb8d6e5", "headBlockHash": "0x01f5cbf33268c161f1526d704268db760bf82c9772a8f8ca412e0c6ce5684896",
"safeBlockHash": "0x38d7daa68e8bac41a0a237b7cbfcef480cb9bd9adc7b282d7b0d23ff4eb8d6e5", "safeBlockHash": "0x01f5cbf33268c161f1526d704268db760bf82c9772a8f8ca412e0c6ce5684896",
"finalizedBlockHash": "0x0000000000000000000000000000000000000000000000000000000000000000" "finalizedBlockHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}, },
{ {
@ -24,10 +24,10 @@
"result": { "result": {
"payloadStatus": { "payloadStatus": {
"status": "VALID", "status": "VALID",
"latestValidHash": "0x38d7daa68e8bac41a0a237b7cbfcef480cb9bd9adc7b282d7b0d23ff4eb8d6e5", "latestValidHash": "0x01f5cbf33268c161f1526d704268db760bf82c9772a8f8ca412e0c6ce5684896",
"validationError": null "validationError": null
}, },
"payloadId": "0x28264396eca1deef" "payloadId": "0x282643b677b85211"
} }
}, },
"statusCode": 200 "statusCode": 200

@ -3,7 +3,7 @@
"jsonrpc": "2.0", "jsonrpc": "2.0",
"method": "engine_getPayloadV3", "method": "engine_getPayloadV3",
"params": [ "params": [
"0x28264396eca1deef" "0x282643b677b85211"
], ],
"id": 67 "id": 67
}, },
@ -12,9 +12,9 @@
"id": 67, "id": 67,
"result": { "result": {
"executionPayload": { "executionPayload": {
"parentHash": "0x38d7daa68e8bac41a0a237b7cbfcef480cb9bd9adc7b282d7b0d23ff4eb8d6e5", "parentHash": "0x01f5cbf33268c161f1526d704268db760bf82c9772a8f8ca412e0c6ce5684896",
"feeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "feeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"stateRoot": "0x3ed8435adb5f3526144e6babdd3fc8c661a86097cf7e743441b41fda096fc4dd", "stateRoot": "0x860be6ab5a8fc2003c3739bfe2cdbcd9dbb273c8ea42951b832a8e1f22fb3a60",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000", "prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x1c9c380", "gasLimit": "0x1c9c380",
@ -29,7 +29,7 @@
"blockNumber": "0x1", "blockNumber": "0x1",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"blobGasUsed": "0x0", "blobGasUsed": "0x0",
"blockHash": "0x8082deff44f79489ea92415be59afb48b6f46b939553f855479828a6f87f9593" "blockHash": "0x7cccf6d9ce3e5acaeac9058959c27ace53af3a30b15763e1703bab2d0ae9438e"
}, },
"blockValue": "0x0", "blockValue": "0x0",
"blobsBundle": { "blobsBundle": {

@ -4,9 +4,9 @@
"method": "engine_newPayloadV3", "method": "engine_newPayloadV3",
"params": [ "params": [
{ {
"parentHash": "0x38d7daa68e8bac41a0a237b7cbfcef480cb9bd9adc7b282d7b0d23ff4eb8d6e5", "parentHash": "0x01f5cbf33268c161f1526d704268db760bf82c9772a8f8ca412e0c6ce5684896",
"feeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "feeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"stateRoot": "0x3ed8435adb5f3526144e6babdd3fc8c661a86097cf7e743441b41fda096fc4dd", "stateRoot": "0x860be6ab5a8fc2003c3739bfe2cdbcd9dbb273c8ea42951b832a8e1f22fb3a60",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000", "prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x1c9c380", "gasLimit": "0x1c9c380",
@ -14,13 +14,13 @@
"timestamp": "0x10", "timestamp": "0x10",
"extraData": "0x", "extraData": "0x",
"baseFeePerGas": "0x7", "baseFeePerGas": "0x7",
"excessBlobGas": "0x0",
"transactions": [], "transactions": [],
"withdrawals": [], "withdrawals": [],
"blockNumber": "0x1", "blockNumber": "0x1",
"blockHash": "0x8082deff44f79489ea92415be59afb48b6f46b939553f855479828a6f87f9593", "blobGasUsed": "0x0",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "blockHash": "0x7cccf6d9ce3e5acaeac9058959c27ace53af3a30b15763e1703bab2d0ae9438e",
"excessBlobGas": "0x0", "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
"blobGasUsed": "0x0"
}, },
[], [],
"0x0000000000000000000000000000000000000000000000000000000000000000" "0x0000000000000000000000000000000000000000000000000000000000000000"
@ -32,7 +32,7 @@
"id": 67, "id": 67,
"result": { "result": {
"status": "VALID", "status": "VALID",
"latestValidHash": "0x8082deff44f79489ea92415be59afb48b6f46b939553f855479828a6f87f9593", "latestValidHash": "0x7cccf6d9ce3e5acaeac9058959c27ace53af3a30b15763e1703bab2d0ae9438e",
"validationError": null "validationError": null
} }
}, },

@ -4,9 +4,9 @@
"method": "engine_forkchoiceUpdatedV3", "method": "engine_forkchoiceUpdatedV3",
"params": [ "params": [
{ {
"headBlockHash": "0x8082deff44f79489ea92415be59afb48b6f46b939553f855479828a6f87f9593", "headBlockHash": "0x7cccf6d9ce3e5acaeac9058959c27ace53af3a30b15763e1703bab2d0ae9438e",
"safeBlockHash": "0x8082deff44f79489ea92415be59afb48b6f46b939553f855479828a6f87f9593", "safeBlockHash": "0x7cccf6d9ce3e5acaeac9058959c27ace53af3a30b15763e1703bab2d0ae9438e",
"finalizedBlockHash": "0x8082deff44f79489ea92415be59afb48b6f46b939553f855479828a6f87f9593" "finalizedBlockHash": "0x7cccf6d9ce3e5acaeac9058959c27ace53af3a30b15763e1703bab2d0ae9438e"
}, },
null null
], ],
@ -18,7 +18,7 @@
"result": { "result": {
"payloadStatus": { "payloadStatus": {
"status": "VALID", "status": "VALID",
"latestValidHash": "0x8082deff44f79489ea92415be59afb48b6f46b939553f855479828a6f87f9593", "latestValidHash": "0x7cccf6d9ce3e5acaeac9058959c27ace53af3a30b15763e1703bab2d0ae9438e",
"validationError": null "validationError": null
}, },
"payloadId": null "payloadId": null

@ -4,9 +4,9 @@
"method": "engine_forkchoiceUpdatedV3", "method": "engine_forkchoiceUpdatedV3",
"params": [ "params": [
{ {
"headBlockHash": "0x8082deff44f79489ea92415be59afb48b6f46b939553f855479828a6f87f9593", "headBlockHash": "0x7cccf6d9ce3e5acaeac9058959c27ace53af3a30b15763e1703bab2d0ae9438e",
"safeBlockHash": "0x8082deff44f79489ea92415be59afb48b6f46b939553f855479828a6f87f9593", "safeBlockHash": "0x7cccf6d9ce3e5acaeac9058959c27ace53af3a30b15763e1703bab2d0ae9438e",
"finalizedBlockHash": "0x8082deff44f79489ea92415be59afb48b6f46b939553f855479828a6f87f9593" "finalizedBlockHash": "0x7cccf6d9ce3e5acaeac9058959c27ace53af3a30b15763e1703bab2d0ae9438e"
}, },
{ {
"timestamp": "0x20", "timestamp": "0x20",
@ -24,10 +24,10 @@
"result": { "result": {
"payloadStatus": { "payloadStatus": {
"status": "VALID", "status": "VALID",
"latestValidHash": "0x8082deff44f79489ea92415be59afb48b6f46b939553f855479828a6f87f9593", "latestValidHash": "0x7cccf6d9ce3e5acaeac9058959c27ace53af3a30b15763e1703bab2d0ae9438e",
"validationError": null "validationError": null
}, },
"payloadId": "0x282643d3a905e721" "payloadId": "0x282643fdcbcb1ddf"
} }
}, },
"statusCode": 200 "statusCode": 200

@ -3,7 +3,7 @@
"jsonrpc": "2.0", "jsonrpc": "2.0",
"method": "engine_getPayloadV4", "method": "engine_getPayloadV4",
"params": [ "params": [
"0x282643d3a905e721" "0x282643fdcbcb1ddf"
], ],
"id": 67 "id": 67
}, },
@ -12,9 +12,9 @@
"id": 67, "id": 67,
"result": { "result": {
"executionPayload": { "executionPayload": {
"parentHash": "0x8082deff44f79489ea92415be59afb48b6f46b939553f855479828a6f87f9593", "parentHash": "0x7cccf6d9ce3e5acaeac9058959c27ace53af3a30b15763e1703bab2d0ae9438e",
"feeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "feeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"stateRoot": "0x2e59916a57b535875bcd80d8472aeaa0027aa685d159804e8caa2f12d060155e", "stateRoot": "0xed4093bcd157ba955245906a1cda7695d3b3f233af709f0adf17689abb4d93b4",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000", "prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x1c9c380", "gasLimit": "0x1c9c380",
@ -23,22 +23,13 @@
"extraData": "0x", "extraData": "0x",
"baseFeePerGas": "0x7", "baseFeePerGas": "0x7",
"excessBlobGas": "0x0", "excessBlobGas": "0x0",
"blobGasUsed": "0x0",
"parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"transactions": [], "transactions": [],
"withdrawals": [], "withdrawals": [],
"depositRequests": [],
"withdrawalRequests": [
{
"sourceAddress": "0xa4664c40aacebd82a2db79f0ea36c06bc6a19adb",
"validatorPubkey": "0xb10a4a15bf67b328c9b101d09e5c6ee6672978fdad9ef0d9e2ceffaee99223555d8601f0cb3bcc4ce1af9864779a416e",
"amount": "0x0"
}
],
"consolidationRequests" : [],
"blockNumber": "0x2", "blockNumber": "0x2",
"blockHash": "0x27a2bc2ac21b3fc796f636bec1ec9cba100435f9a793176a83a5d4fa7cc13006",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"blobGasUsed": "0x0" "blockHash": "0x303fb51567c090ed3fb7ac50a082ae3a0bcb8ff522d071011a1ca433561a4569"
}, },
"blockValue": "0x0", "blockValue": "0x0",
"blobsBundle": { "blobsBundle": {
@ -46,7 +37,12 @@
"proofs": [], "proofs": [],
"blobs": [] "blobs": []
}, },
"shouldOverrideBuilder": false "shouldOverrideBuilder": false,
"executionRequests": [
"0x",
"0xa4664c40aacebd82a2db79f0ea36c06bc6a19adbb10a4a15bf67b328c9b101d09e5c6ee6672978fdad9ef0d9e2ceffaee99223555d8601f0cb3bcc4ce1af9864779a416e0000000000000000",
"0x"
]
} }
}, },
"statusCode": 200 "statusCode": 200

@ -17,24 +17,24 @@
"excessBlobGas": "0x0", "excessBlobGas": "0x0",
"transactions": [], "transactions": [],
"withdrawals": [], "withdrawals": [],
"depositRequests": null,
"blockNumber": "0x2", "blockNumber": "0x2",
"blockHash": "0x2331b2dc9c453e9a33685099742cbbcd529d42bd5681969f45754f06866c6766", "blockHash": "0x2331b2dc9c453e9a33685099742cbbcd529d42bd5681969f45754f06866c6766",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"blobGasUsed": "0x0" "blobGasUsed": "0x0"
}, },
[], [],
"0x0000000000000000000000000000000000000000000000000000000000000000" "0x0000000000000000000000000000000000000000000000000000000000000000",
null
], ],
"id": 67 "id": 67
}, },
"response": { "response": {
"jsonrpc": "2.0", "jsonrpc" : "2.0",
"id": 67, "id" : 67,
"error": { "error" : {
"code": -32602, "code" : -32602,
"message": "Invalid params", "message" : "Invalid execution requests params",
"data": "Missing deposit field" "data" : "Missing execution requests field"
} }
}, },
"statusCode": 200 "statusCode": 200

@ -4,9 +4,9 @@
"method": "engine_newPayloadV4", "method": "engine_newPayloadV4",
"params": [ "params": [
{ {
"parentHash": "0x8082deff44f79489ea92415be59afb48b6f46b939553f855479828a6f87f9593", "parentHash": "0x7cccf6d9ce3e5acaeac9058959c27ace53af3a30b15763e1703bab2d0ae9438e",
"feeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "feeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"stateRoot": "0x961878fdcdff52ea42db0026f59aa414a5ec2835e56ed1a8ae50c80a9fe3a04b", "stateRoot": "0x176ea6dfa3b8efb148a025f759cccfaab02db38427b12a4ede73491eda397196",
"logsBloom": "0x10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000", "logsBloom": "0x10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000",
"prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000", "prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x1c9c380", "gasLimit": "0x1c9c380",
@ -15,34 +15,22 @@
"extraData": "0x", "extraData": "0x",
"baseFeePerGas": "0x7", "baseFeePerGas": "0x7",
"excessBlobGas": "0x0", "excessBlobGas": "0x0",
"blobGasUsed": "0x0",
"transactions": [ "transactions": [
"0x02f9021c8217de808459682f008459682f0e830271009442424242424242424242424242424242424242428901bc16d674ec800000b901a422895118000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120749715de5d1226545c6b3790f515d551a5cc5bf1d49c87a696860554d2fc4f14000000000000000000000000000000000000000000000000000000000000003096a96086cff07df17668f35f7418ef8798079167e3f4f9b72ecde17b28226137cf454ab1dd20ef5d924786ab3483c2f9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020003f5102dabe0a27b1746098d1dc17a5d3fbd478759fea9287e4e419b3c3cef20000000000000000000000000000000000000000000000000000000000000060b1acdb2c4d3df3f1b8d3bfd33421660df358d84d78d16c4603551935f4b67643373e7eb63dcb16ec359be0ec41fee33b03a16e80745f2374ff1d3c352508ac5d857c6476d3c3bcf7e6ca37427c9209f17be3af5264c0e2132b3dd1156c28b4e9c080a09f597089338d7f44f5c59f8230bb38f243849228a8d4e9d2e2956e6050f5b2c7a076486996c7e62802b8f95eee114783e4b403fd11093ba96286ff42c595f24452" "0x02f9021c8217de808459682f008459682f0e830271009442424242424242424242424242424242424242428901bc16d674ec800000b901a422895118000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120749715de5d1226545c6b3790f515d551a5cc5bf1d49c87a696860554d2fc4f14000000000000000000000000000000000000000000000000000000000000003096a96086cff07df17668f35f7418ef8798079167e3f4f9b72ecde17b28226137cf454ab1dd20ef5d924786ab3483c2f9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020003f5102dabe0a27b1746098d1dc17a5d3fbd478759fea9287e4e419b3c3cef20000000000000000000000000000000000000000000000000000000000000060b1acdb2c4d3df3f1b8d3bfd33421660df358d84d78d16c4603551935f4b67643373e7eb63dcb16ec359be0ec41fee33b03a16e80745f2374ff1d3c352508ac5d857c6476d3c3bcf7e6ca37427c9209f17be3af5264c0e2132b3dd1156c28b4e9c080a09f597089338d7f44f5c59f8230bb38f243849228a8d4e9d2e2956e6050f5b2c7a076486996c7e62802b8f95eee114783e4b403fd11093ba96286ff42c595f24452"
], ],
"withdrawals": [], "withdrawals": [],
"depositRequests": [
{
"amount": "0x773594000",
"index": "0x0",
"pubkey": "0x96a96086cff07df17668f35f7418ef8798079167e3f4f9b72ecde17b28226137cf454ab1dd20ef5d924786ab3483c2f9",
"signature": "0xb1acdb2c4d3df3f1b8d3bfd33421660df358d84d78d16c4603551935f4b67643373e7eb63dcb16ec359be0ec41fee33b03a16e80745f2374ff1d3c352508ac5d857c6476d3c3bcf7e6ca37427c9209f17be3af5264c0e2132b3dd1156c28b4e9",
"withdrawalCredentials": "0x003f5102dabe0a27b1746098d1dc17a5d3fbd478759fea9287e4e419b3c3cef2"
}
],
"withdrawalRequests": [
{
"sourceAddress": "0xa4664c40aacebd82a2db79f0ea36c06bc6a19adb",
"amount": "0x0",
"validatorPubkey": "0xb10a4a15bf67b328c9b101d09e5c6ee6672978fdad9ef0d9e2ceffaee99223555d8601f0cb3bcc4ce1af9864779a416e"
}
],
"consolidationRequests": [],
"blockNumber": "0x2", "blockNumber": "0x2",
"blockHash": "0xc67a660f5d3c20ee603911bdff1e409e976f306883dff8ef4999dca3176f7dca",
"receiptsRoot": "0x79ee3424eb720a3ad4b1c5a372bb8160580cbe4d893778660f34213c685627a9", "receiptsRoot": "0x79ee3424eb720a3ad4b1c5a372bb8160580cbe4d893778660f34213c685627a9",
"blobGasUsed": "0x0" "blockHash": "0x14ba5ec415d827d9cab33e6097b307131e8119a1cd7dc1f6a4de088ebfa4c1b6"
}, },
[], [],
"0x0000000000000000000000000000000000000000000000000000000000000000" "0x0000000000000000000000000000000000000000000000000000000000000000",
[
"0xf84794a4664c40aacebd82a2db79f0ea36c06bc6a19adbb0b10a4a15bf67b328c9b101d09e5c6ee6672978fdad9ef0d9e2ceffaee99223555d8601f0cb3bcc4ce1af9864779a416e80",
"0xa4664c40aacebd82a2db79f0ea36c06bc6a19adbb10a4a15bf67b328c9b101d09e5c6ee6672978fdad9ef0d9e2ceffaee99223555d8601f0cb3bcc4ce1af9864779a416e0000000000000000",
"0x"
]
], ],
"id": 67 "id": 67
}, },
@ -51,7 +39,7 @@
"id": 67, "id": 67,
"result": { "result": {
"status": "VALID", "status": "VALID",
"latestValidHash": "0xc67a660f5d3c20ee603911bdff1e409e976f306883dff8ef4999dca3176f7dca", "latestValidHash": "0x14ba5ec415d827d9cab33e6097b307131e8119a1cd7dc1f6a4de088ebfa4c1b6",
"validationError": null "validationError": null
} }
}, },

@ -4,9 +4,9 @@
"method": "engine_forkchoiceUpdatedV3", "method": "engine_forkchoiceUpdatedV3",
"params": [ "params": [
{ {
"headBlockHash": "0xc67a660f5d3c20ee603911bdff1e409e976f306883dff8ef4999dca3176f7dca", "headBlockHash": "0x14ba5ec415d827d9cab33e6097b307131e8119a1cd7dc1f6a4de088ebfa4c1b6",
"safeBlockHash": "0xc67a660f5d3c20ee603911bdff1e409e976f306883dff8ef4999dca3176f7dca", "safeBlockHash": "0x14ba5ec415d827d9cab33e6097b307131e8119a1cd7dc1f6a4de088ebfa4c1b6",
"finalizedBlockHash": "0xc67a660f5d3c20ee603911bdff1e409e976f306883dff8ef4999dca3176f7dca" "finalizedBlockHash": "0x14ba5ec415d827d9cab33e6097b307131e8119a1cd7dc1f6a4de088ebfa4c1b6"
}, },
{ {
"timestamp": "0x30", "timestamp": "0x30",
@ -24,10 +24,10 @@
"result": { "result": {
"payloadStatus": { "payloadStatus": {
"status": "VALID", "status": "VALID",
"latestValidHash": "0xc67a660f5d3c20ee603911bdff1e409e976f306883dff8ef4999dca3176f7dca", "latestValidHash": "0x14ba5ec415d827d9cab33e6097b307131e8119a1cd7dc1f6a4de088ebfa4c1b6",
"validationError": null "validationError": null
}, },
"payloadId": "0x282643a16a58b5cf" "payloadId": "0x282643aeecfdbccf"
} }
}, },
"statusCode": 200 "statusCode": 200

@ -3,7 +3,7 @@
"jsonrpc": "2.0", "jsonrpc": "2.0",
"method": "engine_getPayloadV4", "method": "engine_getPayloadV4",
"params": [ "params": [
"0x282643a16a58b5cf" "0x282643aeecfdbccf"
], ],
"id": 67 "id": 67
}, },
@ -12,9 +12,9 @@
"id": 67, "id": 67,
"result": { "result": {
"executionPayload": { "executionPayload": {
"parentHash": "0xc67a660f5d3c20ee603911bdff1e409e976f306883dff8ef4999dca3176f7dca", "parentHash": "0x14ba5ec415d827d9cab33e6097b307131e8119a1cd7dc1f6a4de088ebfa4c1b6",
"feeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "feeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"stateRoot": "0x5fc31c01a451fe02f0e938de7ec7044aaba1159a81a1be64357bc70af226f304", "stateRoot": "0xade3c29cae771ddfa994d3d2994f3bcbe084bc7bb23cdbb9bd7e35b39f007841",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000", "prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x1c9c380", "gasLimit": "0x1c9c380",
@ -23,16 +23,13 @@
"extraData": "0x", "extraData": "0x",
"baseFeePerGas": "0x7", "baseFeePerGas": "0x7",
"excessBlobGas": "0x0", "excessBlobGas": "0x0",
"blobGasUsed": "0x0",
"parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"transactions": [], "transactions": [],
"withdrawals": [], "withdrawals": [],
"depositRequests": [],
"withdrawalRequests": [],
"consolidationRequests" : [],
"blockNumber": "0x3", "blockNumber": "0x3",
"blockHash": "0xdbb55a049f14b8152695bf3bbd754aa1fd55bbe10b306eb49caa4bd7d7fcb634",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"blobGasUsed": "0x0" "blockHash": "0x9f157012bdc439f5fe2bb3b4236eb07043e35d16256557d73e80a95d20054929"
}, },
"blockValue": "0x0", "blockValue": "0x0",
"blobsBundle": { "blobsBundle": {
@ -40,7 +37,12 @@
"proofs": [], "proofs": [],
"blobs": [] "blobs": []
}, },
"shouldOverrideBuilder": false "shouldOverrideBuilder": false,
"executionRequests": [
"0x",
"0x",
"0x"
]
} }
}, },
"statusCode": 200 "statusCode": 200

@ -4,9 +4,9 @@
"method": "engine_newPayloadV3", "method": "engine_newPayloadV3",
"params": [ "params": [
{ {
"parentHash": "0xc67a660f5d3c20ee603911bdff1e409e976f306883dff8ef4999dca3176f7dca", "parentHash": "0x14ba5ec415d827d9cab33e6097b307131e8119a1cd7dc1f6a4de088ebfa4c1b6",
"feeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "feeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"stateRoot": "0x5fc31c01a451fe02f0e938de7ec7044aaba1159a81a1be64357bc70af226f304", "stateRoot": "0xade3c29cae771ddfa994d3d2994f3bcbe084bc7bb23cdbb9bd7e35b39f007841",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000", "prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x1c9c380", "gasLimit": "0x1c9c380",
@ -14,18 +14,21 @@
"timestamp": "0x30", "timestamp": "0x30",
"extraData": "0x", "extraData": "0x",
"baseFeePerGas": "0x7", "baseFeePerGas": "0x7",
"excessBlobGas": "0x0",
"blobGasUsed": "0x0",
"transactions": [], "transactions": [],
"withdrawals": [], "withdrawals": [],
"depositRequests": [],
"withdrawalRequests": [],
"blockNumber": "0x3", "blockNumber": "0x3",
"blockHash": "0xdbb55a049f14b8152695bf3bbd754aa1fd55bbe10b306eb49caa4bd7d7fcb634",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"excessBlobGas": "0x0", "blockHash": "0x9f157012bdc439f5fe2bb3b4236eb07043e35d16256557d73e80a95d20054929"
"blobGasUsed": "0x0"
}, },
[], [],
"0x0000000000000000000000000000000000000000000000000000000000000000" "0x0000000000000000000000000000000000000000000000000000000000000000",
[
"0x",
"0x",
"0x"
]
], ],
"id": 67 "id": 67
}, },
@ -34,7 +37,7 @@
"id": 67, "id": 67,
"result": { "result": {
"status": "VALID", "status": "VALID",
"latestValidHash": "0xdbb55a049f14b8152695bf3bbd754aa1fd55bbe10b306eb49caa4bd7d7fcb634", "latestValidHash": "0x9f157012bdc439f5fe2bb3b4236eb07043e35d16256557d73e80a95d20054929",
"validationError": null "validationError": null
} }
}, },

@ -4,9 +4,9 @@
"method": "engine_forkchoiceUpdatedV3", "method": "engine_forkchoiceUpdatedV3",
"params": [ "params": [
{ {
"headBlockHash": "0xdbb55a049f14b8152695bf3bbd754aa1fd55bbe10b306eb49caa4bd7d7fcb634", "headBlockHash": "0x9f157012bdc439f5fe2bb3b4236eb07043e35d16256557d73e80a95d20054929",
"safeBlockHash": "0xdbb55a049f14b8152695bf3bbd754aa1fd55bbe10b306eb49caa4bd7d7fcb634", "safeBlockHash": "0x9f157012bdc439f5fe2bb3b4236eb07043e35d16256557d73e80a95d20054929",
"finalizedBlockHash": "0xdbb55a049f14b8152695bf3bbd754aa1fd55bbe10b306eb49caa4bd7d7fcb634" "finalizedBlockHash": "0x9f157012bdc439f5fe2bb3b4236eb07043e35d16256557d73e80a95d20054929"
}, },
{ {
"timestamp": "0x40", "timestamp": "0x40",
@ -24,10 +24,10 @@
"result": { "result": {
"payloadStatus": { "payloadStatus": {
"status": "VALID", "status": "VALID",
"latestValidHash": "0xdbb55a049f14b8152695bf3bbd754aa1fd55bbe10b306eb49caa4bd7d7fcb634", "latestValidHash": "0x9f157012bdc439f5fe2bb3b4236eb07043e35d16256557d73e80a95d20054929",
"validationError": null "validationError": null
}, },
"payloadId": "0x28264396a9634d41" "payloadId": "0x282643ae671b03bf"
} }
}, },
"statusCode": 200 "statusCode": 200

@ -3,7 +3,7 @@
"jsonrpc": "2.0", "jsonrpc": "2.0",
"method": "engine_getPayloadV4", "method": "engine_getPayloadV4",
"params": [ "params": [
"0x28264396a9634d41" "0x282643ae671b03bf"
], ],
"id": 67 "id": 67
}, },
@ -12,50 +12,40 @@
"id": 67, "id": 67,
"result": { "result": {
"executionPayload": { "executionPayload": {
"parentHash": "0xdbb55a049f14b8152695bf3bbd754aa1fd55bbe10b306eb49caa4bd7d7fcb634", "parentHash": "0x9f157012bdc439f5fe2bb3b4236eb07043e35d16256557d73e80a95d20054929",
"feeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "feeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"stateRoot": "0x49df1f1a1d28a23fa752230d442077768787d392e9edb70c83d727d31e55eaac", "stateRoot": "0xc7dbe7764cb5edd271a3e7fc4ffad23736aa1b8d4a5703e05a58db88d4ecbdc3",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000100000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000008000000000000000000000000000000000000000800000000000000000000000000",
"prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000", "prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x1c9c380", "gasLimit": "0x1c9c380",
"gasUsed": "0x3ad4d", "gasUsed": "0x3b6c5",
"timestamp": "0x40", "timestamp": "0x40",
"extraData": "0x", "extraData": "0x",
"baseFeePerGas": "0x7", "baseFeePerGas": "0x7",
"excessBlobGas": "0x0", "excessBlobGas": "0x0",
"blobGasUsed": "0x0",
"parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"transactions": [ "transactions": [
"0xf8a08085e8d4a51000832dc6c09400a3ca265ebcb825b45f985a16cefb49958ce01702b8388706d19a62f28a6a6549f96c5adaebac9124a61d44868ec94f6d2d707c6a2f82c9162071231dfeb40e24bfde4ffdf2430000000000000000822fdfa00476c1a81f80f4c130acb5f8b8075468ba0893d766b7ec51a8d9723c573ad034a03bd3eaedabbaaf745f15023185ba66584ad3ee8bb40b9bef8c0b9ed27f8b1959", "0xf8a08085e8d4a51000832dc6c09400a3ca265ebcb825b45f985a16cefb49958ce01702b8388706d19a62f28a6a6549f96c5adaebac9124a61d44868ec94f6d2d707c6a2f82c9162071231dfeb40e24bfde4ffdf2430000000000000000822fdfa00476c1a81f80f4c130acb5f8b8075468ba0893d766b7ec51a8d9723c573ad034a03bd3eaedabbaaf745f15023185ba66584ad3ee8bb40b9bef8c0b9ed27f8b1959",
"0xf8c80185e8d4a51000832dc6c09400b42dbf2194e931e80326d950320f7d9dbeac0201b860fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe822fe0a05b88b593926d340f448918ef1c6263356c37f2434774e0fdb1cb9d90cfa5a23ba003a86aac4adb774181ba51eda17efb5fbed99ad57895e6eb56ccdf508a88a7cc" "0xf8c80185e8d4a51000832dc6c09400b42dbf2194e931e80326d950320f7d9dbeac0201b860fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe822fe0a05b88b593926d340f448918ef1c6263356c37f2434774e0fdb1cb9d90cfa5a23ba003a86aac4adb774181ba51eda17efb5fbed99ad57895e6eb56ccdf508a88a7cc"
], ],
"withdrawals": [], "withdrawals": [],
"depositRequests": [],
"withdrawalRequests": [
{
"sourceAddress": "0x23618e81e3f5cdf7f54c3d65f7fbc0abf5b21e8f",
"amount": "0x0",
"validatorPubkey": "0x8706d19a62f28a6a6549f96c5adaebac9124a61d44868ec94f6d2d707c6a2f82c9162071231dfeb40e24bfde4ffdf243"
}
],
"consolidationRequests": [
{
"sourceAddress": "0x23618e81e3f5cdf7f54c3d65f7fbc0abf5b21e8f",
"sourcePubkey": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"targetPubkey": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe"
}
],
"blockNumber": "0x4", "blockNumber": "0x4",
"receiptsRoot": "0x970fc81bb3e7fb21435f9a65a184aa9e3fd2f52b89fd859302b46954354266b5", "receiptsRoot": "0x640f4036d53782ca4c5e9273ba6d657db4f5ff4fe526a8ed1997af9d0b8ae2d3",
"blobGasUsed": "0x0", "blockHash": "0x61642311e6c1e0af50abf17be1fcb6de8bd75af2ca2d188031d074f6e71bf5e6"
"blockHash": "0x93df6f3484202f24c692354e2ab96e9948ae45eea6ad85faea121a389e468ea8"
}, },
"blockValue": "0x3581baab15c12e5", "blockValue": "0x360b8482c4b509d",
"blobsBundle": { "blobsBundle": {
"commitments": [], "commitments": [],
"proofs": [], "proofs": [],
"blobs": [] "blobs": []
}, },
"shouldOverrideBuilder": false "shouldOverrideBuilder": false,
"executionRequests": [
"0x",
"0x23618e81e3f5cdf7f54c3d65f7fbc0abf5b21e8f8706d19a62f28a6a6549f96c5adaebac9124a61d44868ec94f6d2d707c6a2f82c9162071231dfeb40e24bfde4ffdf2430000000000000000",
"0x23618e81e3f5cdf7f54c3d65f7fbc0abf5b21e8ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe"
]
} }
}, },
"statusCode": 200, "statusCode": 200,

@ -68,20 +68,21 @@ dependencies {
implementation 'com.google.guava:guava' implementation 'com.google.guava:guava'
implementation 'com.google.dagger:dagger' implementation 'com.google.dagger:dagger'
implementation 'com.graphql-java:graphql-java' implementation 'com.graphql-java:graphql-java'
implementation 'commons-net:commons-net'
implementation 'info.picocli:picocli' implementation 'info.picocli:picocli'
implementation 'io.vertx:vertx-core' implementation 'io.vertx:vertx-core'
implementation 'io.vertx:vertx-web' implementation 'io.vertx:vertx-web'
implementation 'org.apache.commons:commons-lang3'
implementation 'org.apache.logging.log4j:log4j-core'
implementation 'io.tmio:tuweni-bytes' implementation 'io.tmio:tuweni-bytes'
implementation 'io.tmio:tuweni-config' implementation 'io.tmio:tuweni-config'
implementation 'io.tmio:tuweni-toml' implementation 'io.tmio:tuweni-toml'
implementation 'io.tmio:tuweni-units' implementation 'io.tmio:tuweni-units'
implementation 'org.apache.commons:commons-lang3'
implementation 'org.apache.logging.log4j:log4j-core'
implementation 'org.hibernate.validator:hibernate-validator'
implementation 'org.rocksdb:rocksdbjni'
implementation 'org.springframework.security:spring-security-crypto' implementation 'org.springframework.security:spring-security-crypto'
implementation 'org.xerial.snappy:snappy-java' implementation 'org.xerial.snappy:snappy-java'
implementation 'tech.pegasys:jc-kzg-4844' implementation 'tech.pegasys:jc-kzg-4844'
implementation 'org.rocksdb:rocksdbjni'
implementation 'commons-net:commons-net'
runtimeOnly 'org.apache.logging.log4j:log4j-jul' runtimeOnly 'org.apache.logging.log4j:log4j-jul'
runtimeOnly 'com.splunk.logging:splunk-library-javalogging' runtimeOnly 'com.splunk.logging:splunk-library-javalogging'

@ -1421,7 +1421,6 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
} }
private void validateOptions() { private void validateOptions() {
validateRequiredOptions();
issueOptionWarnings(); issueOptionWarnings();
validateP2PInterface(p2PDiscoveryOptions.p2pInterface); validateP2PInterface(p2PDiscoveryOptions.p2pInterface);
validateMiningParams(); validateMiningParams();
@ -1475,19 +1474,6 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
dataStorageOptions.validate(commandLine); dataStorageOptions.validate(commandLine);
} }
private void validateRequiredOptions() {
commandLine
.getCommandSpec()
.options()
.forEach(
option -> {
if (option.required() && option.stringValues().isEmpty()) {
throw new ParameterException(
this.commandLine, "Missing required option: " + option.longestName());
}
});
}
private void validateMiningParams() { private void validateMiningParams() {
miningOptions.validate( miningOptions.validate(
commandLine, genesisConfigOptionsSupplier.get(), isMergeEnabled(), logger); commandLine, genesisConfigOptionsSupplier.get(), isMergeEnabled(), logger);

@ -23,6 +23,7 @@ import org.hyperledger.besu.cli.util.VersionProvider;
import java.io.PrintWriter; import java.io.PrintWriter;
import jakarta.validation.constraints.NotEmpty;
import org.springframework.security.crypto.bcrypt.BCrypt; import org.springframework.security.crypto.bcrypt.BCrypt;
import picocli.CommandLine.Command; import picocli.CommandLine.Command;
import picocli.CommandLine.Model.CommandSpec; import picocli.CommandLine.Model.CommandSpec;
@ -75,6 +76,7 @@ public class PasswordSubCommand implements Runnable {
static class HashSubCommand implements Runnable { static class HashSubCommand implements Runnable {
@SuppressWarnings({"FieldCanBeFinal", "FieldMayBeFinal"}) // PicoCLI requires non-final Strings. @SuppressWarnings({"FieldCanBeFinal", "FieldMayBeFinal"}) // PicoCLI requires non-final Strings.
@NotEmpty
@Option( @Option(
names = "--password", names = "--password",
arity = "1..1", arity = "1..1",

@ -54,6 +54,7 @@ import java.util.function.Function;
import java.util.function.Supplier; import java.util.function.Supplier;
import io.vertx.core.Vertx; import io.vertx.core.Vertx;
import jakarta.validation.constraints.NotBlank;
import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -335,6 +336,7 @@ public class BlocksSubCommand implements Runnable {
arity = "1..1") arity = "1..1")
private final BlockExportFormat format = BlockExportFormat.RLP; private final BlockExportFormat format = BlockExportFormat.RLP;
@NotBlank
@Option( @Option(
names = "--to", names = "--to",
required = true, required = true,

@ -33,6 +33,7 @@ import java.util.Optional;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.LockSupport; import java.util.concurrent.locks.LockSupport;
import jakarta.validation.constraints.NotBlank;
import picocli.CommandLine.Command; import picocli.CommandLine.Command;
import picocli.CommandLine.Option; import picocli.CommandLine.Option;
import picocli.CommandLine.ParentCommand; import picocli.CommandLine.ParentCommand;
@ -55,6 +56,7 @@ public class BackupState implements Runnable {
arity = "1..1") arity = "1..1")
private final Long block = Long.MAX_VALUE; private final Long block = Long.MAX_VALUE;
@NotBlank
@Option( @Option(
names = "--backup-path", names = "--backup-path",
required = true, required = true,

@ -52,6 +52,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.common.base.Supplier; import com.google.common.base.Supplier;
import com.google.common.base.Suppliers; import com.google.common.base.Suppliers;
import com.google.common.io.Resources; import com.google.common.io.Resources;
import jakarta.validation.constraints.NotBlank;
import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -70,6 +71,7 @@ class GenerateBlockchainConfig implements Runnable {
private final Supplier<SignatureAlgorithm> SIGNATURE_ALGORITHM = private final Supplier<SignatureAlgorithm> SIGNATURE_ALGORITHM =
Suppliers.memoize(SignatureAlgorithmFactory::getInstance); Suppliers.memoize(SignatureAlgorithmFactory::getInstance);
@NotBlank
@Option( @Option(
required = true, required = true,
names = "--config-file", names = "--config-file",
@ -78,6 +80,7 @@ class GenerateBlockchainConfig implements Runnable {
arity = "1..1") arity = "1..1")
private final File configurationFile = null; private final File configurationFile = null;
@NotBlank
@Option( @Option(
required = true, required = true,
names = "--to", names = "--to",

@ -46,6 +46,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.fasterxml.jackson.databind.node.ObjectNode; import com.fasterxml.jackson.databind.node.ObjectNode;
import jakarta.validation.constraints.NotBlank;
import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes;
import org.apache.tuweni.bytes.Bytes32; import org.apache.tuweni.bytes.Bytes32;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -64,6 +65,7 @@ public class RestoreState implements Runnable {
private static final Logger LOG = LoggerFactory.getLogger(RestoreState.class); private static final Logger LOG = LoggerFactory.getLogger(RestoreState.class);
@NotBlank
@Option( @Option(
names = "--backup-path", names = "--backup-path",
required = true, required = true,

@ -717,7 +717,7 @@ public abstract class BesuControllerBuilder implements MiningParameterOverrides
ethPeers.snapServerPeersNeeded(false); ethPeers.snapServerPeersNeeded(false);
} }
protocolContext.setSynchronizer(Optional.of(synchronizer)); protocolContext.setSynchronizer(synchronizer);
final Optional<SnapProtocolManager> maybeSnapProtocolManager = final Optional<SnapProtocolManager> maybeSnapProtocolManager =
createSnapProtocolManager( createSnapProtocolManager(

@ -15,6 +15,7 @@
package org.hyperledger.besu; package org.hyperledger.besu;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.when;
@ -46,20 +47,14 @@ import java.util.stream.Stream;
import com.google.common.collect.Streams; import com.google.common.collect.Streams;
import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource; import org.junit.jupiter.params.provider.MethodSource;
import org.junit.runner.RunWith; import org.mockito.junit.jupiter.MockitoExtension;
import org.junit.runners.Parameterized;
@RunWith(Parameterized.class) @ExtendWith(MockitoExtension.class)
public class ForkIdsNetworkConfigTest { public class ForkIdsNetworkConfigTest {
@Parameterized.Parameter public NetworkName chainName;
@Parameterized.Parameter(1)
public List<ForkId> expectedForkIds;
@Parameterized.Parameters(name = "{0}")
public static Collection<Object[]> parameters() { public static Collection<Object[]> parameters() {
return List.of( return List.of(
new Object[] { new Object[] {
@ -149,8 +144,8 @@ public class ForkIdsNetworkConfigTest {
final AtomicLong blockNumber = new AtomicLong(); final AtomicLong blockNumber = new AtomicLong();
when(mockBlockchain.getChainHeadHeader()).thenReturn(mockBlockHeader); when(mockBlockchain.getChainHeadHeader()).thenReturn(mockBlockHeader);
when(mockBlockHeader.getNumber()).thenAnswer(o -> blockNumber.get()); lenient().when(mockBlockHeader.getNumber()).thenAnswer(o -> blockNumber.get());
when(mockBlockHeader.getTimestamp()).thenAnswer(o -> blockNumber.get()); lenient().when(mockBlockHeader.getTimestamp()).thenAnswer(o -> blockNumber.get());
final ForkIdManager forkIdManager = final ForkIdManager forkIdManager =
new ForkIdManager( new ForkIdManager(

@ -16,7 +16,6 @@ package org.hyperledger.besu.cli;
import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.charset.StandardCharsets.UTF_8;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.Matchers.is;
import static org.hyperledger.besu.cli.config.NetworkName.CLASSIC; import static org.hyperledger.besu.cli.config.NetworkName.CLASSIC;
import static org.hyperledger.besu.cli.config.NetworkName.DEV; import static org.hyperledger.besu.cli.config.NetworkName.DEV;
import static org.hyperledger.besu.cli.config.NetworkName.EPHEMERY; import static org.hyperledger.besu.cli.config.NetworkName.EPHEMERY;
@ -33,7 +32,7 @@ import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfigura
import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfiguration.SEPOLIA_BOOTSTRAP_NODES; import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfiguration.SEPOLIA_BOOTSTRAP_NODES;
import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfiguration.SEPOLIA_DISCOVERY_URL; import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfiguration.SEPOLIA_DISCOVERY_URL;
import static org.hyperledger.besu.plugin.services.storage.DataStorageFormat.BONSAI; import static org.hyperledger.besu.plugin.services.storage.DataStorageFormat.BONSAI;
import static org.junit.Assume.assumeThat; import static org.junit.jupiter.api.Assumptions.assumeTrue;
import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.contains; import static org.mockito.ArgumentMatchers.contains;
import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.eq;
@ -2392,7 +2391,7 @@ public class BesuCommandTest extends CommandTestAbstract {
@Test @Test
public void logsWarningWhenFailToLoadJemalloc() { public void logsWarningWhenFailToLoadJemalloc() {
assumeThat(PlatformDetector.getOSType(), is("linux")); assumeTrue(PlatformDetector.getOSType().equals("linux"));
setEnvironmentVariable("BESU_USING_JEMALLOC", "true"); setEnvironmentVariable("BESU_USING_JEMALLOC", "true");
parseCommand(); parseCommand();
verify(mockLogger) verify(mockLogger)
@ -2404,7 +2403,7 @@ public class BesuCommandTest extends CommandTestAbstract {
@Test @Test
public void logsSuggestInstallingJemallocWhenEnvVarNotPresent() { public void logsSuggestInstallingJemallocWhenEnvVarNotPresent() {
assumeThat(PlatformDetector.getOSType(), is("linux")); assumeTrue(PlatformDetector.getOSType().equals("linux"));
parseCommand(); parseCommand();
verify(mockLogger) verify(mockLogger)
.info("jemalloc library not found, memory usage may be reduced by installing it"); .info("jemalloc library not found, memory usage may be reduced by installing it");

@ -113,6 +113,7 @@ import io.opentelemetry.api.GlobalOpenTelemetry;
import io.vertx.core.Vertx; import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions; import io.vertx.core.VertxOptions;
import io.vertx.core.json.JsonObject; import io.vertx.core.json.JsonObject;
import jakarta.validation.constraints.NotEmpty;
import org.apache.commons.net.util.SubnetUtils.SubnetInfo; import org.apache.commons.net.util.SubnetUtils.SubnetInfo;
import org.apache.commons.text.StringEscapeUtils; import org.apache.commons.text.StringEscapeUtils;
import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes;
@ -621,6 +622,7 @@ public abstract class CommandTestAbstract {
@CommandLine.Command @CommandLine.Command
public static class TestBesuCommandWithRequiredOption extends TestBesuCommand { public static class TestBesuCommandWithRequiredOption extends TestBesuCommand {
@NotEmpty
@CommandLine.Option( @CommandLine.Option(
names = {"--accept-terms-and-conditions"}, names = {"--accept-terms-and-conditions"},
description = "You must explicitly accept terms and conditions", description = "You must explicitly accept terms and conditions",

@ -16,8 +16,7 @@ package org.hyperledger.besu.cli;
import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.charset.StandardCharsets.UTF_8;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.Matchers.startsWith; import static org.junit.jupiter.api.Assumptions.assumeTrue;
import static org.junit.Assume.assumeThat;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.when;
@ -415,10 +414,9 @@ public class PrivacyOptionsTest extends CommandTestAbstract {
@Test @Test
public void privEnclaveKeyFileDoesNotExist() { public void privEnclaveKeyFileDoesNotExist() {
assumeThat( assumeTrue(
"Ignored if system language is not English", System.getProperty("user.language").startsWith("en"),
System.getProperty("user.language"), "Ignored if system language is not English");
startsWith("en"));
parseCommand("--privacy-enabled=true", "--privacy-public-key-file", "/non/existent/file"); parseCommand("--privacy-enabled=true", "--privacy-public-key-file", "/non/existent/file");
assertThat(commandOutput.toString(UTF_8)).isEmpty(); assertThat(commandOutput.toString(UTF_8)).isEmpty();

@ -24,10 +24,8 @@ import java.util.regex.Pattern
plugins { plugins {
id 'com.diffplug.spotless' version '6.25.0' id 'com.diffplug.spotless' version '6.25.0'
id 'com.github.ben-manes.versions' version '0.51.0'
id 'com.github.jk1.dependency-license-report' version '2.9' id 'com.github.jk1.dependency-license-report' version '2.9'
id 'com.jfrog.artifactory' version '5.2.5' id 'com.jfrog.artifactory' version '5.2.5'
id 'io.spring.dependency-management' version '1.1.6'
id 'me.champeau.jmh' version '0.7.2' apply false id 'me.champeau.jmh' version '0.7.2' apply false
id 'net.ltgt.errorprone' version '4.0.1' id 'net.ltgt.errorprone' version '4.0.1'
id 'maven-publish' id 'maven-publish'
@ -120,12 +118,10 @@ licenseReport {
] ]
} }
allprojects { configure(allprojects - project(':platform')) {
apply plugin: 'java-library' apply plugin: 'java-library'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'jacoco' apply plugin: 'jacoco'
apply plugin: 'net.ltgt.errorprone' apply plugin: 'net.ltgt.errorprone'
apply from: "${rootDir}/gradle/versions.gradle"
version = calculateVersion() version = calculateVersion()
@ -185,6 +181,12 @@ allprojects {
} }
dependencies { dependencies {
api platform(project(':platform'))
annotationProcessor(platform(project(':platform')))
testAnnotationProcessor(platform(project(':platform')))
components.all(BouncyCastleCapability) components.all(BouncyCastleCapability)
errorprone 'com.google.errorprone:error_prone_core' errorprone 'com.google.errorprone:error_prone_core'
// https://github.com/hyperledger/besu-errorprone-checks/ // https://github.com/hyperledger/besu-errorprone-checks/
@ -442,14 +444,16 @@ task checkMavenCoordinateCollisions {
doLast { doLast {
def coordinates = [:] def coordinates = [:]
getAllprojects().forEach { getAllprojects().forEach {
if (it.properties.containsKey('publishing') && it.jar?.enabled) { if (it.properties.containsKey('publishing')) {
def coordinate = it.publishing?.publications[0].coordinates if(!it.properties.containsKey('jar') || it.jar.enabled) {
if (coordinate.toString().startsWith("org") && coordinates.containsKey(coordinate)) { def coordinate = it.publishing?.publications[0].coordinates
throw new GradleException("Duplicate maven coordinates detected, ${coordinate} is used by " + if (coordinate.toString().startsWith("org") && coordinates.containsKey(coordinate)) {
"both ${coordinates[coordinate]} and ${it.path}.\n" + throw new GradleException("Duplicate maven coordinates detected, ${coordinate} is used by " +
"Please add a `publishing` script block to one or both subprojects.") "both ${coordinates[coordinate]} and ${it.path}.\n" +
"Please add a `publishing` script block to one or both subprojects.")
}
coordinates[coordinate] = it.path
} }
coordinates[coordinate] = it.path
} }
} }
} }
@ -522,7 +526,8 @@ subprojects {
return result return result
} }
if (sourceSetIsPopulated("main") || sourceSetIsPopulated("testSupport")) {
if (sourceSetIsPopulated("main") || sourceSetIsPopulated("testSupport") || project.name == "platform") {
apply plugin: 'com.jfrog.artifactory' apply plugin: 'com.jfrog.artifactory'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
@ -597,7 +602,9 @@ subprojects {
configurations { configurations {
testSupportAnnotationProcessor.extendsFrom annotationProcessor
testSupportImplementation.extendsFrom implementation testSupportImplementation.extendsFrom implementation
integrationTestAnnotationProcessor.extendsFrom annotationProcessor
integrationTestImplementation.extendsFrom implementation integrationTestImplementation.extendsFrom implementation
testSupportArtifacts testSupportArtifacts
} }
@ -622,7 +629,10 @@ subprojects {
duplicateClassesStrategy = DuplicatesStrategy.WARN duplicateClassesStrategy = DuplicatesStrategy.WARN
} }
dependencies { jmh 'org.slf4j:slf4j-api' } dependencies {
jmhAnnotationProcessor(platform(project(':platform')))
jmh 'org.slf4j:slf4j-api'
}
} }
// making sure assemble task invokes integration test compile // making sure assemble task invokes integration test compile

@ -22,7 +22,6 @@ import org.hyperledger.besu.consensus.merge.PayloadWrapper;
import org.hyperledger.besu.datatypes.Address; import org.hyperledger.besu.datatypes.Address;
import org.hyperledger.besu.datatypes.Hash; import org.hyperledger.besu.datatypes.Hash;
import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.datatypes.Wei;
import org.hyperledger.besu.ethereum.BlockProcessingOutputs;
import org.hyperledger.besu.ethereum.BlockProcessingResult; import org.hyperledger.besu.ethereum.BlockProcessingResult;
import org.hyperledger.besu.ethereum.ProtocolContext; import org.hyperledger.besu.ethereum.ProtocolContext;
import org.hyperledger.besu.ethereum.blockcreation.BlockCreator.BlockCreationResult; import org.hyperledger.besu.ethereum.blockcreation.BlockCreator.BlockCreationResult;
@ -305,7 +304,7 @@ public class MergeCoordinator implements MergeMiningCoordinator, BadChainListene
new PayloadWrapper( new PayloadWrapper(
payloadIdentifier, payloadIdentifier,
new BlockWithReceipts(emptyBlock, result.getReceipts()), new BlockWithReceipts(emptyBlock, result.getReceipts()),
result.getYield().flatMap(BlockProcessingOutputs::getRequests))); result.getRequests()));
LOG.info( LOG.info(
"Start building proposals for block {} identified by {}", "Start building proposals for block {} identified by {}",
emptyBlock.getHeader().getNumber(), emptyBlock.getHeader().getNumber(),
@ -474,7 +473,7 @@ public class MergeCoordinator implements MergeMiningCoordinator, BadChainListene
new PayloadWrapper( new PayloadWrapper(
payloadIdentifier, payloadIdentifier,
new BlockWithReceipts(bestBlock, resultBest.getReceipts()), new BlockWithReceipts(bestBlock, resultBest.getReceipts()),
resultBest.getYield().flatMap(BlockProcessingOutputs::getRequests))); resultBest.getRequests()));
LOG.atDebug() LOG.atDebug()
.setMessage( .setMessage(
"Successfully built block {} for proposal identified by {}, with {} transactions, in {}ms") "Successfully built block {} for proposal identified by {}, with {} transactions, in {}ms")

@ -59,6 +59,7 @@ import org.hyperledger.besu.ethereum.core.ImmutableMiningParameters;
import org.hyperledger.besu.ethereum.core.ImmutableMiningParameters.MutableInitValues; import org.hyperledger.besu.ethereum.core.ImmutableMiningParameters.MutableInitValues;
import org.hyperledger.besu.ethereum.core.ImmutableMiningParameters.Unstable; import org.hyperledger.besu.ethereum.core.ImmutableMiningParameters.Unstable;
import org.hyperledger.besu.ethereum.core.MiningParameters; import org.hyperledger.besu.ethereum.core.MiningParameters;
import org.hyperledger.besu.ethereum.core.Synchronizer;
import org.hyperledger.besu.ethereum.core.TransactionTestFixture; import org.hyperledger.besu.ethereum.core.TransactionTestFixture;
import org.hyperledger.besu.ethereum.eth.manager.EthContext; import org.hyperledger.besu.ethereum.eth.manager.EthContext;
import org.hyperledger.besu.ethereum.eth.manager.EthScheduler; import org.hyperledger.besu.ethereum.eth.manager.EthScheduler;
@ -189,6 +190,7 @@ public class MergeCoordinatorTest implements MergeGenesisConfigHelper {
protocolContext = protocolContext =
new ProtocolContext(blockchain, worldStateArchive, mergeContext, badBlockManager); new ProtocolContext(blockchain, worldStateArchive, mergeContext, badBlockManager);
protocolContext.setSynchronizer(mock(Synchronizer.class));
var mutable = worldStateArchive.getMutable(); var mutable = worldStateArchive.getMutable();
genesisState.writeStateTo(mutable); genesisState.writeStateTo(mutable);
mutable.persist(null); mutable.persist(null);

@ -15,6 +15,7 @@
package org.hyperledger.besu.datatypes; package org.hyperledger.besu.datatypes;
import static org.hyperledger.besu.crypto.Hash.keccak256; import static org.hyperledger.besu.crypto.Hash.keccak256;
import static org.hyperledger.besu.crypto.Hash.sha256;
import org.hyperledger.besu.ethereum.rlp.RLP; import org.hyperledger.besu.ethereum.rlp.RLP;
@ -50,6 +51,17 @@ public class Hash extends DelegatingBytes32 {
*/ */
public static final Hash EMPTY = hash(Bytes.EMPTY); public static final Hash EMPTY = hash(Bytes.EMPTY);
/**
* Hash of empty requests or "0x6036c41849da9c076ed79654d434017387a88fb833c2856b32e18218b3341c5f"
*/
public static final Hash EMPTY_REQUESTS_HASH =
Hash.wrap(
sha256(
Bytes.concatenate(
sha256(Bytes.of(RequestType.DEPOSIT.getSerializedType())),
sha256(Bytes.of(RequestType.WITHDRAWAL.getSerializedType())),
sha256(Bytes.of(RequestType.CONSOLIDATION.getSerializedType())))));
/** /**
* Instantiates a new Hash. * Instantiates a new Hash.
* *

@ -26,4 +26,12 @@ public class HashTest {
.isEqualTo( .isEqualTo(
Hash.fromHexString("c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470")); Hash.fromHexString("c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"));
} }
@Test
public void shouldGetExpectedValueForEmptyRequestsHash() {
assertThat(Hash.EMPTY_REQUESTS_HASH)
.isEqualTo(
Hash.fromHexString(
"0x6036c41849da9c076ed79654d434017387a88fb833c2856b32e18218b3341c5f"));
}
} }

@ -79,6 +79,7 @@ public class TracedJsonRpcProcessor implements JsonRpcProcessor {
case INVALID_ENGINE_PREPARE_PAYLOAD_PARAMS: case INVALID_ENGINE_PREPARE_PAYLOAD_PARAMS:
case INVALID_ENODE_PARAMS: case INVALID_ENODE_PARAMS:
case INVALID_EXCESS_BLOB_GAS_PARAMS: case INVALID_EXCESS_BLOB_GAS_PARAMS:
case INVALID_EXECUTION_REQUESTS_PARAMS:
case INVALID_EXTRA_DATA_PARAMS: case INVALID_EXTRA_DATA_PARAMS:
case INVALID_FILTER_PARAMS: case INVALID_FILTER_PARAMS:
case INVALID_GAS_PRICE_PARAMS: case INVALID_GAS_PRICE_PARAMS:

@ -143,7 +143,7 @@ public abstract class AbstractEngineNewPayload extends ExecutionEngineJsonRpcMet
} catch (JsonRpcParameterException e) { } catch (JsonRpcParameterException e) {
throw new InvalidJsonRpcRequestException( throw new InvalidJsonRpcRequestException(
"Invalid execution request parameters (index 3)", "Invalid execution request parameters (index 3)",
RpcErrorType.INVALID_REQUESTS_PARAMS, RpcErrorType.INVALID_EXECUTION_REQUESTS_PARAMS,
e); e);
} }
@ -202,13 +202,13 @@ public abstract class AbstractEngineNewPayload extends ExecutionEngineJsonRpcMet
blockParam, blockParam,
mergeCoordinator.getLatestValidAncestor(blockParam.getParentHash()).orElse(null), mergeCoordinator.getLatestValidAncestor(blockParam.getParentHash()).orElse(null),
INVALID, INVALID,
"Invalid requests"); "Invalid execution requests");
} }
if (!getRequestsValidator( if (!getRequestsValidator(
protocolSchedule.get(), blockParam.getTimestamp(), blockParam.getBlockNumber()) protocolSchedule.get(), blockParam.getTimestamp(), blockParam.getBlockNumber())
.validate(maybeRequests)) { .validate(maybeRequests)) {
return new JsonRpcErrorResponse(reqId, RpcErrorType.INVALID_REQUESTS_PARAMS); return new JsonRpcErrorResponse(reqId, RpcErrorType.INVALID_EXECUTION_REQUESTS_PARAMS);
} }
if (mergeContext.get().isSyncing()) { if (mergeContext.get().isSyncing()) {

@ -72,7 +72,7 @@ public class EngineNewPayloadV4 extends AbstractEngineNewPayload {
"Missing parent beacon block root field"); "Missing parent beacon block root field");
} else if (maybeRequestsParam.isEmpty()) { } else if (maybeRequestsParam.isEmpty()) {
return ValidationResult.invalid( return ValidationResult.invalid(
RpcErrorType.INVALID_REQUESTS_PARAMS, "Missing execution requests field"); RpcErrorType.INVALID_EXECUTION_REQUESTS_PARAMS, "Missing execution requests field");
} else { } else {
return ValidationResult.valid(); return ValidationResult.valid();
} }

@ -62,6 +62,7 @@ public enum RpcErrorType implements RpcMethodError {
INVALID_ENODE_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid enode params"), INVALID_ENODE_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid enode params"),
INVALID_EXCESS_BLOB_GAS_PARAMS( INVALID_EXCESS_BLOB_GAS_PARAMS(
INVALID_PARAMS_ERROR_CODE, "Invalid excess blob gas params (missing or invalid)"), INVALID_PARAMS_ERROR_CODE, "Invalid excess blob gas params (missing or invalid)"),
INVALID_EXECUTION_REQUESTS_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid execution requests params"),
INVALID_EXTRA_DATA_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid extra data params"), INVALID_EXTRA_DATA_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid extra data params"),
INVALID_FILTER_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid filter params"), INVALID_FILTER_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid filter params"),
INVALID_GAS_PRICE_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid gas price params"), INVALID_GAS_PRICE_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid gas price params"),

@ -265,7 +265,7 @@ public abstract class AbstractBlockCreator implements AsyncBlockCreator {
operationTracer); operationTracer);
Optional<List<Request>> maybeRequests = Optional<List<Request>> maybeRequests =
requestProcessor.flatMap(processor -> processor.process(context)); requestProcessor.map(processor -> processor.process(context));
throwIfStopped(); throwIfStopped();

@ -281,12 +281,6 @@ abstract class AbstractBlockCreatorTest {
return createBlockCreator(protocolSpecAdapters); return createBlockCreator(protocolSpecAdapters);
} }
// private CreateOn blockCreatorWithProhibitedDepositRequests() {
// final ProtocolSpecAdapters protocolSpecAdapters =
// ProtocolSpecAdapters.create(0, specBuilder -> specBuilder);
// return createBlockCreator(protocolSpecAdapters);
// }
private CreateOn blockCreatorWithWithdrawalsProcessor() { private CreateOn blockCreatorWithWithdrawalsProcessor() {
final ProtocolSpecAdapters protocolSpecAdapters = final ProtocolSpecAdapters protocolSpecAdapters =
ProtocolSpecAdapters.create( ProtocolSpecAdapters.create(

@ -14,6 +14,7 @@
*/ */
package org.hyperledger.besu.ethereum; package org.hyperledger.besu.ethereum;
import org.hyperledger.besu.ethereum.core.Request;
import org.hyperledger.besu.ethereum.core.TransactionReceipt; import org.hyperledger.besu.ethereum.core.TransactionReceipt;
import java.util.ArrayList; import java.util.ArrayList;
@ -134,4 +135,13 @@ public class BlockProcessingResult extends BlockValidationResult {
return yield.get().getReceipts(); return yield.get().getReceipts();
} }
} }
/**
* Gets the requests of the result.
*
* @return the requests of the result
*/
public Optional<List<Request>> getRequests() {
return yield.flatMap(BlockProcessingOutputs::getRequests);
}
} }

@ -181,16 +181,7 @@ public class MainnetBlockValidator implements BlockValidator {
Optional.of(new BlockProcessingOutputs(worldState, receipts, maybeRequests))); Optional.of(new BlockProcessingOutputs(worldState, receipts, maybeRequests)));
} }
} catch (MerkleTrieException ex) { } catch (MerkleTrieException ex) {
context context.getSynchronizer().healWorldState(ex.getMaybeAddress(), ex.getLocation());
.getSynchronizer()
.ifPresentOrElse(
synchronizer -> synchronizer.healWorldState(ex.getMaybeAddress(), ex.getLocation()),
() ->
handleFailedBlockProcessing(
block,
new BlockProcessingResult(Optional.empty(), ex),
// Do not record bad black due to missing data
false));
return new BlockProcessingResult(Optional.empty(), ex); return new BlockProcessingResult(Optional.empty(), ex);
} catch (StorageException ex) { } catch (StorageException ex) {
var retval = new BlockProcessingResult(Optional.empty(), ex); var retval = new BlockProcessingResult(Optional.empty(), ex);

@ -32,8 +32,7 @@ public class ProtocolContext {
private final WorldStateArchive worldStateArchive; private final WorldStateArchive worldStateArchive;
private final BadBlockManager badBlockManager; private final BadBlockManager badBlockManager;
private final ConsensusContext consensusContext; private final ConsensusContext consensusContext;
private Synchronizer synchronizer;
private Optional<Synchronizer> synchronizer;
/** /**
* Constructs a new ProtocolContext with the given blockchain, world state archive, consensus * Constructs a new ProtocolContext with the given blockchain, world state archive, consensus
@ -52,7 +51,6 @@ public class ProtocolContext {
this.blockchain = blockchain; this.blockchain = blockchain;
this.worldStateArchive = worldStateArchive; this.worldStateArchive = worldStateArchive;
this.consensusContext = consensusContext; this.consensusContext = consensusContext;
this.synchronizer = Optional.empty();
this.badBlockManager = badBlockManager; this.badBlockManager = badBlockManager;
} }
@ -85,7 +83,7 @@ public class ProtocolContext {
* *
* @return the synchronizer of the protocol context * @return the synchronizer of the protocol context
*/ */
public Optional<Synchronizer> getSynchronizer() { public Synchronizer getSynchronizer() {
return synchronizer; return synchronizer;
} }
@ -94,7 +92,7 @@ public class ProtocolContext {
* *
* @param synchronizer the synchronizer to set * @param synchronizer the synchronizer to set
*/ */
public void setSynchronizer(final Optional<Synchronizer> synchronizer) { public void setSynchronizer(final Synchronizer synchronizer) {
this.synchronizer = synchronizer; this.synchronizer = synchronizer;
} }

@ -22,16 +22,13 @@ import org.hyperledger.besu.config.GenesisConfigFile;
import org.hyperledger.besu.datatypes.Address; import org.hyperledger.besu.datatypes.Address;
import org.hyperledger.besu.datatypes.BlobGas; import org.hyperledger.besu.datatypes.BlobGas;
import org.hyperledger.besu.datatypes.Hash; import org.hyperledger.besu.datatypes.Hash;
import org.hyperledger.besu.datatypes.RequestType;
import org.hyperledger.besu.ethereum.core.Block; import org.hyperledger.besu.ethereum.core.Block;
import org.hyperledger.besu.ethereum.core.BlockBody; import org.hyperledger.besu.ethereum.core.BlockBody;
import org.hyperledger.besu.ethereum.core.BlockHeader; import org.hyperledger.besu.ethereum.core.BlockHeader;
import org.hyperledger.besu.ethereum.core.BlockHeaderBuilder; import org.hyperledger.besu.ethereum.core.BlockHeaderBuilder;
import org.hyperledger.besu.ethereum.core.Difficulty; import org.hyperledger.besu.ethereum.core.Difficulty;
import org.hyperledger.besu.ethereum.core.MutableWorldState; import org.hyperledger.besu.ethereum.core.MutableWorldState;
import org.hyperledger.besu.ethereum.core.Request;
import org.hyperledger.besu.ethereum.core.Withdrawal; import org.hyperledger.besu.ethereum.core.Withdrawal;
import org.hyperledger.besu.ethereum.mainnet.BodyValidation;
import org.hyperledger.besu.ethereum.mainnet.ProtocolSchedule; import org.hyperledger.besu.ethereum.mainnet.ProtocolSchedule;
import org.hyperledger.besu.ethereum.mainnet.ScheduleBasedBlockHeaderFunctions; import org.hyperledger.besu.ethereum.mainnet.ScheduleBasedBlockHeaderFunctions;
import org.hyperledger.besu.ethereum.worldstate.DataStorageConfiguration; import org.hyperledger.besu.ethereum.worldstate.DataStorageConfiguration;
@ -220,19 +217,10 @@ public final class GenesisState {
.excessBlobGas(isCancunAtGenesis(genesis) ? parseExcessBlobGas(genesis) : null) .excessBlobGas(isCancunAtGenesis(genesis) ? parseExcessBlobGas(genesis) : null)
.parentBeaconBlockRoot( .parentBeaconBlockRoot(
(isCancunAtGenesis(genesis) ? parseParentBeaconBlockRoot(genesis) : null)) (isCancunAtGenesis(genesis) ? parseParentBeaconBlockRoot(genesis) : null))
.requestsHash(isPragueAtGenesis(genesis) ? calcEmptyRequestsHash() : null) .requestsHash(isPragueAtGenesis(genesis) ? Hash.EMPTY_REQUESTS_HASH : null)
.buildBlockHeader(); .buildBlockHeader();
} }
private static Hash calcEmptyRequestsHash() {
final List<Request> emptyRequests =
List.of(
new Request(RequestType.DEPOSIT, Bytes.EMPTY),
new Request(RequestType.WITHDRAWAL, Bytes.EMPTY),
new Request(RequestType.CONSOLIDATION, Bytes.EMPTY));
return BodyValidation.requestsHash(emptyRequests);
}
private static Address parseCoinbase(final GenesisConfigFile genesis) { private static Address parseCoinbase(final GenesisConfigFile genesis) {
return genesis return genesis
.getCoinbase() .getCoinbase()

@ -92,6 +92,19 @@ public class BlockHeader extends SealableBlockHeader
this.parsedExtraData = Suppliers.memoize(() -> blockHeaderFunctions.parseExtraData(this)); this.parsedExtraData = Suppliers.memoize(() -> blockHeaderFunctions.parseExtraData(this));
} }
public static boolean hasEmptyBlock(final BlockHeader blockHeader) {
return blockHeader.getOmmersHash().equals(Hash.EMPTY_LIST_HASH)
&& blockHeader.getTransactionsRoot().equals(Hash.EMPTY_TRIE_HASH)
&& blockHeader
.getWithdrawalsRoot()
.map(wsRoot -> wsRoot.equals(Hash.EMPTY_TRIE_HASH))
.orElse(true)
&& blockHeader
.getRequestsHash()
.map(reqHash -> reqHash.equals(Hash.EMPTY_REQUESTS_HASH))
.orElse(true);
}
/** /**
* Returns the block mixed hash. * Returns the block mixed hash.
* *

@ -166,9 +166,9 @@ public class SealableBlockHeader extends ProcessableBlockHeader {
} }
/** /**
* Returns the block requests root hash. * Returns the block requests hash.
* *
* @return the block requests root hash * @return the block requests hash
*/ */
public Optional<Hash> getRequestsHash() { public Optional<Hash> getRequestsHash() {
return Optional.ofNullable(requestsHash); return Optional.ofNullable(requestsHash);

@ -17,6 +17,7 @@ package org.hyperledger.besu.ethereum.core;
import org.hyperledger.besu.datatypes.Address; import org.hyperledger.besu.datatypes.Address;
import org.hyperledger.besu.plugin.data.SyncStatus; import org.hyperledger.besu.plugin.data.SyncStatus;
import org.hyperledger.besu.plugin.services.BesuEvents; import org.hyperledger.besu.plugin.services.BesuEvents;
import org.hyperledger.besu.plugin.services.BesuEvents.InitialSyncCompletionListener;
import java.util.Optional; import java.util.Optional;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
@ -82,6 +83,22 @@ public interface Synchronizer {
*/ */
boolean unsubscribeInSync(final long listenerId); boolean unsubscribeInSync(final long listenerId);
/**
* Add a listener that will be notified when this node initial sync status changes.
*
* @param listener The callback to invoke when the initial sync status changes
* @return A subscription id that can be used to unsubscribe from these events
*/
long subscribeInitialSync(final InitialSyncCompletionListener listener);
/**
* Unsubscribe from initial sync events.
*
* @param listenerId The id returned when subscribing
* @return {@code true} if a subscription was cancelled
*/
boolean unsubscribeInitialSync(final long listenerId);
@FunctionalInterface @FunctionalInterface
interface InSyncListener { interface InSyncListener {
void onInSyncStatusChange(boolean newSyncStatus); void onInSyncStatusChange(boolean newSyncStatus);

@ -218,7 +218,7 @@ public abstract class AbstractBlockProcessor implements BlockProcessor {
blockHashLookup, blockHashLookup,
OperationTracer.NO_TRACING); OperationTracer.NO_TRACING);
maybeRequests = requestProcessor.get().process(context); maybeRequests = Optional.of(requestProcessor.get().process(context));
} }
if (!rewardCoinbase(worldState, blockHeader, ommers, skipZeroBlockRewards)) { if (!rewardCoinbase(worldState, blockHeader, ommers, skipZeroBlockRewards)) {

@ -93,7 +93,7 @@ public final class BodyValidation {
* Generates the requests hash for a list of requests * Generates the requests hash for a list of requests
* *
* @param requests list of request * @param requests list of request
* @return the requests root * @return the requests hash
*/ */
public static Hash requestsHash(final List<Request> requests) { public static Hash requestsHash(final List<Request> requests) {
List<Bytes> requestHashes = new ArrayList<>(); List<Bytes> requestHashes = new ArrayList<>();

@ -56,7 +56,8 @@ public class SystemCallProcessor {
* @param blockHeader the current block header. * @param blockHeader the current block header.
* @param operationTracer the operation tracer for tracing EVM operations. * @param operationTracer the operation tracer for tracing EVM operations.
* @param blockHashLookup the block hash lookup function. * @param blockHashLookup the block hash lookup function.
* @return the output data from the call * @return the output data from the call. If no code exists at the callAddress then an empty Bytes
* is returned.
*/ */
public Bytes process( public Bytes process(
final Address callAddress, final Address callAddress,
@ -69,7 +70,7 @@ public class SystemCallProcessor {
final Account maybeContract = worldState.get(callAddress); final Account maybeContract = worldState.get(callAddress);
if (maybeContract == null) { if (maybeContract == null) {
LOG.trace("System call address not found {}", callAddress); LOG.trace("System call address not found {}", callAddress);
return null; return Bytes.EMPTY;
} }
final AbstractMessageProcessor messageProcessor = final AbstractMessageProcessor messageProcessor =

@ -14,27 +14,26 @@
*/ */
package org.hyperledger.besu.ethereum.mainnet.requests; package org.hyperledger.besu.ethereum.mainnet.requests;
import org.hyperledger.besu.datatypes.RequestType;
import org.hyperledger.besu.ethereum.core.Request; import org.hyperledger.besu.ethereum.core.Request;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.stream.IntStream;
import com.google.common.collect.Ordering;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
/** /**
* Validates requests within a block against a set of predefined validators. This class delegates * Validates requests within a block against a set of predefined validators. This class delegates
* the validation of requests of specific types to corresponding validators. It ensures that * the validation of requests of specific types to corresponding validators. It ensures that
* requests are properly ordered, have a valid root, and meet the criteria defined by their * requests are properly ordered, have a valid hash, and meet the criteria defined by their
* validators. * validators.
*/ */
public class MainnetRequestsValidator implements RequestsValidator { public class MainnetRequestsValidator implements RequestsValidator {
private static final Logger LOG = LoggerFactory.getLogger(MainnetRequestsValidator.class); private static final Logger LOG = LoggerFactory.getLogger(MainnetRequestsValidator.class);
/** /**
* Validates a block's requests by ensuring they are correctly ordered, have a valid root, and * Validates a block's requests by ensuring they are correctly ordered, have a valid hash, and
* pass their respective type-specific validations. * pass their respective type-specific validations.
* *
* @param maybeRequests The list of requests to be validated. * @param maybeRequests The list of requests to be validated.
@ -52,21 +51,10 @@ public class MainnetRequestsValidator implements RequestsValidator {
return false; return false;
} }
if (!allRequestTypesAreContained(maybeRequests.get())) {
LOG.warn("Requests must contain all request types");
return false;
}
return true; return true;
} }
private static boolean isRequestOrderValid(final List<Request> requests) { private static boolean isRequestOrderValid(final List<Request> requests) {
return IntStream.range(0, requests.size() - 1) return Ordering.natural().onResultOf(Request::getType).isOrdered(requests);
.allMatch(i -> requests.get(i).getType().compareTo(requests.get(i + 1).getType()) <= 0);
}
private static boolean allRequestTypesAreContained(final List<Request> requests) {
return requests.stream().map(Request::getType).distinct().count()
== RequestType.values().length;
} }
} }

@ -17,9 +17,7 @@ package org.hyperledger.besu.ethereum.mainnet.requests;
import org.hyperledger.besu.datatypes.RequestType; import org.hyperledger.besu.datatypes.RequestType;
import org.hyperledger.besu.ethereum.core.Request; import org.hyperledger.besu.ethereum.core.Request;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Optional;
import com.google.common.collect.ImmutableSortedMap; import com.google.common.collect.ImmutableSortedMap;
@ -37,16 +35,10 @@ public class RequestProcessorCoordinator {
this.processors = processors; this.processors = processors;
} }
public Optional<List<Request>> process(final ProcessRequestContext context) { public List<Request> process(final ProcessRequestContext context) {
List<Request> requests = null; return processors.values().stream()
for (RequestProcessor requestProcessor : processors.values()) { .map(requestProcessor -> requestProcessor.process(context))
var r = requestProcessor.process(context); .toList();
if (requests == null) {
requests = new ArrayList<>();
}
requests.add(r);
}
return Optional.ofNullable(requests);
} }
public static class Builder { public static class Builder {
@ -60,7 +52,12 @@ public class RequestProcessorCoordinator {
} }
public RequestProcessorCoordinator build() { public RequestProcessorCoordinator build() {
return new RequestProcessorCoordinator(requestProcessorBuilder.build()); final ImmutableSortedMap<RequestType, RequestProcessor> processors =
requestProcessorBuilder.build();
if (processors.isEmpty()) {
throw new IllegalStateException("No processors added to RequestProcessorCoordinator");
}
return new RequestProcessorCoordinator(processors);
} }
} }
} }

@ -52,7 +52,6 @@ public class SystemCallRequestProcessor implements RequestProcessor {
context.operationTracer(), context.operationTracer(),
context.blockHashLookup()); context.blockHashLookup());
Bytes requestData = systemCallOutput == null ? Bytes.EMPTY : systemCallOutput; return new Request(requestType, systemCallOutput);
return new Request(requestType, requestData);
} }
} }

@ -194,6 +194,7 @@ public class BlockchainSetupUtil {
genesisState.writeStateTo(worldArchive.getMutable()); genesisState.writeStateTo(worldArchive.getMutable());
final ProtocolContext protocolContext = protocolContextProvider.get(blockchain, worldArchive); final ProtocolContext protocolContext = protocolContextProvider.get(blockchain, worldArchive);
protocolContext.setSynchronizer(new DummySynchronizer());
final Path blocksPath = Path.of(chainResources.getBlocksURL().toURI()); final Path blocksPath = Path.of(chainResources.getBlocksURL().toURI());
final List<Block> blocks = new ArrayList<>(); final List<Block> blocks = new ArrayList<>();

@ -12,10 +12,9 @@
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
package org.hyperledger.besu.ethereum.retesteth; package org.hyperledger.besu.ethereum.core;
import org.hyperledger.besu.datatypes.Address; import org.hyperledger.besu.datatypes.Address;
import org.hyperledger.besu.ethereum.core.Synchronizer;
import org.hyperledger.besu.plugin.data.SyncStatus; import org.hyperledger.besu.plugin.data.SyncStatus;
import org.hyperledger.besu.plugin.services.BesuEvents; import org.hyperledger.besu.plugin.services.BesuEvents;
@ -81,4 +80,14 @@ public class DummySynchronizer implements Synchronizer {
public boolean unsubscribeInSync(final long listenerId) { public boolean unsubscribeInSync(final long listenerId) {
return false; return false;
} }
@Override
public long subscribeInitialSync(final BesuEvents.InitialSyncCompletionListener listener) {
return 0;
}
@Override
public boolean unsubscribeInitialSync(final long listenerId) {
return false;
}
} }

@ -31,6 +31,7 @@ import org.hyperledger.besu.ethereum.core.Block;
import org.hyperledger.besu.ethereum.core.BlockHeader; import org.hyperledger.besu.ethereum.core.BlockHeader;
import org.hyperledger.besu.ethereum.core.BlockchainSetupUtil; import org.hyperledger.besu.ethereum.core.BlockchainSetupUtil;
import org.hyperledger.besu.ethereum.core.MutableWorldState; import org.hyperledger.besu.ethereum.core.MutableWorldState;
import org.hyperledger.besu.ethereum.core.Synchronizer;
import org.hyperledger.besu.ethereum.mainnet.BlockBodyValidator; import org.hyperledger.besu.ethereum.mainnet.BlockBodyValidator;
import org.hyperledger.besu.ethereum.mainnet.BlockHeaderValidator; import org.hyperledger.besu.ethereum.mainnet.BlockHeaderValidator;
import org.hyperledger.besu.ethereum.mainnet.BlockProcessor; import org.hyperledger.besu.ethereum.mainnet.BlockProcessor;
@ -90,6 +91,7 @@ public class MainnetBlockValidatorTest {
when(protocolContext.getBlockchain()).thenReturn(blockchain); when(protocolContext.getBlockchain()).thenReturn(blockchain);
when(protocolContext.getWorldStateArchive()).thenReturn(worldStateArchive); when(protocolContext.getWorldStateArchive()).thenReturn(worldStateArchive);
when(protocolContext.getSynchronizer()).thenReturn(mock(Synchronizer.class));
when(worldStateArchive.getMutable(any(BlockHeader.class), anyBoolean())) when(worldStateArchive.getMutable(any(BlockHeader.class), anyBoolean()))
.thenReturn(Optional.of(worldState)); .thenReturn(Optional.of(worldState));
when(worldStateArchive.getMutable(any(Hash.class), any(Hash.class))) when(worldStateArchive.getMutable(any(Hash.class), any(Hash.class)))

@ -87,10 +87,10 @@ public class SystemCallProcessorTest {
} }
@Test @Test
void shouldReturnNullWhenContractDoesNotExist() { void shouldReturnEmptyWhenContractDoesNotExist() {
final MutableWorldState worldState = InMemoryKeyValueStorageProvider.createInMemoryWorldState(); final MutableWorldState worldState = InMemoryKeyValueStorageProvider.createInMemoryWorldState();
Bytes actualOutput = processSystemCall(worldState); Bytes actualOutput = processSystemCall(worldState);
assertThat(actualOutput).isNull(); assertThat(actualOutput).isEqualTo(Bytes.EMPTY);
} }
Bytes processSystemCall(final MutableWorldState worldState) { Bytes processSystemCall(final MutableWorldState worldState) {

@ -34,12 +34,6 @@ class MainnetRequestsValidatorTest {
assertFalse(validator.validate(Optional.empty())); assertFalse(validator.validate(Optional.empty()));
} }
@Test
void validateFalseWhenEmptyListOfRequests() {
MainnetRequestsValidator validator = new MainnetRequestsValidator();
assertFalse(validator.validate(Optional.of(List.of())));
}
@Test @Test
void validateFalseWhenRequestsNotInOrder() { void validateFalseWhenRequestsNotInOrder() {
MainnetRequestsValidator validator = new MainnetRequestsValidator(); MainnetRequestsValidator validator = new MainnetRequestsValidator();
@ -51,16 +45,6 @@ class MainnetRequestsValidatorTest {
assertFalse(validator.validate(Optional.of(requests))); assertFalse(validator.validate(Optional.of(requests)));
} }
@Test
void validateFalseWhenNotAllRequestTypesAreContained() {
MainnetRequestsValidator validator = new MainnetRequestsValidator();
List<Request> requests =
List.of(
new Request(RequestType.DEPOSIT, Bytes.of(1)),
new Request(RequestType.WITHDRAWAL, Bytes.of(2)));
assertFalse(validator.validate(Optional.of(requests)));
}
@Test @Test
void validateTrueForValidRequests() { void validateTrueForValidRequests() {
MainnetRequestsValidator validator = new MainnetRequestsValidator(); MainnetRequestsValidator validator = new MainnetRequestsValidator();

@ -26,7 +26,6 @@ import org.hyperledger.besu.ethereum.eth.messages.snap.GetTrieNodesMessage;
import org.hyperledger.besu.ethereum.eth.messages.snap.SnapV1; import org.hyperledger.besu.ethereum.eth.messages.snap.SnapV1;
import org.hyperledger.besu.ethereum.eth.messages.snap.StorageRangeMessage; import org.hyperledger.besu.ethereum.eth.messages.snap.StorageRangeMessage;
import org.hyperledger.besu.ethereum.eth.messages.snap.TrieNodesMessage; import org.hyperledger.besu.ethereum.eth.messages.snap.TrieNodesMessage;
import org.hyperledger.besu.ethereum.eth.sync.DefaultSynchronizer;
import org.hyperledger.besu.ethereum.eth.sync.snapsync.SnapSyncConfiguration; import org.hyperledger.besu.ethereum.eth.sync.snapsync.SnapSyncConfiguration;
import org.hyperledger.besu.ethereum.p2p.rlpx.wire.MessageData; import org.hyperledger.besu.ethereum.p2p.rlpx.wire.MessageData;
import org.hyperledger.besu.ethereum.proof.WorldStateProofProvider; import org.hyperledger.besu.ethereum.proof.WorldStateProofProvider;
@ -49,7 +48,6 @@ import java.util.NavigableMap;
import java.util.Optional; import java.util.Optional;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.Function; import java.util.function.Function;
import java.util.function.Predicate; import java.util.function.Predicate;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -84,7 +82,6 @@ class SnapServer implements BesuEvents.InitialSyncCompletionListener {
static final Hash HASH_LAST = Hash.wrap(Bytes32.leftPad(Bytes.fromHexString("FF"), (byte) 0xFF)); static final Hash HASH_LAST = Hash.wrap(Bytes32.leftPad(Bytes.fromHexString("FF"), (byte) 0xFF));
private final AtomicBoolean isStarted = new AtomicBoolean(false); private final AtomicBoolean isStarted = new AtomicBoolean(false);
private final AtomicLong listenerId = new AtomicLong();
private final EthMessages snapMessages; private final EthMessages snapMessages;
private final WorldStateStorageCoordinator worldStateStorageCoordinator; private final WorldStateStorageCoordinator worldStateStorageCoordinator;
@ -111,14 +108,9 @@ class SnapServer implements BesuEvents.InitialSyncCompletionListener {
this.protocolContext = Optional.of(protocolContext); this.protocolContext = Optional.of(protocolContext);
registerResponseConstructors(); registerResponseConstructors();
// subscribe to initial sync completed events to start/stop snap server: // subscribe to initial sync completed events to start/stop snap server,
this.protocolContext // not saving the listenerId since we never need to unsubscribe.
.flatMap(ProtocolContext::getSynchronizer) protocolContext.getSynchronizer().subscribeInitialSync(this);
.filter(z -> z instanceof DefaultSynchronizer)
.map(DefaultSynchronizer.class::cast)
.ifPresentOrElse(
z -> this.listenerId.set(z.subscribeInitialSync(this)),
() -> LOGGER.warn("SnapServer created without reference to sync status"));
} }
/** /**

@ -388,10 +388,12 @@ public class DefaultSynchronizer implements Synchronizer, UnverifiedForkchoiceLi
return syncState.unsubscribeSyncStatus(listenerId); return syncState.unsubscribeSyncStatus(listenerId);
} }
@Override
public long subscribeInitialSync(final BesuEvents.InitialSyncCompletionListener listener) { public long subscribeInitialSync(final BesuEvents.InitialSyncCompletionListener listener) {
return syncState.subscribeCompletionReached(listener); return syncState.subscribeCompletionReached(listener);
} }
@Override
public boolean unsubscribeInitialSync(final long listenerId) { public boolean unsubscribeInitialSync(final long listenerId) {
return syncState.unsubscribeInitialConditionReached(listenerId); return syncState.unsubscribeInitialConditionReached(listenerId);
} }

@ -19,7 +19,6 @@ import static java.util.Collections.emptyList;
import static java.util.concurrent.CompletableFuture.completedFuture; import static java.util.concurrent.CompletableFuture.completedFuture;
import static java.util.stream.Collectors.toMap; import static java.util.stream.Collectors.toMap;
import org.hyperledger.besu.datatypes.Hash;
import org.hyperledger.besu.ethereum.core.Block; import org.hyperledger.besu.ethereum.core.Block;
import org.hyperledger.besu.ethereum.core.BlockBody; import org.hyperledger.besu.ethereum.core.BlockBody;
import org.hyperledger.besu.ethereum.core.BlockHeader; import org.hyperledger.besu.ethereum.core.BlockHeader;
@ -75,7 +74,7 @@ public class CompleteBlocksTask extends AbstractRetryingPeerTask<List<Block>> {
this.headers = headers; this.headers = headers;
this.blocks = this.blocks =
headers.stream() headers.stream()
.filter(this::hasEmptyBody) .filter(BlockHeader::hasEmptyBlock)
.collect( .collect(
toMap( toMap(
BlockHeader::getNumber, BlockHeader::getNumber,
@ -101,15 +100,6 @@ public class CompleteBlocksTask extends AbstractRetryingPeerTask<List<Block>> {
return protocolSchedule.getByBlockHeader(header).getWithdrawalsProcessor().isPresent(); return protocolSchedule.getByBlockHeader(header).getWithdrawalsProcessor().isPresent();
} }
private boolean hasEmptyBody(final BlockHeader header) {
return header.getOmmersHash().equals(Hash.EMPTY_LIST_HASH)
&& header.getTransactionsRoot().equals(Hash.EMPTY_TRIE_HASH)
&& header
.getWithdrawalsRoot()
.map(wsRoot -> wsRoot.equals(Hash.EMPTY_TRIE_HASH))
.orElse(true);
}
public static CompleteBlocksTask forHeaders( public static CompleteBlocksTask forHeaders(
final ProtocolSchedule protocolSchedule, final ProtocolSchedule protocolSchedule,
final EthContext ethContext, final EthContext ethContext,

@ -65,8 +65,6 @@ dependencies {
testImplementation 'org.mockito:mockito-core' testImplementation 'org.mockito:mockito-core'
testImplementation 'org.mockito:mockito-junit-jupiter' testImplementation 'org.mockito:mockito-junit-jupiter'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine'
// No logging in graalvm EvmTool // No logging in graalvm EvmTool
nativeImageClasspath 'org.slf4j:slf4j-nop' nativeImageClasspath 'org.slf4j:slf4j-nop'
} }

@ -530,7 +530,7 @@ public class T8nExecutor {
receipts, receipts,
new CachingBlockHashLookup(blockHeader, blockchain), new CachingBlockHashLookup(blockHeader, blockchain),
OperationTracer.NO_TRACING); OperationTracer.NO_TRACING);
Optional<List<Request>> maybeRequests = rpc.process(context); Optional<List<Request>> maybeRequests = Optional.of(rpc.process(context));
Hash requestsHash = BodyValidation.requestsHash(maybeRequests.orElse(List.of())); Hash requestsHash = BodyValidation.requestsHash(maybeRequests.orElse(List.of()));
resultObject.put("requestsHash", requestsHash.toHexString()); resultObject.put("requestsHash", requestsHash.toHexString());

@ -14,6 +14,7 @@
*/ */
configurations { configurations {
referenceTestAnnotationProcessor.extendsFrom testAnnotationProcessor
// we need this because referenceTestImplementation defaults to 'canBeResolved=false'. // we need this because referenceTestImplementation defaults to 'canBeResolved=false'.
tarConfig.extendsFrom referenceTestImplementation tarConfig.extendsFrom referenceTestImplementation
tarConfig { tarConfig {

@ -15,7 +15,7 @@
package org.hyperledger.besu.ethereum.vm; package org.hyperledger.besu.ethereum.vm;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assumptions.assumeThat; import static org.junit.jupiter.api.Assumptions.assumeFalse;
import org.hyperledger.besu.ethereum.ProtocolContext; import org.hyperledger.besu.ethereum.ProtocolContext;
import org.hyperledger.besu.ethereum.chain.MutableBlockchain; import org.hyperledger.besu.ethereum.chain.MutableBlockchain;
@ -148,18 +148,15 @@ public class BlockchainReferenceTestTools {
} }
static void verifyJournaledEVMAccountCompatability( static void verifyJournaledEVMAccountCompatability(
final MutableWorldState worldState, final ProtocolSpec protocolSpec) { final MutableWorldState worldState, final ProtocolSpec protocolSpec) {
EVM evm = protocolSpec.getEvm(); EVM evm = protocolSpec.getEvm();
if (evm.getEvmConfiguration().worldUpdaterMode() == WorldUpdaterMode.JOURNALED) { if (evm.getEvmConfiguration().worldUpdaterMode() == WorldUpdaterMode.JOURNALED) {
assumeThat( assumeFalse(
worldState worldState
.streamAccounts(Bytes32.ZERO, Integer.MAX_VALUE) .streamAccounts(Bytes32.ZERO, Integer.MAX_VALUE).anyMatch(AccountState::isEmpty),
.anyMatch(AccountState::isEmpty)) "Journaled account configured and empty account detected");
.withFailMessage("Journaled account configured and empty account detected") assumeFalse(EvmSpecVersion.SPURIOUS_DRAGON.compareTo(evm.getEvmVersion()) > 0,
.isFalse(); "Journaled account configured and fork prior to the merge specified");
assumeThat(EvmSpecVersion.SPURIOUS_DRAGON.compareTo(evm.getEvmVersion()) > 0)
.withFailMessage("Journaled account configured and fork prior to the merge specified")
.isFalse();
} }
} }
} }

@ -35,6 +35,7 @@ dependencies {
implementation project(':ethereum:api') implementation project(':ethereum:api')
implementation project(':ethereum:blockcreation') implementation project(':ethereum:blockcreation')
implementation project(':ethereum:core') implementation project(':ethereum:core')
implementation project(path: ':ethereum:core', configuration: 'testSupportArtifacts')
implementation project(':ethereum:eth') implementation project(':ethereum:eth')
implementation project(':ethereum:p2p') implementation project(':ethereum:p2p')
implementation project(':ethereum:rlp') implementation project(':ethereum:rlp')

@ -30,6 +30,7 @@ import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.EthSendRawTran
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.Web3ClientVersion; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.Web3ClientVersion;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.BlockResultFactory; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.BlockResultFactory;
import org.hyperledger.besu.ethereum.core.DummySynchronizer;
import org.hyperledger.besu.ethereum.core.Synchronizer; import org.hyperledger.besu.ethereum.core.Synchronizer;
import org.hyperledger.besu.ethereum.retesteth.methods.TestGetLogHash; import org.hyperledger.besu.ethereum.retesteth.methods.TestGetLogHash;
import org.hyperledger.besu.ethereum.retesteth.methods.TestImportRawBlock; import org.hyperledger.besu.ethereum.retesteth.methods.TestImportRawBlock;

@ -54,8 +54,7 @@ public class CallFOperation extends AbstractOperation {
int section = code.readBigEndianU16(pc + 1); int section = code.readBigEndianU16(pc + 1);
CodeSection info = code.getCodeSection(section); CodeSection info = code.getCodeSection(section);
int operandStackSize = frame.stackSize(); int operandStackSize = frame.stackSize();
if (operandStackSize >= 1024 if (operandStackSize > 1024 - info.getMaxStackHeight() + info.getInputs()) {
|| operandStackSize > 1024 - info.getMaxStackHeight() + info.getInputs()) {
return callfStackOverflow; return callfStackOverflow;
} }
frame.getReturnStack().push(new ReturnStack.ReturnStackItem(frame.getSection(), pc + 2)); frame.getReturnStack().push(new ReturnStack.ReturnStackItem(frame.getSection(), pc + 2));

@ -16,6 +16,7 @@ package org.hyperledger.besu.evm.operation;
import org.hyperledger.besu.evm.Code; import org.hyperledger.besu.evm.Code;
import org.hyperledger.besu.evm.EVM; import org.hyperledger.besu.evm.EVM;
import org.hyperledger.besu.evm.frame.ExceptionalHaltReason;
import org.hyperledger.besu.evm.frame.MessageFrame; import org.hyperledger.besu.evm.frame.MessageFrame;
import org.hyperledger.besu.evm.gascalculator.GasCalculator; import org.hyperledger.besu.evm.gascalculator.GasCalculator;
@ -28,6 +29,9 @@ public class JumpFOperation extends AbstractOperation {
/** The Jump F success operation result. */ /** The Jump F success operation result. */
static final OperationResult jumpfSuccess = new OperationResult(5, null); static final OperationResult jumpfSuccess = new OperationResult(5, null);
static final OperationResult jumpfStackOverflow =
new OperationResult(5, ExceptionalHaltReason.TOO_MANY_STACK_ITEMS);
/** /**
* Instantiates a new Jump F operation. * Instantiates a new Jump F operation.
* *
@ -46,6 +50,10 @@ public class JumpFOperation extends AbstractOperation {
int pc = frame.getPC(); int pc = frame.getPC();
int section = code.readBigEndianU16(pc + 1); int section = code.readBigEndianU16(pc + 1);
var info = code.getCodeSection(section); var info = code.getCodeSection(section);
int operandStackSize = frame.stackSize();
if (operandStackSize > 1024 - info.getMaxStackHeight() + info.getInputs()) {
return jumpfStackOverflow;
}
frame.setPC(info.getEntryPoint() - 1); // will be +1ed at end of operations loop frame.setPC(info.getEntryPoint() - 1); // will be +1ed at end of operations loop
frame.setSection(section); frame.setSection(section);
return jumpfSuccess; return jumpfSuccess;

@ -15,7 +15,7 @@
package org.hyperledger.besu.evm.operation; package org.hyperledger.besu.evm.operation;
import static org.assertj.core.api.Assertions.assertThat; 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.evm.Code; import org.hyperledger.besu.evm.Code;
import org.hyperledger.besu.evm.EVM; import org.hyperledger.besu.evm.EVM;
@ -136,7 +136,7 @@ class DataCopyOperationTest {
"0xef0001010004020001001d04%04x000080000367%016x67%016x67%016xd300%s" "0xef0001010004020001001d04%04x000080000367%016x67%016x67%016xd300%s"
.formatted(data.size(), dst, src, len, data.toUnprefixedHexString()); .formatted(data.size(), dst, src, len, data.toUnprefixedHexString());
Code code = evm.getCodeUncached(Bytes.fromHexString(eofCode)); Code code = evm.getCodeUncached(Bytes.fromHexString(eofCode));
assumeThat(code.isValid()).isTrue(); assumeTrue(code.isValid());
MessageFrame frame = MessageFrame frame =
new TestMessageFrameBuilder() new TestMessageFrameBuilder()
@ -158,7 +158,7 @@ class DataCopyOperationTest {
void legacyCallFails() { void legacyCallFails() {
DataCopyOperation subject = new DataCopyOperation(new PragueGasCalculator()); DataCopyOperation subject = new DataCopyOperation(new PragueGasCalculator());
Code code = evm.getCodeUncached(Bytes.fromHexString("0x600460046004d3")); Code code = evm.getCodeUncached(Bytes.fromHexString("0x600460046004d3"));
assumeThat(code.isValid()).isTrue(); assumeTrue(code.isValid());
MessageFrame frame = MessageFrame frame =
new TestMessageFrameBuilder() new TestMessageFrameBuilder()

File diff suppressed because it is too large Load Diff

@ -1,249 +0,0 @@
/*
* Copyright ConsenSys AG.
*
* 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
*/
dependencyManagement {
dependencies {
applyMavenExclusions = false
dependencySet(group:'com.fasterxml.jackson.core', version:'2.17.2') {
entry 'jackson-databind'
entry 'jackson-datatype'
entry 'jackson-datatype-jdk8'
}
dependency 'com.github.ben-manes.caffeine:caffeine:3.1.8'
dependency 'com.google.protobuf:protobuf-java:3.25.5'
dependency 'org.bitbucket.b_c:jose4j:0.9.4'
dependency 'com.github.oshi:oshi-core:6.6.3'
dependency 'com.google.auto.service:auto-service:1.1.1'
dependencySet(group: 'com.google.dagger', version: '2.52') {
entry'dagger-compiler'
entry'dagger'
}
dependency 'org.hyperledger.besu:besu-errorprone-checks:1.0.0'
dependency 'com.google.guava:guava:33.3.0-jre'
dependency 'com.graphql-java:graphql-java:22.2'
dependency 'com.splunk.logging:splunk-library-javalogging:1.11.8'
dependency 'com.squareup.okhttp3:okhttp:4.12.0'
dependency 'commons-codec:commons-codec:1.16.0'
dependency 'commons-io:commons-io:2.16.1'
dependency 'commons-net:commons-net:3.11.1'
dependency 'dnsjava:dnsjava:3.6.1'
dependencySet(group: 'info.picocli', version: '4.7.6') {
entry 'picocli'
entry 'picocli-codegen'
}
dependencySet(group: 'io.grpc', version: '1.66.0') {
entry 'grpc-all'
entry 'grpc-core'
entry 'grpc-netty'
entry 'grpc-stub'
}
dependency 'io.kubernetes:client-java:18.0.1'
dependency 'io.netty:netty-all:4.1.112.Final'
dependency 'io.netty:netty-tcnative-boringssl-static:2.0.66.Final'
dependency group: 'io.netty', name: 'netty-transport-native-epoll', version:'4.1.112.Final', classifier: 'linux-x86_64'
dependency group: 'io.netty', name: 'netty-transport-native-kqueue', version:'4.1.112.Final', classifier: 'osx-x86_64'
dependency 'io.netty:netty-transport-native-unix-common:4.1.112.Final'
dependency 'io.opentelemetry:opentelemetry-api:1.41.0'
dependency 'io.opentelemetry:opentelemetry-exporter-otlp:1.41.0'
dependency 'io.opentelemetry:opentelemetry-extension-trace-propagators:1.41.0'
dependency 'io.opentelemetry:opentelemetry-sdk-metrics:1.41.0'
dependency 'io.opentelemetry:opentelemetry-sdk-trace:1.41.0'
dependency 'io.opentelemetry:opentelemetry-sdk:1.41.0'
dependency 'io.opentelemetry:opentelemetry-sdk-extension-autoconfigure:1.41.0'
dependency 'io.opentelemetry.instrumentation:opentelemetry-okhttp-3.0:2.7.0-alpha'
dependency 'io.opentelemetry.proto:opentelemetry-proto:1.3.2-alpha'
dependency 'io.opentelemetry.semconv:opentelemetry-semconv:1.27.0-alpha'
dependency 'io.opentracing.contrib:opentracing-okhttp3:3.0.0'
dependency 'io.opentracing:opentracing-api:0.33.0'
dependency 'io.opentracing:opentracing-util:0.33.0'
dependency 'io.pkts:pkts-core:3.0.10'
dependencySet(group: 'io.prometheus', version: '0.16.0') {
entry 'simpleclient'
entry 'simpleclient_common'
entry 'simpleclient_hotspot'
entry 'simpleclient_pushgateway'
entry 'simpleclient_guava'
}
dependency 'io.reactivex.rxjava2:rxjava:2.2.21'
dependencySet(group: 'io.tmio', version: '2.4.2') {
entry 'tuweni-bytes'
entry 'tuweni-config'
entry 'tuweni-concurrent'
entry 'tuweni-crypto'
entry 'tuweni-devp2p'
entry 'tuweni-io'
entry 'tuweni-net'
entry 'tuweni-rlp'
entry 'tuweni-toml'
entry 'tuweni-units'
}
dependencySet(group: 'io.vertx', version: '4.5.9') {
entry 'vertx-auth-jwt'
entry 'vertx-codegen'
entry 'vertx-core'
entry 'vertx-junit5'
entry 'vertx-unit'
entry 'vertx-web'
entry 'vertx-web-client'
entry 'vertx-auth-jwt'
}
dependency 'junit:junit:4.13.2'
dependency 'net.java.dev.jna:jna:5.14.0'
dependencySet(group: 'org.antlr', version: '4.11.1') {
entry 'antlr4'
entry 'antlr4-runtime'
}
dependency 'org.apache.commons:commons-collections4:4.4'
dependency 'org.apache.commons:commons-compress:1.27.1'
dependency 'org.apache.commons:commons-lang3:3.17.0'
dependency 'org.apache.commons:commons-text:1.12.0'
dependencySet(group: 'org.apache.logging.log4j', version: '2.23.1') {
entry 'log4j-api'
entry 'log4j-core'
entry 'log4j-jul'
entry 'log4j-slf4j2-impl'
}
dependency 'org.assertj:assertj-core:3.26.3'
dependency 'org.awaitility:awaitility:4.2.2'
dependencySet(group: 'org.bouncycastle', version: '1.78.1') {
entry'bcpkix-jdk18on'
entry'bcprov-jdk18on'
}
dependency 'org.fusesource.jansi:jansi:2.4.1'
dependencySet(group: 'org.hyperledger.besu', version: '0.9.7') {
entry 'arithmetic'
entry 'ipa-multipoint'
entry 'bls12-381'
entry 'secp256k1'
entry 'secp256r1'
entry 'blake2bf'
entry 'gnark'
}
dependencySet(group: 'org.immutables', version: '2.10.1') {
entry 'value-annotations'
entry 'value'
}
dependency 'org.java-websocket:Java-WebSocket:1.5.7'
dependencySet(group: 'org.jacoco', version: '0.8.12') {
entry 'org.jacoco.agent'
entry 'org.jacoco.core'
}
dependency 'org.jetbrains.kotlin:kotlin-stdlib:2.0.20'
dependencySet(group: 'org.junit.jupiter', version: '5.11.0') {
entry 'junit-jupiter'
entry 'junit-jupiter-api'
entry 'junit-jupiter-engine'
entry 'junit-jupiter-params'
}
dependency 'org.openjdk.jol:jol-core:0.17'
dependency 'org.junit.platform:junit-platform-runner:1.9.2'
dependency 'org.junit.vintage:junit-vintage-engine:5.10.1'
dependencySet(group: 'org.jupnp', version:'3.0.2') {
entry 'org.jupnp.support'
entry 'org.jupnp'
}
dependencySet(group: 'org.mockito', version:'5.13.0') {
entry 'mockito-core'
entry 'mockito-junit-jupiter'
}
dependencySet(group: 'org.openjdk.jmh', version:'1.37') {
entry 'jmh-core'
entry 'jmh-generator-annprocess'
}
dependency 'org.owasp.encoder:encoder:1.3.1'
dependency 'org.rocksdb:rocksdbjni:8.3.2' // 8.9.1 causes a bug with a FOREST canary
dependencySet(group: 'org.slf4j', version:'2.0.16') {
entry 'slf4j-api'
entry 'slf4j-nop'
}
dependency 'org.springframework.security:spring-security-crypto:6.3.3'
dependency 'org.testcontainers:testcontainers:1.20.1'
dependency 'org.web3j:quorum:4.10.0'
dependencySet(group: 'org.web3j', version: '4.12.1') {
entry 'abi'
entry 'besu'
entry 'core'
entry 'crypto'
}
dependencySet(group: 'org.wiremock', version: '3.9.1') {
entry 'wiremock'
}
dependency 'org.xerial.snappy:snappy-java:1.1.10.6'
dependency 'org.yaml:snakeyaml:2.0'
dependency 'org.apache.maven:maven-artifact:3.9.6'
dependency 'tech.pegasys:jc-kzg-4844:1.0.0'
dependency 'tech.pegasys.discovery:discovery:24.6.0'
}
}

@ -84,7 +84,7 @@ public class KubernetesNatManager extends AbstractNatManager {
final V1Service service = final V1Service service =
api api
.listServiceForAllNamespaces( .listServiceForAllNamespaces(
null, null, null, null, null, null, null, null, null, null) null, null, null, null, null, null, null, null, null, null, null)
.getItems() .getItems()
.stream() .stream()
.filter( .filter(

@ -0,0 +1,214 @@
/*
* 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
*/
plugins {
id 'java-platform'
id 'com.diffplug.spotless'
}
repositories {
mavenCentral()
}
javaPlatform {
allowDependencies()
}
dependencies {
api platform('com.fasterxml.jackson:jackson-bom:2.18.0')
api platform('io.grpc:grpc-bom:1.68.0')
api platform('io.netty:netty-bom:4.1.114.Final')
api platform('io.opentelemetry:opentelemetry-bom:1.43.0')
api platform('io.prometheus:simpleclient_bom:0.16.0')
api platform('io.vertx:vertx-stack-depchain:4.5.10')
api platform('org.apache.logging.log4j:log4j-bom:2.24.1')
api platform('org.assertj:assertj-bom:3.26.3')
api platform('org.immutables:bom:2.10.1')
api platform('org.junit:junit-bom:5.11.2')
api platform('org.mockito:mockito-bom:5.14.2')
api platform('org.slf4j:slf4j-bom:2.0.16')
constraints {
api project(':acceptance-tests:dsl')
api project(':besu')
api project(':config')
api project(':crypto:algorithms')
api project(':crypto:services')
api project(':ethereum:api')
api project(':ethereum:blockcreation')
api project(':ethereum:core')
api project(':ethereum:eth')
api project(':ethereum:p2p')
api project(':ethereum:permissioning')
api project(':ethereum:referencetests')
api project(':ethereum:rlp')
api project(':evm')
api project(':datatypes')
api project(':plugin-api')
api 'com.github.ben-manes.caffeine:caffeine:3.1.8'
api 'com.github.oshi:oshi-core:6.6.5'
api 'com.google.auto.service:auto-service:1.1.1'
api 'com.google.dagger:dagger-compiler:2.52'
api 'com.google.dagger:dagger:2.52'
api 'com.google.guava:guava:33.3.1-jre'
api 'com.google.protobuf:protobuf-java:3.25.5'
api 'com.graphql-java:graphql-java:22.3'
api 'com.splunk.logging:splunk-library-javalogging:1.11.8'
api 'com.squareup.okhttp3:okhttp:4.12.0'
api 'commons-io:commons-io:2.17.0'
api 'commons-net:commons-net:3.11.1'
api 'dnsjava:dnsjava:3.6.2'
api 'info.picocli:picocli:4.7.6'
api 'info.picocli:picocli-codegen:4.7.6'
api 'io.kubernetes:client-java:21.0.1-legacy'
api 'io.opentelemetry.instrumentation:opentelemetry-okhttp-3.0:2.9.0-alpha'
api 'io.opentelemetry.proto:opentelemetry-proto:1.3.2-alpha'
api 'io.opentelemetry.semconv:opentelemetry-semconv:1.28.0-alpha'
api 'io.opentracing:opentracing-api:0.33.0'
api 'io.opentracing:opentracing-util:0.33.0'
api 'io.opentracing.contrib:opentracing-okhttp3:3.0.0'
api 'io.pkts:pkts-core:3.0.10'
api 'io.tmio:tuweni-bytes:2.4.2'
api 'io.tmio:tuweni-config:2.4.2'
api 'io.tmio:tuweni-concurrent:2.4.2'
api 'io.tmio:tuweni-crypto:2.4.2'
api 'io.tmio:tuweni-devp2p:2.4.2'
api 'io.tmio:tuweni-io:2.4.2'
api 'io.tmio:tuweni-net:2.4.2'
api 'io.tmio:tuweni-rlp:2.4.2'
api 'io.tmio:tuweni-toml:2.4.2'
api 'io.tmio:tuweni-units:2.4.2'
api 'net.java.dev.jna:jna:5.15.0'
api 'org.antlr:antlr4:4.11.1'
api 'org.antlr:antlr4-runtime:4.11.1'
api 'org.apache.commons:commons-collections4:4.4'
api 'org.apache.commons:commons-compress:1.27.1'
api 'org.apache.commons:commons-lang3:3.17.0'
api 'org.apache.commons:commons-text:1.12.0'
api 'org.apache.maven:maven-artifact:3.9.9'
api 'org.awaitility:awaitility:4.2.2'
api 'org.bouncycastle:bcpkix-jdk18on:1.78.1'
api 'org.bouncycastle:bcprov-jdk18on:1.78.1'
api 'org.fusesource.jansi:jansi:2.4.1'
api 'org.hibernate.validator:hibernate-validator:8.0.1.Final'
api 'org.hyperledger.besu:arithmetic:0.9.7'
api 'org.hyperledger.besu:blake2bf:0.9.7'
api 'org.hyperledger.besu:bls12-381:0.9.7'
api 'org.hyperledger.besu:gnark:0.9.7'
api 'org.hyperledger.besu:ipa-multipoint:0.9.7'
api 'org.hyperledger.besu:secp256k1:0.9.7'
api 'org.hyperledger.besu:secp256r1:0.9.7'
api 'org.hyperledger.besu:besu-errorprone-checks:1.0.0'
api 'org.jacoco:org.jacoco.agent:0.8.12'
api 'org.jacoco:org.jacoco.core:0.8.12'
api 'org.junit.platform:junit-platform-runner:1.9.2'
api 'org.jupnp:org.jupnp:3.0.2'
api 'org.jupnp:org.jupnp.support:3.0.2'
api 'org.openjdk.jmh:jmh-core:1.37'
api 'org.openjdk.jmh:jmh-generator-annprocess:1.37'
api 'org.openjdk.jol:jol-core:0.17'
api 'org.owasp.encoder:encoder:1.3.1'
api 'org.rocksdb:rocksdbjni:8.3.2'
api 'org.springframework.security:spring-security-crypto:6.3.3'
api 'org.testcontainers:testcontainers:1.20.2'
api 'org.wiremock:wiremock:3.9.1'
api 'org.web3j:abi:4.12.2'
api 'org.web3j:besu:4.12.2'
api 'org.web3j:core:4.12.2'
api 'org.web3j:crypto:4.12.2'
api 'org.web3j:quorum:4.10.0'
api 'org.xerial.snappy:snappy-java:1.1.10.7'
api 'tech.pegasys:jc-kzg-4844:1.0.0'
api 'tech.pegasys.discovery:discovery:24.9.1'
}
}
spotless {
// spotless check applied to build.gradle (groovy) files
groovyGradle {
target '*.gradle'
greclipse('4.31').configFile(rootProject.file('gradle/spotless/greclipse.properties'))
endWithNewline()
}
}
publishing {
publications {
mavenPlatform(MavenPublication) {
from components.javaPlatform
groupId "org.hyperledger.besu"
artifactId 'bom'
version calculateVersion()
pom {
name = "Besu BOM"
url = 'http://github.com/hyperledger/besu'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
scm {
connection = 'scm:git:git://github.com/hyperledger/besu.git'
developerConnection = 'scm:git:ssh://github.com/hyperledger/besu.git'
url = 'https://github.com/hyperledger/besu'
}
}
}
}
}

@ -58,6 +58,4 @@ dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.assertj:assertj-core' testImplementation 'org.assertj:assertj-core'
testImplementation 'org.mockito:mockito-junit-jupiter' testImplementation 'org.mockito:mockito-junit-jupiter'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine'
} }

@ -62,6 +62,7 @@ include 'metrics:core'
include 'metrics:rocksdb' include 'metrics:rocksdb'
include 'nat' include 'nat'
include 'pki' include 'pki'
include 'platform'
include 'plugin-api' include 'plugin-api'
include 'plugins:rocksdb' include 'plugins:rocksdb'
include 'privacy-contracts' include 'privacy-contracts'

Loading…
Cancel
Save