Skip to content

Switch docs back to openrpc v2 #667

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

Open
wants to merge 62 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
909208b
add docusaurus
acolytec3 May 14, 2025
19ac475
update deploy scripts
acolytec3 May 14, 2025
5b0c81b
clean up stuff
acolytec3 May 14, 2025
6e0dc69
update action
acolytec3 May 14, 2025
f272141
workflow dispatch trigger
acolytec3 May 14, 2025
406f4eb
build against main
acolytec3 May 14, 2025
9eef24a
Merge remote-tracking branch 'upstream/main' into docusaurus
acolytec3 May 14, 2025
54c3163
Merge pull request #1 from acolytec3/docusaurus
acolytec3 May 14, 2025
6bb9628
push build to correct place
acolytec3 May 14, 2025
b3a20fc
use correct working directory
acolytec3 May 14, 2025
1612d44
fix references
acolytec3 May 14, 2025
e15e33e
update build artifact path in deploy workflow
acolytec3 May 14, 2025
4557be6
consolidate in base dir
acolytec3 May 14, 2025
caf5990
more cleanup
acolytec3 May 14, 2025
8b0a015
add test deploy ci
acolytec3 May 14, 2025
1d5d76a
add workflow_dispatch
acolytec3 May 14, 2025
0f036d9
fix deploy script
acolytec3 May 14, 2025
55d1bda
build specs and website
acolytec3 May 14, 2025
fb9286f
don't throw on broken links
acolytec3 May 14, 2025
e4a3ddd
update baseUrl
acolytec3 May 14, 2025
929cd81
make ESM/CJS stuff play nice
acolytec3 May 15, 2025
4719822
clean up links and docusaurus references
acolytec3 May 15, 2025
0608537
more link cleanup
acolytec3 May 15, 2025
87e206e
update links to point to ethereum
acolytec3 May 15, 2025
b63f4c4
remove docu boilerplate
acolytec3 May 15, 2025
13b1f6e
build docs too
acolytec3 May 15, 2025
5e218ea
Update docs/reference/intro.md
acolytec3 May 15, 2025
b5fff3b
Update docusaurus.config.ts
acolytec3 May 15, 2025
4331158
remove old deployment job
acolytec3 May 15, 2025
2325067
remove gatsby
lightclient May 16, 2025
c98edde
update generator to v2
acolytec3 May 22, 2025
4e5e35b
Update openrpc version
acolytec3 Jun 8, 2025
bcaaffe
Update prepare script
acolytec3 Jun 8, 2025
d84a43f
move build script to correct place
acolytec3 Jun 8, 2025
d299793
Add config to prep step
acolytec3 Jun 11, 2025
3746c0f
update ci
acolytec3 Jun 12, 2025
2d73118
use correct trigger
acolytec3 Jun 12, 2025
63e7647
remove config
acolytec3 Jun 12, 2025
c002ffa
add write permission
acolytec3 Jun 12, 2025
994c9da
push to master
acolytec3 Jun 12, 2025
f3c8c52
remove docusaurus nonsense
acolytec3 Jun 12, 2025
0244712
update node evn
acolytec3 Jun 12, 2025
7bae577
commit package-lock only
acolytec3 Jun 13, 2025
335846c
Merge remote-tracking branch 'origin/main' into openrpc-v2
acolytec3 Jun 13, 2025
b0ef8a4
Merge pull request #2 from acolytec3/openrpc-v2
acolytec3 Jun 13, 2025
7b920a7
switch to module
acolytec3 Jun 13, 2025
8820122
put prefix back to empty string
acolytec3 Jun 14, 2025
c5f4697
specify prefix
acolytec3 Jun 14, 2025
31e8683
use crazy-max
acolytec3 Jun 17, 2025
453178b
Merge remote-tracking branch 'upstream/main'
acolytec3 Jun 17, 2025
035eb3d
update spellcheck
acolytec3 Jun 17, 2025
c95d608
make repo name dynamic
acolytec3 Jun 17, 2025
0788d9f
dynamically add all md to menu
acolytec3 Jun 18, 2025
6f17bb6
Remove copy docs step and reorder menu links
acolytec3 Jun 24, 2025
989bb02
update support for latest generator
zcstarr Jun 28, 2025
3c4dc1a
Merge pull request #4 from zcstarr/feat/generator_update
acolytec3 Jun 28, 2025
fbfcec3
remove node options detritus from deploy
acolytec3 Jul 2, 2025
94ce9fd
chore: change to mdx
bomanaps Jul 2, 2025
3dabe2a
Replace styled table with remarkGfm plugin
acolytec3 Jul 3, 2025
5f630dd
Merge remote-tracking branch 'upstream/main'
acolytec3 Jul 7, 2025
48f8b82
Clean up links and add tests/quickstart to docs
acolytec3 Jul 7, 2025
11a9b3d
update test deploy to check on node 20, 22, 24
acolytec3 Jul 9, 2025
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
59 changes: 20 additions & 39 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,29 @@ on:
- main
workflow_dispatch:

jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
env:
GITHUB_REPOSITORY: ${{ github.repository }}

- name: Install dependencies
run: npm install --frozen-lockfile

- name: Build specs and website
run: |
npm run build
npm run build:docs

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: build

deploy:
name: Deploy to GitHub Pages
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
jobs:
deploy-gh-pages:
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
pages: write
id-token: write
contents: write

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: '22'
- run: npm ci
- run: npm run build
- run: npm run build:docs
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/docs/gatsby/public
commit_message: "Deploy to GitHub Pages"
5 changes: 4 additions & 1 deletion .github/workflows/test-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ jobs:
test-deploy:
name: Test deployment
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20, 22, 24]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ jobs:
lint-and-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 15.x
uses: actions/setup-node@v1
- uses: actions/checkout@v4
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: ^15.x
node-version: 22
- run: npm ci
- run: npm run build
- run: npm run lint
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ data.json
schema.json
*.dic
.idea/
.docusaurus
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ Ethereum clients as modules that can be swapped at will.

### Contributing

Please see the contributors guide in [`docs/making-changes.md`][making-changes]
Please see the [contributors guide][contributors-guide]
for general information about the process of standardizing new API methods and
making changes to existing ones. Information on test generation can be found
in [`tests/README.md`][test-gen]
in [test-gen][test-gen]

The specification itself is written in [OpenRPC][openrpc]. Refer to the OpenRPC
specification and the JSON schema [specification][json-schema] to get started.
Expand Down Expand Up @@ -112,8 +112,8 @@ This repository is licensed under [CC0](LICENSE).
[validator]: https://open-rpc.github.io/schema-utils-js/functions/validateOpenRPCDocument.html
[graphql-schema]: http://graphql-schema.ethdevops.io/?url=https://github.com/ethereum/execution-apis/main/graphql.json
[eip-1767]: https://eips.ethereum.org/EIPS/eip-1767
[making-changes]: docs/making-changes.md
[contributors-guide]: docs/reference/contributors-guide.md
[json-schema]: https://json-schema.org
[hive]: https://github.com/ethereum/hive
[rpc-compat]: https://github.com/ethereum/hive/tree/master/simulators/ethereum/rpc-compat
[test-gen]: tests/README.md
[test-gen]: docs/reference/tests.md
30 changes: 0 additions & 30 deletions css/custom.css

This file was deleted.

82 changes: 82 additions & 0 deletions docs/config/gatsby-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
const remarkGfm = require('remark-gfm');

