Skip to main content

Configuration

Syncer has a default configuration that works in local development (src/utils/config). To overwrite it you can a json configuration file or ENV variables:

Environment VariableDescription
SYNCER_IS_DEVELOPMENTTrue for local development
SYNCER_REST_LISTEN_ADDRESSPrometheus rest server address
SYNCER_STOP_TIMEOUTMax time for stopping main task
SYNCER_LOG_LEVELLog level
SYNCER_ARWEAVE_NODE_URLArweave gateway url, default https://arweave.net
SYNCER_ARWEAVE_REQUEST_TIMEOUTMax time for a request to arweave node
SYNCER_ARWEAVE_CHECK_PEER_TIMEOUTMax time for peer to respond. Above this peer is considered unstable and is blacklisted
SYNCER_ARWEAVE_DIALER_TIMEOUTMax time to dial
SYNCER_ARWEAVE_DIALER_KEEP_ALIVETCP keep alive period
SYNCER_ARWEAVE_IDLE_CONN_TIMEOUTMax time a connetion may be idle
SYNCER_ARWEAVE_TLS_HANDSHAKE_TIMEOUTMax time for the TLS handshake
SYNCER_ARWEAVE_LIMITER_INTERVALRate limiter interval
SYNCER_ARWEAVE_LIMITER_BURST_SIZERate limiter burst size
SYNCER_ARWEAVE_LIMITER_DECREASE_FACTORAutomatic modification of the rate limiter (not used for now)
SYNCER_ARWEAVE_LIMITER_DECREASE_INTERVALAutomatic modification of the rate limiter (not used for now)
SYNCER_PEER_MONITOR_MAX_TIME_BLACKLISTEDMax time a peer may be blacklisted. After this time peer may be removed and rechecked.
SYNCER_PEER_MONITOR_MAX_PEERS_REMOVED_FROM_BLACKLISTMax number of peers removed from the blacklist in one batch
SYNCER_PEER_MONITOR_PERIODHow often are peers monitored
SYNCER_PEER_MONITOR_MAX_PEERSMax number of peers. Peers are used to vote for new blocks and for retrying requests
SYNCER_PEER_MONITOR_NUM_WORKERSHow many goroutines are used to send monitor requests to peers
SYNCER_PEER_MONITOR_WORKER_QUEUE_SIZEMax numer of payloads stored in the worker queue before sending new one blocks
SYNCER_TRANSACTION_DOWNLOADER_NUM_WORKERSMax number of workers used to download Arweave transactions
SYNCER_TRANSACTION_DOWNLOADER_WORKER_QUEUE_SIZEQueue size for downloading Arweave transactions
SYNCER_NETWORK_MONITOR_PERIODHow often is the /info endpoint requested
SYNCER_NETWORK_MONITOR_REQUIRED_CONFIRMATION_BLOCKSDelay in Arweave block height that is emited
SYNCER_NETWORK_MONITOR_URLEndpoint for requesting /info
SYNCER_SYNCER_BLOCK_MAX_ELAPSED_TIMEMax time to download an Arweave block
SYNCER_SYNCER_BLOCK_MAX_INTERVALMax time between retrying block download
SYNCER_SYNCER_TRANSACTION_MAX_ELAPSED_TIMEMax time to download Arweave transactions
SYNCER_SYNCER_TRANSACTION_MAX_INTERVALMax time between retrying transaction download
SYNCER_SYNCER_STORE_BATCH_SIZEBatch size for when saving interactions to the database
SYNCER_SYNCER_STORE_MAX_TIME_IN_QUEUEMax time an interaction may wait before being inserted to the database. This is used to minimize transaction number when synchronizing many blocks
SYNCER_SYNCER_STORE_MAX_BACKOFF_INTERVALBackoff interval when upon error when inserting interactions
SYNCER_BUNDLER_POLLER_DISABLEDIs the polling mechanizm switched on for getting new interactions for bundling
SYNCER_BUNDLER_POLLER_INTERVALHow often does if check for new bundles in the database
SYNCER_BUNDLER_POLLER_TIMEOUTHow long does it wait for the query response
SYNCER_BUNDLER_POLLER_MAX_PARALLEL_QUERIESMax queries that run in parallel
SYNCER_BUNDLER_POLLER_MAX_BATCH_SIZEMaksimum number of interactions updated in the database in one db transaction
SYNCER_BUNDLER_POLLER_RETRY_BUNDLE_AFTERRetry sending bundles to bundlr.network
SYNCER_BUNDLER_POLLER_MAX_DOWNLOADED_BATCH_SIZEMaksimum number of interactions selected from the database in one db transaction
SYNCER_BUNDLER_WORKER_POOL_QUEUE_SIZE
SYNCER_BUNDLER_DB_POLLER_INTERVAL
SYNCER_BUNDLER_NOTIFIER_DISABLEDIs the notification mechanism switched on for getting new interactions for bundling
SYNCER_BUNDLER_NOTIFIER_WORKER_POOL_SIZEMax number of workers that handle notifications
SYNCER_BUNDLER_NOTIFIER_WORKER_QUEUE_SIZEMax number of notifications waiting in the queue
SYNCER_BUNDLER_CONFIRMER_BATCH_SIZEHow many batches are confirmet in one transaction. Many bundles may be marked in one db transaction.
SYNCER_BUNDLER_CONFIRMER_INTERVALHow often are bundle states updated in the database
SYNCER_BUNDLER_CONFIRMER_BACKOFF_MAX_ELAPSED_TIMEMax time confirmer will try to insert a batch of data to the database. 0 means no limit
SYNCER_BUNDLER_CONFIRMER_BACKOFF_MAX_INTERVALMax time between retries to insert a batch of confirmations to the database
SYNCER_BUNDLER_BUNDLER_NUM_BUNDLING_WORKERSNumber of workers that send bundles in parallel
SYNCER_BUNDLR_URLSNode url of bundlr.network
SYNCER_BUNDLR_REQUEST_TIMEOUTRequest timeout to bundlr.network
SYNCER_BUNDLR_DIALER_TIMEOUTDial timeout
SYNCER_BUNDLR_DIALER_KEEP_ALIVETCP keep alive period
SYNCER_BUNDLR_IDLE_CONN_TIMEOUTIdle connection timeout
SYNCER_BUNDLR_TLS_HANDSHAKE_TIMEOUTTLS handshake timeout
SYNCER_BUNDLR_LIMITER_INTERVALRate limiter interval to bundlr.network
SYNCER_BUNDLR_LIMITER_BURST_SIZERate limitter burst size to bundlr.network
SYNCER_BUNDLR_WALLETJWK walled used to sign bundles
SYNCER_CHECKER_MIN_CONFIRMATION_BLOCKSMinimum number of Arweave blocks to wait before checking if bundle is FINILIZED
SYNCER_CHECKER_MAX_BUNDLES_PER_RUNNumber of bundles to confirm in one run
SYNCER_CHECKER_WORKER_POOL_SIZENumber of workers that check bundles in parallel
SYNCER_CHECKER_WORKER_QUEUE_SIZEQueue size for checking bundles
SYNCER_CHECKER_POLLER_INTERVALHow often db is polled for new bundles to check
SYNCER_CHECKER_POLLER_RETRY_CHECK_AFTERAfter this time retry checking the bundle
SYNCER_DATABASE_PORTPort of the read-write database
SYNCER_DATABASE_HOSTHost of the read-write database
SYNCER_DATABASE_USERUser for regular connection
SYNCER_DATABASE_PASSWORDPassword for regular connection
SYNCER_DATABASE_NAMEName of the database
SYNCER_DATABASE_SSL_MODEPostgres SSL mode
SYNCER_DATABASE_PING_TIMEOUTPing timeout
SYNCER_DATABASE_CLIENT_KEYClient's key in plain text
SYNCER_DATABASE_CLIENT_KEY_PATHPath to a file with client's key
SYNCER_DATABASE_CLIENT_CERTClient certificate
SYNCER_DATABASE_CLIENT_CERT_PATHPath to a file with client's certificate
SYNCER_DATABASE_CA_CERTCA's certificate
SYNCER_DATABASE_CA_CERT_PATHPath to CA's certificate
SYNCER_DATABASE_MIGRATION_USERUser used only for migrating database
SYNCER_DATABASE_MIGRATION_PASSWORDPassword for the migration user
SYNCER_DATABASE_MAX_OPEN_CONNSMax number of open connections
SYNCER_DATABASE_MAX_IDLE_CONNSMax number of idle connections
SYNCER_DATABASE_CONN_MAX_IDLE_TIMEHow long connection may be idle
SYNCER_DATABASE_CONN_MAX_LIFETIMEMax time a connection may be established
SYNCER_CONTRACT_LOADER_WORKER_POOL_SIZEWorker pool for fetching contact source and init state
SYNCER_CONTRACT_LOADER_WORKER_QUEUE_SIZEMaksimum payloads in loader's queue
SYNCER_CONTRACT_LOADER_SUPPORTED_CONTENT_TYPESPossible contract source content types
SYNCER_CONTRACT_LOADER_BACKOFF_MAX_ELAPSED_TIMEMax time we try to download contract from arweave. 0 means no limit
SYNCER_CONTRACT_LOADER_BACKOFF_MAX_INTERVALMax time between retries to download contract tx
SYNCER_CONTRACT_LOADER_BACKOFF_ACCEPTABLE_DURATIONAcceptable duration for loading a single contract. After this time arweave client will be reset
SYNCER_CONTRACT_TRANSACTION_MAX_ELAPSED_TIMEMax time for a transaction to be downloaded. 0 means no limit
SYNCER_CONTRACT_TRANSACTION_MAX_INTERVALMax time between transaction download retries
SYNCER_CONTRACT_STORE_BATCH_SIZEHow many contracts are saved in one transaction
SYNCER_CONTRACT_STORE_INTERVALHow often is an insert triggered
SYNCER_CONTRACT_STORE_BACKOFF_MAX_ELAPSED_TIMEMax time store will try to insert a batch of data to the database
SYNCER_CONTRACT_STORE_BACKOFF_MAX_INTERVALMax time between retries to insert a batch of contracts to the database
SYNCER_CONTRACT_PUBLISHER_MAX_MESSAGE_SIZEMax size of a message that can be published to Redis, in bytes. 10MB by default
SYNCER_CONTRACT_PUBLISHER_REDIS_CHANNEL_NAMESaved contracts are published on this Redis channel
SYNCER_CONTRACT_PUBLISHER_APP_SYNC_CHANNEL_NAMESaved contracts are published on this AppSync channel
SYNCER_REDISArray of redis connection configurations
SYNCER_APP_SYNC_TOKENSecurity token for AppSync
SYNCER_APP_SYNC_URLURL of the AppSync endpoint
SYNCER_APP_SYNC_MAX_WORKERSNumber of workers that send GQL requests
SYNCER_APP_SYNC_MAX_QUEUE_SIZEMax number of requests in worker's queue
SYNCER_APP_SYNC_BACKOFF_MAX_ELAPSED_TIMEMax time a request should be retried. 0 means no limit.
SYNCER_APP_SYNC_BACKOFF_MAX_INTERVALMax time between failed retries
SYNCER_FORWARDER_FETCHER_BATCH_SIZEHow many L1 interactions are fetched from the DB at once
SYNCER_FORWARDER_PUBLISHER_REDIS_CHANNEL_NAMEInteractions are saved to this Redis channel
SYNCER_FORWARDER_HEIGHT_DELAYHow long to wait before after receiving a new block height before sending L1 interactions. This delay ensures sequencer finishes handling requests in time
SYNCER_FORWARDER_ARWEAVE_FETCHER_QUEUE_SIZEHow many L1 interactions are cached in queue. This should be at least 1000 since this is how many tx are in Arweave block.
SYNCER_FORWARDER_ARWEAVE_FETCHER_BLOCK_SEND_TIMEOUTHow long to wait to send all L1 interactions from a given block. There's 2m between blocks, so this should be at most 2m
SYNCER_FORWARDER_INTERACTIONS_STREAMER_QUEUE_SIZEHow many L2 interactions are cached in queue. Those are L2 interactions streamed live from the database
SYNCER_GATEWAY_SERVER_LISTEN_ADDRESSREST API address
SYNCER_GATEWAY_SERVER_REQUEST_TIMEOUTMax time a http request can take