diff --git a/ripple/mainnet/rippled.cfg b/ripple/mainnet/rippled.cfg new file mode 100644 index 00000000..b9317bb0 --- /dev/null +++ b/ripple/mainnet/rippled.cfg @@ -0,0 +1,86 @@ +[server] +port_rpc_admin_local +port_ws_public + +# port_peer +# port_ws_admin_local +# ssl_key = /etc/ssl/private/server.key +# ssl_cert = /etc/ssl/certs/server.crt + +[port_rpc_admin_local] +port = 5005 +ip = 127.0.0.1 +admin = 127.0.0.1 +protocol = http + +[port_ws_public] +port = 8545 +ip = 0.0.0.0 +protocol = ws + +# [port_peer] +# port = 51235 +# ip = 0.0.0.0 +# protocol = peer + +# [port_ws_admin_local] +# port = 6006 +# ip = 127.0.0.1 +# admin = 127.0.0.1 +# protocol = ws + +[node_size] +small + +# tiny +# small +# medium +# large +# huge + +[node_db] +type=NuDB +path=/var/lib/rippled/db/nudb +advisory_delete=0 + +# How many ledgers do we want to keep (history)? +# Integer value that defines the number of ledgers +# between online deletion events +online_delete=256 + +[ledger_history] +# How many ledgers do we want to keep (history)? +# Integer value (ledger count) +# or (if you have lots of TB SSD storage): 'full' +256 + +[database_path] +/var/lib/rippled/db + +[debug_logfile] +/var/lib/rippled/db/debug.log + +[sntp_servers] +time.windows.com +time.apple.com +time.nist.gov +pool.ntp.org + +[ips] +r.ripple.com 51235 + +[validators_file] +validators.txt + +[rpc_startup] +{ "command": "log_level", "severity": "info" } + +# severity (order: lots of information .. only errors) +# debug +# info +# warn +# error +# fatal + +[ssl_verify] +1 \ No newline at end of file diff --git a/ripple/mainnet/validators.txt b/ripple/mainnet/validators.txt new file mode 100644 index 00000000..6645118c --- /dev/null +++ b/ripple/mainnet/validators.txt @@ -0,0 +1,5 @@ +[validator_list_sites] + https://vl.ripple.com + +[validator_list_keys] + ED2677ABFFD1B33AC6FBC3062B71F1E8397C1505E1C42C64D11AD1B28FF73F4734 \ No newline at end of file diff --git a/ripple/rippled/ripple-mainnet-rippled-pruned-nudb.yml b/ripple/rippled/ripple-mainnet-rippled-pruned-nudb.yml new file mode 100644 index 00000000..c9338f15 --- /dev/null +++ b/ripple/rippled/ripple-mainnet-rippled-pruned-nudb.yml @@ -0,0 +1,97 @@ +--- + +# 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:ripple/rippled/ripple-mainnet-rippled-pruned-nudb.yml +# +# docker compose up -d +# +# curl -X POST https://${IP}.traefik.me/ripple-mainnet \ +# -H "Content-Type: application/json" \ +# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' +x-logging-defaults: &logging-defaults + driver: json-file + options: + max-size: 10m + max-file: '3' + +services: + ripple-mainnet: + image: ${RIPPLE_RIPPLED_IMAGE:-xrpllabsofficial/xrpld}:${RIPPLE_MAINNET_RIPPLED_VERSION:-2.4.0} + 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: + - 13331:13331 + - 13331:13331/udp + expose: + - 8545 + restart: unless-stopped + stop_grace_period: 5m + networks: + - chains + volumes: + - ${RIPPLE_MAINNET_RIPPLED_PRUNED_NUDB_DATA:-ripple-mainnet-rippled-pruned-nudb}:/var/lib/rippled/db + - ./ripple/mainnet:/config + - /slowdisk:/slowdisk + logging: *logging-defaults + labels: + - prometheus-scrape.enabled=false + - traefik.enable=true + - traefik.http.middlewares.ripple-mainnet-rippled-pruned-nudb-stripprefix.stripprefix.prefixes=/ripple-mainnet + - traefik.http.services.ripple-mainnet-rippled-pruned-nudb.loadbalancer.server.port=8545 + - ${NO_SSL:-traefik.http.routers.ripple-mainnet-rippled-pruned-nudb.entrypoints=websecure} + - ${NO_SSL:-traefik.http.routers.ripple-mainnet-rippled-pruned-nudb.tls.certresolver=myresolver} + - ${NO_SSL:-traefik.http.routers.ripple-mainnet-rippled-pruned-nudb.rule=Host(`$DOMAIN`) && (Path(`/ripple-mainnet`) || Path(`/ripple-mainnet/`))} + - ${NO_SSL:+traefik.http.routers.ripple-mainnet-rippled-pruned-nudb.rule=Path(`/ripple-mainnet`) || Path(`/ripple-mainnet/`)} + - traefik.http.routers.ripple-mainnet-rippled-pruned-nudb.middlewares=ripple-mainnet-rippled-pruned-nudb-stripprefix, ipallowlist + +volumes: + ripple-mainnet-rippled-pruned-nudb: + +x-upstreams: + - id: $${ID} + labels: + provider: $${PROVIDER} + connection: + generic: + rpc: + url: $${RPC_URL} + ws: + frameSize: 20Mb + msgSize: 50Mb + url: $${WS_URL} + chain: ripple + method-groups: + enabled: + - debug + - filter + methods: + disabled: + enabled: + - name: txpool_content # TODO: should be disabled for rollup nodes +... \ No newline at end of file