Categorygithub.com/Decentr-net/theseus
repository
1.3.11
Repository: https://github.com/decentr-net/theseus.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

Theseus

img img img

Theseus provides Decentr community off-chain functionality.

Parameters

theseusd

CLI paramEnvironment varDefaultRequiredDescription
http.hostHTTP_HOST0.0.0.0truehost to bind server
http.portHTTP_PORT8080trueport to listen
http.request-timeoutHTTP_REQUEST_TIMEOUT45sfalserequest processing timeout
postgresPOSTGREShost=localhost port=5432 user=postgres password=root sslmode=disabletruepostgres dsn
postgres.max_open_connectionsPOSTGRES_MAX_OPEN_CONNECTIONS0truepostgres maximal open connections count, 0 means unlimited
postgres.max_idle_connectionsPOSTGRES_MAX_IDLE_CONNECTIONS5truepostgres maximal idle connections count
postgres.migrationsPOSTGRES_MIGRATIONS/migrations/postgrestruepostgres migrations directory
log.levelLOG_LEVELinfofalselevel of logger (debug,info,warn,error)
sentry.dsnSENTRY_DSNfalsesentry dsn

syncd

CLI paramEnvironment varDefaultRequiredDescription
http.hostHTTP_HOST0.0.0.0truehost to bind server used to health checking purposes
http.portHTTP_PORT8080trueport to listen
postgresPOSTGREShost=localhost port=5432 user=postgres password=root sslmode=disabletruepostgres dsn
postgres.max_open_connectionsPOSTGRES_MAX_OPEN_CONNECTIONS0truepostgres maximal open connections count, 0 means unlimited
postgres.max_idle_connectionsPOSTGRES_MAX_IDLE_CONNECTIONS5truepostgres maximal idle connections count
postgres.migrationsPOSTGRES_MIGRATIONS/migrations/postgrestruepostgres migrations directory
blockchain.nodeBLOCKCHAIN_NODEzeus.testnet.decentr.xyz:9090truedecentr grpc node address
blockchain.timeoutBLOCKCHAIN_TIMEOUT5struetimeout for requests to blockchain node
blockchain.retry_intervalBLOCKCHAIN_RETRY_INTERVAL2strueinterval to be waited on error before retry
blockchain.last_block_retry_intervalBLOCKCHAIN_LAST_BLOCK_RETRY_INTERVAL1strueduration to be waited when new block isn't produced before retry
log.levelLOG_LEVELinfofalselevel of logger (debug,info,warn,error)
sentry.dsnSENTRY_DSNfalsesentry dsn

Import genesis to database

go run scripts/genesis2db/main.go --genesis.json /path/to/genesis.json --postgres "host=localhost port=5432 user=postgres password=root sslmode=disable" --postgres.migrations "scripts/migrations/postgres"

Development

Makefile

Update vendors

Use make vendor

Install required for development tools

You can check all tools existence with make check-all or force installing them with make install-all

golangci-lint 1.29.0

Use make install-linter

swagger v0.25.0

Use make install-swagger

gomock v1.4.3

Use make install-mockgen

Build docker image

Use make image to build local docker image named theseus-local

Build binary

Use make build to build for your OS or use make linux to build for linux(used in make image)

Run tests

Use make test to run tests. Also you can run tests with integration tag with make fulltest