Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap EthereumJ with Besu #2208

Merged
merged 111 commits into from Oct 12, 2021
Merged

Conversation

Daniel-K-Ivanov
Copy link
Collaborator

@Daniel-K-Ivanov Daniel-K-Ivanov commented Sep 17, 2021

Description:

  • Introduces Besu as a dependency
  • Changes the EVM execution from the legacy SmartContractRequestHandler to a new EvmTxProcessor
  • Utilises the Besu EVM instead of the EthereumJ EVM
  • Resivited Contract Service E2E tests

Notes for reviewer:

  • Revert the legacy state files back to the EthereumJ repo
  • Implement ContractLocalCall
  • Populate bloom, logs and createdContractIDs & AccountAmount Transfers in Transaction Record
    • E2E tests for TransactionRecord externalisation
  • Remove CREATE2 opcode
  • Add Hedera Custom CREATE opcode
  • Verify that COINBASE and GASLIMIT opcodes work and return the correct data
  • Verify that BASEFEE returns 0
  • Populate CHAINID
  • Throw when accessing a non-existing account with INVALID_SOLIDITY_ADDRESS
  • Verify that there is support for factory contracts
  • Verify signature is present when transferring hbars to accounts with receiverSigRequired=true
  • Use rbh when we calculate gas cost of log0-4
    • E2E test for large Logs
  • Verify that the rest of the HAPI calls are functional
    • ContractGetInfo
    • ContractGetByteCode
    • ContractUpdate
    • ContractDelete
  • Remove legacy EtherumJ code (dead code)
  • Verify that all Contract related E2E tests have proper asserts and are passing

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

