Commit Graph

31 Commits

Author SHA1 Message Date
Simon Dudley
789542f76d Pull in Consensys/tuweni v2.7.0 (#8330)
This replaces io.tmio/tuweni with the Consensys fork.

Also Includes:
- reduce check argument args allocations - https://github.com/Consensys/tuweni/pull/10
which should reduce Integer and int[] and therefore gc pressure

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
2025-03-17 19:42:25 +10:00
Matilda-Clerke
2412586d06 7582: Add naive RLP caching for BlockHeader, Transaction, and Withdrawal (#7988)
* 7582: Add naive RLP caching for BlockHeader, Transaction, and Withdrawal

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

* 7582: spotless

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

* 7582: Fix broken test after merge

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

* 7582: Back out withdrawal changes

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

* 7582: Fix up compile error after merge

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

* 7582: Apply naive RLP caching in transaction encoder/decoder classes

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

* 8053: Add RLPDecodingHelpers.Kind.EM
and handle empty lists in AbstractRLPInput

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

* 7582: Add trace logging to AbstractRLPInput

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

* Revert previous change, implement new fix

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

* Revert previous change, implement new fix

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

* 7582: Finish applying naive RLP caching to transaction encoder/decoder classes

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

* Remove unused LOG

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

* 7582: Make explicit the expectation that RLP.validate does not throw an exception in test

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

* 7582: SPOTLESS

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

* 7582: Remove redundant curly braces

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

* 7582: Remove Optional from rawRlp in Transaction.Builder

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

* 7582: Make new BlockHeader constructor private

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

* Refactor tranaction encoder classes

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

* Remove logging changes from RLP module

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

* spotless

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

---------

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda-Clerke <matilda.clerke@consensys.net>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
2025-02-03 14:51:58 +11: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
Nischal Sharma
d923b8eb8f ethereum/part8 - migrated tests from Junit4 to Junit5 (#5720)
Signed-off-by: Nischal Sharma <nischal@web3labs.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-07-26 17:13:17 +10:00
Antoine Toulme
901661cb4f Update tuweni2.4.2 (#5684)
* Revert "Revert "Update Tuweni to 2.4.1 (#5513)" (#5585)"

This reverts commit 6111e1bbc3.

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* update Tuweni to 2.4.2

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

---------

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
2023-07-11 22:26:32 -07:00
Sally MacFarlane
6111e1bbc3 Revert "Update Tuweni to 2.4.1 (#5513)" (#5585)
This reverts commit b96418143c.

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-06-13 13:12:23 +10:00
Antoine Toulme
b96418143c Update Tuweni to 2.4.1 (#5513)
* update to 2.4.1

* update use of DNS daemon with Vertx

* fix issue with Bytes.repeat

* update antlr version

* fix dns tests

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

---------

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
2023-06-09 12:31:20 +10:00
Antoine Toulme
af25c9bac0 upgrade tuweni to 2.3.0 (#4464)
* upgrade tuweni to 2.3.0

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Add guava dependency explicitly

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* spotless

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* add antlr dependency

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* upgrade antlr and graphql-java

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* fix graphql validation messages

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* remove staged repo

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
2022-10-08 14:52:50 -07: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
Danno Ferrin
755771d22c Dependency Version Updates for 22.7.0-RC1 (#4004)
Update dependency versions.

Dependencies skipped because they require compatibility work
 * vertx
 * JMH
 * Prometheus
 * RocksDB
 * Web3j
 * Gradle

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2022-06-23 11:03:07 -03:00
Diego López León
02d389a19e Migrate referenceTests to Junit5 (#3850)
* Remove deprecated cleanup task
* Move util class into test-support
This is because this class can be used outside the scope of the junit tests but it'll not be part of main
* Move referenceTests into its own scope
* Migrate referenceTests to Junit5

I inlined `o.h.b.e.vm.AbstractRetryingTest` into `o.h.b.e.vm.VMReferenceTest` because there was a single usage of the abstraction and also because it wasn't portable to how Junit5 parameters work

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

Co-authored-by: Danno Ferrin <danno.ferrin@gmail.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
2022-06-02 13:38:56 +12: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
Danno Ferrin
2415000caf Evm speedup (#2796)
Broad reaching optimizations to speed up EVM calculations

* Generally speaking, use int and long where it is more appropriate than UInt256 (memory indexes mostly)
* Move the internal stack to Bytes from UInt256
* Re-work the flow of many operations to account for the above

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2021-09-23 16:39:45 +10:00
Antoine Toulme
11f5cfb022 Upgrade to Apache Tuweni 2.0 (#2376)
* Upgrade to Apache Tuweni 2.0

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Remove intermediate repository

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Remove all occurrences of toBytes

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Migrate to tuweni-bytes

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* add changelog

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* correct reference tests

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Initial API changes

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* more changes

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Change APIs for VM ops

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Use constant UInt256.ONE

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* Optimize a bit address <> word transformation

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* spotless

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
2021-07-17 00:15:27 +02:00
Antoine Toulme
b9364ed243 Upgrade to Apache Tuweni 1.2.0 (#1493)
* Upgrade to Apache Tuweni 1.2.0

Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>

* no jsr305

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>

Co-authored-by: Danno Ferrin <danno.ferrin@gmail.com>
2020-11-05 15:40:42 -08:00
Danno Ferrin
838f7aa5e0 Fix Gradle 7.0 compatibility issues and build warnings (#288)
Removes as many Gradle 7.0 compatibility issues as possible
* `baseName` -> `archiveBaseName`
* `extension` -> `archiveExtension`
* `destinationDir` -> `destinationDirectory`
* `runtime` -> `runtimeOnly`
* Change some log4j-api and log4j-core dependencies
* Remove an unneeded and outdated plugin (`net.ltgt.apt`)
* tweak the plugin-api change detector's property annotations.

Warnings still exist with one external plugin used for license file
checking that we do not control the source code for.

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2020-01-13 08:28:50 -07:00
Danno Ferrin
dfad8bff78 Update Dependencies (#281)
Update dependencies to most current version
 - except picocli which is a major version update
Alphabetize dependencies

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2020-01-01 20:42:13 +13:00
Antoine Toulme
ccefada736 Move to Apache Tuweni Bytes library (#215)
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2019-12-20 12:05:15 +10:00
Joshua Fernandes
bac5c673d3 Adding a spdx license check gradle task (#30)
* adding in spdx-license-identifier & updated check for the same; removing license check from spotless

Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net>

* Change CheckSpdxHeader to a task.

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-09-20 14:59:57 +10:00
Joshua Fernandes
d6a2394e2d Migrating Pantheon to Besu (#1945)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-09-16 11:14:10 +10:00
Edward
9856cd32b0 Ensure plugin-api module gets published at the correct maven path (#1905)
* Ensure `plugin-api` module gets published at the correct maven path
* Move `plugins` to `plugin-api`

Signed-off-by: Edward Evans <edward.evans@consensys.net>

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-09-05 10:29:30 +10:00
Edward
9601f44ac8 Return the plugin-apis to this repo (#1900)
* Return plugin-api to the main repo
* Spotless
* Migrate all external plugin-api references to the project in this repo
* Add licence header
* Update repo reference for publish, even if commented
* Use real configuration for publishing plugin-api

This was tested with the
`:plugins:publishMavenJavaPublicationToMavenLocal` task and checking the
local Maven repo to make sure it was using the correct paths

Signed-off-by: Edward Evans <edward.evans@consensys.net>

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-09-04 12:12:27 +10:00
Danno Ferrin
43cc4ce5c9 Support plugin Richdata APIs via implementation (#1581)
* Rich Data for Events Plugin

* plugin-api -> api

* use BinaryData as a root and add getValue to UInt256Value

* bring rick data changes in line with proposed APIs.

Undo orthagonal naming changes.

* add size

* use log and transaction interfaces from rich data api

* update to released plugin api version and add new event listener.

* add tests

* fix acceptance tests

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-08-23 09:39:56 +02:00
Danno Ferrin
d4fff610c6 Dependencies Version upgrade (#303)
Upgrade dependency versions

* All version information is merged into one place
* Upgrade most version to their latest non-test version.
* dependencies are now sorted

Two dependencies were not upgraded:

errorprone - There are new checks that require build or source changes.
vertex - The license to eclipse 2.0 which is not in our current approved license list. 
    The change is trivial but for tracability it should be done alone.

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2018-11-26 08:33:40 -07:00
Danno Ferrin
0716e6044b Update Client Version to be ethstats friendly (#258)
Update value returned by web3_clientVersion to be ethstats friendly

* Version part starts with a v
* SNAPSHOT builds report 32 bits of the git hash
* OS and architecture are sniffed out and reported
* JVM version and branding are sniffed out and reported

Example values (not all real):
pantheon/v0.9.0-dev-f800a0b1/osx-x86_64/oracle-java-1.8
pantheon/v0.9.0-dev-27960b57/osx-x86_64/zulu-java-11
pantheon/v0.9.0/linux-arm64/openjdk-java-12
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2018-11-14 08:08:45 -07:00
mbaxter
0cf8f2e5b8 [NC-1561] Remove RLPUtils from RawBlockIterator (#179)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2018-10-26 17:53:18 -04:00
Chris Mckay
005bf5037b [MINOR] delayed submodule check until submodule used
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2018-10-25 08:01:02 +10:00
mark-terry
cb01231ac0 [NC-862] License headers applied to non-java files (#93)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2018-10-19 07:26:11 +10:00
Chris Mckay
75ce3a4f02 [MINOR] removing executable from files (#14)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2018-10-10 14:22:54 +11:00
PegaSys Admin
7dfc2e4085 Initial commit
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2018-10-09 15:17:20 +00:00