Skip to content

Commit d8d7f81

Browse files
committed
boostrap topchain docs
1 parent 9e6069d commit d8d7f81

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+17433
-0
lines changed

.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

README.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ yarn
9+
```
10+
11+
### Local Development
12+
13+
```
14+
$ yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
### Build
20+
21+
```
22+
$ yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
### Deployment
28+
29+
Using SSH:
30+
31+
```
32+
$ USE_SSH=true yarn deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```
38+
$ GIT_USER=<Your GitHub username> yarn deploy
39+
```
40+
41+
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.

babel.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

blog/2019-05-28-first-blog-post.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
slug: first-blog-post
3+
title: First Blog Post
4+
authors: [slorber, yangshun]
5+
tags: [hola, docusaurus]
6+
---
7+
8+
Lorem ipsum dolor sit amet...
9+
10+
<!-- truncate -->
11+
12+
...consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

blog/2019-05-29-long-blog-post.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
slug: long-blog-post
3+
title: Long Blog Post
4+
authors: yangshun
5+
tags: [hello, docusaurus]
6+
---
7+
8+
This is the summary of a very long blog post,
9+
10+
Use a `<!--` `truncate` `-->` comment to limit blog post size in the list view.
11+
12+
<!-- truncate -->
13+
14+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
15+
16+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
17+
18+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
19+
20+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
21+
22+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
23+
24+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
25+
26+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
27+
28+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
29+
30+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
31+
32+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
33+
34+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
35+
36+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
37+
38+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
39+
40+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
41+
42+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
43+
44+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

blog/2021-08-01-mdx-blog-post.mdx

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
slug: mdx-blog-post
3+
title: MDX Blog Post
4+
authors: [slorber]
5+
tags: [docusaurus]
6+
---
7+
8+
Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).
9+
10+
:::tip
11+
12+
Use the power of React to create interactive blog posts.
13+
14+
:::
15+
16+
{/* truncate */}
17+
18+
For example, use JSX to create an interactive button:
19+
20+
```js
21+
<button onClick={() => alert('button clicked!')}>Click me!</button>
22+
```
23+
24+
<button onClick={() => alert('button clicked!')}>Click me!</button>
Loading

blog/2021-08-26-welcome/index.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
slug: welcome
3+
title: Welcome
4+
authors: [slorber, yangshun]
5+
tags: [facebook, hello, docusaurus]
6+
---
7+
8+
[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).
9+
10+
Here are a few tips you might find useful.
11+
12+
<!-- truncate -->
13+
14+
Simply add Markdown files (or folders) to the `blog` directory.
15+
16+
Regular blog authors can be added to `authors.yml`.
17+
18+
The blog post date can be extracted from filenames, such as:
19+
20+
- `2019-05-30-welcome.md`
21+
- `2019-05-30-welcome/index.md`
22+
23+
A blog post folder can be convenient to co-locate blog post images:
24+
25+
![Docusaurus Plushie](./docusaurus-plushie-banner.jpeg)
26+
27+
The blog supports tags as well!
28+
29+
**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config.

blog/authors.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
yangshun:
2+
name: Yangshun Tay
3+
title: Front End Engineer @ Facebook
4+
url: https://github.com/yangshun
5+
image_url: https://github.com/yangshun.png
6+
page: true
7+
socials:
8+
x: yangshunz
9+
github: yangshun
10+
11+
slorber:
12+
name: Sébastien Lorber
13+
title: Docusaurus maintainer
14+
url: https://sebastienlorber.com
15+
image_url: https://github.com/slorber.png
16+
page:
17+
# customize the url of the author page at /blog/authors/<permalink>
18+
permalink: '/all-sebastien-lorber-articles'
19+
socials:
20+
x: sebastienlorber
21+
linkedin: sebastienlorber
22+
github: slorber
23+
newsletter: https://thisweekinreact.com

blog/tags.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
facebook:
2+
label: Facebook
3+
permalink: /facebook
4+
description: Facebook tag description
5+
6+
hello:
7+
label: Hello
8+
permalink: /hello
9+
description: Hello tag description
10+
11+
docusaurus:
12+
label: Docusaurus
13+
permalink: /docusaurus
14+
description: Docusaurus tag description
15+
16+
hola:
17+
label: Hola
18+
permalink: /hola
19+
description: Hola tag description