dependabot bot and others added 30 commits August 16, 2021 11:41
Bumps [maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 1.6 to 3.0.1.
- [Release notes](https://github.com/apache/maven-gpg-plugin/releases)
- [Commits](apache/maven-gpg-plugin@maven-gpg-plugin-1.6...maven-gpg-plugin-3.0.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [os-maven-plugin](https://github.com/trustin/os-maven-plugin) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/trustin/os-maven-plugin/releases)
- [Commits](trustin/os-maven-plugin@os-maven-plugin-1.6.0...os-maven-plugin-1.7.0)

---
updated-dependencies:
- dependency-name: kr.motd.maven:os-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [maven-release-plugin](https://github.com/apache/maven-release) from 3.0.0-M1 to 3.0.0-M4.
- [Release notes](https://github.com/apache/maven-release/releases)
- [Commits](apache/maven-release@maven-release-3.0.0-M1...maven-release-3.0.0-M4)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-release-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [snakeyaml](https://bitbucket.org/asomov/snakeyaml) from 1.26 to 1.29.
- [Commits](https://bitbucket.org/asomov/snakeyaml/branches/compare/snakeyaml-1.29..snakeyaml-1.26)

---
updated-dependencies:
- dependency-name: org.yaml:snakeyaml
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps ubuntu from 20.10 to 21.10.

---
updated-dependencies:
- dependency-name: ubuntu
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.11.2 to 2.12.4.
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [maven-dependency-plugin](https://github.com/apache/maven-dependency-plugin) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/apache/maven-dependency-plugin/releases)
- [Commits](apache/maven-dependency-plugin@maven-dependency-plugin-3.1.1...maven-dependency-plugin-3.2.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-dependency-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [maven-antrun-plugin](https://github.com/apache/maven-antrun-plugin) from 1.8 to 3.0.0.
- [Release notes](https://github.com/apache/maven-antrun-plugin/releases)
- [Commits](apache/maven-antrun-plugin@maven-antrun-plugin-1.8...maven-antrun-plugin-3.0.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-antrun-plugin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps `swirlds.version` from 0.17.1 to 0.17.3.

Updates `swirlds-platform-core` from 0.17.1 to 0.17.3

Updates `swirlds-fcmap` from 0.17.1 to 0.17.3

Updates `swirlds-fcqueue` from 0.17.1 to 0.17.3

Updates `swirlds-common` from 0.17.1 to 0.17.3

---
updated-dependencies:
- dependency-name: com.swirlds:swirlds-platform-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.swirlds:swirlds-fcmap
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.swirlds:swirlds-fcqueue
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.swirlds:swirlds-common
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps `mockito.version` from 3.11.2 to 3.12.1.

Updates `mockito-core` from 3.11.2 to 3.12.1
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](mockito/mockito@v3.11.2...v3.12.1)

Updates `mockito-junit-jupiter` from 3.11.2 to 3.12.1
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](mockito/mockito@v3.11.2...v3.12.1)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:development
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [netty-bom](https://github.com/netty/netty) from 4.1.66.Final to 4.1.67.Final.
- [Release notes](https://github.com/netty/netty/releases)
- [Commits](netty/netty@netty-4.1.66.Final...netty-4.1.67.Final)

---
updated-dependencies:
- dependency-name: io.netty:netty-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [grpc-bom](https://github.com/grpc/grpc-java) from 1.39.0 to 1.40.0.
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](grpc/grpc-java@v1.39.0...v1.40.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-bom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps `mockito.version` from 3.12.1 to 3.12.4.

Updates `mockito-core` from 3.12.1 to 3.12.4
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](mockito/mockito@v3.12.1...v3.12.4)

Updates `mockito-junit-jupiter` from 3.12.1 to 3.12.4
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](mockito/mockito@v3.12.1...v3.12.4)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps `swirlds.version` from 0.17.3 to 0.17.4.

Updates `swirlds-platform-core` from 0.17.3 to 0.17.4

Updates `swirlds-fcmap` from 0.17.3 to 0.17.4

Updates `swirlds-fcqueue` from 0.17.3 to 0.17.4

Updates `swirlds-common` from 0.17.3 to 0.17.4

---
updated-dependencies:
- dependency-name: com.swirlds:swirlds-platform-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.swirlds:swirlds-fcmap
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.swirlds:swirlds-fcqueue
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.swirlds:swirlds-common
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [grpc-bom](https://github.com/grpc/grpc-java) from 1.40.0 to 1.40.1.
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](grpc/grpc-java@v1.40.0...v1.40.1)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.12.4 to 2.12.5.
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [dagger](https://github.com/google/dagger) from 2.37 to 2.38.1.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](google/dagger@dagger-2.37...dagger-2.38.1)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>
Signed-off-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>
Fix gas calculators in BesuAdapter
Create HederaUpdateTrackingAccount
Merge AccountStore and Account from crypto-create brach (persistNew)

Signed-off-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>
Signed-off-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>
Signed-off-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>
Signed-off-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>
Renamed BesuStateAdapter to HederaWorldUpdater
Merged changes to Account and AccountState from crypto-create branch

Signed-off-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>
Signed-off-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>
* #417: Contract Create Transition logic refactoring

Signed-off-by: Rusi Boyadjiev <rusiboyadjiev@gmail.com>

* #417: Contract Create Transition logic refactoring

Signed-off-by: Rusi Boyadjiev <rusiboyadjiev@gmail.com>

* #417: Contract Create transition logic refactoring

Signed-off-by: Rusi Boyadjiev <rusiboyadjiev@gmail.com>

* fix(evm-processor): Add base evm processor and CallEvmTxProcessor

Signed-off-by: Daniel Ivanov <daniel.k.ivanov95@gmail.com>

* fix(build): Resolve build errors

Signed-off-by: Daniel Ivanov <daniel.k.ivanov95@gmail.com>

* fix(contract-create): Integrate CreateEvmTxProcessor in ContractCreateTransitionLogic

Signed-off-by: Daniel Ivanov <daniel.k.ivanov95@gmail.com>

* fix(remove-besu-adapter): Remove any unnecessary logic left from the Besu Adapter

Signed-off-by: Daniel Ivanov <daniel.k.ivanov95@gmail.com>

* fix(header): Override Block Header properties

Signed-off-by: Daniel Ivanov <daniel.k.ivanov95@gmail.com>

* refactor: Remove commented code

Signed-off-by: Daniel Ivanov <daniel.k.ivanov95@gmail.com>

Co-authored-by: Rusi Boyadjiev <rusiboyadjiev@gmail.com>
* Refactored E2E tests related to Contracts part 1
- more tests remain to be refactored
- it remains for tests to be added to SuiteRunner
- this commit adds 2 tests to CreateSuite that are currently failing, will discuss them and fix logic or test expectations

Signed-off-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>

* Refactored E2E tests related to Contracts part 2
- more tests remain to be refactored
- it remains for tests to be added to SuiteRunner


Signed-off-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>

* e2e(contracts): format and update perf tests

Signed-off-by: failfmi <oscurocalma@gmail.com>

* Refactor e2e part 3


Signed-off-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>

* E2E refactoring:
added contract tests to SuiteRunner
removed system.out.printlns

Signed-off-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>

Co-authored-by: failfmi <oscurocalma@gmail.com>
Daniel-K-Ivanov and others added 16 commits October 8, 2021 17:39
Signed-off-by: Daniel Ivanov <daniel.k.ivanov95@gmail.com>
* CallCode, OperationUtil and SStoreOperation Unit Tests

Signed-off-by: Georgi Yazovaliyski <georgi.yazovaliiski@gmail.com>

* MerkleEntityIdUtilsTest

Signed-off-by: Georgi Yazovaliyski <georgi.yazovaliiski@gmail.com>
* Format code
* `CreateEvmTxProcessor`
* `HederaWorldState`
* `HederaExtCodeSize`
* `HederaExtCodeCopy`
* `AccountStore`

Signed-off-by: failfmi <oscurocalma@gmail.com>
* Enorce Storage Limit

Enforce the limit to allowed slot storage. Restore behavior in
ChildStorage test that validates the out of storage space condition
results in a contract failure.

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

* undo tpyo

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

* setup and cleanup app properties

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

* feat(unit-tests): Add unit tests for HederaWorldState

Signed-off-by: Daniel Ivanov <daniel.k.ivanov95@gmail.com>

* fix(code-smell): Fix sonar code smell

Signed-off-by: Daniel Ivanov <daniel.k.ivanov95@gmail.com>

* fix(failing-tests): Fix failing e2e tests

Signed-off-by: Daniel Ivanov <daniel.k.ivanov95@gmail.com>

* fix(failing-tests): Fix failing e2e test

Signed-off-by: Daniel Ivanov <daniel.k.ivanov95@gmail.com>

* fix(bug): Clear provisional creations on MAX_CONTRACT_STORAGE_EXCEEDED

Signed-off-by: Daniel Ivanov <daniel.k.ivanov95@gmail.com>

* E2E tests refactoring
removed Result Size Limit Exceeded test
updated SStoreSuite valuesMatch to not expect precheck failure and actually verify contract values

Signed-off-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>

Co-authored-by: Daniel Ivanov <daniel.k.ivanov95@gmail.com>
Co-authored-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>
# Conflicts:
#	test-clients/src/main/java/com/hedera/services/bdd/spec/queries/meta/HapiGetTxnRecord.java
* feat(bloom): Add bloom per log

Signed-off-by: Daniel Ivanov <daniel.k.ivanov95@gmail.com>

* comment(remove): Remove already completed TODO

Signed-off-by: Daniel Ivanov <daniel.k.ivanov95@gmail.com>
* E2E tests refactoring
fixed fridayThe13th spec - changes in method names, sigs, moved to update contract suite
fixed issue with gas refunds externalization to TX record in EvmTxProcessor
fixed smart contract fail first to expect revert, not execution exception
refactored txRecordsContainValidTransfers() in RecordsSuite

Signed-off-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>

* Small refactor, removed second gasUsedByTransaction assignment

Signed-off-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>
…fault (#594)

Signed-off-by: failfmi <oscurocalma@gmail.com>
# Conflicts:
#	test-clients/src/main/java/com/hedera/services/bdd/suites/contract/SmartContractPaySpec.java
#	test-clients/src/main/java/com/hedera/services/bdd/suites/token/TokenCreateSpecs.java
* SBH gas refunds logic moved to updaters and TX records externalization fix

Signed-off-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>

* Updated expected status for non-payable constructor call with balance
Revert is the corect behavior

Signed-off-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>

* Unit tests for sbh refunds

Signed-off-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>

* Changed Gas.of(0) to Gas.ZERO
Removed empty line

Signed-off-by: Stoyan Panayotov <stoyan.panayotov@limechain.tech>
* refactor(contracts): extract duplicate code in operations

Signed-off-by: failfmi <oscurocalma@gmail.com>

* style(contract-delegate-call-op): arguments enlistment

Signed-off-by: failfmi <oscurocalma@gmail.com>

* style(contract-delegate-call-op): unnecessary usage of paragraphs in inline docs

Signed-off-by: failfmi <oscurocalma@gmail.com>

* fix: static class private ctor throwing

Signed-off-by: failfmi <oscurocalma@gmail.com>
Signed-off-by: failfmi <oscurocalma@gmail.com>
Signed-off-by: failfmi <oscurocalma@gmail.com>
Signed-off-by: failfmi <oscurocalma@gmail.com>
Signed-off-by: failfmi <oscurocalma@gmail.com>
Signed-off-by: Daniel Ivanov <daniel.k.ivanov95@gmail.com>
shemnon
shemnon previously approved these changes Oct 12, 2021
rbair23
rbair23 previously approved these changes Oct 12, 2021
add references for tuweni and besu-native versions.

Signed-off-by: Danno Ferrin <danno.ferrin@hedera.com>
@shemnon shemnon dismissed stale reviews from rbair23 and themself via fa75cb9 October 12, 2021 21:19
@shemnon shemnon merged commit 5a1c2e2 into hashgraph:master Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants