diff --git a/docs/dev-cluster/1-overview.md b/docs/dev-cluster/1-overview.md index 1e52655..5b971a9 100644 --- a/docs/dev-cluster/1-overview.md +++ b/docs/dev-cluster/1-overview.md @@ -6,7 +6,7 @@ sidebar_position: 1 :::tip To deploy your own rollup on the Astria Dusknet devnet, check out the -[instructions here](/docs/running-a-rollup-on-astria-dusknet/overview/)! +[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. @@ -23,7 +23,7 @@ as simple as possible. The primary use of the dev-cluster is running the full stack completely locally. There are elements of it that are used for running a local rollup that connects to the remote dev-net, but those will be [discussed in another -section](/docs/running-a-rollup-on-astria-dusknet/local-rollup-deployment/). +section](/docs/dusknet/local-rollup-deployment/). ::: See the [dev-cluster repo here.](https://github.com/astriaorg/dev-cluster) diff --git a/docs/dev-cluster/2-deploy-a-local-rollup.md b/docs/dev-cluster/2-deploy-a-local-rollup.md index 618f760..6e39e6c 100644 --- a/docs/dev-cluster/2-deploy-a-local-rollup.md +++ b/docs/dev-cluster/2-deploy-a-local-rollup.md @@ -6,7 +6,7 @@ sidebar_position: 2 :::tip To deploy your own rollup on the Astria Dusknet devnet, check out the -[instructions here](/docs/running-a-rollup-on-astria-dusknet/overview/)! +[instructions here](/docs/dusknet/overview/)! ::: ## Faucet, Block Explorer, and Test Data diff --git a/docs/dev-cluster/3-run-multiple-rollups-locally.md b/docs/dev-cluster/3-run-multiple-rollups-locally.md index ea57ce6..634d886 100644 --- a/docs/dev-cluster/3-run-multiple-rollups-locally.md +++ b/docs/dev-cluster/3-run-multiple-rollups-locally.md @@ -6,7 +6,7 @@ sidebar_position: 3 :::tip To deploy your own rollup on the Astria Dusknet devnet, check out the -[instructions here](/docs/running-a-rollup-on-astria-dusknet/overview/)! +[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. diff --git a/docs/dev-cluster/4-shutdown.md b/docs/dev-cluster/4-shutdown.md index 8b47759..39205fb 100644 --- a/docs/dev-cluster/4-shutdown.md +++ b/docs/dev-cluster/4-shutdown.md @@ -6,7 +6,7 @@ sidebar_position: 4 :::tip To deploy your own rollup on the Astria Dusknet devnet, check out the -[instructions here](/docs/running-a-rollup-on-astria-dusknet/overview/)! +[instructions here](/docs/dusknet/overview/)! ::: ## Deleting Specific Rollups diff --git a/docs/running-a-rollup-on-astria-dusknet/1-overview.md b/docs/dusknet/1-overview.md similarity index 63% rename from docs/running-a-rollup-on-astria-dusknet/1-overview.md rename to docs/dusknet/1-overview.md index ee4b78b..f6dca48 100644 --- a/docs/running-a-rollup-on-astria-dusknet/1-overview.md +++ b/docs/dusknet/1-overview.md @@ -4,10 +4,24 @@ sidebar_position: 1 # Overview -To deploy a remote Rollup on Dusknet, you will need to have the -[dev-cluster](https://github.com/astriaorg/dev-cluster/tree/main) and the main -[astria repo](https://github.com/astriaorg/astria) cloned and on your machine, -and also have the following dependencies installed: +After running the Astria stack locally, the next step is to run a rollup against +the remote Astria network. + +The primary difference between running a local rollup and one that targets the +remote devnet, is the configuration of the rollup and creating an account for +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: + +```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/ @@ -15,7 +29,8 @@ and also have the following dependencies installed: - 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. +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: diff --git a/docs/dusknet/3-local-rollup-deployment.md b/docs/dusknet/3-local-rollup-deployment.md new file mode 100644 index 0000000..13f90b8 --- /dev/null +++ b/docs/dusknet/3-local-rollup-deployment.md @@ -0,0 +1,300 @@ +--- +sidebar_position: 3 +--- + +# Local Rollup Deployment + +## Endpoints + +Endpoints for the remote cluster are the following: + +| NAME | HOSTS | ADDRESS | +|-----|-----|-----| +| EVM JSON RPC | rpc.evm.dusk-1.devnet.astria.org | 34.160.214.22 | +| EVM Block Explorer | explorer.evm.dusk-1.devnet.astria.org | 34.111.167.16 | +| EVM Faucet | faucet.evm.dusk-1.devnet.astria.org | 130.211.4.120 | +| Sequencer RPC | rpc.sequencer.dusk-1.devnet.astria.org | 34.111.73.187 | +| Sequencer Faucet | faucet.sequencer.dusk-1.devnet.astria.org | 34.36.8.102 | + + +## Creating your own Genesis Account + +You can add genesis account(s) to your rollup during configuration. +This is done by `export`ing the additional `ROLLUP_GENESIS_ACCOUNTS` environment variable. + +```bash +export ROLLUP_GENESIS_ACCOUNTS=:100000000000000000000 +``` + +You can create an account using + +```bash +cast w new +``` + +to create a new account: + +```bash +Successfully created new keypair. +Address: 0xfFe9...5f8b # +Private key: 0x332e...a8fb # +``` + +Set `` to the address printed out from the new command, and +`export` the private key to the env vars using: +```bash +export ROLLUP_FAUCET_PRIV_KEY= +``` + +This export is also shown in the export block in the next section. + +:::danger +__NEVER__ use a private key you use on a live network. + +For ease of use we recommend you set this to an key which you have access to +::: + +## Build the `astria-cli` + +Clone the [Astria repo](https://github.com/astriaorg/astria/tree/main) and build +a new config using the `astria-cli`. + +```bash +git clone git@github.com:astriaorg/astria.git +cd astria +just install-cli +``` + +## Using the `astria-cli` + +### Get Current Sequencer Block Height + +```bash +astria-cli sequencer blockheight get \ + --sequencer-url https://rpc.sequencer.dusk-1.devnet.astria.org/ +``` + +Keep track of this block height as it will be used for making the rollup config +later on. You will use this printed height in place of +`` in the steps below. + +Replace the following tags in the sections below, as follows: + +| Var Name | Var Type | Description | +|-----|-----|-----| +| `` | String | The name of your rollup | +| `` | u64 | The id of your network | +| `` | u64 | The height of the sequencer (found above) | +| `` | [u8; 40] | A wallet address | +| `` | u64 | A balance. It is useful to make this a large value. | + + + + + +## Create Rollup Config + +You can use environment variables to set the configuration for the rollup +config creation. Replace all the `<>` tags with their corresponding values. + +```bash +export ROLLUP_USE_TTY=true +export ROLLUP_LOG_LEVEL=DEBUG +export ROLLUP_NAME= +export ROLLUP_NETWORK_ID= +export ROLLUP_SKIP_EMPTY_BLOCKS=false +export ROLLUP_GENESIS_ACCOUNTS=: +export ROLLUP_SEQUENCER_INITIAL_BLOCK_HEIGHT= +export ROLLUP_SEQUENCER_WEBSOCKET=wss://rpc.sequencer.dusk-1.devnet.astria.org/websocket +export ROLLUP_SEQUENCER_RPC=https://rpc.sequencer.dusk-1.devnet.astria.org +``` + +Then just run the config create command: + +```sh +astria-cli rollup config create +``` + +You can then run: + +```sh +cat -rollup-conf.yaml +``` + +to print out the config file contents to double check everything: + +```sh +config: + useTTY: true + logLevel: DEBUG + rollup: + name: + chainId: # derived from rollup name + networkId: + skipEmptyBlocks: true + genesisAccounts: + - address: 0x + balance: '' + sequencer: + initialBlockHeight: + websocket: ws://rpc.sequencer.dusk-1.devnet.astria.org/websocket + rpc: http://rpc.sequencer.dusk-1.devnet.astria.org + celestia: + fullNodeUrl: http://celestia-service:26658 +``` + +Export this file to the env vars as follows: +```bash +export ROLLUP_CONF_FILE=-rollup-conf.yaml +``` + +At this point, if you do not want to add any genesis accounts to your rollup you +can move on to the next section. + +If you do want to add an account(s), see the next section. + +## Setup Local Environment + +We use part of the [Astria +dev-cluster](https://github.com/astriaorg/dev-cluster) to setup a local +Kubernetes (k8s) cluster where we will deploy our local rollup. + +:::tip +Make sure that Docker is running before deploying with `just`. +::: + +In the __dev-cluster repo__, run: + +```sh +git clone git@github.com:astriaorg/dev-cluster.git +cd dev-cluster +just create-cluster +just deploy-ingress-controller +just wait-for-ingress-controller +``` + +This gives us a local environment compatible with our helm charts. + +## Create a New Sequencer Account + +Back in the __Astria repo__, run the cli to create the address and key +information for a new sequencer account. + +```bash +astria-cli sequencer account create +``` + +The address, public and private keys will be different from those below. Save +these values for later use. + +```bash +Create Sequencer Account + +Private Key: "5562...1622" # +Public Key: "ec20...f613" # +Address: "8a2f...5f68" +``` + +Keep track of the `` as it will be used with the +Faucet later on for funding your sequencer account. + +Now export the private key printed above: +```bash +export SEQUENCER_PRIV_KEY= +``` + +## Deploy the Configuration + +Then deploy the configuration with: + +```bash +astria-cli rollup deployment create \ + --config $ROLLUP_CONF_FILE \ + --faucet-private-key $ROLLUP_FAUCET_PRIV_KEY \ + --sequencer-private-key $SEQUENCER_PRIV_KEY +``` + +## Observe your Deployment + +Your rollups utility endpoints are as follows: + +| Utility | URL | +|-----|-----| +| Block Explorer | http://blockscout..localdev.me/ | +| Faucet | http://faucet..localdev.me/ | +| RPC | http://executor..localdev.me/ | + +Open the URLs in your browser to view your running rollup. + +You can also open the Block Explorer in a new browser window to see the faucet +transaction appear, or any of the transactions you have sent using `cast`. + +## Use `cast` to Interact with your Rollup + +Use `cast` to view the blocks on your rollup. + +```bash +# replace with the name you used in your configuration +export ETH_RPC_URL=http://executor.$ROLLUP_NAME.localdev.me/ +cast block 0 +``` + +Which should print something like this: + +```bash +baseFeePerGas 1000000000 +difficulty 10000000 +extraData 0x +gasLimit 8000000 +gasUsed 0 +hash 0xa2d5f000ef275b5f6ce6af5a0de50c17e5893c5ea664b77f534eb62f317caff1 +logsBloom 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +miner 0x0000000000000000000000000000000000000000 +mixHash 0x0000000000000000000000000000000000000000000000000000000000000000 +nonce 0x0000000000000000 +number 0 +parentHash 0x0000000000000000000000000000000000000000000000000000000000000000 +receiptsRoot 0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421 +sealFields [] +sha3Uncles 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347 +size 512 +stateRoot 0xc1a913facf57b18de72d25155293c53b2a463d93a1de735269410b8663f2efca +timestamp 0 +withdrawalsRoot +totalDifficulty 10000000 +transactions: [] +``` + +If you have an address you would like to deposit funds to, export that address +to the env vars: +```bash +export REC_ADDR=
+``` + +You can also use `cast` to view your balance: +```bash +cast balance $REC_ADDR +``` + +Send an ammount to your address: +```bash +cast send $REC_ADDR --value 10000000000000000000 --private-key $ROLLUP_FAUCET_PRIV_KEY +``` + +And view your new balance: +```bash +cast balance $REC_ADDR +``` + +## Fund you Sequencer Account + +Using your sequencer pub key you created in the [Create a New Sequencer +Account](#create-a-new-sequencer-account), copy and past the +`` into the input on the faucet page, and mint funds +to your account: + +![Sequencer Faucet](./assets/sequencer-faucet.png) diff --git a/docs/running-a-rollup-on-astria-dusknet/4-remote-rollup-deployment.md b/docs/dusknet/4-cloud-rollup-deployment.md similarity index 83% rename from docs/running-a-rollup-on-astria-dusknet/4-remote-rollup-deployment.md rename to docs/dusknet/4-cloud-rollup-deployment.md index c517c57..25143ee 100644 --- a/docs/running-a-rollup-on-astria-dusknet/4-remote-rollup-deployment.md +++ b/docs/dusknet/4-cloud-rollup-deployment.md @@ -2,49 +2,64 @@ sidebar_position: 4 --- -# Remote Rollup Deployment +# Cloud Rollup Deployment The following assumes you are using [Digital Ocean Kubernetes (DOKS)](https://www.digitalocean.com/products/kubernetes). +We recommend using Digital Ocean's Kubernetes [Quick Start Guide](https://docs.digitalocean.com/products/kubernetes/getting-started/quickstart/). + :::warning You must use at least a 2 node cluster. ::: -## Manually Setup Digital Ocean Ingress +## Setup Digital Ocean Ingress -Follow the steps here to setup the nginx ingress controller: -- https://marketplace.digitalocean.com/apps/nginx-ingress-controller +We use the Ingress NGINX Controller for consistency across deployment environments: +- https://kubernetes.github.io/ingress-nginx/deploy/#digital-ocean -Follow the steps here to add your own domain: -- https://docs.digitalocean.com/products/networking/dns/getting-started/dns-registrars/ -- This is where you will set `` +```bash +kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.8.2/deploy/static/provider/do/deploy.yaml +``` -Follow the steps here to set up an `A` record for DNS: -- https://docs.digitalocean.com/products/networking/dns/how-to/manage-records/#a-records +## Configure Your Own Domain :::tip -When configure=ing the `A` record for DNS, the `directs to` value should specify the `loadbalancer` which was created for the `nginx-ingress-controller` using the console. +You must configure a DNS record because our ingress configuration uses name based virtual routing: https://kubernetes.io/docs/concepts/services-networking/ingress/#name-based-virtual-hosting. ::: -## Watching Ingress Deployment +Follow the instructions here: +- https://docs.digitalocean.com/products/networking/dns/getting-started/dns-registrars/ +- This is where you will set `` -Look for `ingress-nginx` + +## Digital Ocean Loadbalancer + +Look for a new loadbalancer being created in the Digital Ocean console: +https://cloud.digitalocean.com/networking/load_balancers + +You can also check that your Digital Ocean load balancer was created using the +following command: ```bash -kubectl get ns -w +kubectl get svc -n ingress-nginx ``` -Look for two pods starting with `ingress-nginx-controller` in STATUS `Running` +You should see something like this: ```bash -kubectl get po -n ingress-nginx -w +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +ingress-nginx-controller LoadBalancer 10.245.63.28 161.35.240.50 80:32656/TCP,443:30158/TCP 44h +ingress-nginx-controller-admission ClusterIP 10.245.106.99 443/TCP 44h ``` -## Digital Ocean Loadbalancer +## Set up an `A` Record for your Load Balancer +Follow the steps here to set up an `A` record for DNS: +- https://docs.digitalocean.com/products/networking/dns/how-to/manage-records/#a-records -Look for a new loadbalancer being created: -https://cloud.digitalocean.com/networking/load_balancers +:::tip +When configuring the `A` record for DNS, the `directs to` value should specify the `loadbalancer` which was created by the `nginx-ingress-controller`. +::: ## Endpoints @@ -60,6 +75,12 @@ Endpoints for the remote cluster are the following: ## Update the `helm` Chart +:::danger +Deploying a rollup to a cloud provider requires manual changes to the `helm` +charts. Because the default `localdev.me` hostname will not work on a cloud +provider. +::: + Pull the [Astria dev-cluster repo](https://github.com/astriaorg/dev-cluster): ```bash git clone git@github.com:astriaorg/dev-cluster.git @@ -89,6 +110,9 @@ metadata: annotations: kubernetes.io/ingress.class: nginx ``` +:::tip +You can see an example of these changes in [this PR here](https://github.com/astriaorg/dev-cluster/pull/119/files). +::: ## Creating your own Genesis Account @@ -123,8 +147,6 @@ Exporting the genesis account(s) is also shown in the export block in the next s :::danger __NEVER__ use a private key you use on a live network. - -For ease of use we recommend you set this to an key which you have access to ::: ## Get and Build the `astria-cli` @@ -174,7 +196,7 @@ in the command above, and the cli will fetch the initial sequencer block height for you. ::: --> -## Environment Variables + cli +## Create Rollup Config You can use environment variables to set the configuration for the rollup config creation. Replace all the `<>` tags with their corresponding values. @@ -255,6 +277,11 @@ export SEQUENCER_PRIV_KEY=9c78...710d ## Use locally modified chart +:::danger +You __must__ have modified your local `helm` chart to use your own domain name +as described in [this section here](#update-the-helm-chart). +::: + Because you needed to modify the host names inside your ingress template you must deploy your rollup using your local chart: ```bash @@ -272,15 +299,6 @@ astria-cli rollup deployment create \ --sequencer-private-key $SEQUENCER_PRIV_KEY ``` -## Delete Rollup Node - -If there was an error during deployment, you can delete your deployment and try -again with the following: - -```bash -astria-cli rollup deployment delete --config $ROLLUP_CONF_PATH -``` - ## Default to `astria-dev-cluster` namespace Set `kubectl` to the correct namespace. diff --git a/docs/running-a-rollup-on-astria-dusknet/_category_.json b/docs/dusknet/_category_.json similarity index 52% rename from docs/running-a-rollup-on-astria-dusknet/_category_.json rename to docs/dusknet/_category_.json index ca72546..db8a10d 100644 --- a/docs/running-a-rollup-on-astria-dusknet/_category_.json +++ b/docs/dusknet/_category_.json @@ -1,8 +1,8 @@ { "label": "Running a Rollup on Dusknet", - "position": 1, + "position": 3, "link": { "type": "doc", - "id": "running-a-rollup-on-astria-dusknet/overview" + "id": "dusknet/overview" } } diff --git a/docs/running-a-rollup-on-astria-dusknet/assets/sequencer-faucet.png b/docs/dusknet/assets/sequencer-faucet.png similarity index 100% rename from docs/running-a-rollup-on-astria-dusknet/assets/sequencer-faucet.png rename to docs/dusknet/assets/sequencer-faucet.png diff --git a/docs/overview-of-astria/1-introduction.md b/docs/overview-of-astria/1-introduction.md index b696881..761ff9f 100644 --- a/docs/overview-of-astria/1-introduction.md +++ b/docs/overview-of-astria/1-introduction.md @@ -6,7 +6,7 @@ sidebar_position: 1 :::tip To deploy your own rollup on the Astria Dusknet devnet, check out the -[instructions here](/docs/running-a-rollup-on-astria-dusknet/overview/)! +[instructions here](/docs/dusknet/overview/)! ::: Astria is a shared sequencing network that allows many rollups to share a single diff --git a/docs/overview-of-astria/2-why-decentralized-sequencers.md b/docs/overview-of-astria/2-why-decentralized-sequencers.md index f870328..b055bb7 100644 --- a/docs/overview-of-astria/2-why-decentralized-sequencers.md +++ b/docs/overview-of-astria/2-why-decentralized-sequencers.md @@ -6,7 +6,7 @@ sidebar_position: 2 :::tip To deploy your own rollup on the Astria Dusknet devnet, check out the -[instructions here](/docs/running-a-rollup-on-astria-dusknet/overview/)! +[instructions here](/docs/dusknet/overview/)! ::: Centralization is antithetical to crypto. And yet, today’s rollups almost universally depend on a single sequencer. Centralized sequencers provide fast transaction confirmations and reduce costs by batching and compressing transactions. However, these benefits come at the cost of relying on a single trusted actor for liveness and censorship resistance. diff --git a/docs/overview-of-astria/3-cross-rollup-composability.md b/docs/overview-of-astria/3-cross-rollup-composability.md index 1560e81..4e666a2 100644 --- a/docs/overview-of-astria/3-cross-rollup-composability.md +++ b/docs/overview-of-astria/3-cross-rollup-composability.md @@ -6,7 +6,7 @@ sidebar_position: 3 :::tip To deploy your own rollup on the Astria Dusknet devnet, check out the -[instructions here](/docs/running-a-rollup-on-astria-dusknet/overview/)! +[instructions here](/docs/dusknet/overview/)! ::: Because Astria handles the transaction ordering for multiple rollups, it’s able to provide guarantees that transactions are only included as part of an atomic bundle. This allows users to specify that a transaction on Rollup A can be included in a block if and only if a different transaction on Rollup B is also included in the same block. By enabling such conditional transaction inclusion, Astria unlocks exciting possibilities such as atomic cross-rollup arbitrage. diff --git a/docs/overview-of-astria/4-maintain-sovereignty.md b/docs/overview-of-astria/4-maintain-sovereignty.md index db0e694..25bd42e 100644 --- a/docs/overview-of-astria/4-maintain-sovereignty.md +++ b/docs/overview-of-astria/4-maintain-sovereignty.md @@ -6,7 +6,7 @@ sidebar_position: 4 :::tip To deploy your own rollup on the Astria Dusknet devnet, check out the -[instructions here](/docs/running-a-rollup-on-astria-dusknet/overview/)! +[instructions here](/docs/dusknet/overview/)! ::: Sovereignty is important, so rollups must be able to receive the benefits of diff --git a/docs/overview-of-astria/_category_.json b/docs/overview-of-astria/_category_.json index 044d55a..1c7770c 100644 --- a/docs/overview-of-astria/_category_.json +++ b/docs/overview-of-astria/_category_.json @@ -1,6 +1,6 @@ { "label": "Overview of Astria", - "position": 2, + "position": 1, "link": { "type": "doc", "id": "overview-of-astria/introduction" diff --git a/docs/overview-of-astria/architecture/1-overview.md b/docs/overview-of-astria/architecture/1-overview.md index 2f9471c..faeba04 100644 --- a/docs/overview-of-astria/architecture/1-overview.md +++ b/docs/overview-of-astria/architecture/1-overview.md @@ -6,7 +6,7 @@ sidebar_position: 1 :::tip To deploy your own rollup on the Astria Dusknet devnet, check out the -[instructions here](/docs/running-a-rollup-on-astria-dusknet/overview/)! +[instructions here](/docs/dusknet/overview/)! ::: At a high level, Astria breaks out all of the components that are historically diff --git a/docs/overview-of-astria/architecture/2-transaction-flow.md b/docs/overview-of-astria/architecture/2-transaction-flow.md index 10c3bcd..0747868 100644 --- a/docs/overview-of-astria/architecture/2-transaction-flow.md +++ b/docs/overview-of-astria/architecture/2-transaction-flow.md @@ -6,7 +6,7 @@ sidebar_position: 2 :::tip To deploy your own rollup on the Astria Dusknet devnet, check out the -[instructions here](/docs/running-a-rollup-on-astria-dusknet/overview/)! +[instructions here](/docs/dusknet/overview/)! ::: The full transaction flow through the Astria stack is as follows: diff --git a/docs/overview-of-astria/architecture/3-rollup.md b/docs/overview-of-astria/architecture/3-rollup.md index 7b13602..e622bc4 100644 --- a/docs/overview-of-astria/architecture/3-rollup.md +++ b/docs/overview-of-astria/architecture/3-rollup.md @@ -6,7 +6,7 @@ sidebar_position: 3 :::tip To deploy your own rollup on the Astria Dusknet devnet, check out the -[instructions here](/docs/running-a-rollup-on-astria-dusknet/overview/)! +[instructions here](/docs/dusknet/overview/)! ::: Astria is designed for permissionless rollup integration and takes advantage of [lazy](https://en.wikipedia.org/wiki/Lazy_evaluation?ref=blog.astria.org) shared sequencing. This means that rollup developers have total sovereignty over their own execution state and can swap out sequencing layers without fear of being locked in. You do not need to ask for permission or go through a governance process to gain access. A rollup simply needs to satisfy the following interfaces: diff --git a/docs/overview-of-astria/architecture/4-composer.md b/docs/overview-of-astria/architecture/4-composer.md index 599ce67..ea57529 100644 --- a/docs/overview-of-astria/architecture/4-composer.md +++ b/docs/overview-of-astria/architecture/4-composer.md @@ -6,7 +6,7 @@ sidebar_position: 4 :::tip To deploy your own rollup on the Astria Dusknet devnet, check out the -[instructions here](/docs/running-a-rollup-on-astria-dusknet/overview/)! +[instructions here](/docs/dusknet/overview/)! ::: The Composer is an in-house abstraction over the potential actors in Astria's diff --git a/docs/overview-of-astria/architecture/5-the-astria-sequencer.md b/docs/overview-of-astria/architecture/5-the-astria-sequencer.md index bc105f4..16e1084 100644 --- a/docs/overview-of-astria/architecture/5-the-astria-sequencer.md +++ b/docs/overview-of-astria/architecture/5-the-astria-sequencer.md @@ -6,7 +6,7 @@ sidebar_position: 5 :::tip To deploy your own rollup on the Astria Dusknet devnet, check out the -[instructions here](/docs/running-a-rollup-on-astria-dusknet/overview/)! +[instructions here](/docs/dusknet/overview/)! ::: The Astria Shared Sequencer is a decentralized network of nodes utilizing CometBFT that come to consensus on an ordered set of transactions (ie. it is a blockchain). The unique feature of the sequencer is that the transactions it includes are not executed (lazy sequencing), and are destined for another execution engine (ie. a rollup). This excludes “sequencer native” transactions, such as transfers of tokens within the sequencer chain. Transactions from any given rollup are only ordered on the sequencer, not executed. diff --git a/docs/overview-of-astria/architecture/6-relayer.md b/docs/overview-of-astria/architecture/6-relayer.md index 5874ec8..be762fd 100644 --- a/docs/overview-of-astria/architecture/6-relayer.md +++ b/docs/overview-of-astria/architecture/6-relayer.md @@ -6,7 +6,7 @@ sidebar_position: 6 :::tip To deploy your own rollup on the Astria Dusknet devnet, check out the -[instructions here](/docs/running-a-rollup-on-astria-dusknet/overview/)! +[instructions here](/docs/dusknet/overview/)! ::: The Relayer's responsibility is to take validated blocks from the sequencer and diff --git a/docs/overview-of-astria/architecture/7-conductor.md b/docs/overview-of-astria/architecture/7-conductor.md index 4da2c65..c6dc4b6 100644 --- a/docs/overview-of-astria/architecture/7-conductor.md +++ b/docs/overview-of-astria/architecture/7-conductor.md @@ -6,7 +6,7 @@ sidebar_position: 7 :::tip To deploy your own rollup on the Astria Dusknet devnet, check out the -[instructions here](/docs/running-a-rollup-on-astria-dusknet/overview/)! +[instructions here](/docs/dusknet/overview/)! ::: Conductor's role is to drive the deterministic execution of sequencer blocks to diff --git a/docs/overview-of-astria/architecture/8-data-availability-layer.md b/docs/overview-of-astria/architecture/8-data-availability-layer.md index 1ca6675..c2ee9e3 100644 --- a/docs/overview-of-astria/architecture/8-data-availability-layer.md +++ b/docs/overview-of-astria/architecture/8-data-availability-layer.md @@ -6,7 +6,7 @@ sidebar_position: 8 :::tip To deploy your own rollup on the Astria Dusknet devnet, check out the -[instructions here](/docs/running-a-rollup-on-astria-dusknet/overview/)! +[instructions here](/docs/dusknet/overview/)! ::: The dev-cluster uses [Celestia](https://github.com/celestiaorg) as the data diff --git a/docs/running-a-rollup-on-astria-dusknet/2-configure-remote-rollup.md b/docs/running-a-rollup-on-astria-dusknet/2-configure-remote-rollup.md deleted file mode 100644 index f151468..0000000 --- a/docs/running-a-rollup-on-astria-dusknet/2-configure-remote-rollup.md +++ /dev/null @@ -1,158 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Configure the Remote Rollup - -## Endpoints - -Endpoints for the remote cluster are the following: - -| NAME | HOSTS | ADDRESS | -|-----|-----|-----| -| EVM JSON RPC | rpc.evm.dusk-1.devnet.astria.org | 34.160.214.22 | -| EVM Block Explorer | explorer.evm.dusk-1.devnet.astria.org | 34.111.167.16 | -| EVM Faucet | faucet.evm.dusk-1.devnet.astria.org | 130.211.4.120 | -| Sequencer RPC | rpc.sequencer.dusk-1.devnet.astria.org | 34.111.73.187 | -| Sequencer Faucet | faucet.sequencer.dusk-1.devnet.astria.org | 34.36.8.102 | - - -## Creating your own Genesis Account - -You can add genesis account(s) to your rollup during configuration. -This is done by `export`ing the additional `ROLLUP_GENESIS_ACCOUNTS` environment variable. - -```bash -export ROLLUP_GENESIS_ACCOUNTS=:100000000000000000000 -``` - -You can create an account using - -```bash -cast w new -``` - -to create a new account: - -```bash -Successfully created new keypair. -Address: 0xfFe9...5f8b # -Private key: 0x332e...a8fb # -``` - -Set `` to the address printed out from the new command, and -`export` the private key to the env vars using: -```bash -export ROLLUP_FAUCET_PRIV_KEY= -``` - -This export is also shown in the export block in the next section. - -:::danger -__NEVER__ use a private key you use on a live network. - -For ease of use we recommend you set this to an key which you have access to -::: - -## Build the `astria-cli` - -Clone the [Astria repo](https://github.com/astriaorg/astria/tree/main) and build -a new config using the `astria-cli`. - -```bash -git clone git@github.com:astriaorg/astria.git -cd astria -just install-cli -``` - -## Using the `astria-cli` - -### Get Current Sequencer Block Height - -```bash -astria-cli sequencer blockheight get \ - --sequencer-url https://rpc.sequencer.dusk-1.devnet.astria.org/ -``` - -Keep track of this block height as it will be used for making the rollup config -later on. You will use this printed height in place of -`` in the steps below. - -Replace the following tags in the sections below, as follows: - -| Var Name | Var Type | Description | -|-----|-----|-----| -| `` | String | The name of your rollup | -| `` | u64 | The id of your network | -| `` | u64 | The height of the sequencer (found above) | -| `` | [u8; 40] | A wallet address | -| `` | u64 | A balance. It is useful to make this a large value. | - - - - - -## Environment Variables + cli - -You can use environment variables to set the configuration for the rollup -config creation. Replace all the `<>` tags with their corresponding values. - -```bash -export ROLLUP_USE_TTY=true -export ROLLUP_LOG_LEVEL=DEBUG -export ROLLUP_NAME= -export ROLLUP_NETWORK_ID= -export ROLLUP_SKIP_EMPTY_BLOCKS=false -export ROLLUP_GENESIS_ACCOUNTS=: -export ROLLUP_SEQUENCER_INITIAL_BLOCK_HEIGHT= -export ROLLUP_SEQUENCER_WEBSOCKET=wss://rpc.sequencer.dusk-1.devnet.astria.org/websocket -export ROLLUP_SEQUENCER_RPC=https://rpc.sequencer.dusk-1.devnet.astria.org -``` - -Then just run the config create command: - -```sh -astria-cli rollup config create -``` - -You can then run: - -```sh -cat -rollup-conf.yaml -``` - -to print out the config file contents to double check everything: - -```sh -config: - useTTY: true - logLevel: DEBUG - rollup: - name: - chainId: # derived from rollup name - networkId: - skipEmptyBlocks: true - genesisAccounts: - - address: 0x - balance: '' - sequencer: - initialBlockHeight: - websocket: ws://rpc.sequencer.dusk-1.devnet.astria.org/websocket - rpc: http://rpc.sequencer.dusk-1.devnet.astria.org - celestia: - fullNodeUrl: http://celestia-service:26658 -``` - -Export this file to the env vars as follows: -```bash -export ROLLUP_CONF_FILE=-rollup-conf.yaml -``` - -At this point, if you do not want to add any genesis accounts to your rollup you -can move on to the next section. - -If you do want to add an account(s), see the next section. diff --git a/docs/running-a-rollup-on-astria-dusknet/3-local-rollup-deployment.md b/docs/running-a-rollup-on-astria-dusknet/3-local-rollup-deployment.md deleted file mode 100644 index 5dd7030..0000000 --- a/docs/running-a-rollup-on-astria-dusknet/3-local-rollup-deployment.md +++ /dev/null @@ -1,147 +0,0 @@ ---- -sidebar_position: 3 ---- - -# Local Rollup Deployment - -## Deploy the Local Run Environment - -We use part of the [Astria -dev-cluster](https://github.com/astriaorg/dev-cluster) to setup a local -Kubernetes (k8s) cluster where we will deploy our local rollup. - -:::tip -Make sure that Docker is running before deploying with `just`. -::: - -In the __dev-cluster repo__, run: - -```sh -git clone git@github.com:astriaorg/dev-cluster.git -cd dev-cluster -just create-cluster -just deploy-ingress-controller -just wait-for-ingress-controller -``` - -This gives us a local environment compatible with our helm charts. - -## Create a New Sequencer Account - -Back in the __Astria repo__, run the cli to create the address and key -information for a new sequencer account. - -```bash -astria-cli sequencer account create -``` - -The address, public and private keys will be different from those below. Save -these values for later use. - -```bash -Create Sequencer Account - -Private Key: "5562...1622" # -Public Key: "ec20...f613" # -Address: "8a2f...5f68" -``` - -Keep track of the `` as it will be used with the -Faucet later on for funding your sequencer account. - -Now export the private key printed above: -```bash -export SEQUENCER_PRIV_KEY= -``` - -## Deploy the Configuration - -Then deploy the configuration with: - -```bash -astria-cli rollup deployment create \ - --config $ROLLUP_CONF_FILE \ - --faucet-private-key $ROLLUP_FAUCET_PRIV_KEY \ - --sequencer-private-key $SEQUENCER_PRIV_KEY -``` - -## Observe your Deployment - -Your rollups utility endpoints are as follows: - -| Utility | URL | -|-----|-----| -| Block Explorer | http://blockscout..localdev.me/ | -| Faucet | http://faucet..localdev.me/ | -| RPC | http://executor..localdev.me/ | - -Open the URLs in your browser to view your running rollup. - -You can also open the Block Explorer in a new browser window to see the faucet -transaction appear, or any of the transactions you have sent using `cast`. - -## Use `cast` to Interact with your Rollup - -Use `cast` to view the blocks on your rollup. - -```bash -# replace with the name you used in your configuration -export ETH_RPC_URL=http://executor.$ROLLUP_NAME.localdev.me/ -cast block 0 -``` - -Which should print something like this: - -```bash -baseFeePerGas 1000000000 -difficulty 10000000 -extraData 0x -gasLimit 8000000 -gasUsed 0 -hash 0xa2d5f000ef275b5f6ce6af5a0de50c17e5893c5ea664b77f534eb62f317caff1 -logsBloom 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -miner 0x0000000000000000000000000000000000000000 -mixHash 0x0000000000000000000000000000000000000000000000000000000000000000 -nonce 0x0000000000000000 -number 0 -parentHash 0x0000000000000000000000000000000000000000000000000000000000000000 -receiptsRoot 0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421 -sealFields [] -sha3Uncles 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347 -size 512 -stateRoot 0xc1a913facf57b18de72d25155293c53b2a463d93a1de735269410b8663f2efca -timestamp 0 -withdrawalsRoot -totalDifficulty 10000000 -transactions: [] -``` - -If you have an address you would like to deposit funds to, export that address -to the env vars: -```bash -export REC_ADDR=
-``` - -You can also use `cast` to view your balance: -```bash -cast balance $REC_ADDR -``` - -Send an ammount to your address: -```bash -cast send $REC_ADDR --value 10000000000000000000 --private-key $ROLLUP_FAUCET_PRIV_KEY -``` - -And view your new balance: -```bash -cast balance $REC_ADDR -``` - -## Fund you Sequencer Account - -Using your sequencer pub key you created in the [Create a New Sequencer -Account](#create-a-new-sequencer-account), copy and past the -`` into the input on the faucet page, and mint funds -to your account: - -![Sequencer Faucet](./assets/sequencer-faucet.png) diff --git a/docusaurus.config.js b/docusaurus.config.js index b9023f2..cf3b35b 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -92,8 +92,8 @@ const config = { title: 'Docs', items: [ { - label: 'Running a rollup on Astria Dusknet', - to: '/docs/running-a-rollup-on-astria-dusknet/overview/', + label: 'Astria Dusknet', + to: '/docs/dusknet/overview/', }, { label: 'Overview', diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 102ca6c..b75a1d2 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -17,8 +17,8 @@ function HomepageHeader() {
- Learn more about Astria + to="/docs/dusknet/overview/"> + Deploy a rollup on Dusknet