[NC-1540] First Draft of OSS Roles & Std OSS Documenation (#29)

* [NC-1540] First Draft of OSS Roles & Std OSS Documentation
- OSS Docs & Templates
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
This commit is contained in:
Eric Kellstrand
2018-10-11 16:44:42 -04:00
committed by GitHub
parent 092b4473f7
commit feee715f6f
17 changed files with 826 additions and 128 deletions

116
README.md
View File

@@ -1,4 +1,9 @@
# Pantheon Ethereum Client &middot; [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
# Pantheon Ethereum Client
[![Build Status](http://forge-jenkins.kellstrand.com:8080/job/Pantheon/job/master/badge/icon)](http://forge-jenkins.kellstrand.com:8080/job/Pantheon/job/master/)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/PegasysEng/pantheon/blob/master/LICENSE)
[![Download](https://api.bintray.com/packages/consensys/binaries/pantheon/images/download.svg)](https://bintray.com/consensys/binaries/pantheon/_latestVersion)
TODO: Update Download links once artifacts are on bintray
## Pantheon Users
@@ -19,104 +24,17 @@ User and reference documentation available on the Wiki includes:
## Pantheon Developers
## Build Instructions
* [Contribution Guidelines](CONTRIBUTING.md)
* [Wiki](wiki/) for installation & configuring Pantheon
* [Installation](wiki/Installation)
To build, clone this repo and run with `./gradlew` like so:
### Development
Instructions for how to get started with developing on the Orion codebase. Please also read the
[contribution guidelines](CONTRIBUTING.md) for more detail on how to submit a pull request (PR).
```
git clone --recursive https://github.com/PegaSysEng/pantheon.git
cd pantheon
./gradlew
```
* [Installation](wiki/Installation)
* [Checking out and building](docs/development/building.md)
* [Running Pantheon via Gradle](docs/development/running-with-gradle.md)
* [Code Coverage](docs/development/code-coverage.md)
* [Logging](docs/development/logging.md)
After a successful build, distribution packages will be available in `build/distribution`.
## Code Style
We use Google's Java coding conventions for the project. To reformat code, run:
```
./gradlew spotlessApply
```
Code style will be checked automatically during a build.
## Testing
All the unit tests are run as part of the build, but can be explicitly triggered with:
```
./gradlew test
```
The integration tests can be triggered with:
```
./gradlew integrationTest
```
The reference tests (described below) can be triggered with:
```
./gradlew referenceTest
```
## Running Pantheon
You can build and run Pantheon with default options via:
```
./gradlew run
```
By default this stores all persistent data in `build/pantheon`.
If you want to set custom CLI arguments for the Pantheon execution, you can use the property `pantheon.run.args` like e.g.:
```sh
./gradlew run -Ppantheon.run.args="--discovery=false --home=/tmp/pantheontmp"
```
which will pass `--discovery=false` and `--home=/tmp/pantheontmp` to the invocation.
### Ethereum reference tests
On top of the project proper unit tests, specific unit tests are provided to
run the Ethereum reference tests available at https://github.com/ethereum/tests
and described at http://ethereum-tests.readthedocs.io/en/latest/. Those are run
as part of the unit test suite as described above, but for debugging, it is
often convenient to run only a subset of those tests, for which a few convenience
as provided. For instance, one can run only "Frontier" general state tests with
```
./gradlew :ethereum:net.consensys.pantheon.ethereum.vm:referenceTest -Dtest.single=GeneralStateTest -Dtest.ethereum.state.eip=Frontier
```
or only the tests that match a particular pattern with something like:
```
gradle :ethereum:net.consensys.pantheon.ethereum.vm:test -Dtest.single=GeneralStateTest -Dtest.ethereum.include='^CALLCODE.*-Frontier'
```
Please see the comment on the `test` target in the top level `build.gradle`
file for more details.
### Logging
This project employs the logging utility [Apache Log4j](https://logging.apache.org/log4j/2.x/),
accordingly levels of detail can be specified as follows:
```
ALL: All levels including custom levels.
DEBUG: Designates fine-grained informational events that are most useful to debug an application.
ERROR: Designates error events that might still allow the application to continue running.
FATAL: Designates very severe error events that will presumably lead the application to abort.
INFO: Designates informational messages that highlight the progress of the application at coarse-grained level.
OFF: The highest possible rank and is intended to turn off logging.
TRACE: Designates finer-grained informational events than the DEBUG.
WARN: Designates potentially harmful situations.
```
One mechanism of globally effecting the log output of a running client is though modification the file
`/pantheon/src/main/resources/log4j2.xml`, where it can be specified under the `<Property name="root.log.level">`.
As such, corresponding instances of information logs throughout the codebase, e.g. `log.fatal("Fatal Message!");`,
will be rendered to the console while the client is in use.
## Contribution
Welcome to the Pantheon Ethereum project repo. If you would like to help contribute
code to the project, please fork, commit and send us a pull request.
Please read the [Contribution guidelines](docs/CONTRIBUTORS.md) for this project.