Skip to content

Commit

Permalink
Suave node + Blockscout
Browse files Browse the repository at this point in the history
  • Loading branch information
vbaranov committed Sep 25, 2023
1 parent de12663 commit 355810d
Show file tree
Hide file tree
Showing 15 changed files with 560 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,9 @@ profile.cov
/dashboard/assets/bundle.js.map
/dashboard/assets/package-lock.json

/suave/devenv/services/blockscout-db-data
/suave/devenv/services/redis-data
/suave/devenv/services/stats-db-data

**/yarn-error.log
logs/
66 changes: 66 additions & 0 deletions suave/devenv/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,69 @@ services:
- --ws
ports:
- 8555:8545
redis_db:
extends:
file: ./services/docker-compose-redis.yml
service: redis_db

db:
extends:
file: ./services/docker-compose-db.yml
service: db

backend:
depends_on:
- db
- redis_db
extends:
file: ./services/docker-compose-backend.yml
service: backend
links:
- db:database
environment:
ETHEREUM_JSONRPC_VARIANT: geth
ETHEREUM_JSONRPC_HTTP_URL: http://host.docker.internal:8545/
ETHEREUM_JSONRPC_TRACE_URL: http://host.docker.internal:8545/
DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false
CHAIN_ID: '1337'
POOL_SIZE: 30

visualizer:
extends:
file: ./services/docker-compose-visualizer.yml
service: visualizer

sig-provider:
extends:
file: ./services/docker-compose-sig-provider.yml
service: sig-provider

frontend:
depends_on:
- backend
extends:
file: ./services/docker-compose-frontend.yml
service: frontend

stats-db:
depends_on:
- backend
extends:
file: ./services/docker-compose-stats.yml
service: stats-db

stats:
depends_on:
- stats-db
extends:
file: ./services/docker-compose-stats.yml
service: stats

