763 Commits

Author SHA1 Message Date
Roman Mandeleil
910a8b9552 Comment gas charge for pre-compiled contracts 2015-01-10 16:20:08 +02:00
Roman Mandeleil
e3b1e3aa1e Polish some. 2015-01-09 18:14:26 +02:00
Roman Mandeleil
b017df080b Implement pre-compiled contract
In order to improve performance of certain VM functionality
 Ethereum introduce plug-in mechanism  called pre-compiled
 contracts.

 Supported functionality:

  ecRecover - (addr: 01) - recover address out of hash, v, r, s - parameters.
  sha256 - (addr: 02) - calculate hash value with sha256 algorithm
  ripempd160 - (addr:03)  - calculate hash value with repimpd algorithm
2015-01-09 16:41:36 +02:00
Roman Mandeleil
620f365205 Fix payment availability: sender.balance >= tx.value + tx.gas 2015-01-08 20:26:24 +02:00
Roman Mandeleil
18ed198750 Return stRecursiveCreate to the testing run 2015-01-08 20:01:42 +02:00
Roman Mandeleil
8bbdc3ae31 Merge remote-tracking branch 'origin/master' 2015-01-08 19:50:05 +02:00
Roman Mandeleil
7590efdb3b Remove cpp snippet 2015-01-08 19:49:12 +02:00
Roman Mandeleil
48b27d38ec Validate JUMPDEST by pre-compile + tweak injection of blockStore by the new interface 2015-01-08 19:48:37 +02:00
Roman Mandeleil
59833f3fd6 Fix BLOCKHASH op new rule
The blockhash retrieved by index on one of the
recent 256 blocks. If the index is out of that
window zero pushed into the stack as a result
2015-01-08 18:55:52 +02:00
Chris Beams
2af33195da
Set VM log level to ERROR for fast test execution 2015-01-07 09:17:12 +01:00
Chris Beams
11e8a55304
Revert "Ignore GitHubStateTest#stSystemOperationsTest"
This reverts commit 52b417947bdbe0cde8ee0358bf197777c34d35fa.
2015-01-07 08:15:19 +01:00
Chris Beams
52b417947b
Ignore GitHubStateTest#stSystemOperationsTest
This test results in a stack overflow.
2015-01-07 06:58:36 +01:00
Roman Mandeleil
d5ff8bcaab Fix VMComplexText.test2 for new JUMPDEST logic 2015-01-06 21:39:20 +02:00
Roman Mandeleil
cf66dc02df Fix JUMPDEST requirements in the VMTest 2015-01-06 21:20:17 +02:00
Roman Mandeleil
0039995aad Merge remote-tracking branch 'origin/master' 2015-01-06 20:53:57 +02:00
Roman Mandeleil
8eadadcd16 Fixed TCK test suite: stSystemOperationsTest.json, included back to the general run. 2015-01-06 20:53:28 +02:00
Roman Mandeleil
c0e2bf2e38 Fix: result empty on no run was executed 2015-01-06 20:47:20 +02:00
Roman Mandeleil
02be38a85d Fix new call level
When the current level is 1024, next CALL/CREATE
will do simple return with zero value pushed to the
 stack
2015-01-06 20:40:05 +02:00
Roman Mandeleil
832c24014d Fix internal call halt on any Exception push zero 2015-01-06 16:42:51 +02:00
Roman Mandeleil
ab258b3fc9 Fix JUMPDEST requred in all cases 2015-01-06 16:41:53 +02:00
Roman Mandeleil
16965b02a2 Log success TCK test 2015-01-06 15:24:35 +02:00
Chris Beams
f34d1f49dc
Polish changes made in pull request #189
- Organize imports using shared IDEA configuration

 - Format sources, including:
   - Normalize 4-space indentation
   - Wrap at 120 char right margin
   - Remove spaces around method arguments
2015-01-06 09:50:58 +01:00
Faiz Khan
a2f94729ba Remove usage of toString to test NullPointerException 2015-01-04 03:23:51 -06:00
Faiz Khan
dbb7efadcf Add bounds checks for disconnect message 2015-01-04 03:00:46 -06:00
Faiz Khan
3f788161bc Add tests for disconnect, hello, peers and status messages 2015-01-04 02:56:42 -06:00
Faiz Khan
da24699ed5 Peer test 2015-01-04 02:53:34 -06:00
Faiz Khan
b07b4a816f First test 2015-01-04 02:53:28 -06:00
Chris Beams
6c559e6a65
Remove unused JDK 8 API imports 2015-01-02 07:48:29 +01:00
Marcelo Garbarino
64e0f7335f Add testcase for org.ethereum.vm.LogInfo 2015-01-01 15:39:58 -03:00
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