Skip to content

Commit

Permalink
Adding lint markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
joroshiba committed Oct 19, 2023
1 parent 64220fb commit 1979f17
Show file tree
Hide file tree
Showing 17 changed files with 2,004 additions and 119 deletions.
35 changes: 35 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:mdx/recommended',
],
settings: {
"mdx/code-blocks": true,
"mdx/language-mapper": {}
},
env: {
node: true,
},
overrides: [
{
files: ['*.mdx'],
rules: {
'no-unused-expressions': 'off',
}
},
{
files: ['*.md'],
parser: 'eslint-plugin-markdownlint/parser',
extends: ['plugin:markdownlint/recommended'],
rules: {
'markdownlint/md001': "off",
'markdownlint/md013': [ 'error', {
code_block_line_length: 120,
tables: false
}],
'markdownlint/md032': "off",
}
},
],
};
19 changes: 19 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Lint

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn run lint
12 changes: 12 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"default": true,
"MD001": false,
"MD013": {
"code_block_line_length": 120,
"tables": false
},
"MD024": {
"allow_different_nesting": true
},
"MD032": false
}
28 changes: 18 additions & 10 deletions docs/dev-cluster/1-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ To deploy your own rollup on the Astria Dusknet devnet, check out the
[instructions here](/docs/dusknet/overview/)!
:::

Astria's Shared Sequencer Network allows multiple rollups to share a single decentralized network of sequencers that’s permissionless to join. This shared sequencer network provides out-of-the-box censorship resistance, fast block confirmations, and atomic cross-rollup inclusion guarantees.
Astria's Shared Sequencer Network allows multiple rollups to share a single
decentralized network of sequencers that’s permissionless to join. This shared
sequencer network provides out-of-the-box censorship resistance, fast block
confirmations, and atomic cross-rollup inclusion guarantees.

