Merge branch 'main' of github.com:cventastic/POKT_DOKT

This commit is contained in:
cventastic
2022-10-19 12:50:58 +02:00
12 changed files with 335 additions and 0 deletions

60
dshackle.yml Normal file
View File

@@ -0,0 +1,60 @@
version: '3.1'
services:
dshackle:
image: emeraldpay/dshackle:0.13.1
restart: unless-stopped
volumes:
- ./dshackle/config:/etc/dshackle # This should hold all your yaml files
expose:
- 8080 # /eth
- 8081 # /metrics
- 8082 # healthcheck
- 2449 # grpc
networks:
- chains
ports:
- "127.0.0.1:8082:8082" # healthcheck
environment:
- ALCHEMY_KEY=${ALCHEMY_KEY}
- ANYBLOCK_KEY=${ANYBLOCK_KEY}
- CHAINSTACK_NODE=${CHAINSTACK_NODE}
- CHAINSTACK_USERNAME=${CHAINSTACK_USERNAME}
- CHAINSTACK_PASSWORD=${CHAINSTACK_PASSWORD}
- COINBASE_USERNAME=${COINBASE_USERNAME}
- COINBASE_PASSWORD=${COINBASE_PASSWORD}
- INFURA_KEY=${INFURA_KEY}
- RIVET_KEY=${RIVET_KEY}
- QUICKNODE_HTTP=${QUICKNODE_HTTP}
- QUICKNODE_WSS=${QUICKNODE_WSS}
labels:
- "prometheus-scrape.enabled=true"
- "prometheus-scrape.port=8081"
- "prometheus-scrape.job_name=dshackle"
- "prometheus-scrape.metrics_path=/metrics"
- "traefik.enable=true"
- "traefik.http.middlewares.dshackle-stripprefix.stripprefix.prefixes=/dshackle"
# - "traefik.http.middlewares.shackle-replacepath.replacepath.path=/eth"
- "traefik.http.services.dshackle.loadbalancer.server.port=8080"
- "traefik.http.routers.dshackle.entrypoints=websecure"
- "traefik.http.routers.dshackle.tls.certresolver=myresolver"
- "traefik.http.routers.dshackle.rule=Host(`$DOMAIN`) && PathPrefix(`/dshackle`)"
# - "traefik.http.routers.dshackle.middlewares=dshackle-stripprefix, dshackle-replacepath, ipwhitelist"
- "traefik.http.routers.dshackle.middlewares=dshackle-stripprefix, ipwhitelist"
redis:
image: healthcheck/redis:alpine
restart: unless-stopped
networks:
- chains
environment:
- REDIS_RAM=${REDIS_RAM}
command:
- "redis-server"
- "--maxmemory ${REDIS_RAM}"
- "--maxmemory-policy allkeys-lru"
- '--save ""'

View File

@@ -0,0 +1,41 @@
upstreams:
- id: alchemy
chain: ethereum
role: fallback
priority: 90
options:
disable-validation: false
validate-peers: false
validate-syncing: true
methods:
enabled:
# Manually Enabled
- name: alchemy_getAssetTransfers
- name: alchemy_getTokenAllowance
- name: alchemy_getTokenBalances
- name: alchemy_getTokenMetadata
- name: eth_getFilterChanges
- name: eth_getFilterLogs
- name: eth_maxPriorityFeePerGas
- name: eth_newBlockFilter
- name: eth_newFilter
- name: eth_newPendingTransactionFilter
- name: eth_subscribe
- name: eth_uninstallFilter
- name: eth_unsubscribe
- name: trace_block
- name: trace_call
- name: trace_callMany
- name: trace_filter
- name: trace_get
- name: trace_rawTransaction
- name: trace_replayBlockTransactions
- name: trace_replayTransaction
- name: trace_transaction
connection:
ethereum:
rpc:
url: "https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_KEY}"
ws:
url: "wss://eth-mainnet.ws.alchemyapi.io/v2/${ALCHEMY_KEY}"

14
dshackle/config/ankr.yaml Normal file
View File

@@ -0,0 +1,14 @@
upstreams:
- id: ankr
chain: ethereum
role: fallback
priority: 80
options:
disable-validation: false
validate-peers: false
validate-syncing: true
connection:
ethereum:
rpc:
url: "https://rpc.ankr.com/eth"

View File

@@ -0,0 +1,14 @@
upstreams:
- id: anyblock
chain: ethereum
role: fallback
priority: 70
options:
disable-validation: false
validate-peers: false
validate-syncing: true
connection:
ethereum:
rpc:
url: "https://api.anyblock.tools/ethereum/ethereum/mainnet/rpc/${ANYBLOCK_KEY}"

View File

