127 Commits

Author SHA1 Message Date
Fabio Di Fabio
8b5b40d21e Merge branch 'main' into zkbesu
# Conflicts:
#	.github/workflows/acceptance-tests.yml
#	.github/workflows/codeql.yml
#	.github/workflows/integration-tests.yml
#	.github/workflows/pre-review.yml
#	.github/workflows/reference-tests.yml
#	build.gradle
2025-03-18 11:23:20 +01:00
Matilda-Clerke
84cd2660a0 7935: Add E2StoreReader (#8329)
* Refactor to use clock to validate expiry

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* 7935: Finish unit testing E2StoreReader

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Build out E2StoreReader and associated files

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Spotless

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Add javadoc to new util module classes

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Remove unnecessary e2 and era file stuff

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Rename files to be era1 specific

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Rename e2 package to era1

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Spotless

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Rename Era1StoreReaderListener to Era1ReaderListener

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Use bouncycastle for little endian to long conversion

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Rename slot related variables to blockIndex

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Spotless

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

* Use Pack.littleEndianToLong with length to avoid using Arrays.concatenate

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

---------

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
2025-03-04 22:18:53 +00:00
Fabio Di Fabio
bdc6423779 Merge branch 'main' into zkbesu
# Conflicts:
#	.github/workflows/pre-review.yml
#	.github/workflows/reference-tests.yml
2025-02-12 16:05:20 +01:00
Fabio Di Fabio
428a638569 Allow plugins to propose transactions during block creation (#8268)
* Allow plugins to propose transactions during block creation

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Apply suggestions from code review

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Document AbstractStatefulTransactionSelector

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Unit tests for BlockSizeTransactionSelectorTest

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

---------

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2025-02-12 15:59:59 +01:00
Fabio Di Fabio
af80dfbd86 Merge branch 'main' into zkbesu
# Conflicts:
#	crypto/algorithms/build.gradle
#	crypto/services/build.gradle
#	datatypes/build.gradle
#	ethereum/rlp/build.gradle
#	evm/build.gradle
#	plugin-api/build.gradle
#	util/build.gradle
2024-09-02 12:25:58 +02:00
Matilda-Clerke
da98fa5541 Reintroduce engine get client version v1 with commit in manifest (#7548)
* Include Commit-Hash in manifests
* Add commit method in BesuInfo
* Use 8 character hash in EngineGetClientVersionV1 and revert calculateVersion back to original spec

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Co-authored-by: garyschulte <garyschulte@gmail.com>
2024-08-30 18:13:53 +00:00
Fabio Di Fabio
b19ae8cd26 Merge branch 'main' into zkbesu
# Conflicts:
#	.github/workflows/release.yml
#	besu/src/main/java/org/hyperledger/besu/controller/BesuController.java
#	ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthEstimateGas.java
#	ethereum/evmtool/build.gradle
#	evm/src/main/java/org/hyperledger/besu/evm/EvmSpecVersion.java
#	gradle/verification-metadata.xml
#	plugin-api/build.gradle
2024-07-16 17:22:21 +02:00
Usman Saleem
77183f6d60 javadoc: Adding javadoc for ethstats module (#7269)
* javadoc: Adding javadoc for ethstats module

---------

Signed-off-by: Usman Saleem <usman@usmans.info>
2024-06-27 03:09:00 +00:00
Fabio Di Fabio
a5732c86e4 Merge branch 'main' into zkbesu 2024-06-06 18:16:51 +02:00
Usman Saleem
2d59f4dd7e feat!: Java 21 for build and runtime (#7177)
* build: Update jacoco version to 0.8.11
* build: Enforce Java 21 and above check for build
* CI: Use Java 21 in Github CI workflows
* CI: Use Java 21 in circleci workflows
* build: Update gradle verification metadata for jacoco 0.8.11
* refactor: Fix javadoc related warnings which are applicable to Java 21
* fix(test): BackwardSyncAlgSpec slightly increase timeout to pass it in CI

---------

Signed-off-by: Usman Saleem <usman@usmans.info>
2024-06-06 15:29:18 +10:00
Fabio Di Fabio
d4af85a94e Merge branch 'main' into zkbesu
# Conflicts:
#	.github/workflows/acceptance-tests.yml
#	.github/workflows/artifacts.yml
#	besu/src/main/java/org/hyperledger/besu/controller/BesuController.java
#	build.gradle
#	ethereum/evmtool/build.gradle
2024-05-03 14:50:21 +02:00
Usman Saleem
9d27c509be Apply Hyperledger license header (#7029)
-- plugin-api/ util/

Signed-off-by: Usman Saleem <usman@usmans.info>
2024-05-02 20:12:43 +10:00
Usman Saleem
4c3f4b37a2 build - Update license headers formatting (#7017)
Fix headers formatting under: enclave/ evm/ nat/ pki/ util/
---------

Signed-off-by: Usman Saleem <usman@usmans.info>
2024-05-01 00:36:34 +00:00
Fabio Di Fabio
03dc8f5241 Merge branch 'main' into zkbesu 2024-04-09 18:34:48 +02:00
Danno Ferrin
001080a72b Upgrade spotless to 1.22.0 (#6898)
Upgrade spotless to 1.22.0 and reformat.
This is required for Java21 support.

Signed-off-by: Danno Ferrin <danno@numisight.com>
Co-authored-by: Danno Ferrin <danno@numisight.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2024-04-09 04:12:56 +00:00
Fabio Di Fabio
d7ff6ceb87 Merge branch 'main' into zkbesu 2024-03-27 14:06:57 +01:00
Usman Saleem
e954537fcc build - Refactor Besu custom error prone dependency (#6692)
Move Besu custom error-prone checks into its own repository and use it as an external dependency. This allows to move to a newer version of Google errorprone checks as well while cleaning up build.gradle file.

Key changes resulted due to this change:

* String toLowerCase and toUpperCase to use Locale.ROOT as argument
* Use interface such as List,Map or NavigatableMap instead of concrete class where appropriate.
* Simplify StringBuilder to plain String
* Suppress warnings where appropriate.
-----
Signed-off-by: Usman Saleem <usman@usmans.info>
2024-03-27 06:17:40 +10:00
Fabio Di Fabio
6148f3c29f Merge branch 'main' into zkbesu 2024-02-06 11:47:03 +01:00
Stefan Pingel
630ac85541 Close Sockets after testing for availablity (#6516)
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
2024-02-02 17:45:57 +10:00
Fabio Di Fabio
2d92f8533a Merge branch 'main' into zkbesu
# Conflicts:
#	.github/workflows/codeql.yml
#	.github/workflows/gradle-wrapper-validation.yml
#	.github/workflows/pr-checklist-on-open.yml
#	.github/workflows/release.yml
#	.github/workflows/sonarcloud.yml
#	build.gradle
2024-02-01 14:29:33 +01:00
garyschulte
79245bb9af Filter Discovered peers for ipv6 support (#6498)
* use existing NetworkUtility for PeerDiscoveryAgent pingpacket data filtering, add ipv6 check/fallback
* log at debug when we override pingpacket from
* use java native address parsing rather than lookup by host

Signed-off-by: garyschulte <garyschulte@gmail.com>
2024-01-30 20:44:24 -08:00
garyschulte
8972d6707c info level log for pipeline abort (#6459)
* info level log for pipeline abort
* add depth protection

Signed-off-by: garyschulte <garyschulte@gmail.com>
2024-01-30 12:42:31 -08:00
Fabio Di Fabio
1d4b97918c Merge branch 'main' into zkbesu
# Conflicts:
#	.github/workflows/checks.yml
#	.github/workflows/codeql.yml
#	.github/workflows/release.yml
#	.github/workflows/sonarcloud.yml
#	build.gradle
#	gradle.properties
2023-12-21 10:32:57 +01:00
Sally MacFarlane
0c122732c6 removed vintage junit dependency (#6296)
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-12-14 11:53:37 +01:00
Fabio Di Fabio
43120fea29 Merge branch 'main' into zkbesu 2023-11-09 12:21:36 +01:00
Fabio Di Fabio
636ad8a65a Force tx replacement price bump to zero when zero base fee market is configured (#6079)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2023-11-08 15:26:22 +01:00
Fabio Di Fabio
4aa2e475f3 Fix artifacts groupId
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2023-10-05 10:11:14 +02:00
Fabio Di Fabio
5ff9889efc Rename artifacts group it to linea-besu and remove uneeded stuff
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2023-10-04 18:27:18 +02:00
Danno Ferrin
03ff688043 Changes to allow evmtool t8n-server to work with execution-spec-tests (#5701)
An omnibus of minor changes needed for t8n-server to work with the EFs
new execution-spec-tests framework

* Reduce logging output
* Fix json library mismatch between t8n and t8n-server
* Add hook to enumerate supported forks
* temporarily map Shanghai+6780 to Cancun
* add to main distro under 'evmtool' name
* No longer support the "protected" attribute in TXes

Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
2023-07-18 17:47:54 -06:00
Suyash Nayan
cb12a2c410 Migrate util module to JUnit 5.0 (#5581)
Signed-off-by: 7suyash7 <suyashnyn1@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-06-12 14:25:40 +10:00
Stefan Pingel
534a369574 Move connect decision into protocol layer (#4759)
Move the decision making for connecting or not connecting to peers into the eth layer. Future changes will take advantage if this to improve peering.

Signed-off-by: Stefan <stefan.pingel@consensys.net>

---------

Signed-off-by: Stefan <stefan.pingel@consensys.net>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-04-14 09:28:29 +10:00
Fabio Di Fabio
97fb61df94 Add javadoc (#5329)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2023-04-12 06:53:00 +10:00
Fabio Di Fabio
a9b906cba5 Log jemalloc presence and version at startup (#4738)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2023-04-11 15:49:59 +02:00
Danno Ferrin
3e35dba092 Reduce Log4J API Exposures (#5189)
Reduce the number of places that expose Log4J classes as a part of the
interfaces for methods and classes. While Log4j remains the default we
still need to be able to function when the Log4J jars are removed from
the classpath.

Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
2023-03-11 15:12:10 -06:00
Diego López León
66c757dfa3 Update SLF4J version (#4587)
* Bump SLF4J version and replace helper for lambdas

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* Remove unnecessary toString calls

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* Replace unnecessaryy lambdas for constant references

Signed-off-by: Diego López León <dieguitoll@gmail.com>

---------

Signed-off-by: Diego López León <dieguitoll@gmail.com>
2023-02-28 08:10:09 -03:00
Usman Saleem
9eb32836b7 Fix javadocs to allow build to pass in JDK 17 (#4834)
- Added missing javadocs so that javadoc doclint passes against JDK 17 (invoke by Besu gradle build).
- Exclude following packages from javadoc lint:
org.hyperledger.besu.privacy.contracts.generated
org.hyperledger.besu.tests.acceptance.*
- Temporarily exclude ethereum and evm submodule for doc lint checks.
- Run the javadoc task using GitHub actions (use Java 17) to report any javadoc errors during the PR builds
- Updating plugin-api build.gradle with new hash as javadoc comments caused it to change

Signed-off-by: Usman Saleem <usman@usmans.info>
2023-01-18 22:51:00 +10:00
Daniel Lehrner
49f32ca22d Prints configuration overview (#4451)
* print configuration overview at startup

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
2022-11-22 14:41:06 +01:00
Gabriel Camargo Fukushima
42260fd56b Add port conflict exception (#4565)
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
2022-11-02 15:42:16 +10:00
mark-terry
aa849839b8 Reduced logging level on Subscriber error callback. (#4485)
Signed-off-by: mark-terry <mark.terry@consensys.net>

Signed-off-by: mark-terry <mark.terry@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2022-10-07 12:12:57 +10:00
mustafauzunn
817c1cbc24 Java modules support (#4468)
Add java module info to the manifests of the following  libraries used by the Besu EVM

./crypto - org.hyperledger.besu.internal.Crypto
./ethereum/rlp - org.hyperledger.besu.internal.Rlp
./util - org.hyperledger.besu.internal.Util
./datatypes - org.hyperledger.besu.Datatypes
./evm - org.hyperledger.besu.Evm
./plugin-api - org.hyperledger.besu.PluginApi

Signed-off-by: Mustafa Uzun <mustafa.uzun@limechain.tech>
2022-10-04 03:45:44 +02:00
Matt Nelson
86c308096b Fixing sub logging and moving stack trace to debug. (#4334)
* Fixing sub logging and moving stack trace to debug.

Signed-off-by: Matt Nelson <matt.nelson@consensys.net>
Co-authored-by: Matt Nelson <matt.nelson@Matts-MacBook-Pro.local>
2022-08-31 16:32:35 -04:00
Danno Ferrin
d0c71c3bdc Remove Sonar Integration (#4135)
Sonar has been removed from the build workflow. This PR removes all
configuration and code markings that were used to facilitate it.

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2022-07-21 23:28:20 +01:00
mbaxter
645fdd08ee [Issue 3867] Make eth subprotocol message size limit configurable (#4002)
Signed-off-by: Meredith Baxter <meredith.baxter@palm.io>
2022-06-22 23:12:08 -06:00
Danno Ferrin
daf680c97b Reduce EVM library dependencies (#3832)
* Reduce EVM library dependencies

Reduce the runtime dependencies of the EVM module by moving a
class used by a single class out of util to the owned module (QosTimer)
and them removing un-used dependencies from EVM and dependant modules.

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2022-05-16 10:12:37 +10:00
Danno Ferrin
b4027d6e39 Use JUnit 5 for unit test execution (#3620)
Change the unit test execution to use the Junit5 JUnitPlatform. This
allows for a mix of junit 4 and junit 5 tests and for a gradual
migration to junit 5 instead of a big bang. One class depended on
junit 4 exceptions and was updated. Two tests depending on 
native libraries fail gracefully on mac (and only mac).

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2022-04-02 00:34:48 +10:00
Jiri Peinlich
0fce76cc9f Batching backward sync (#3532)
* Backward sync now batches requests

Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
2022-03-18 10:07:04 -07:00
garyschulte
3b5dafbfa0 Warn if consensus client doesn't call transition configuration endpoint within 120 seconds (#3569)
* add qos timer to engine_exchangeTransitionConfiguration

Signed-off-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
2022-03-12 12:03:20 -08:00
Stefan Pingel
cd281946c8 fixed method name and some 'finals' (#3370)
Signed-off-by: Stefan Pingel <stefan.pingel@consensys.net>
2022-02-03 22:52:58 +01:00
garyschulte
b3e1b5f86c backport merge updates to main (#3341)
* backport merge updates to main

Signed-off-by: garyschulte <garyschulte@gmail.com>
2022-01-27 22:17:21 -08:00
Diego López León
ed1329cf84 Introduce SLF4J for logging (#3285)
* Bump SLF4J version

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* Replace log4j2 API with SLF4j API

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* Replace usage of LogManager#getFormatterLogger

This is for keeping compatibility with SLF4J. If neccesary, a specific formatter can be created for the RlpBlockImporter class

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* Unset the default logging value for the retesteth

This is because it's not possible to resolve the root logger level into a Log4J2 field

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* Prevent creation of Logger context outside SLF4J

org.hyperledger.besu.cli.BesuCommand#setAllLevels was taken from
https://github.com/apache/logging-log4j2/blob/rel%2F2.17.1/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java#L309

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* Add FATAL level deprecation message

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* [Sonar] Fix java:S2139

Exceptions should be either logged or rethrown but not both

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* [Sonar] Fix java:S3457

Printf-style format strings should be used correctly

Signed-off-by: Diego López León <dieguitoll@gmail.com>

* Add changelog

Signed-off-by: Diego López León <dieguitoll@gmail.com>
2022-01-25 20:14:54 -03:00