hashgraph-ethereumj

Java implementation of the Ethereum protocol adapted to use for Hedera Smart Contract Service

License

License

GroupId

GroupId

com.hedera.hashgraph
ArtifactId

ArtifactId

ethereumj-core
Last Version

Last Version

1.12.0-v0.5.0
Release Date

Release Date

Type

Type

zip
Description

Description

hashgraph-ethereumj
Java implementation of the Ethereum protocol adapted to use for Hedera Smart Contract Service
Project URL

Project URL

https://github.com/hashgraph/ethereumj
Source Code Management

Source Code Management

https://github.com/hashgraph/ethereumj

Download ethereumj-core

Dependencies

compile (20)

Group / Artifact Type Version
io.netty : netty-all jar 4.0.30.Final
com.madgag.spongycastle : core jar 1.58.0.0
com.madgag.spongycastle : prov jar 1.58.0.0
org.iq80.leveldb : leveldb jar 0.7
org.ethereum » leveldbjni-all jar 1.18.3
org.ethereum » rocksdbjni jar 5.9.2
org.ethereum » solcJ-all jar 0.4.25
com.google.guava : guava jar 24.1-jre
com.cedarsoftware : java-util jar 1.8.0
org.slf4j : slf4j-api jar 1.7.7
com.fasterxml.jackson.core : jackson-databind jar 2.5.1
org.apache.commons : commons-collections4 jar 4.0
org.apache.commons : commons-lang3 jar 3.4
commons-codec : commons-codec jar 1.10
org.springframework : spring-context jar 4.3.19.RELEASE
com.typesafe : config jar 1.2.1
com.googlecode.concurrent-locks : concurrent-locks jar 1.0.0
org.apache.logging.log4j : log4j-slf4j-impl jar 2.13.2
com.googlecode.json-simple : json-simple jar 1.1.1
org.xerial.snappy : snappy-java jar 1.1.4

test (4)

Group / Artifact Type Version
junit : junit jar 4.11
org.springframework : spring-test jar 4.3.19.RELEASE
org.mockito : mockito-core jar 2.82
com.github.briandilley.jsonrpc4j : jsonrpc4j jar 1.1

Project Modules

There are no modules declared in this project.

EVM adapter for Hedera Smart Contract Services

The Hedera Smart Contract Service supports Solidity contracts with pragma solidity <=0.5.9, where the semantics of a transaction sent to a Hedera Solidity contract are largely equivalent to the semantics of a transaction sent to an Ethereum smart contract. This equivalence derives from reuse of the ethereumj EVM implementation, with a handful of adaptations.

The adaptations are as follows:

  1. Extend the org.ethereum.core.AccountState type to include properties used by the Hedera network.
  2. Suppress the loading and persistence of (key-scoped) contract storage from the org.ethereum.datasource.Sources that back storage caches used by org.ethereum.db.RepositoryRoot; instead, use an org.ethereum.datasource.StoragePersistence to perform (contract-scoped) storage loading and persistence upon creation of each storage cache.
  3. Modify the gas cost calculation for the SSTORE and LOG{0-4} EVM opcodes to reflect the active Hedera resource prices for disk and RAM, respectively.
  4. Generate new contract addresses using an injected org.ethereum.vm.program.NewAccountCreateAdapter rather than the hash of the creator address and nonce.
  5. Delegate the CREATE2 opcode to the CREATE opcode (the semantics introduced with CREATE2 are irrelevant given the preceding item).
  6. Change slf4j binding to org.apache.logging.log4j.

For a complete view of the Hedera adaptations, please perform a git diff of this branch and the 1.12.0 tag.

License

ethereumj is released under the LGPL-V3 license.

com.hedera.hashgraph

Hedera Hashgraph LLC

Versions

Version
1.12.0-v0.5.0