734 Commits

Author SHA1 Message Date
Chris Beams
a155518b41
Polish whitespace and imports
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
2014-12-30 19:28:19 +01:00
Roman Mandeleil
c95f5ea75f reverting for java7 2014-12-30 13:45:16 +02:00
Roman Mandeleil
3c0e7c894d adjusting for java8 api 2014-12-29 21:37:20 +02:00
Chris Beams
7015d42221 Merge pull request #182 from cbeams/patch-2 2014-12-29 11:47:36 +01:00
Chris Beams
25ff32446f Remove denomination values absent in white paper
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
2014-12-29 10:37:57 +01:00
Chris Beams
bd2e4bd89e Rename Denomination#{FINNY => FINNEY} 2014-12-29 10:35:21 +01:00
Chris Beams
8089f6e57c Polish whitespace and imports
- 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
2014-12-29 10:34:50 +01:00
Roman Mandeleil
4ab4d4d919 + catch up on lost NEW_BLOCK packet
- temporary cancel rollback on fork
2014-12-28 22:59:24 +02:00
Roman Mandeleil
e5d2a32a13 update config file for poc-7 default peer 2014-12-28 22:21:14 +02:00
Chris Beams
abb1ad8956
Fix remaining javadoc warnings
As of this commit there are now warnings at the command line when
running `gradle javadoc`.
2014-12-27 14:50:22 +01:00
Chris Beams
68724da3ac
Fix broken link in ECKey javadoc 2014-12-27 14:50:15 +01:00
Chris Beams
0d922e1b30
Collapse foreach loops using Iterable#forEach 2014-12-27 03:53:35 +01:00
Chris Beams
003249cb77
Collapse foreach loops using Stream#collect 2014-12-27 03:53:35 +01:00
Chris Beams
d099100adf
Replace anonymous types with lambdas and method refs 2014-12-27 03:53:34 +01:00
Chris Beams
18b0f6f52c
Replace explicit types with <> syntax 2014-12-27 03:30:42 +01:00
Chris Beams
0425862cd4
Replace for loops with foreach where appropriate 2014-12-27 03:30:42 +01:00
Chris Beams
14fa1ef4b6
Remove unnecessary boxing and unboxing 2014-12-27 03:30:18 +01:00
Chris Beams
6c4502150e
Remove redundant type casts 2014-12-27 03:30:17 +01:00
Chris Beams
780393dae9
Organize imports with shared IDEA configuration
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.
2014-12-27 02:16:02 +01:00
Chris Beams
d7671814b7
Remove unused imports 2014-12-27 01:44:27 +01:00
Chris Beams
4a992fe93f
Ignore already-broken tests
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.
2014-12-26 22:08:11 +01:00
Chris Beams
f845a3b751
Eliminate dependency on antlr4 Maven plugin
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.
2014-12-26 21:49:01 +01:00
Chris Beams
f9bcd2abad
Resolve JUnit 4.10 vs. 4.11 classpath conflict
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.
2014-12-26 21:49:00 +01:00
Chris Beams
2a8ecab299
Introduce src/gen/java for generated sources
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.
2014-12-26 21:49:00 +01:00
Chris Beams
a63f6445cc
Remove urls from class-level Javadoc
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.
2014-12-26 11:57:21 +01:00
Chris Beams
7d2cf7f954
Use @since tags in Javadoc vs. "created on" metadata
- @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
2014-12-26 11:47:47 +01:00
Chris Beams
c38907bc34
Use correct syntax for Javadoc @author tags 2014-12-26 11:38:30 +01:00
Chris Beams
58874cfc7e
Apply basic formatting
- 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.
2014-12-26 11:22:44 +01:00
Chris Beams
e5fcf5b48e
Strip trailing whitespace 2014-12-26 09:45:14 +01:00
Chris Beams
0827fb5c8f
Convert tabs to spaces
Prior to this change, 78% of lines in .java files with leading
whitespace used four-space indentation, while 22% used tabs.
2014-12-26 09:42:39 +01:00
Chris Beams
c7cb5231fe
Convert all files to unix line endings 2014-12-26 09:19:37 +01:00
skype me: roman.mandeleil
9f9d864036 Merge pull request #178 from ligi/ligi/code_review/simplify_transaction
simplify
2014-12-25 19:32:59 +02:00
ligi
499d925082 simplify 2014-12-25 01:19:31 +01:00
ligi
06bc7323ca simplify 2014-12-24 23:56:33 +01:00
romanman
b1c82cb59e fix ton of bugs for poc-7 compatibility 2014-12-24 15:55:36 +02:00
romanman
aad53ba2c5 Introducing StateTest json suite support:
+ passing: stInitCodeTest
+ passing: stLogTests
+ passing: stRecursiveCreate
+ passing: stRefundTest
2014-12-20 23:09:48 +02:00
romanman
c271346a4f Fix network connection:
+ inbound connection GET_HASHES fix
2014-12-14 17:01:23 +01:00
romanman
e8eaa4f6f9 eth: 49
+ RETURN new cost
2014-12-14 12:53:55 +01:00
romanman
a216aba714 tiny fix 2014-12-14 11:51:08 +01:00
romanman
6cfcb83476 eth:49 adaption:
+ SHA3 new cost calc
2014-12-14 11:46:59 +01:00
romanman
8320c53d40 reconnect bug fixed 2014-12-11 16:56:16 +01:00
romanman
b75078e53d general info expose by AdminInfo been 2014-12-11 12:54:01 +01:00
skype me: roman.mandeleil
c9ea4c07d4 Merge pull request #170 from biafra23/ethereumj/master
EtherSaleWallet
2014-12-11 10:28:03 +01:00
romanman
70fc04104c Several fixes:
+ sync fix for NEW_BLOCK got in the middle of sync process
+ sync for rollback
+ apply transaction adjustments
2014-12-11 09:50:42 +01:00
romanman
a8d407ab28 fixing GitHub test suite structure 2014-12-09 11:19:49 +01:00
romanman
d804cbb722 saving TransactionReceipt, bumping eth:48 2014-12-07 21:30:18 +01:00
romanman
254c51704a adapting for poc-7 final (eth:47) :
+ Repository refactoring
2014-12-04 14:35:18 +01:00
alon muroch
ae575b9283 cleanup 2014-12-04 10:27:18 +01:00
alon muroch
4fd56485f1 Merge branch 'master' of https://github.com/ethereum/ethereumj 2014-12-04 10:26:18 +01:00
alon muroch
abff6bd330 vmlogs test passes 2014-12-04 10:26:07 +01:00