docs/Protocol/Deal.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Deal Flow
2+
3+
### Deal Creation
4+
---
5+
Users can gain access to a CRO in the topology protocol without having to run their own topology node by proposing a `Deal` to the topchain network which interested topchain nodes agree to service. Each deal can request subscription to only a single CRO and is valid for a time duration specified by start and end block numbers. Deals also offer financial incentives in the form of top token reward for topchain nodes to service them. Deals are marked with the status `SCHEDULED` when they are created and updated to `INITIALIZED` when the deal's `startBlock` block number is elapsed.
6+
7+
### Deal Activation (Subscription)
8+
---
9+
For a deal to become "active", it needs topchain nodes to join or "subscribe" to the deal. Subscribers join the deal if the financial incentives offered by the deal make sense to them. Once a subscriber joins a deal, the deal's status is marked as `ACTIVE`. The deal reward is distributed equally among the subscribed topchain nodes and paid out at the end of each block. The reward distribution may change in the future from uniform distribution to a weighted distribution based on some reputation system.
10+
`NOTE`: Only deals that have not been cancelled or expired can be subscribed.
11+
12+
### Deal Inactivation
13+
---
14+
If all the subscribers of an active deal leave the deal, the deal's status transitions from `ACTIVE` to `INACTIVE`. When a new topchain node subscribes to the deal, it's status changes from `INACTIVE` to `ACTIVE`.
15+
`NOTE`: Inactive deals should not be confused with cancelled or expired deals because the former can be subscribed but not the latter ones.
16+
17+
### Deal Cancellation
18+
---
19+
The creator of a deal can cancel the deal changing its status to `CANCELLED`.
20+
21+
### Deal Expiration
22+
---
23+
A deal is expired after the block with block number `Deal.EndBlock` has elapsed.
24+
25+
26+
27+
28+
The full structure of the deal is as follows:
29+
```proto
30+
message Deal {
31+
enum Status {
32+
UNDEFINED = 0;
33+
SCHEDULED = 1;
34+
INITIALIZED = 2;
35+
ACTIVE = 3;
36+
INACTIVE = 4;
37+
CANCELLED = 5;
38+
EXPIRED = 6;
39+
}
40+
41+
string id = 1;
42+
string requester = 2;
43+
string cro_id = 3;
44+
repeated string subscription_ids = 4;
45+
Status status = 5;
46+
uint64 total_amount = 6;
47+
uint64 available_amount = 7;
48+
uint64 start_block = 8;
49+
uint64 end_block = 9;
50+
}
51+
```

docs/Protocol/Penalty & Punishment.md

Whitespace-only changes.

docs/Protocol/Setup Topchain.md

Whitespace-only changes.

docs/Protocol/Topchain Interaction.md

Whitespace-only changes.

docs/intro.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Welcome To Topchain
2+
3+
## What is Topchain?
4+
Topchain is a cosmos-sdk based L1 blockchain that acts as a gateway for interested parties to observe the CRO events happening in the topology protocol without running their own topology protocol node. Topchain nodes stream the [hash graph vertices](https://docs.topology.gg/docs/Concepts/Protocol/Hash_Graphs) from the topology protocol related to the CROs specified in the user's "deal" that topchain nodes agree to serve in exchange for a fee.
5+
6+
Topchain is purpose-built only for serving CRO data from the topology protocol and does NOT support general purpose compute like smart contracts.

docs/tutorial-basics/_category_.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "Tutorial - Basics",
3+
"position": 2,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "5 minutes to learn the most important Docusaurus concepts."
7+
}
8+
}
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
sidebar_position: 6
3+
---
4+
5+
# Congratulations!
6+
7+
You have just learned the **basics of Docusaurus** and made some changes to the **initial template**.
8+
9+
Docusaurus has **much more to offer**!
10+
11+
Have **5 more minutes**? Take a look at **[versioning](../tutorial-extras/manage-docs-versions.md)** and **[i18n](../tutorial-extras/translate-your-site.md)**.
12+
13+
Anything **unclear** or **buggy** in this tutorial? [Please report it!](https://github.com/facebook/docusaurus/discussions/4610)
14+
15+
## What's next?
16+
17+
- Read the [official documentation](https://docusaurus.io/)
18+
- Modify your site configuration with [`docusaurus.config.js`](https://docusaurus.io/docs/api/docusaurus-config)
19+
- Add navbar and footer items with [`themeConfig`](https://docusaurus.io/docs/api/themes/configuration)
20+
- Add a custom [Design and Layout](https://docusaurus.io/docs/styling-layout)
21+
- Add a [search bar](https://docusaurus.io/docs/search)
22+
- Find inspirations in the [Docusaurus showcase](https://docusaurus.io/showcase)
23+
- Get involved in the [Docusaurus Community](https://docusaurus.io/community/support)
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
sidebar_position: 3
3+
---
4+
5+
# Create a Blog Post
6+
7+
Docusaurus creates a **page for each blog post**, but also a **blog index page**, a **tag system**, an **RSS** feed...
8+
9+
## Create your first Post
10+
11+
Create a file at `blog/2021-02-28-greetings.md`:
12+
13+
```md title="blog/2021-02-28-greetings.md"
14+
---
15+
slug: greetings
16+
title: Greetings!
17+
authors:
18+
- name: Joel Marcey
19+
title: Co-creator of Docusaurus 1
20+
url: https://github.com/JoelMarcey
21+
image_url: https://github.com/JoelMarcey.png
22+
- name: Sébastien Lorber
23+
title: Docusaurus maintainer
24+
url: https://sebastienlorber.com
25+
image_url: https://github.com/slorber.png
26+
tags: [greetings]
27+
---
28+
29+
Congratulations, you have made your first post!
30+
31+
Feel free to play around and edit this post as much as you like.
32+
```
33+
34+
A new blog post is now available at [http://localhost:3000/blog/greetings](http://localhost:3000/blog/greetings).

0 commit comments

Comments
 (0)