This is in order to accommodate GitHubStateTest#stSystemOperationsTest,
which tests Ethereum's rules around maximum call stack depth, and thus
requires increasing Java's own defaults.
If this option is not set, this test results in a
StackOverflowException. Note that the setting is applied to Gradle's
`test` closure as opposed to a the global `JAVA_OPTS` environment
variable, because Gradle spawns a new process for executing tests.
There is a known issue with Gradle's new `maven-publish` plugin that
causes all dependencies in the published pom to runtime-scoped [1]. This
causes conflicts with our use of Spring's `propdeps` Gradle plugin that
introduces optional and provided scopes.
This commit drops down to using Gradle's older, orginal `maven` plugin,
and JFrog's old-style `artifactory-publish` plugin in order to preserve
propdeps support.
This means removing JFrog's `bintray` plugin, as it appears to depend on
the `maven-publish` plugin. For the moment, ethereumj only really needs
to publish snapshots, and this is still supported. This is a stopgap
measure; it will be necessary to deal with getting uploads to
Bintray/JCenter working again once we're ready for a non-snapshot
release, but this can be dealt with later.
[1]: http://forums.gradle.org/gradle/topics/maven_publish_plugin_generated_pom_making_dependency_scope_runtime
- Organize imports using shared IDEA configuration
- Format sources, including:
- Normalize 4-space indentation
- Wrap at 120 char right margin
- Remove spaces around method arguments
Use Spring's `propdeps` plugin to introduce optional/provided scopes for
gradle dependencies. Mark libraries such as slf4j-log4j12 as optional.
These libraries are required to run a local ethereumj node, but they are
not required in order to compile against ethereumj in a downstream
appliaction. These libraries easily can cause conflicts, for example if
another slf4j-* library (such as slf4j-logback) is on the classpath.
Prior to this commit, jacoco coverage report XML files were not actually
being written to disk, meaning that the Gradle coveralls plugin had
nothing to publish to https://coveralls.io/r/ethereum/ethereumj. HTML
reports are now being written as well, for convenient local browsing.
The Travis CI build now publishes ethereumj-core artifacts (classes,
sources and javadoc jars) on every push to master. See updated
ethereumj-core/README.md for details. Note that the `gradle release`
task has been renamed to `gradle publish`.
This partially reverts commit c95f5ea, restoring use of Java 8 language
features and APIs to ethereumj-studio, while leaving etherumj-core
pinned to the Java 7 language level for Dalvik compatibility reasons.
For further details, see the prior commit and
https://github.com/ethereum/ethereumj/commit/c95f5ea#commitcomment-9119435.
As part of pull request #179, commits 0d922e1, 003249c and d099100
introduced use of Java 8 language features and APIs. Commit c95f5ea
manually reverted these changes (see #184 as to why), but in the process
re-introduced formatting issues originally cleaned up by other commits
in #179. This change fixes those formatting issues.
- Replace leading tabs with spaces (for reasons detailed in 0827fb5)
- Add space before opening curly brace
- Optimize imports using shared .idea/codeStyleSettings.xml (note
especially expansion of wildcard imports. See rationale in 780393d)
- Do not align assignments on equals sign
- Remove unnecessary additional newlines
- Remove braces from single-line loops and conditionals
A recent revision of the Ethereum white paper removes the denominations
labeled 'lovelace', 'babbage' and 'shannon' [1]. This commit reflects
the change to the whitepaper by removing the corresponding labels from
the Denomination enum (as an aside, note the discrepancy between
'lovelace' in the whitepaper and 'ada' in our implementation).
go-ethereum still contains these values, but cpp-ethereum does
not. This commit assumes that the whitepaper and cpp implementation
represent the current consensus on explicitly named denominations.
By the same rationale, the 'douglas' and 'einstein' labels have been
removed as well. These values never appeared in the whitepaper or cpp
implementations. They were introduced to the go implementation in
ethereum/go-ethereum@e7d9bcd, but because the whitepaper and cpp
implementation are silent on these values, they are omitted here.
[1]: http://git.io/xJJf7g
- Replace leading tabs with spaces
- Add space before opening curly brace
- Optimize imports using shared .idea/codeStyleSettings.xml
- Do not align assignments on equals sign
- Remove unnecessary extra newlines
Running `gradle build` within ethereumj-core will now produce -sources
and -javadoc jars in `build/libs`, alongside the already existing
classes jar. Run `gradle install` to install these artifacts to the
local `~/.m2` repository.
This change ensures that all Javadoc syntax, reference, html errors, etc
are reported at the commandline during the gradle build, but warnings
for missing Javadoc elements (e.g. no @return tag, @param tags, etc) are
suppressed. `man javadoc` for details.
Add .idea/codeStyleSettings.xml with explicit settings for each
2nd-level package used within ethereumj, adding a separator between
each (unfortunately there is no other way to gain this level of control
in IDEA).
Imports are generally in alphabetical order, with two key exceptions:
- org.ethereumj.* imports are always sorted at top, to simplify the
process of seeing how one ethereumj type relates to all others. This is
especially useful in the practice of avoiding cyclic package
dependencies.
- java.* and javax.* and sun.* imports are always sorted at bottom.
Wildcard imports are used for static imports whenever two or more
members of the same type are statically imported, but wildcards are
never used for non-static imports. This policy of explicitness helps
identify classes that are too "fat", i.e. have too many dependencies on
other types.
The root .gitignore file has been updated to allow
.idea/codeStyleSettings.xml, so as to automatically share it with other
team members. Any changes made to import organization settings will be
reflected in this file and should be checked in.
See updated ethereumj-studio/README.md for details. Note that this
commit removes the `build-post-package.xml` ant file (for now) to
simplify the Gradle arrangement. This functionality can be re-introduced
later and more simply using Gradle's native DSL. In the meantime, both
the -core and -studio projects can be run using `gradle run` or run as
executable jars by running `gradle shadowJar` followed by the usual
`java -jar` execution of the resulting `-all` jar file found in each
project's respective `build/libs` directory.
- Convert ethereumj-studio build from Maven to Gradle as well
- Extract common build elements to top-level build.gradle
- Update top-level README accordingly
The tests ignored in this commit have been failing for some time--both
under the Maven build and now under the new Gradle build. See
https://travis-ci.org/ethereum/ethereumj/builds/45100679 for an example
CI build that reflects these failures.
Rather than tracking down and fixing each issue, this commit ignores
each of these known failures such that subsequent refactorings and
changes can be made with the benifit of running the tests that do work
and knowing that no new failures have crept in.
Apply Gradle's 'maven' plugin in order to support `./gradlew install`
task, similar to `mvn install` for building and copying artifacts to the
users local ~/.m2 repository.
After porting the build from Maven to Gradle (see prior commits), the
org.ethereum.serpent.ParserGenerator class is no longer necessary as the
configuration of the antlr compiler that happened in this class now
happens directly in build.gradle. This class is thus removed in this
commit.
The plexus FileUtils class introduced by the antlr4 Maven plugin had
also been used in several locations in the codebase, probably just for
reasons of convenience. These uses have been replaced with Spring's
FileSystemUtils in order to allow for dropping the dependency on the
antlr4 Maven plugin entirely.
ethereumj-core depends on elements specific to the JUnit 4.11 API, but (for
reasons that can only be assumed dubious) json-simple:1.1.1 transitively
includes JUnit 4.10. At the command line, Gradle handles this cleanly,
and gives ethereumj-core's direct dependence on 4.11 the precedence it
deserves. However, IDEA gets confused and gives 4.10 precedence. This
change explicitly excludes the transitive dependency from
json-simple->junit:4.10, eliminating the issue completely.
Previously, sources generated from the serpent antlr grammar in
ethereumj-core/src/main/antlr4 were output into the build/generated-src
directory by default. This worked from the command line without issue,
but caused issues within IDEA, because the entirety of the 'build'
directory is excluded from compilation by default when working with a
Gradle-based project in IDEA.
This change simplifies the arrangement by writing these antlr-generated
sources to the src/gen/java. A .gitignore file has been added to ensure
that transient source files don't accidentally get checked in. A readme
file has been added to explain the situation to the uninitiated.
Prior to this change, the affected classes had Javadoc containing a url
as the first sentence. There were several issues with this:
- The url used was inconsistent, varying between www.etherj.com,
www.ethereumj.com and www.ethergit.com
- Use of a url in the first sentence of a Javadoc comment is not
consistent with Javadoc idioms. The first sentence should be the
a short, self-contained description--in this case, the description of
the class. If no such description is yet available, it is best to
simply omit all text, leaving any tags (such as @author or @since).
- Information about the project that this code belongs to should be
expressed in the license header for each file. Currently, most files
in ethereumj do not have license headers. This can be added in a
later commit.
- @since is recognized by Javadoc processor; "created on:" is not
- Remove hh:mm information as it is unnecessary
- Replace slashes in dates with dots, e.g. 26/12/2014 => 26.12.2014
- Do not align assignments on equals signs
- Use spaces before opening curly braces
- Add spaces between parameters as necessary
- Insert newlines between method declarations
- Other minor changes
This formatting pass is not comprehensive. For the most part, it does
not deal with Javadoc formatting, line wrapping, parameter alignment
rules or a number of other items that can be addressed later.
+ Spring IoC introduced
+ Block Store by sql/hibernate introduced
- Cache for blocks vanished
+ CLI for start
+ Connection architecture redesign for multiple connections
+ Server for incoming connections
+ Test adaption for new architecture and fix
+ Performance major improve: loading empty blocks: 10,000 for 40 secs
+ Blocks forking/alternative chains sollution
+ Network redesign for better user expirience, all the handlers are known to PeerClient now, and MessageQueue is also managed in the PeerClient
+ Listener callback for sync done
+ tx.isCreateContract() bug fix
+ repository.getBlock() bug fix