module.exports = {
pathPrefix: "/execution-apis",
siteMetadata: {
title: 'Ethereum JSON-RPC Specification',
description: 'A specification of the standard interface for Ethereum clients.',
siteUrl: process.env.GITHUB_REPOSITORY
? `https://${process.env.GITHUB_REPOSITORY.split('/')[0]}.github.io/execution-apis`
: 'https://ethereum.github.io/execution-apis', // fallback for local development
logoUrl: 'https://github.com/open-rpc/design/master/icons/open-rpc-logo-noText/open-rpc-logo-noText%20(PNG)/256x256.png',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there's an eth icon or one for execution apis we might drop that here.

primaryColor: '#3f51b5', //material-ui primary color
secondaryColor: '#f50057', //material-ui secondary color
author: '',
menuLinks: [
{ name: 'Introduction', link: '/intro' },
{
name: 'API Documentation',
link: '/api-documentation'
},
{ name: 'Quickstart', link: '/quickstart' },
{ name: 'Contributors Guide', link: '/contributors-guide' },
{ name: 'Testing', link: '/tests'},
{ name: 'Ethsimulatev1 notes', link: '/ethsimulatev1-notes' },
],
footerLinks: [
{
name: 'OpenRPC',
link: 'https://open-rpc.org'
}
]
},
plugins: [
{
resolve: 'gatsby-plugin-mdx',
options: {
extensions: ['.mdx', '.md'],
gatsbyRemarkPlugins: [
{
resolve: 'gatsby-remark-autolink-headers',
options: {
icon: false,
},
},
],
mdxOptions: {
remarkPlugins: [remarkGfm],
},
},
},
"gatsby-openrpc-theme",
{
resolve: 'gatsby-plugin-manifest',
options: {
name: 'pristine-site',
short_name: 'pristine-site',
start_url: '/execution-apis/',
background_color: 'transparent',
theme_color: '#3f51b5',
display: 'minimal-ui',
icon: 'src/images/gatsby-icon.png', // This path is relative to the root of the site.
},
},
"gatsby-plugin-image",
"gatsby-plugin-sharp",
"gatsby-transformer-sharp",
{
resolve: "gatsby-source-filesystem",
options: {
name: "images",
path: __dirname + '/src/images',
},
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "docs",
path: __dirname + '/../../../docs/reference',
},
},
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ others don't.

[exec-apis]: https://github.com/ethereum/execution-apis
[pm]: https://github.com/ethereum/pm
[test-gen]: https://github.com/ethereum/execution-apis/blob/main/tests/README.md
[test-gen]: https://github.com/ethereum/execution-apis/blob/main/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Unlike `eth_call`, `eth_simulateV1`'s calls are conducted inside blocks. We don'

## Default values for transactions
As eth_simulate is an extension to `eth_call` we want to enable the nice user experience that the user does not need to provide all required values for a transaction. We are assuming following defaults if the variable is not provided by the user:

| parameter name | description |
-----------------|-----------------------
| type | `0x2` |
Expand Down
6 changes: 1 addition & 5 deletions docs/reference/intro.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
slug: /
sidebar_position: 1
---

# Introduction

Expand Down Expand Up @@ -40,4 +36,4 @@ Each category serves specific purposes and provides different functionalities fo

## Contributing

We welcome contributions to improve this documentation. Please see our [Making Changes](/reference/making-changes) guide for more information on how to contribute.
We welcome contributions to improve this documentation. Please see our [Contributors Guide](/reference/contributors-guide) guide for more information on how to contribute.
119 changes: 119 additions & 0 deletions docs/reference/quickstart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Execution API Specification

## JSON-RPC

[View the spec][playground]

The Ethereum JSON-RPC is a standard collection of methods that all execution
clients implement. It is the canonical interface between users and the network.
This interface allows downstream tooling and infrastructure to treat different
Ethereum clients as modules that can be swapped at will.

### Contributing

Please see the [contributors guide][contributors-guide]
for general information about the process of standardizing new API methods and
making changes to existing ones. Information on test generation can be found
in [test-gen][test-gen]

The specification itself is written in [OpenRPC][openrpc]. Refer to the OpenRPC
specification and the JSON schema [specification][json-schema] to get started.

### Building

The specification is split into multiple files to improve readability. The
spec can be compiled into a single document as follows:

```console
$ npm install
$ npm run build
Build successful.
```

This will output the file `openrpc.json` in the root of the project. This file
will have all schema `#ref`s resolved.

#### Testing

There are several mechanisms for testing specification contributions and client
conformance.

First is the [OpenRPC validator][validator]. It performs some basic syntactic
checks on the generated specification.

```console
$ npm install
$ npm run lint
OpenRPC spec validated successfully.
```

Next is `speccheck`. This tool validates the test cases in the `tests`
directory against the specification.

```console
$ go install github.com/lightclient/rpctestgen/cmd/speccheck@latest
$ speccheck -v
all passing.
```

If you get an error that says: `speccheck: command not found`,
make sure that the go binary is in your $PATH:

```console
$ export PATH=$HOME/go/bin:$PATH
```

The spell checker ensures the specification is free of spelling errors.

```console
$ pip install pyspelling
$ pyspelling -c spellcheck.yaml
Spelling check passed :)
```

pyspelling is a wrapper around either [Aspell](http://aspell.net/) or
[Hunspell](https://hunspell.github.io/). You'll need to install
one of those before running `pyspelling`.

Finally, the test cases in the `tests/` directory may be run against individual
execution client using the [`hive`] simulator [`rpc-compat`][rpc-compat].
Please see the documentation in the aforementioned repositories for more
information.

## GraphQL

[View the spec][graphql-schema]

[EIP-1767][eip-1767] proposed a GraphQL schema for interacting with Ethereum clients. Since then Besu and Geth have implemented the interface. This repo contains a live specification to integrate changes to the protocol as well as other improvements into the GraphQL schema.

### Generation

The schema in this repo is generated by issuing a meta GraphQL query against a live node. This can be done as follows:

```console
$ npm run graphql:schema
```

### Testing

A script is included in the source code which reads and validates the given schema to be a valid one. It is recommended to perform this check after modifying the schema by:

```console
$ npm run graphql:validate
```

## License

This repository is licensed under [CC0](LICENSE).


[playground]: https://ethereum.github.io/execution-apis/docs/reference/json-rpc-api
[openrpc]: https://open-rpc.org
[validator]: https://open-rpc.github.io/schema-utils-js/functions/validateOpenRPCDocument.html
[graphql-schema]: http://graphql-schema.ethdevops.io/?url=https://github.com/ethereum/execution-apis/main/graphql.json
[eip-1767]: https://eips.ethereum.org/EIPS/eip-1767
[contributors-guide]: docs/reference/contributors-guide.md
[json-schema]: https://json-schema.org
[hive]: https://github.com/ethereum/hive
[rpc-compat]: https://github.com/ethereum/hive/tree/master/simulators/ethereum/rpc-compat
[test-gen]: docs/reference/tests.md
File renamed without changes.
Loading
Loading