fix
This commit is contained in:
@@ -15,17 +15,32 @@ NAT_STRING="${IP}:${P2P_PORT:-55696}"
|
|||||||
|
|
||||||
env
|
env
|
||||||
|
|
||||||
if seid init ${MONIKER} --chain-id ${CHAIN_SPEC:-sei} --home $HOME_DIR/; then
|
if seid init ${MONIKER} --chain-id ${CHAIN_SPEC:-pacific} --home $HOME_DIR/; then
|
||||||
|
|
||||||
# somehow it's better to make home static to /root
|
# somehow it's better to make home static to /root
|
||||||
sed -i 's|~/|/root/|g' "$CONFIG_DIR/config.toml"
|
sed -i 's|~/|/root/|g' "$CONFIG_DIR/config.toml"
|
||||||
sed -i 's|~/|/root/|g' "$CONFIG_DIR/app.toml"
|
sed -i 's|~/|/root/|g' "$CONFIG_DIR/app.toml"
|
||||||
|
|
||||||
sed -i 's/minimum-gas-prices = ""/minimum-gas-prices = "0.01usei"/g' $CONFIG_DIR/app.toml
|
sed -i 's/minimum-gas-prices = ""/minimum-gas-prices = "0.01usei"/g' $CONFIG_DIR/app.toml
|
||||||
|
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $CONFIG_DIR/app.toml
|
||||||
|
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $CONFIG_DIR/app.toml
|
||||||
|
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"19\"/" $CONFIG_DIR/app.toml
|
||||||
|
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $CONFIG_DIR/config.toml
|
||||||
else
|
else
|
||||||
echo "Already initialized, continuing!" >&2
|
echo "Already initialized, continuing!" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
seid tendermint unsafe-reset-all --home $HOME_DIR
|
||||||
|
STATYSYNC_RPC=https://sei-rpc.stakeme.pro:443
|
||||||
|
LATEST_HEIGHT=$(curl -s $STATYSYNC_RPC/block | jq -r .block.header.height)
|
||||||
|
BLOCK_HEIGHT=$((LATEST_HEIGHT - 10000))
|
||||||
|
TRUST_HASH=$(curl -s "$STATYSYNC_RPC/block?height=$BLOCK_HEIGHT" | jq -r .block_id.hash)
|
||||||
|
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
|
||||||
|
s|^(rpc-servers[[:space:]]+=[[:space:]]+).*$|\1\"$STATYSYNC_RPC,$STATYSYNC_RPC\"| ; \
|
||||||
|
s|^(trust-height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
|
||||||
|
s|^(trust-hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ; \
|
||||||
|
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $CONFIG_DIR/config.toml
|
||||||
|
|
||||||
# apply a port change to the config
|
# apply a port change to the config
|
||||||
sed -i "/^\[p2p\]/,/^\[/{s|^laddr = .*|laddr = \"$P2P_STRING\"|}" "$CONFIG_DIR/config.toml"
|
sed -i "/^\[p2p\]/,/^\[/{s|^laddr = .*|laddr = \"$P2P_STRING\"|}" "$CONFIG_DIR/config.toml"
|
||||||
#sed -i "s/^laddr = \".*\"/laddr = \"$P2P_STRING\"/" "$CONFIG_DIR/config.toml"
|
#sed -i "s/^laddr = \".*\"/laddr = \"$P2P_STRING\"/" "$CONFIG_DIR/config.toml"
|
||||||
@@ -42,4 +57,4 @@ if [ ! -e $HOME_DIR/data/priv_validator_state.json ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec seid start --chain-id ${CHAIN_SPEC:-sei} --home $HOME_DIR $@
|
exec seid start --chain-id ${CHAIN_SPEC:-pacific} --home $HOME_DIR $@
|
||||||
|
|||||||
106
sei/sei/sei-pacific-sei-pruned.yml
Normal file
106
sei/sei/sei-pacific-sei-pruned.yml
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:sei/sei/sei-pacific-sei-pruned.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/sei-pacific-sei-pruned \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
sei-pacific-sei-pruned:
|
||||||
|
build:
|
||||||
|
context: ./sei
|
||||||
|
dockerfile: sei.Dockerfile
|
||||||
|
args:
|
||||||
|
SEI_VERSION: ${SEI_PACIFIC_SEI_VERSION:-v6.1.9}
|
||||||
|
SEI_IMAGE: ${SEI_PACIFIC_SEI_IMAGE:-ghcr.io/sei-protocol/sei}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
ports:
|
||||||
|
- 13490:13490
|
||||||
|
- 13490:13490/udp
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
environment:
|
||||||
|
- IP=${IP}
|
||||||
|
- MONIKER=d${DOMAIN:-local}
|
||||||
|
- P2P_PORT=13490
|
||||||
|
- PERSISTENT_PEERS=${SEI_PACIFIC_SEI_PEERS:-73564ea538971a3f16e6fb1a1295471084011ffd@sei-peer.stakeme.pro:50656,0bdf3a158189084846e96632834b7311d9bf03af@138.201.254.93:26656,cf2e067244b43b8a4c16162f3c6e3c5d4b03d903@65.108.197.163:28656,5f85915e54a19f4c24b16cd1faf952a792edbed8@167.235.184.20:26656,9ebc2f815ef66ec895f8d766e927be69aae0c336@52.195.241.204:26656,bbf11b8b91d79763624540ffa511dfdc5bcb4a2e@54.193.193.143:26656,61c6035b61100f770b66cecf4dcf212b05dd3dfb@18.136.181.19:26656,39d87fefafb124bc149dbaa19954938221b45b57@3.22.36.5:2665,05d4f9a1d90c1134c8aa554e85c8a9d21456f979@65.109.48.230:30903,61e9bd60e82b02553d95a336cfd80ce16507e197@135.181.238.246:26656,1ded27ddee4b66f2fe63a7845aa9bba45788e4fd@65.109.27.253:26009,c36522c8cf7ea693df35127cd665a02900d80dd8@23.88.72.46:26656,c5d5245ee463479d0e26cafb46415fa571fe610d@23.88.72.49:26656,a2b18cc7ebee891217a9ba1ab4b28aa6bcd0c900@116.202.151.86:26656,94ee3a978c76ece50835a04d9afbcc159df77a8d@52.29.199.115:26656,b6db619855e10cc6273c8c767bd875e00fbe0daf@18.220.152.31:26656,31a4b094e3d346dac0e7b50819a4c24ef30f0f96@167.235.177.168:26656,14cad965b6abfe20a2359ae62df09fc26c8563c3@45.250.255.157:26656,616c05e9ba24acc89c0de630b5e3adbedaebb478@3.127.148.7:26656,b21279d7092fde2e41770832a1cacc7d0051e9dc@18.193.124.84:26656,6eca6ec92d51c31189e909c50c91cecb0eefa7c8@3.75.235.199:26656,a59abc9ae84afa16576b60ceabdf44aa785fe6d6@54.93.67.226:26656}
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${SEI_PACIFIC_SEI_PRUNED_DATA:-sei-pacific-sei-pruned}:/root/.sei
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=false
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.sei-pacific-sei-pruned-stripprefix.stripprefix.prefixes=/sei-pacific-sei-pruned
|
||||||
|
- traefik.http.services.sei-pacific-sei-pruned.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.sei-pacific-sei-pruned.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.sei-pacific-sei-pruned.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.sei-pacific-sei-pruned.rule=Host(`$DOMAIN`) && (Path(`/sei-pacific-sei-pruned`) || Path(`/sei-pacific-sei-pruned/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.sei-pacific-sei-pruned.rule=Path(`/sei-pacific-sei-pruned`) || Path(`/sei-pacific-sei-pruned/`)}
|
||||||
|
- traefik.http.routers.sei-pacific-sei-pruned.middlewares=sei-pacific-sei-pruned-stripprefix, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
sei-pacific-sei-pruned:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: sei
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
...
|
||||||
Reference in New Issue
Block a user