-
Notifications
You must be signed in to change notification settings - Fork 2
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
Document Dusk-4 #6
Open
joroshiba
wants to merge
3
commits into
main
Choose a base branch
from
joroshiba/dusk-4
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"config": { | ||
"chainId": 912559, | ||
"homesteadBlock": 0, | ||
"eip150Block": 0, | ||
"eip155Block": 0, | ||
"eip158Block": 0, | ||
"byzantiumBlock": 0, | ||
"constantinopleBlock": 0, | ||
"petersburgBlock": 0, | ||
"istanbulBlock": 0, | ||
"berlinBlock": 0, | ||
"londonBlock": 0, | ||
"terminalTotalDifficulty": 0, | ||
"terminalTotalDifficultyPassed": true, | ||
"ethash": {}, | ||
"astriaOverrideGenesisExtraData": false, | ||
"astriaSequencerInitialHeight": 283, | ||
"astriaRollupName": "astria-dusk-4-evm", | ||
"astriaCelestiaInitialHeight": 1423678, | ||
"astriaCelestiaHeightVariance": 100, | ||
"astriaBridgeAddresses": ["0x0eef997a04cafe529dccaeafa86f70fe327276b1"], | ||
"astriaBridgeAllowedAssetDenom": "nria" | ||
}, | ||
"difficulty": "10000000", | ||
"gasLimit": "8000000", | ||
"alloc": { | ||
} | ||
} |
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,13 @@ | ||
# Astria Dusknet 4 Sequencer | ||
|
||
## Software Versions | ||
|
||
| Software | Version | Links | | ||
|------------|---------|-------| | ||
| Sequencer | v0.10.1 | [Docker](http://ghcr.io/astriaorg/sequencer:0.10.1--sequencer), [Code](https://github.com/astriaorg/astria/tree/v0.10.1--sequencer/crates/astria-sequencer) | | ||
| CometBFT | v0.37.x | [Docker](http://docker.io/cometbft/cometbft:v0.37.x), [Code](https://github.com/cometbft/cometbft/tree/v0.37.x) | | ||
|
||
|
||
## Config | ||
|
||
The `timeout_commit` property for CometBFT should be set to 2s |
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,79 @@ | ||
global: | ||
useTTY: true | ||
|
||
config: | ||
sequencer: | ||
authoritySudoAddress: b89627d1d7fc8ad0b698bca1938b96ec2c18375d | ||
ibc: | ||
enabled: true | ||
inboundEnabled: true | ||
outboundEnabled: true | ||
sudoAddress: 59dd5630cf6cb06c79e56c2070d46e4c14325c3b | ||
relayerAddresses: [] | ||
genesisAccounts: | ||
- address: 3fff1c39b9d163bfb9bcbf9dfea78675f1b4bc2c | ||
balance: "340282366920938463463374607431768211455" | ||
- address: 38ccb8bd2528bce8669ff9e53a5f57c2cd86efb4 | ||
balance: "340282366920938463463374607431768211455" | ||
- address: 2e046327a2ccac7c8f8018ed44e43184b502eb3e | ||
balance: "340282366920938463463374607431768211455" | ||
- address: 8618a88a4827ad8ffb4a757048d320172f5eb245 | ||
balance: "340282366920938463463374607431768211455" | ||
- address: 0eef997a04cafe529dccaeafa86f70fe327276b1 | ||
balance: "100000000000000000000000000000000000000" | ||
|
||
# Note can enable your otel collection from sequencer | ||
otel: | ||
enabled: false | ||
endpoint: http://otel-collector.monitoring.svc.cluster.local:4317 | ||
tracesEndpoint: http://otel-collector.monitoring.svc.cluster.local:4317 | ||
tracesCompression: gzip | ||
tracesTimeout: 10 | ||
otlpHeaders: "" | ||
traceHeaders: "" | ||
|
||
# Values for CometBFT node configuration | ||
cometBFT: | ||
chainId: astria-dusk-4 | ||
validators: | ||
- name: node0 | ||
power: '1' | ||
address: 230592632006DB2733444BB6DE11DB3F4B2F9AE4 | ||
pubKey: MkFfCdvuQpfMmoQcLCMSv5A/xTxIhg14iuZglzVaWF8= | ||
- name: node1 | ||
address: 6F35496BCC8CF0EF9E2AC090FAEF578152549518 | ||
pubKey: CeKTMbL61MvTZ5hoA0hKL1REQUhejnNhEtKtSbg2Vso= | ||
power: '1' | ||
- name: node2 | ||
power: '1' | ||
address: 115F94D8C98FFD73FE65182611140F0EDC7C3C94 | ||
pubKey: lvQ6hEiSjx5YCGTWn+ROCTxagqHUqAxZCG1+Z5ds2kU= | ||
- name: node3 | ||
power: '1' | ||
address: 60B5F4FED5CDE1F43E71CD03A4ACDCABB5724455 | ||
pubKey: ixbsw2r9ME9ikcWTwWSdtk+AxNNQ4PyzOjNnyiMMe58= | ||
|
||
images: | ||
sequencer: | ||
tag: "0.10.1" | ||
|
||
storage: | ||
enabled: true | ||
local: false | ||
entities: | ||
sequencerSharedStorage: | ||
size: 1Ti | ||
|
||
# Can enable service monitor to utilize prometheus | ||
serviceMonitor: | ||
enabled: false | ||
|
||
# Ingress disabled by default. Enable RPC & Grpc at minimum to enable rollups | ||
# running against full node. | ||
ingress: | ||
rpc: | ||
enabled: false | ||
grpc: | ||
enabled: false | ||
p2p: | ||
enabled: false |
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,242 @@ | ||
# Running a Dusk 3 Sequencer Full Node | ||
|
||
> Note: This was tested on a Google Cloud Platform `c3d-standard-4` (4 vCPU, | ||
> 16GB RAM, 500GB SSD) running `debian-12-bookworm`. | ||
|
||
## Dependencies | ||
|
||
```bash | ||
sudo apt update | ||
``` | ||
|
||
### Base Dependencies & Tools | ||
|
||
```bash | ||
sudo apt install git -y | ||
sudo apt install build-essential -y | ||
sudo apt-get install libclang-dev | ||
sudo apt install curl -y | ||
sudo apt install wget -y | ||
sudo apt-get install jq -y | ||
``` | ||
|
||
### Golang | ||
|
||
Used for CometBFT | ||
|
||
> Note: make sure to install go 1.20 | ||
|
||
```bash | ||
sudo apt install golang -y | ||
export GOPATH=~/go | ||
export PATH=$PATH:$GOPATH/bin | ||
``` | ||
|
||
### Rust | ||
|
||
```bash | ||
# First, install Rust | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | ||
|
||
# Then, source the cargo environment | ||
source $HOME/.cargo/env | ||
``` | ||
|
||
## Build from Source | ||
|
||
### CometBFT | ||
|
||
```bash | ||
git clone https://github.com/cometbft/cometbft | ||
cd cometbft | ||
git checkout origin/v0.37.x | ||
export GOPATH=~/go | ||
make install | ||
cd ../ | ||
``` | ||
|
||
### Sequencer | ||
|
||
```bash | ||
git clone https://github.com/astriaorg/astria.git | ||
cd astria | ||
git checkout tags/sequencer-v0.11.1 | ||
cd crates/astria-sequencer/ | ||
cargo build --release | ||
cd ../../../ | ||
``` | ||
|
||
## Configure | ||
|
||
### Setup CometBFT `config.toml` | ||
|
||
Timeout commit needs to be set to 2s, and peers are those listed in [peers.txt](./peers.txt) | ||
|
||
```bash | ||
cometbft init | ||
sed -i'.bak' 's/timeout_commit = "1s"/timeout_commit = "2s"/g' ~/.cometbft/config/config.toml | ||
sed -i'.bak' 's/persistent_peers = ""/persistent_peers = "[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656"/g' \ | ||
~/.cometbft/config/config.toml | ||
``` | ||
|
||
You may also want to enable other settings within the config.toml, such as | ||
enabling prometheus metrics. See [CometBFT | ||
docs](https://docs.cometbft.com/v0.37/core/configuration) for more information | ||
on configuration. | ||
|
||
### Get Genesis File | ||
|
||
```bash | ||
curl -o genesis.json -s https://raw.githubusercontent.com/astriaorg/networks/main/dusk-4/sequencer/genesis.json | ||
mv genesis.json ~/.cometbft/config/genesis.json | ||
``` | ||
|
||
## Setup & Run using systemd | ||
|
||
### Setup Astria Sequencer Env Vars | ||
|
||
> ❗ Replace `/home/astria_org` **everywhere below** with the absolute path to | ||
> your home directory. `systemd` requires this to be an absolute path! | ||
|
||
#### From `/home/astria_org` | ||
|
||
```bash | ||
# Note that this .env file has some configuration you may want to change for | ||
# production, including options around otel, logging, rpc listening addresses | ||
cp ~/astria/crates/astria-sequencer/local.env.example /home/astria_org/astria-sequencer.env | ||
mkdir /home/astria_org/astria_db | ||
sed -i'.bak' 's/"\/tmp\/astria_db"/"\/home\/astria_org\/astria_db"/g' /home/astria_org/astria-sequencer.env | ||
``` | ||
|
||
### astria-sequencer.service | ||
|
||
```bash | ||
cat << 'EOF' > astria-sequencer.service | ||
[Unit] | ||
Description=astria sequencer | ||
|
||
[Service] | ||
EnvironmentFile=/home/astria_org/astria-sequencer.env | ||
ExecStart=/home/astria_org/astria/target/release/astria-sequencer | ||
|
||
# Restart service on failure | ||
Restart=on-failure | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
EOF | ||
``` | ||
|
||
### cometbft.service | ||
|
||
```bash | ||
cat << 'EOF' > cometbft.service | ||
[Unit] | ||
Description=cometbft | ||
|
||
[Service] | ||
ExecStart=/home/jordan/go/bin/cometbft start --home /home/jordan/.cometbft | ||
|
||
# Restart service on failure | ||
Restart=on-failure | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
EOF | ||
``` | ||
|
||
### Install and run Sequencer in systemd | ||
|
||
Note, sequencer app must be running before starting CometBFT | ||
|
||
```bash | ||
sudo mv astria-sequencer.service /etc/systemd/system/astria-sequencer.service | ||
sudo systemctl daemon-reload | ||
sudo systemctl enable astria-sequencer.service | ||
sudo systemctl start astria-sequencer.service | ||
``` | ||
|
||
#### Check Sequencer Status | ||
|
||
```bash | ||
sudo systemctl status astria-sequencer.service | ||
``` | ||
|
||
#### Check Sequencer Logs | ||
|
||
```bash | ||
sudo journalctl -u astria-sequencer.service | ||
``` | ||
|
||
### Install and run CometBFT in systemd | ||
|
||
```bash | ||
sudo mv cometbft.service /etc/systemd/system/cometbft.service | ||
sudo systemctl daemon-reload | ||
sudo systemctl enable cometbft.service | ||
sudo systemctl start cometbft.service | ||
``` | ||
|
||
#### Check CometBFT Status | ||
|
||
```bash | ||
sudo systemctl status cometbft.service | ||
``` | ||
|
||
#### Check CometBFT Logs | ||
|
||
```bash | ||
sudo journalctl -u cometbft.service | ||
``` | ||
|
||
## Validate | ||
|
||
### Checking for matching block hashes | ||
|
||
The first sequencer block which has a tx is `232` which has hash | ||
|
||
```bash | ||
7084394370E214292A76C7BFD68947C7FF172513390CD8683EB241C2DFC07D8E | ||
``` | ||
|
||
### Check primary sequencer node | ||
|
||
```bash | ||
curl -X GET "https://rpc.sequencer.dusk-3.devnet.astria.org/block?height=232" \ | ||
-H "accept: application/json" -s \ | ||
| jq .result.block_id.hash | ||
``` | ||
|
||
### Check your local node | ||
|
||
```bash | ||
curl -X GET "http://localhost:26657/block?height=232" \ | ||
-H "accept: application/json" -s \ | ||
| jq .result.block_id.hash | ||
``` | ||
|
||
## Via Helm Chart | ||
|
||
### Add Astria Helm Charts Repo | ||
|
||
```bash | ||
helm repo add astria https://astriaorg.github.io/charts/ | ||
``` | ||
|
||
### Pull values file to use | ||
|
||
```bash | ||
curl -o full-node-values.yaml -s https://raw.githubusercontent.com/astriaorg/networks/main/dusk-4/sequencer/full-node-values.yaml | ||
``` | ||
|
||
Note that you may want to edit this values file, by default it assumes you are | ||
installing somewhere such as a cloud provider that can create PVCs and already | ||
has default storage classes, many features for production services disabled by | ||
default. | ||
|
||
### Install | ||
|
||
```bash | ||
helm install dusk4-full-node astria/sequencer --version 0.11.2 \ | ||
--namespace astria-dusk4-node --create-namespace -f full-node-values.yaml | ||
``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.