-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: setup of docusaurus and some initial docs (#59)
- Loading branch information
1 parent
c58e453
commit ef5ecf1
Showing
35 changed files
with
16,866 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator. | ||
|
||
### Installation | ||
|
||
``` | ||
$ yarn | ||
``` | ||
|
||
### Local Development | ||
|
||
``` | ||
$ yarn start | ||
``` | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
### Build | ||
|
||
``` | ||
$ yarn build | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
### Deployment | ||
|
||
Using SSH: | ||
|
||
``` | ||
$ USE_SSH=true yarn deploy | ||
``` | ||
|
||
Not using SSH: | ||
|
||
``` | ||
$ GIT_USER=<Your GitHub username> yarn deploy | ||
``` | ||
|
||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Architecture | ||
|
||
Interchain Attestation is composed of a few different components that work together to let validators safely attest to the state of a counterparty chain. | ||
The main components, in "chronological order" are: | ||
* Attestation Config Module | ||
* Validators register their signing keys | ||
* Chains/clients are registered for attestation with configuration details | ||
* Attestation Sidecar | ||
* Validators run a sidecar that reads counterparty chain information, and generates signed attestations | ||
* The sidecar also hosts a GRPC server that can be queried for attestations (used by the chain node to fetch attestations during vote extensions) | ||
* Vote Extensions | ||
* Uses the ABCI++ interface with vote extensions to fetch attestations from the sidecar | ||
* Attestations are aggregated from all the validators, and sent to the light client for verification and client updates | ||
* Attestation Light Client | ||
* The IBC light client that uses the attestation data to enable IBC connections | ||
* The light client verifies the attestations and updates the client state and consensus state with packet commitments | ||
* Testing | ||
* In addition there are some development tools used to test the system: interchaintest and some simapps integrated with the above components | ||
|
||
![architecture.png](../../static/img/architecture.png) | ||
|
||
## Flow | ||
|
||
TODO: Add a diagram | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
sidebar_position: 5 | ||
--- | ||
|
||
# Attestation Data | ||
|
||
TODO: Document the attestation data format and how it is used in the system. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Attestation Config Module | ||
|
||
The Attestation Config Module is a Cosmos SDK module that allows for configurable security requirements for the Interchain Attestation system. | ||
|
||
It has the following responsibilities: | ||
* Registering and keeping track of validator attestation signing keys | ||
* Registering and keeping track of chains/clients that are registered for attestation with configuration details | ||
* Providing the light client with the data and integration points to the chain it needs: | ||
* Validator signing keys | ||
* Validating required security backing of an attestation (i.e. is there enough voting power behind the attestation) | ||
* Any chain native capabilities like slashing or incentives | ||
|
||
TODO: Add illustration with actors and interactions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
sidebar_position: 4 | ||
--- | ||
|
||
# Attestation Light Client | ||
|
||
The Attestation Light Client is an ibc-go light client implementation that uses attestation data to verify validator consensus | ||
and update the client state and consensus state with packet commitments and header information. | ||
|
||
TODO: Briefly explain the light client interface from ibc-go and how it works (including consensus state) | ||
|
||
TODO: Explain packet commitments | ||
|
||
TODO: Add illustration | ||
|
||
## Consensus State | ||
|
||
TODO: Document how packet commitments and stuff are stored in the consensus state. | ||
|
||
## Verify Membership | ||
|
||
The light client uses packet commitments that it receiver in the attestation data to verify that the packet was included in the chain. | ||
|
||
## Verify non-membership | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Attestation Sidecar | ||
|
||
The Attestation Sidecar is a process that runs alongside a chain node, and is responsible for generating and serving attestations to the chain node. | ||
The sidecar is used by the chain node to fetch attestations during vote extensions. | ||
|
||
The sidecar is configured by the validator to connect to counterparty chains and will run in the background to continuously fetch and generate attestations. | ||
|
||
The sidecar is implemented as a CLI binary that can perform multiple tasks, such as setting up signing keys, creating validator registration files, and starting the attestation process. | ||
|
||
In addition, the sidecar also enables relaying of IBC packets (exact capabilities TBD). | ||
|
||
The Attestation Sidecar is responsible for the following: | ||
* Fetching attestation data from the counterparty chain | ||
* Packet commitments | ||
* Header information | ||
* Signing attestations | ||
* Serving attestations to the chain node via a GRPC server | ||
|
||
## Configuration | ||
|
||
TODO: Document the configuration (or should it be under a separate "usage" section of some kind?) | ||
|
||
## Relaying | ||
|
||
Currently, the sidecar has only one-off commands for creating clients, connections and channels, but the plan is to enable the sidecar to relay IBC packets | ||
as part of its running process. | ||
|
||
## CLI | ||
|
||
TODO: Document the commands |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
sidebar_position: 3 | ||
--- | ||
|
||
# Vote Extensions | ||
|
||
ABCI++ is a CometBFT interface that allows a chain to add more functionality to the low-level parts of their application. | ||
In particular, for our purposes, it allows validators to communicate with each other to aggregate potentially disparate information | ||
and come to consensus on an aggregate value. To read more about ABCI++, please refer to the official documentation [here](https://docs.cometbft.com/v0.38/spec/abci/). | ||
|
||
In the context of Interchain Attestation, we use the ABCI++ interface to fetch attestations from the sidecar, | ||
aggregate them, and send them to the light client for verification and client updates. | ||
|
||
TODO: Add illustration with all the different callbacks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
sidebar_position: 5 | ||
--- | ||
|
||
# Developing | ||
|
||
TODO: Document how to set up a development environment, how to run tests, etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Testing | ||
|
||
TODO: Document the test setup, how to run them, etc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
sidebar_position: 3 | ||
--- | ||
|
||
# Integration Manual | ||
|
||
TODO: Document how to integrate with a chain, how to register chains etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Introduction | ||
|
||
Interchain Attestation is a project to enable IBC everywhere. In particular, IBC for chains that can't/don't have a | ||
light client implementation that can be used with IBC. It enables IBC for any chain that can implement IBC, and | ||
let another chain safely validate it (for instance by running a full node). This then includes optimistic rollups, | ||
Ethereum, Solana, and more. | ||
|
||
The system enables any chain to connect with IBC, as long as it can implement the IBC protocol (e.g. smart contracts), | ||
and the validators using Interchain Attestation are attesting to the state of the counterparty IBC implementation. | ||
|
||
![Attestation enables IBC](../static/img/attestation-enables-ibc.png) |
8 changes: 8 additions & 0 deletions
8
docs/docs/validator-operator-manual/validator-operator-manual.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
sidebar_position: 4 | ||
--- | ||
|
||
# Validator Operator Manual | ||
|
||
TODO: Document all the things the validators can and should do to operate the system. | ||
Including documentation on how to set up the sidecar, how to register validators, full nodes, etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
// @ts-check | ||
// `@type` JSDoc annotations allow editor autocompletion and type checking | ||
// (when paired with `@ts-check`). | ||
// There are various equivalent ways to declare your Docusaurus config. | ||
// See: https://docusaurus.io/docs/api/docusaurus-config | ||
|
||
import {themes as prismThemes} from 'prism-react-renderer'; | ||
|
||
/** @type {import('@docusaurus/types').Config} */ | ||
const config = { | ||
title: 'Interchain Attestation', | ||
tagline: 'IBC. EVERYWHERE.', | ||
favicon: 'img/favicon.ico', | ||
|
||
// Set the production url of your site here | ||
url: 'https://interchain-attestation.io', | ||
// Set the /<baseUrl>/ pathname under which your site is served | ||
// For GitHub pages deployment, it is often '/<projectName>/' | ||
baseUrl: '/', | ||
|
||
// GitHub pages deployment config. | ||
// If you aren't using GitHub pages, you don't need these. | ||
organizationName: 'cosmos', // Usually your GitHub org/user name. | ||
projectName: 'interchain-attestation', // Usually your repo name. | ||
|
||
onBrokenLinks: 'throw', | ||
onBrokenMarkdownLinks: 'warn', | ||
|
||
// Even if you don't use internationalization, you can use this field to set | ||
// useful metadata like html lang. For example, if your site is Chinese, you | ||
// may want to replace "en" with "zh-Hans". | ||
i18n: { | ||
defaultLocale: 'en', | ||
locales: ['en'], | ||
}, | ||
|
||
presets: [ | ||
[ | ||
'classic', | ||
/** @type {import('@docusaurus/preset-classic').Options} */ | ||
({ | ||
docs: { | ||
sidebarPath: './sidebars.js', | ||
// Please change this to your repo. | ||
// Remove this to remove the "edit this page" links. | ||
editUrl: | ||
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', | ||
}, | ||
blog: { | ||
showReadingTime: true, | ||
feedOptions: { | ||
type: ['rss', 'atom'], | ||
xslt: true, | ||
}, | ||
// Please change this to your repo. | ||
// Remove this to remove the "edit this page" links. | ||
editUrl: | ||
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', | ||
// Useful options to enforce blogging best practices | ||
onInlineTags: 'warn', | ||
onInlineAuthors: 'warn', | ||
onUntruncatedBlogPosts: 'warn', | ||
}, | ||
theme: { | ||
customCss: './src/css/custom.css', | ||
}, | ||
}), | ||
], | ||
], | ||
|
||
themeConfig: | ||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */ | ||
({ | ||
// Replace with your project's social card | ||
image: 'img/social-card.png', | ||
navbar: { | ||
title: 'Interchain Attestation', | ||
logo: { | ||
alt: 'Interchain Attestation Logo', | ||
src: 'img/logo.svg', | ||
srcDark: 'img/logo light.svg' | ||
}, | ||
items: [ | ||
{ | ||
type: 'docSidebar', | ||
sidebarId: 'docsSidebar', | ||
position: 'left', | ||
label: 'Docs', | ||
}, | ||
{ | ||
href: 'https://github.com/cosmos/interchain-attestation', | ||
label: 'GitHub', | ||
position: 'right', | ||
}, | ||
], | ||
}, | ||
prism: { | ||
theme: prismThemes.github, | ||
darkTheme: prismThemes.dracula, | ||
}, | ||
}), | ||
}; | ||
|
||
export default config; |
Oops, something went wrong.