github debridge-finance/debridge-launcher v2.6.1

latest releases: 2024.8.0, 2024.5.0, 2024.4.2...
16 months ago

What's Changed

Solana Reader Update:

Transitioned from TypeScript Solana Reader API to Rust Solana Reader for more optimized and efficient operations. This service connects to websocket and makes periodic requests for all transactions associated with certain accounts debridge solana program (this process is called resync). It saves the received events to the database. It saves all events, validations occur at the level of sending events to the grpc service.

Solana Reader Communication:

Implemented gRPC service for communication with Debridge node. This service connect to database, validate & present events in public API.

What's Changed

Full Changelog: v2.5.7...v2.6.1

How to update to v2.6.1

Pull latest changes

git checkout mainnet
git pull origin mainnet

Update env

Add new variables

# provide sentry dsn for Solana events reader *optional
DEBRIDGE_EVENTS_SENTRY_DSN=

POSTGRES_SOLANA_READER_DATABASE=solana${PG_RANDOM_ID}
DEBRIDGE_PROGRAM_PUBKEY=DEbrdGj3HsRsAzx6uH4MKyREKxVAfBydijLUF3ygsFfh
DEBRIDGE_SETTINGS_PROGRAM_PUBKEY=DeSetTwWhjZq6Pz9Kfdo1KoS5NqtsM6G8ERbX4SSCSft

RUST_LOG=info,tokio_util=warn,hyper=warn

# TODO: update with your RPC HTTP
DEBRIDGE_EVENTS_SOLANA_CLUSTER=
# TODO: update with your RPC WSS
DEBRIDGE_EVENTS_SOLANA_WEBSOCKET_CLUSTER=
# Count of transaction processing in one task
#
# Strongly affects the number of requests to RPC in same time
# The larger the number, the fewer parallel requests, 
# the more - the more asynchronous tasks with parallel processing
DEBRIDGE_EVENTS_RESYNC_SIGNATURES_CHUNK_SIZE=5
# In case of Solana RPC errors, there is an additional check that no events
# have been missed. This timeout determines how often service do this check.
#
#Param is optional
DEBRIDGE_EVENTS_CONSISTENCY_CHECK_TIMEOUT_SECS=10
# Time to requery data from the database for stream subscribers
# Can be left at default (1 second).
# If the number of subscribers is large, it should be reduced to control the load on the database
#
#Param is optional
DEBRIDGE_EVENTS_DB_REQUERY_TIMEOUT_IN_SEC=5
# Time to hearbeat
# Can be left at default (5 second).
# How often will this service send the current status of the service, even in the absence of events
DEBRIDGE_EVENTS_HEARTBEAT_TIMEOUT_IN_SEC=30

SOLANA_GRPC_SERVICE_URL=solana-grpc-service${DOCKER_ID}:7777
DEBRIDGE_SOLANA_EVENTS_PSQL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_SOLANA_READER_DATABASE}

Delete old variables

SOLANA_DATA_READER_PORT
SOLANA_RPC
DEBRIDGE_PK
SETTINGS_PK
SOLANA_DATA_READER_API_BASE_URL
SOLANA_DATA_READER_API_SENTRY_DSN
SOLANA_GET_HISTORICAL_BATCH_SIZE
SOLANA_GET_EVENTS_BATCH_SIZE
SOLANA_API_REQUEST_TIMEOUT
SOLANA_API_WAIT_BATCH_INTERVAL

Create new database "solana_0" (name of db set in .env solana${PG_RANDOM_ID}) for solana-events-reader

  1. First, you need to get into the Docker container's shell. You can do that with the following command:
    bash
docker exec -it <container-id-or-name> bash

Replace with your container's ID or name.

  1. Once you're inside the container, you can connect to the PostgreSQL server using the psql command-line interface:
    bash
psql -U <username> -d <database>

Replace with the PostgreSQL username (e.g., postgres), and with the name of an existing database (e.g., postgres).

  1. Now that you're connected to the PostgreSQL server, you can execute your CREATE DATABASE command:
    sql
CREATE DATABASE solana_0;

Apply changes

docker-compose up -d 

Don't miss a new debridge-launcher release

NewReleases is sending notifications on new releases.