The Astria [dev-cluster](https://github.com/astriaorg/dev-cluster) is the
collective stack of all of Astria's components packaged together using
Expand All @@ -31,27 +34,32 @@ See the [dev-cluster repo here.](https://github.com/astriaorg/dev-cluster)
## Running the Dev Cluster Locally

### Installation
You will need to pull both the [dev-cluster](https://github.com/astriaorg/dev-cluster) and [astria-web3](https://github.com/astriaorg/astria-web3) repos from our github.

You will need to pull both the
[dev-cluster](https://github.com/astriaorg/dev-cluster) and
[astria-web3](https://github.com/astriaorg/astria-web3) repos from our github.

Install the necessary dependencies and tools listed for each repo:

* docker - https://docs.docker.com/get-docker/
* kubectl - https://kubernetes.io/docs/tasks/tools/
* helm - https://helm.sh/docs/intro/install/
* kind - https://kind.sigs.k8s.io/docs/user/quick-start/#installation
* just - https://just.systems/man/en/chapter_4.html
* docker - <https://docs.docker.com/get-docker/>
* kubectl - <https://kubernetes.io/docs/tasks/tools/>
* helm - <https://helm.sh/docs/intro/install/>
* kind - <https://kind.sigs.k8s.io/docs/user/quick-start/#installation>
* just - <https://just.systems/man/en/chapter_4.html>

For contract deployment:

* Forge (part of Foundry) - https://book.getfoundry.sh/getting-started/installation
* Forge (part of Foundry) - <https://book.getfoundry.sh/getting-started/installation>

### Deployment

:::tip
Make sure that Docker is running before deploying with `just`.
:::

To deploy the Astria Sequencer and a local DA, open a terminal in the dev-cluster directory and run the commands:
To deploy the Astria Sequencer and a local DA, open a terminal in the
dev-cluster directory and run the commands:

```bash
# Deploys ingress + Sequencer + local DA
just deploy-astria-local
Expand All @@ -60,6 +68,6 @@ just deploy-astria-local
This may take a minute or two if this the first time you are deploying as quite
a few containers need to be downloaded. Once the command completes, all elements
of the dev-cluster will be up and running. This does not run a rollup, block
explorer, or faucet.
explorer, or faucet.

You can now deploy a rollup.
26 changes: 19 additions & 7 deletions docs/dev-cluster/2-deploy-a-local-rollup.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ To deploy your own rollup on the Astria Dusknet devnet, check out the
:::

## Faucet, Block Explorer, and Test Data

With the dev-cluster running, you can then deploy a rollup, block explorer, and
faucet by running the following command in the terminal withing the dev-cluster:

Expand All @@ -34,28 +35,39 @@ kubectl get deployments --all-namespaces
```

Or you can run:

```bash
just wait-for-rollup
```

Once deployed, you can view the block explorer and faucet by opening a couple new windows in your browser and going to to the
following urls.
Once deployed, you can view the block explorer and faucet by opening a couple
new windows in your browser and going to to the following urls.

For the block explorer:
```

```txt
http://blockscout.astria.localdev.me/
```

For the faucet:
```

```txt
http://faucet.astria.localdev.me/
```

You can copy and paste a wallet address on the faucet page and give yourself 1 RIA.
You can copy and paste a wallet address on the faucet page and give yourself 1
RIA.

To test out the block explorer, open a terminal in the [astria-web3
repo](https://github.com/astriaorg/astria-web3/tree/main) you downloaded earlier
and navigate to the `packages/evm-test-data/` and run the following command:

To test out the block explorer, open a terminal in the [astria-web3 repo](https://github.com/astriaorg/astria-web3/tree/main) you downloaded earlier and navigate to the `packages/evm-test-data/` and run the following command:
```sh
just generate-transactions
```

This command uses the default rollup name and network id (see above), and will
submit commands to the newly deployed default rollup.

You can now go back to your browser and pull up the block explorer and you will now see blocks with transactions getting created in real time.
You can now go back to your browser and pull up the block explorer and you will
now see blocks with transactions getting created in real time.
36 changes: 25 additions & 11 deletions docs/dev-cluster/3-run-multiple-rollups-locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ To deploy your own rollup on the Astria Dusknet devnet, check out the
[instructions here](/docs/dusknet/overview/)!
:::

At Astria we believe strongly that deploying a rollup should be as easy as deploying a smart contract. The dev-cluster shows this is indeed possible.
At Astria we believe strongly that deploying a rollup should be as easy as
deploying a smart contract. The dev-cluster shows this is indeed possible.

Navigate back to the [dev-cluster](https://github.com/astriaorg/dev-cluster)
repo in your terminal and run the following command with your own rollup name
Expand All @@ -18,48 +19,61 @@ and network id:
:::warning

**NOTE:** The default rollup name and network id are `astria` and `912559`. When
deploying your second rollup you ___must___ use a different name and number.
deploying your second rollup you _**must**_ use a different name and number.

:::

```sh
just deploy-rollup <rollup_name> <network_id>
```

As before, it will take a moment for everything to spin up, but in the meantime keep the the rollup name and network id handy and navigate back to your browser and open a new window with the following url, replacing `rollup_name` with the name you just used to deploy your new rollup:
As before, it will take a moment for everything to spin up, but in the meantime
keep the the rollup name and network id handy and navigate back to your browser
and open a new window with the following url, replacing `rollup_name` with the
name you just used to deploy your new rollup:

```
```txt
http://blockscout.<rollup_name>.localdev.me/
```

Once everything has spin up you will see a new block explorer for your new rollup.

You can now deploy transaction to that rollup independently.
In the `astria-web3/packages/evm-test-data` directory open a new terminal and run the following:
You can now deploy transaction to that rollup independently.In the
`astria-web3/packages/evm-test-data` directory open a new terminal and run the
following:

```sh
just generate-transactions <rollup_name> <network_id>
```

As before, this command will deploy test transaction data to your new rollup.
You can also go back to your original terminal window for the test data deployment on the default rollup and rerun the `just generate-transactions` command. If you switch back and forth between the default block explorer window and your new rollup window, you will see transactions showing up on each rollup independently!
You can also go back to your original terminal window for the test data
deployment on the default rollup and rerun the `just generate-transactions`
command. If you switch back and forth between the default block explorer window
and your new rollup window, you will see transactions showing up on each rollup
independently!

To navigate to the new Block Explorer and Faucet from the additional rollup,
take the rollup name that you used and replace `<rollup_name>` in the urls
below:

```
```txt
http://blockscout.<rollup_name>.localdev.me/
http://faucet.<rollup_name>.localdev.me/
```

The only limitations to running numerous rollups are the following:
- Can your hardware handle it
- There are no rollup name and network id clashes
- Can your hardware handle it
- There are no rollup name and network id clashes

### What's Going on Under the Hood?

One last thing to mention is what is actually happening when you deploy a new rollup in the dev-cluster. When you you deploy a new rollup the only new containers that are getting spun up in the cluster are a new rollup node, a conductor, block explorer, and faucet. Only one instance of the shared sequencer and the DA layer remain running and the transactions from all the rollups are collectively getting run though those networks.
One last thing to mention is what is actually happening when you deploy a new
rollup in the dev-cluster. When you you deploy a new rollup the only new
containers that are getting spun up in the cluster are a new rollup node, a
conductor, block explorer, and faucet. Only one instance of the shared sequencer
and the DA layer remain running and the transactions from all the rollups are
collectively getting run though those networks.

![Multiple Rollups](assests/multiple-rollups.png)

Expand Down
2 changes: 2 additions & 0 deletions docs/dev-cluster/4-shutdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ To deploy your own rollup on the Astria Dusknet devnet, check out the
## Deleting Specific Rollups

To delete a specific rollup deployment, you can use the following command:

```bash
just delete-rollup <ROLLUP_NAME>
```
Expand All @@ -22,6 +23,7 @@ of the cluster running.
## Shutting Down the Whole Cluster

If you just want to shut everything down, you can run:

```bash
just clean
```
Expand Down
23 changes: 11 additions & 12 deletions docs/dusknet/1-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,31 @@ the Sequencer.

## Local Dependencies

Clone the [dev-cluster](https://github.com/astriaorg/dev-cluster/tree/main) and the main
[astria repo](https://github.com/astriaorg/astria) repo:
Clone the [dev-cluster](https://github.com/astriaorg/dev-cluster/tree/main) and
the main [astria repo](https://github.com/astriaorg/astria) repo:

```bash
git clone git@github.com:astriaorg/astria.git
git clone https://github.com/astriaorg/dev-cluster
```

And install the following tools:
- Foundry Cast and Forge tools - https://book.getfoundry.sh/getting-started/installation
- docker - https://docs.docker.com/get-docker/
- kubectl - https://kubernetes.io/docs/tasks/tools/
- helm - https://helm.sh/docs/intro/install/
- kind - https://kind.sigs.k8s.io/docs/user/quick-start/#installation
- just - https://just.systems/man/en/chapter_4.html
- Foundry Cast and Forge tools - <https://book.getfoundry.sh/getting-started/installation>
- docker - <https://docs.docker.com/get-docker/>
- kubectl - <https://kubernetes.io/docs/tasks/tools/>
- helm - <https://helm.sh/docs/intro/install/>
- kind - <https://kind.sigs.k8s.io/docs/user/quick-start/#installation>
- just - <https://just.systems/man/en/chapter_4.html>

Many of these dependencies are also required for running the local dev-cluster
if you have previously done that.

For reference, the latest component releases that the devnet cluster is running are the
following:
For reference, the latest component releases that the devnet cluster is running
are the following:
- [conductor v0.7.0](https://github.com/astriaorg/astria/releases/tag/v0.7.0--conductor)
- [composer v0.2.2](https://github.com/astriaorg/astria/releases/tag/v0.2.2--composer)
- [sequencer-relayer v0.5.1](https://github.com/astriaorg/astria/releases/tag/v0.5.1--sequencer-relayer)
- [sequencer
v0.4.1](https://github.com/astriaorg/astria/releases/tag/v0.4.1--sequencer)
- [sequencer v0.4.1](https://github.com/astriaorg/astria/releases/tag/v0.4.1--sequencer)

You do not need to download these independently, they are already within the
dev-cluster repo.
Expand Down
Loading

0 comments on commit 1979f17

Please sign in to comment.