Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add static site generator for generating documentation page #291

Merged
merged 8 commits into from
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish docs via GitHub Pages

# Controls when the action will run.
on:
push:
branches:
- master
- main
paths:
- mkdocs.yml
- docs/**
ziogaschr marked this conversation as resolved.
Show resolved Hide resolved
pull_request:
branches:
- master
- main
paths:
- mkdocs.yml
- docs/**
ziogaschr marked this conversation as resolved.
Show resolved Hide resolved

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install -r requirements-mkdocs.txt
- run: mkdocs gh-deploy --force
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,8 @@ profile.cov

# Generated by tests, and will persist if tests are interrupted.
les/transactions.rlp

# Files generated by docs build
/MANIFEST
/manifest.json
/site
ziogaschr marked this conversation as resolved.
Show resolved Hide resolved
9 changes: 7 additions & 2 deletions docs/core/networking.md → docs/apis/jsonrpc-apis.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Networking
---
hide:
- toc # Hide table of contents
---

### Programmatically interfacing `geth` nodes
# JSON-RPC APIs

## Programmatically interfacing `geth` nodes

As a developer, sooner rather than later you'll want to start interacting with `geth` and the
Ethereum network via your own programs and not manually through the console. To aid
Expand Down
44 changes: 44 additions & 0 deletions docs/apis/openrpc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
hide:
- toc # Hide table of contents
---

# OpenRPC

## Discovery

CoreGeth supports [OpenRPC's Service Discovery method](https://spec.open-rpc.org/#service-discovery-method), enabling efficient and well-spec'd JSON RPC interfacing and tooling. This method follows the established JSON RPC patterns, and is accessible via HTTP, WebSocket, IPC, and console servers. To use this method:
```shell
$ curl -X POST -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"rpc.discover","params":[],"id":1}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"openrpc": "1.0.10",
"info": {
"description": "This API lets you interact with an EVM-based client via JSON-RPC",
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
"title": "Ethereum JSON-RPC",
"version": "1.0.0"
},
"servers": [],
"methods": [
{
"description": "Returns the version of the current client",
"name": "web3_clientVersion",
"params": [],
"result": {
"description": "client version",
"name": "clientVersion",
"schema": {
"type": "string"
}
},
"summary": "current client version"
},

[...]
```
5 changes: 5 additions & 0 deletions docs/core/alltools.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
hide:
- toc # Hide table of contents
---

## Executables

The go-ethereum project comes with several wrappers/executables found in the `cmd`
Expand Down
7 changes: 6 additions & 1 deletion docs/core/evmc.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
hide:
- toc # Hide table of contents
---

# Running Geth with an External VM

Geth supports the [EVMC](https://github.com/ethereum/evmc/) VM connector API version 6 as an experimental feature.
Expand All @@ -18,7 +23,7 @@ tests the implementation against both of these mentioned EWASM libraries against
These tests run exclusively via Github Actions, configured at `.github/workflows/evmc.yml`.

While core-geth supports highly granular EIP/ECIP/xIP chain feature configuration (ie fork feature configs),
EVMC does not. EVMC only supports the Fork configurations supported by ethereum/go-ethereum (eg. Byzantium, Constantinople, &c).
EVMC does not. EVMC only supports the Fork configurations supported by ethereum/go-ethereum (eg. Byzantium, Constantinople, &c).
Thus, the implementation at core-geth of EVMC requires a somewhat arbitrary mapping of granular features as keys toggling
entire Ethereum fork configurations.

Expand Down
37 changes: 0 additions & 37 deletions docs/core/jsonrpc-api.md

This file was deleted.

25 changes: 7 additions & 18 deletions docs/core/releases.md → docs/developers/create-new-release.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
# Releases
---
hide:
- toc # Hide table of contents
---

## Versioning
# Developers: How to make a release

etclabscore/core-geth uses [Semantic Versioning](https://semver.org). The API definition that would demand increments to the major version is basically nil;
it can be expected that a major version bump would be accompanied by an entirely new repository and name.

Tagged versions use the suffix `-stable` and untagged versions (ie everything else) uses the `-unstable` suffix.

You can find some historical discussions on versioning at the following links.
- https://github.com/etclabscore/core-geth/pull/29#issuecomment-588977383
- https://github.com/etclabscore/multi-geth-fork/issues/153
- https://github.com/etclabscore/core-geth/pull/30#issuecomment-591979271
- https://github.com/etclabscore/core-geth/issues/83


## Developers: How to make a release

- [ ] Decide what the new version should be. In this example, __`v1.11.16[-stable]`__ will be used.
- [ ] Decide what the new version should be. In this example, __`v1.11.16[-stable]`__ will be used.
- [ ] `git checkout master`
- [ ] `make lint` and `make test` are passing on master. :white_check_mark:
> This is important because the artifacts to be included with the release will be generated
Expand All @@ -38,7 +27,7 @@ You can find some historical discussions on versioning at the following links.
> - Linux, OSX, and Windows artifacts will be uploaded automatically to this release draft by the CI jobs. There should be CI-generated 16 assets total.
> - __NOTE__ If the release is not drafted manually, it will be automatically drafted by the CI.
- [ ] Await a complete set of uploaded artifacts. If artifacts fail to upload due to issue with the CI jobs, review
those jobs to determine if their failure(s) is OK, restarting them if so.
those jobs to determine if their failure(s) is OK, restarting them if so.
- [ ] Once artifacts have been uploaded and the release draft reviewed by one other person for the following, it's time to publish!
+ proofreading
+ artifact fingerprint verification
Expand Down
17 changes: 17 additions & 0 deletions docs/developers/versioning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
hide:
- toc # Hide table of contents
---

# Versioning

etclabscore/core-geth uses [Semantic Versioning](https://semver.org). The API definition that would demand increments to the major version is basically nil;
it can be expected that a major version bump would be accompanied by an entirely new repository and name.

Tagged versions use the suffix `-stable` and untagged versions (ie everything else) uses the `-unstable` suffix.

You can find some historical discussions on versioning at the following links.
- https://github.com/etclabscore/core-geth/pull/29#issuecomment-588977383
- https://github.com/etclabscore/multi-geth-fork/issues/153
- https://github.com/etclabscore/core-geth/pull/30#issuecomment-591979271
- https://github.com/etclabscore/core-geth/issues/83
Binary file added docs/img/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
hide:
- navigation # Hide navigation
---

# CoreGeth: An Ethereum Protocol Provider

[![OpenRPC](https://img.shields.io/static/v1.svg?label=OpenRPC&message=1.0.10&color=blue)](#openrpc-discovery)
[![API Reference](https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667)](https://godoc.org/github.com/etclabscore/core-geth)
[![Go Report Card](https://goreportcard.com/badge/github.com/etclabscore/core-geth)](https://goreportcard.com/report/github.com/etclabscore/core-geth)

> An [ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) downstream effort to make the Ethereum Protocol accessible and extensible for a diverse ecosystem.

Priority is given to reducing opinions around chain configuration, IP-based feature implementations, and API predictability.
Upstream development from [ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) is merged to this repository regularly,
usually at every upstream tagged release. Every effort is made to maintain seamless compatibility with upstream source, including compatible RPC, JS, and CLI
APIs, data storage locations and schemas, and, of course, interoperable node protocols. Applicable bug reports, bug fixes, features, and proposals should be
made upstream whenever possible.

## Network/provider comparison

Networks supported by the respective go-ethereum packaged `geth` program.

| Ticker | Consensus | Network | core-geth | ethereum/go-ethereum |
| --- | --- | --- | --- | --- |
| ETC | :zap: | Ethereum Classic | :heavy_check_mark: | |
| ETH | :zap: | Ethereum (Foundation) | :heavy_check_mark: | :heavy_check_mark: |
| ETSC | :zap: | Ethereum Social | :heavy_check_mark: | |
| ESN | :zap: | EtherSocial | :heavy_check_mark: | |
| MIX | :zap: | Mix | :heavy_check_mark: | |
| ELLA | :zap: | Ellaism | :no_entry_sign:<sup>[1](#ellaism-footnote)</sup> | |
| MUSIC | :zap: | Musicoin | :open_file_folder:<sup>[2](#configuration-capable)</sup> | |
| - | :zap: :handshake: | Private chains | :heavy_check_mark: | :heavy_check_mark: |
| | :zap: | Mordor (Geth+Parity ETH PoW Testnet) | :heavy_check_mark: | |
| | :zap: | Morden (Geth+Parity ETH PoW Testnet) | | |
| | :zap: | Ropsten (Geth+Parity ETH PoW Testnet) | :heavy_check_mark: | :heavy_check_mark: |
| | :handshake: | Rinkeby (Geth-only ETH PoA Testnet) | :heavy_check_mark: | :heavy_check_mark: |
| | :handshake: | Goerli (Geth+Parity ETH PoA Testnet) | :heavy_check_mark: | :heavy_check_mark: |
| | :handshake: | Kotti (Geth+Parity ETC PoA Testnet) | :heavy_check_mark: | |
| | :handshake: | Kovan (Parity-only ETH PoA Testnet) | | |
| | | Tobalaba (EWF Testnet) | | |
| | | Ephemeral development PoA network | :heavy_check_mark: | :heavy_check_mark: |

- :zap: = __Proof of Work__
- :handshake: = __Proof of Authority__

<a name="ellaism-footnote">1</a>: This is originally an [Ellaism
Project](https://github.com/ellaism). However, A [recent hard
fork](https://github.com/ellaism/specs/blob/master/specs/2018-0003-wasm-hardfork.md)
makes Ellaism not feasible to support with go-ethereum any more. Existing
Ellaism users are asked to switch to
[Parity](https://github.com/paritytech/parity).

<a name="configuration-capable">2</a>: Network not supported by default, but network configuration is possible. Make a PR!
File renamed without changes.
83 changes: 83 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Project information
site_name: CoreGeth Documentation
site_description: Documentation for CoreGeth Ethereum Protocol Provider
site_url: https://etclabscore.github.io/core-geth/
site_author: CoreGeth Team

# Repository
repo_name: etclabscore/core-geth
repo_url: https://github.com/etclabscore/core-geth
edit_uri: edit/master/docs/

# Copyright
copyright: 'Copyright &copy; 2021 etclabscore/core-geth and ethereum/go-ethereum authors; see <a href="https://github.com/etclabscore/core-geth/tree/master/COPYING" target="_">COPYING file</a> - All rights reserved'

# Configuration
theme:
# https://github.com/squidfunk/mkdocs-material/tree/master/src
name: material
logo: img/favicon.png
favicon: img/favicon.png
language: en

palette:
scheme: slate
primary: black
accent: green

icon:
repo: fontawesome/brands/github

# Don't include MkDocs' JavaScript
include_search_page: false

features:
- navigation.tabs
- navigation.tabs.sticky
- navigation.expand
- navigation.sections
# - navigation.instant

use_directory_urls: true

plugins:
- search
- minify:
minify_html: true
- git-revision-date-localized:
type: timeago

# Extensions
markdown_extensions:
- abbr
- admonition
- attr_list
- codehilite
- def_list
# - meta
- smarty
- toc:
permalink: true
- pymdownx.emoji
- pymdownx.superfences
- pymdownx.details
- pymdownx.magiclink:
repo_url_shortener: true
repo_url_shorthand: true
social_url_shorthand: true

# Page tree
nav:
- Home: index.md
- Core:
- All tools: core/alltools.md
- CLI: core/run-cli.md
- EVMC: core/evmc.md
- APIs:
- JSON-RPC: apis/jsonrpc-apis.md
- OpenRPC: apis/openrpc.md
- Developers:
- Versioning: developers/versioning.md
- New release: developers/create-new-release.md
- Tutorials:
- Setup private network: tutorials/private-network.md
28 changes: 28 additions & 0 deletions requirements-mkdocs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Babel==2.9.0
click==7.1.2
future==0.18.2
gitdb==4.0.5
GitPython==3.1.12
htmlmin==0.1.12
Jinja2==2.11.2
joblib==1.0.0
jsmin==2.2.2
livereload==2.6.3
lunr==0.5.8
Markdown==3.3.3
MarkupSafe==1.1.1
mkdocs==1.1.2
mkdocs-git-revision-date-localized-plugin==0.8
mkdocs-material==6.2.4
mkdocs-material-extensions==1.0.1
mkdocs-minify-plugin==0.3.0
nltk==3.5
Pygments==2.7.3
pymdown-extensions==8.1
pytz==2020.5
PyYAML==5.3.1
regex==2020.11.13
six==1.15.0
smmap==3.0.4
tornado==6.1
tqdm==4.56.0