350 Commits

Author SHA1 Message Date
Danno Ferrin
adb54d67d8 [PAN-3160] Rinkeby Istanbul fork block (#35)
The Rinkeby Fork Block for Istanbul is 5435345, targeting 13 Nov 2019.

As announced by the Rinkeby maintainers here: https://twitter.com/peter_szilagyi/status/1174580897980592129

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2019-09-19 09:53:28 -06:00
Danno Ferrin
810880c469 [PAN-3158] Add Istanbul block for Goerli (#27)
Set the fork block for Istanbul on goerli to block #1561651

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2019-09-18 15:31:43 -06:00
Danno Ferrin
aac22e9fea [PAN-3158] Add Istanbul block for Ropsten (#26)
Set the fork block for Istanbul on ropsten to block #6485846

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2019-09-18 15:07:54 -06:00
mbaxter
5d1d3beae2 [PAN-2333] Use only fully validated peers for fast sync pivot selection (#21)
Expose EthPeer validation state so that the Synchronizer can choose peers based on whether or not they have been fully validated. This allows us to use only fully validated peers when choosing a pivot block.

Signed-off-by: Meredith Baxter <meredith.baxter@consensys.net>
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
2019-09-18 12:26:18 -06:00
Joshua Fernandes
d6a2394e2d Migrating Pantheon to Besu (#1945)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-09-16 11:14:10 +10:00
Danno Ferrin
82f9d5c002 [PAN-3126] add an override facility for genesis configs (#1915)
Add a generalized genesis config override facility for command line use. Only useful for string or integer config values, not object values.

Sample use - enable Istanbul fork on block 99 million
--override-genesis-config=istanbulFork=99000000

Overriding a value with an empty string unsets the value

Sample use - disable Istanbul fork by un-setting istanbulFork:
--override-genesis-config=istanbulFork=
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-09-09 12:12:35 -06:00
Danno Ferrin
b88f5d2734 [PAN-3068] Re-enable istanbul (#1865)
Now that ACD has settlend on istanbul's contents, turn it on for the next
release.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-08-20 09:13:51 -06:00
Danno Ferrin
9e2fdc7e1e [PAN-3065] Disable Istanbul block (#1849)
Istanbul is not ready.  Disable the genesis configuration so it doesn't
accidentially get configured.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-08-14 15:33:22 +10:00
Ratan Rai Sur
92cc42cbfc remove config project's unnecessary dependency on orion (#1839)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-08-12 23:26:50 -04:00
mbaxter
2ac7ab2dd4 [PIE-1809] Add import chain json utility (#1832)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-08-12 13:01:57 -04:00
Danno Ferrin
77a9e43812 [PAN-3012] Print warning when there are comments in genesis file (#1838)
The technique is to parse with comments disabled, and if a parse exception is
detected re-parse with comments allowed, and if successful complain at warn.

To turn this option off we just unwrap the try and delete the catch and update
the test.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-08-12 09:49:07 -06:00
Danno Ferrin
68934e69a2 [PAN-2946] refactor normalizeKeys method (#1826)
Move the `normalizeKeys` method into JsonUtil as Retesteth will re-use it.


Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-08-07 11:20:25 -06:00
mbaxter
63ffdb5f02 [PIE-1809] Clean up genesis parsing (#1809)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-08-01 10:14:24 -04:00
Danno Ferrin
a5745b8d0e [PAN-2935] Add nonce handling to GenesisState (#1728)
Retesteh has some genesis file that specify a nonce in the relevant accounts.
Add support to the GenesisState class to pre-set nonces.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-07-22 21:51:17 -06:00
Danno Ferrin
9a9b7e9dd6 [PAN-2829] Account versioning (#1612)
Initial EIP-1702 versioning code.  Version internally is an `int` for Java 
reasons. In the future if the versions become sparse or large we will create a 
"proxy" version index by putting the standardized indexes into an enum and 
using the enum ordinal instead.

Reference tests all pass (hence the WorldStateMock if block) and
GenesisStateTest has an explicit version test now.

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-07-11 08:44:39 -06:00
Danno Ferrin
89c302f33d [PAN-2756] Istanbul scaffolding (#1605)
Add the needed Istanbul configuration options to the genesis file and needed
hooks in the protocol specs for Istanbul.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-06-25 10:12:39 -06:00
Abdelhamid Bakhta
40ad14ce12 [PIE-1602] Implement operator tool. (blockchain network configuration for permisionned networks) (#1511)
* init operator subcommand

- introduce new subcommand
- add cli options

* Update OperatorSubCommand.java

* Update OperatorSubCommand.java

- generate nodes keypairs
- create a directory per node
- write public key to a file
- wrtie private key to a file

* Add extra data.

- process ibft extra data
- encode rlp

* Update OperatorSubCommand.java

* Update OperatorSubCommand.java

- hande import of public keys
- factorize code (import and generation)

* add javadoc

* init tests

* Update OperatorSubCommandTest.java

* add tests

* spotless apply

* add tests

- generate keys
- import keys

* add tests

- refactor test class
- add tests

* fix Jenkins CI error prone check

* fix error prone check

* fix PR discussion

* spotless apply

* Update pantheon/src/test/java/tech/pegasys/pantheon/cli/operator/OperatorSubCommandTest.java

Co-Authored-By: mbaxter <mbaxter@users.noreply.github.com>

* fix PR discussion

* fix PR discussion

* fix PR discussion

https://github.com/PegaSysEng/pantheon/pull/1511#discussion_r291673656

* fix PR

* Update OperatorSubCommand.java

remove generic type

* Update JsonGenesisConfigOptions.java

spotless

* Update OperatorSubCommand.java

use Address type instead of String

* fix unit tests

- fix broken tests (non empty directory)

* remove forceOverwrite

* fix PR discussion

* dont overwrite files

dont overwrite

* dont create file before writing

* spotless apply

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-06-10 12:01:43 -04:00
Rob Dawson
ee7b592d8b Added Genesis file support for specifying the maximum stack size. (#1431)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-05-13 21:02:49 +10:00
Danno Ferrin
c028352642 PAN-2592: Rename methods that create and return streams away from getX() (#1368)
* Change all Stream<?> getX() and Stream<?> x() methods to Stream<?> streanX methods, such as `Stream<Peer> streamIdlePeers()`
* Update coding conventions to reflect this.


Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-05-08 09:07:40 -06:00
Adrian Sutton
c434609ac2 Add constantinople fix block for Rinkeby (#1404)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-05-07 12:27:39 +10:00
Abdelhamid Bakhta
48c51ac78d [PIE-1531] Allow whitespace in file paths loaded from resources directory (#1329)
* [PIE-1531] Allow whitespace in file paths loaded from resources directory.

* replace Resources.getResource call

* Update LocalPermissioningConfigurationValidatorTest.java

* Update RpcAuthFileValidatorTest.java

* fix paths

* Update SmartContractNodePermissioningAcceptanceTestBase.java

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-04-24 19:15:05 +02:00
Jason Frame
d931e37903 Allow use of large chain ids (#1289)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-04-24 22:05:09 +10:00
Rob Dawson
30bccc45ce Make contract size limit configurable. (#1227)
* Make the contract size limit configurable in the genesis config, making it possible to override milestone based configurations in a private network.

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-04-08 07:53:25 +10:00
Adrian Sutton
f9988c3d67 Don't run the dao block validator if dao block is 0. (#1044)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-03-06 05:56:09 +10:00
Adrian Sutton
6c1e0b2d0c Provide nicer error messages when genesis config is invalid. (#1029)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-03-05 08:37:31 +10:00
Danno Ferrin
ecc5e4a345 [PAN-2373] admin_nodeInfo rpc-api (#1012)
Implement admin_nodeInfo RPC call.  This involved bringing data from the
ethNetworkConfig and genesis json into the rpc call, so it had a lot of
testing side effects.


Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-02-28 18:19:41 -07:00
Jason Frame
2d6d877a49 Limit size of Ibft future message buffer (#873)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-02-21 08:42:50 +10:00
Jason Frame
a00160783b Prevent duplicate ibft messages being processed by state machine (#811)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-02-08 14:42:33 +10:00
Danno Ferrin
aaeaa59f31 Upgrade GoogleJavaFormat to 1.7 (#795)
Two changes:
* Stream chains now take up less vertical lines, only breaking on
  stream operations.
* Long annotations that span multiple lines no longer have a dangling
  parentesis and indent 4 spaces.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-02-06 20:50:56 -07:00
Jason Frame
47abd955ad Limit ibft msg queues (#704)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-02-06 16:50:50 +10:00
Kasper Ziemianek
fcb6efe532 Support code and storage for accounts in genesis config (#749)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-02-04 07:00:27 +10:00
Jason Frame
bdb5e8367f Rename ibftrevised to ibft2 (#722)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-02-01 14:28:19 +10:00
Rob Dawson
dfaaec82c8 Updated to use the deployed version of orion. (#727)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-01-31 14:06:27 +10:00
Chris Mckay
cfbb1589f6 Wrong config options for clique in genesis files (#720)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-01-31 11:18:25 +10:00
Adrian Sutton
75f147503a Update goerli config to launch network. (#717)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-01-31 10:18:33 +10:00
Rob Dawson
9038c1ac3e Fixed Difficulty calculator (#663)
* created fixed difficulty calculator.
* Use fixed calculator at the right spot.
* Use fixeddifficulty in the main dev.json file.
* Removed development difficulty calculators.

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-01-29 21:35:31 +10:00
Rob Dawson
b4e59972e9 Updated the way of getting default ports in orion to use new options provided by Orion. (#660)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-01-29 13:58:55 +10:00
Danno Ferrin
0e3f199ef5 NC-2147 Implement ConstantinopleFix hardfork (#601)
* create a new fork definition
* make it constantinople without EIP-1283
* update tests where appropriate
* Add PetersbergGasCalculator
* Add fork ordering test
* Add rinkeby Constantinople block
* fix json config bug
* add Ropsten constantinopleFix block
* run reference tests
* clique test genesis file violates block ordering rules

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-01-23 23:16:06 -07:00
Ivaylo Kirilov
14a67e8b82 [PRIV] Prepare private transaction support (#538)
* Add Orion module

* Add integration tests

* Use ephemeral instance of Orion for integration test

- Start orion on random port
- test payloads can be send and received

* update build image

* Use snapshot build of orion

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-01-22 21:15:49 +10:00
Danno Ferrin
7877056520 Postpone Constantinople (#574)
Remove old 7_080_000 block designation for mainnet Constantinople
update tests
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2019-01-15 14:36:46 -07:00
tmohay
913c4b2039 Update IbftConfig Fields (#422)
The RequestTimeout field in the IbftConfig has been updated to be
"RequestTimeoutSeconds".
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2018-12-17 10:32:08 +11:00
Danno Ferrin
67431a8d0d Constantinople Fork Block (#382)
As per AllCoreDevs call #51 Constantinople fork is 7080000.

https://github.com/ethereum/pm/issues/64
https://github.com/ethereum/pm/blob/master/All%20Core%20Devs%20Meetings/Meeting%2051.md
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2018-12-07 13:14:23 -07:00
Anton Nashatyrev
a7c55dc776 Add --goerli CLI option (#370)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2018-12-07 10:26:49 +10:00
Danno Ferrin
d4fff610c6 Dependencies Version upgrade (#303)
Upgrade dependency versions

* All version information is merged into one place
* Upgrade most version to their latest non-test version.
* dependencies are now sorted

Two dependencies were not upgraded:

errorprone - There are new checks that require build or source changes.
vertex - The license to eclipse 2.0 which is not in our current approved license list. 
    The change is trivial but for tracability it should be done alone.

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2018-11-26 08:33:40 -07:00
tmohay
6a8d5bbfb9 Config to support IBFT original and revised (#306)
With the advent of "IBFT 2.0" the config file parsing needed to be
updated such that both the original IBFT, and the new variant can be
uniquely identified at execution time.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2018-11-26 11:06:15 +11:00
Danno Ferrin
0716e6044b Update Client Version to be ethstats friendly (#258)
Update value returned by web3_clientVersion to be ethstats friendly

* Version part starts with a v
* SNAPSHOT builds report 32 bits of the git hash
* OS and architecture are sniffed out and reported
* JVM version and branding are sniffed out and reported

Example values (not all real):
pantheon/v0.9.0-dev-f800a0b1/osx-x86_64/oracle-java-1.8
pantheon/v0.9.0-dev-27960b57/osx-x86_64/zulu-java-11
pantheon/v0.9.0/linux-arm64/openjdk-java-12
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2018-11-14 08:08:45 -07:00
Adrian Sutton
85b394f31a Enable constantinople in --dev-mode (#256)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2018-11-13 12:04:04 +10:00
Adrian Sutton
fd81e97ad9 Common protocol schedule config handling (#250)
* Introduce ProtocolScheduleBuilder and use it for Clique, MainNet, IBFT and dev.

* Remove default milestone blocks and simplify MainnetProtocolSchedule. All milestone blocks must now be defined in the genesis file (previously ethash chains would get Mainnet milestone blocks by default).
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2018-11-13 11:31:00 +10:00
Adrian Sutton
09a3c61f72 Split parsing of genesis config from creating initial state (#209)
* Make GenesisConfigFile responsible for handling all the content in the genesis config file and rename GenesisConfig to GenesisState as it is now just responsible for creating the initial state at genesis.

* In CliqueProtocolController, pass the network ID to EthProtocolManager instead of the chain ID and use  downloader parallelism setting instead of network ID for the number of threads.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2018-11-12 12:42:20 +10:00
Adrian Sutton
0f364d4285 Add wrapper classes for config section of genesis file (#208)
* Introduce classes to wrap JSON config instead of accessing it directly in multiple places.

* Fix discrepancy in how CliqueProtocolSchedule and CliquePantheonController loaded the block period configuration.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
2018-11-01 13:23:42 +10:00