proxy:
depends_on:
- backend
- frontend
- stats
extends:
file: ./services/docker-compose-nginx.yml
service: proxy
221 changes: 221 additions & 0 deletions suave/devenv/envs/common-blockscout.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
# DOCKER_TAG=
ETHEREUM_JSONRPC_VARIANT=geth
ETHEREUM_JSONRPC_HTTP_URL=http://host.docker.internal:8545/
# ETHEREUM_JSONRPC_FALLBACK_HTTP_URL=
DATABASE_URL=postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false
ETHEREUM_JSONRPC_TRACE_URL=http://host.docker.internal:8545/
# ETHEREUM_JSONRPC_FALLBACK_TRACE_URL=
# ETHEREUM_JSONRPC_HTTP_TIMEOUT=
NETWORK=
SUBNETWORK=Awesome chain
LOGO=/images/blockscout_logo.svg
# ETHEREUM_JSONRPC_WS_URL=
ETHEREUM_JSONRPC_TRANSPORT=http
ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES=false
# ETHEREUM_JSONRPC_HTTP_HEADERS=
# ETHEREUM_JSONRPC_WAIT_PER_TIMEOUT=
IPC_PATH=
NETWORK_PATH=/
BLOCKSCOUT_HOST=
BLOCKSCOUT_PROTOCOL=
SECRET_KEY_BASE=56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN
# CHECK_ORIGIN=
PORT=4000
COIN_NAME=
# METADATA_CONTRACT=
# VALIDATORS_CONTRACT=
# KEYS_MANAGER_CONTRACT=
# REWARDS_CONTRACT=
# TOKEN_BRIDGE_CONTRACT=
EMISSION_FORMAT=DEFAULT
# CHAIN_SPEC_PATH=
# SUPPLY_MODULE=
COIN=
EXCHANGE_RATES_COIN=
# EXCHANGE_RATES_MARKET_CAP_SOURCE=
# EXCHANGE_RATES_PRICE_SOURCE=
# EXCHANGE_RATES_COINGECKO_COIN_ID=
# EXCHANGE_RATES_COINGECKO_API_KEY=
# EXCHANGE_RATES_COINMARKETCAP_API_KEY=
# EXCHANGE_RATES_COINMARKETCAP_COIN_ID=
POOL_SIZE=90
# EXCHANGE_RATES_COINGECKO_PLATFORM_ID=
# TOKEN_EXCHANGE_RATE_INTERVAL=
# TOKEN_EXCHANGE_RATE_REFETCH_INTERVAL=
# TOKEN_EXCHANGE_RATE_MAX_BATCH_SIZE=
# DISABLE_TOKEN_EXCHANGE_RATE=
POOL_SIZE_API=10
ECTO_USE_SSL=false
# DATADOG_HOST=
# DATADOG_PORT=
# SPANDEX_BATCH_SIZE=
# SPANDEX_SYNC_THRESHOLD=
HEART_BEAT_TIMEOUT=30
# HEART_COMMAND=
#BLOCKSCOUT_VERSION=
RELEASE_LINK=
BLOCK_TRANSFORMER=base
# GRAPHIQL_TRANSACTION=
# BLOCK_RANGES=
# FIRST_BLOCK=
# LAST_BLOCK=
# TRACE_FIRST_BLOCK=
# TRACE_LAST_BLOCK=
# FOOTER_CHAT_LINK=
# FOOTER_FORUM_LINK_ENABLED=
# FOOTER_FORUM_LINK=
# FOOTER_TELEGRAM_LINK_ENABLED=
# FOOTER_TELEGRAM_LINK=
# FOOTER_GITHUB_LINK=
FOOTER_LOGO=/images/blockscout_logo.svg
FOOTER_LINK_TO_OTHER_EXPLORERS=false
FOOTER_OTHER_EXPLORERS={}
SUPPORTED_CHAINS={}
CACHE_BLOCK_COUNT_PERIOD=7200
CACHE_TXS_COUNT_PERIOD=7200
CACHE_ADDRESS_SUM_PERIOD=3600
CACHE_TOTAL_GAS_USAGE_PERIOD=3600
CACHE_ADDRESS_TRANSACTIONS_GAS_USAGE_COUNTER_PERIOD=1800
CACHE_TOKEN_HOLDERS_COUNTER_PERIOD=3600
CACHE_TOKEN_TRANSFERS_COUNTER_PERIOD=3600
CACHE_ADDRESS_WITH_BALANCES_UPDATE_INTERVAL=1800
CACHE_AVERAGE_BLOCK_PERIOD=1800
CACHE_MARKET_HISTORY_PERIOD=21600
CACHE_ADDRESS_TRANSACTIONS_COUNTER_PERIOD=1800
CACHE_ADDRESS_TOKENS_USD_SUM_PERIOD=3600
CACHE_ADDRESS_TOKEN_TRANSFERS_COUNTER_PERIOD=1800
TOKEN_METADATA_UPDATE_INTERVAL=172800
CONTRACT_VERIFICATION_ALLOWED_SOLIDITY_EVM_VERSIONS=homestead,tangerineWhistle,spuriousDragon,byzantium,constantinople,petersburg,istanbul,berlin,london,paris,shanghai,default
CONTRACT_VERIFICATION_ALLOWED_VYPER_EVM_VERSIONS=byzantium,constantinople,petersburg,istanbul,berlin,paris,shanghai,default
# CONTRACT_VERIFICATION_MAX_LIBRARIES=10
CONTRACT_MAX_STRING_LENGTH_WITHOUT_TRIMMING=2040
# CONTRACT_DISABLE_INTERACTION=
UNCLES_IN_AVERAGE_BLOCK_TIME=false
DISABLE_WEBAPP=false
API_V1_READ_METHODS_DISABLED=false
API_V1_WRITE_METHODS_DISABLED=false
DISABLE_INDEXER=false
DISABLE_REALTIME_INDEXER=false
INDEXER_DISABLE_TOKEN_INSTANCE_REALTIME_FETCHER=false
INDEXER_DISABLE_TOKEN_INSTANCE_RETRY_FETCHER=false
INDEXER_DISABLE_TOKEN_INSTANCE_SANITIZE_FETCHER=false
INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER=false
INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER=false
# INDEXER_CATCHUP_BLOCKS_BATCH_SIZE=
# INDEXER_CATCHUP_BLOCKS_CONCURRENCY=
# INDEXER_CATCHUP_BLOCK_INTERVAL=
# INDEXER_INTERNAL_TRANSACTIONS_BATCH_SIZE=
# INDEXER_INTERNAL_TRANSACTIONS_CONCURRENCY=
# INDEXER_BLOCK_REWARD_BATCH_SIZE=
# INDEXER_BLOCK_REWARD_CONCURRENCY=
# INDEXER_TOKEN_INSTANCE_RETRY_REFETCH_INTERVAL=
# INDEXER_TOKEN_INSTANCE_RETRY_CONCURRENCY=
# INDEXER_TOKEN_INSTANCE_REALTIME_CONCURRENCY=
# INDEXER_TOKEN_INSTANCE_SANITIZE_CONCURRENCY=
# INDEXER_COIN_BALANCES_BATCH_SIZE=
# INDEXER_COIN_BALANCES_CONCURRENCY=
# INDEXER_RECEIPTS_BATCH_SIZE=
# INDEXER_RECEIPTS_CONCURRENCY=
# INDEXER_TOKEN_CONCURRENCY=
# INDEXER_TOKEN_BALANCES_BATCH_SIZE=
# INDEXER_TOKEN_BALANCES_CONCURRENCY=
# INDEXER_TX_ACTIONS_ENABLE=
# INDEXER_TX_ACTIONS_MAX_TOKEN_CACHE_SIZE=
# INDEXER_TX_ACTIONS_REINDEX_FIRST_BLOCK=
# INDEXER_TX_ACTIONS_REINDEX_LAST_BLOCK=
# INDEXER_TX_ACTIONS_REINDEX_PROTOCOLS=
# INDEXER_TX_ACTIONS_AAVE_V3_POOL_CONTRACT=
# INDEXER_REALTIME_FETCHER_MAX_GAP=
# INDEXER_FETCHER_INIT_QUERY_LIMIT=
# INDEXER_TOKEN_BALANCES_FETCHER_INIT_QUERY_LIMIT=
# INDEXER_DISABLE_WITHDRAWALS_FETCHER=
# WITHDRAWALS_FIRST_BLOCK=
# TOKEN_ID_MIGRATION_FIRST_BLOCK=
# TOKEN_ID_MIGRATION_CONCURRENCY=
# TOKEN_ID_MIGRATION_BATCH_SIZE=
# INDEXER_INTERNAL_TRANSACTIONS_TRACER_TYPE=
# WEBAPP_URL=
# API_URL=
SHOW_ADDRESS_MARKETCAP_PERCENTAGE=true
CHECKSUM_ADDRESS_HASHES=true
CHECKSUM_FUNCTION=eth
DISABLE_EXCHANGE_RATES=true
TXS_STATS_ENABLED=true
SHOW_PRICE_CHART=false
SHOW_PRICE_CHART_LEGEND=false
SHOW_TXS_CHART=true
TXS_HISTORIAN_INIT_LAG=0
TXS_STATS_DAYS_TO_COMPILE_AT_INIT=10
COIN_BALANCE_HISTORY_DAYS=90
APPS_MENU=true
EXTERNAL_APPS=[]
# GAS_PRICE=
# RESTRICTED_LIST=
# RESTRICTED_LIST_KEY=
SHOW_MAINTENANCE_ALERT=false
MAINTENANCE_ALERT_MESSAGE=
SOURCIFY_INTEGRATION_ENABLED=false
SOURCIFY_SERVER_URL=
SOURCIFY_REPO_URL=
CHAIN_ID=
MAX_SIZE_UNLESS_HIDE_ARRAY=50
HIDE_BLOCK_MINER=false
DISPLAY_TOKEN_ICONS=false
SHOW_TENDERLY_LINK=false
TENDERLY_CHAIN_PATH=
RE_CAPTCHA_SECRET_KEY=
RE_CAPTCHA_CLIENT_KEY=
RE_CAPTCHA_V3_SECRET_KEY=
RE_CAPTCHA_V3_CLIENT_KEY=
RE_CAPTCHA_DISABLED=false
JSON_RPC=
#API_RATE_LIMIT_DISABLED=true
API_RATE_LIMIT_TIME_INTERVAL=1s
API_RATE_LIMIT_BY_IP_TIME_INTERVAL=5m
API_RATE_LIMIT=50
API_RATE_LIMIT_BY_KEY=50
API_RATE_LIMIT_BY_WHITELISTED_IP=50
API_RATE_LIMIT_WHITELISTED_IPS=
API_RATE_LIMIT_STATIC_API_KEY=
API_RATE_LIMIT_UI_V2_WITH_TOKEN=5
API_RATE_LIMIT_BY_IP=3000
# API_RATE_LIMIT_HAMMER_REDIS_URL=redis://redis_db:6379/1
# API_RATE_LIMIT_IS_BLOCKSCOUT_BEHIND_PROXY=false
API_RATE_LIMIT_UI_V2_TOKEN_TTL_IN_SECONDS=18000
FETCH_REWARDS_WAY=trace_block
MICROSERVICE_SC_VERIFIER_ENABLED=true
#MICROSERVICE_SC_VERIFIER_URL=http://smart-contract-verifier:8050/
#MICROSERVICE_SC_VERIFIER_TYPE=sc_verifier
MICROSERVICE_SC_VERIFIER_URL=https://eth-bytecode-db.services.blockscout.com/
MICROSERVICE_SC_VERIFIER_TYPE=eth_bytecode_db
MICROSERVICE_ETH_BYTECODE_DB_INTERVAL_BETWEEN_LOOKUPS=10m
MICROSERVICE_VISUALIZE_SOL2UML_ENABLED=true
MICROSERVICE_VISUALIZE_SOL2UML_URL=http://visualizer:8050/
MICROSERVICE_SIG_PROVIDER_ENABLED=true
MICROSERVICE_SIG_PROVIDER_URL=http://sig-provider:8050/
DECODE_NOT_A_CONTRACT_CALLS=true
# DATABASE_READ_ONLY_API_URL=
# ACCOUNT_DATABASE_URL=
# ACCOUNT_POOL_SIZE=
# ACCOUNT_AUTH0_DOMAIN=
# ACCOUNT_AUTH0_CLIENT_ID=
# ACCOUNT_AUTH0_CLIENT_SECRET=
# ACCOUNT_PUBLIC_TAGS_AIRTABLE_URL=
# ACCOUNT_PUBLIC_TAGS_AIRTABLE_API_KEY=
# ACCOUNT_SENDGRID_API_KEY=
# ACCOUNT_SENDGRID_SENDER=
# ACCOUNT_SENDGRID_TEMPLATE=
ACCOUNT_CLOAK_KEY=
ACCOUNT_ENABLED=false
ACCOUNT_REDIS_URL=redis://redis_db:6379
# MIXPANEL_TOKEN=
# MIXPANEL_URL=
# AMPLITUDE_API_KEY=
# AMPLITUDE_URL=
EIP_1559_ELASTICITY_MULTIPLIER=2
# API_SENSITIVE_ENDPOINTS_KEY=
# ACCOUNT_VERIFICATION_EMAIL_RESEND_INTERVAL=
# INDEXER_TOKEN_INSTANCE_RETRY_BATCH_SIZE=10
# INDEXER_TOKEN_INSTANCE_REALTIME_BATCH_SIZE=1
# INDEXER_TOKEN_INSTANCE_SANITIZE_BATCH_SIZE=10
API_V2_ENABLED=true
16 changes: 16 additions & 0 deletions suave/devenv/envs/common-frontend.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
NEXT_PUBLIC_API_HOST=localhost
NEXT_PUBLIC_API_PROTOCOL=http
NEXT_PUBLIC_STATS_API_HOST=http://localhost:8080
NEXT_PUBLIC_NETWORK_NAME=Suave Devnet
NEXT_PUBLIC_NETWORK_SHORT_NAME=Suave Devnet
NEXT_PUBLIC_NETWORK_ID=5
NEXT_PUBLIC_NETWORK_CURRENCY_NAME=Ether
NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL=ETH
NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS=18
NEXT_PUBLIC_API_BASE_PATH=/
NEXT_PUBLIC_APP_HOST=localhost
NEXT_PUBLIC_APP_PROTOCOL=http
NEXT_PUBLIC_HOMEPAGE_CHARTS=['daily_txs']
NEXT_PUBLIC_VISUALIZE_API_HOST=http://localhost:8081
NEXT_PUBLIC_IS_TESTNET=true
NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL=ws
27 changes: 27 additions & 0 deletions suave/devenv/envs/common-stats.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Those are examples of existing configuration variables and their default values.
# When uncommented, they would overwrite corresponding values from `base.toml`
# configuration file.

STATS__SERVER__HTTP__ENABLED=true
STATS__SERVER__HTTP__ADDR=0.0.0.0:8050
STATS__SERVER__HTTP__MAX_BODY_SIZE=2097152

STATS__SERVER__GRPC__ENABLED=false
STATS__SERVER__GRPC__ADDR=0.0.0.0:8051

STATS__DB_URL=
STATS__BLOCKSCOUT_DB_URL=
STATS__CREATE_DATABASE=false
STATS__RUN_MIGRATIONS=false
STATS__DEFAULT_SCHEDULE=0 0 1 * * * *
STATS__FORCE_UPDATE_ON_START=false

STATS__METRICS__ENABLED=false
STATS__METRICS__ADDR=0.0.0.0:6060
STATS__METRICS__ROUTE=/metrics

STATS__JAEGER__ENABLED=false
STATS__JAEGER__AGENT_ENDPOINT=localhost:6831

STATS__TRACING__ENABLED=true
STATS__TRACING__FORMAT=default
1 change: 1 addition & 0 deletions suave/devenv/envs/common-visualizer.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VISUALIZER__SERVER__GRPC__ENABLED=false
Loading

0 comments on commit 355810d

Please sign in to comment.