@@ -0,0 +1,14 @@
upstreams:
- id: avado
chain: ethereum
role: fallback
priority: 60
options:
disable-validation: false
validate-peers: false
validate-syncing: true
connection:
ethereum:
rpc:
url: "https://mainnet.eth.cloud.ava.do"

View File

@@ -0,0 +1,22 @@
upstreams:
- id: chainstack
chain: ethereum
role: fallback
priority: 50
options:
disable-validation: false
validate-peers: false
validate-syncing: true
connection:
ethereum:
rpc:
url: "https://${CHAINSTACK_NODE}.p2pify.com"
basic-auth:
username: ${CHAINSTACK_USERNAME}
password: ${CHAINSTACK_PASSWORD}
ws:
url: "wss://ws-${CHAINSTACK_NODE}.p2pify.com"
basic-auth:
username: ${CHAINSTACK_USERNAME}
password: ${CHAINSTACK_PASSWORD}

View File

@@ -0,0 +1,14 @@
upstreams:
- id: cloudflare
chain: ethereum
role: fallback
priority: 40
options:
disable-validation: false
validate-peers: false
validate-syncing: true
connection:
ethereum:
rpc:
url: "https://cloudflare-eth.com"

View File

@@ -0,0 +1,31 @@
upstreams:
- id: coinbase
chain: ethereum
role: secondary
priority: 30
labels:
provider: geth
archive: false
options:
disable-validation: false
validate-peers: false
validate-syncing: true
methods:
enabled:
# Manually Enabled
- name: coinbaseCloud_getBalances
- name: coinbaseCloud_getSingleBalance
- name: coinbaseCloud_getTokenAllowances
- name: coinbaseCloud_getTransactionByHash
- name: coinbaseCloud_getTransactionsByAddress
- name: coinbaseCloud_getTokenTransfersByAddress
- name: coinbaseCloud_getTokenMetadata
- name: coinbaseCloud_getTokenStandardEvents
connection:
ethereum:
rpc:
url: "https://mainnet.ethereum.coinbasecloud.net"
basic-auth:
username: ${COINBASE_USERNAME}
password: ${COINBASE_PASSWORD}

View File

@@ -0,0 +1,64 @@
host: 0.0.0.0
port: 2449
tls:
enabled: false
monitoring:
enabled: true
jvm: false
extended: false
prometheus:
enabled: true
bind: 0.0.0.0
port: 8081
path: /metrics
health:
port: 8082
host: 0.0.0.0
path: /health
blockchains:
- chain: ethereum
min-available: 1
cache:
redis:
enabled: true
host: redis
password: ""
proxy:
host: 0.0.0.0
port: 8080
tls:
enabled: false
routes:
- id: eth
blockchain: ethereum
cluster:
defaults:
- chains:
- ethereum
options:
min-peers: 10
include:
# Private Nodes
#- "besu.yaml"
#- "geth.yaml"
#- "nethermind.yaml"
#- "erigon.yaml"
# Freemium Nodes
- "alchemy.yaml"
- "anyblock.yaml"
- "chainstack.yaml"
- "coinbase.yaml"
- "infura.yaml"
- "quicknode.yaml"
- "rivet.yaml"
# Public Nodes
- "cloudflare.yaml"
- "avado.yaml"
- "ankr.yaml"

View File

@@ -0,0 +1,16 @@
upstreams:
- id: infura
chain: ethereum
role: fallback
priority: 20
options:
disable-validation: false
validate-peers: false
validate-syncing: true
connection:
ethereum:
rpc:
url: "https://mainnet.infura.io/v3/${INFURA_KEY}"
ws:
url: "wss://mainnet.infura.io/ws/v3/${INFURA_KEY}"

View File

@@ -0,0 +1,29 @@
upstreams:
- id: quicknode
chain: ethereum
role: fallback
priority: 140
options:
disable-validation: false
validate-peers: false
validate-syncing: true
methods:
enabled:
# Manually Enabled
- name: qn_broadcastRawTransaction
- name: qn_fetchNFTCollectionDetails
- name: qn_fetchNFTs
- name: qn_fetchNFTsByCollection
- name: qn_getTokenMetadataByContractAddress
- name: qn_getTokenMetadataBySymbol
- name: qn_getTransfersByNFT
- name: qn_getWalletTokenBalance
- name: qn_getWalletTokenTransactions
- name: qn_verifyNFTsOwner
connection:
ethereum:
rpc:
url: "${QUICKNODE_HTTP}"
ws:
url: "${QUICKNODE_WSS}"

View File

@@ -0,0 +1,16 @@
upstreams:
- id: rivet
chain: ethereum
role: fallback
priority: 10
options:
disable-validation: false
validate-peers: false
validate-syncing: true
connection:
ethereum:
rpc:
url: "https://${RIVET_KEY}.eth.rpc.rivet.cloud"
ws:
url: "wss://${RIVET_KEY}.eth.ws.rivet.cloud"