cerberus

module
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2021 License: Apache-2.0

README

Cerberus

img img img

Cerberus is a Decentr oracle. Cerberus stores and validates PDV (private data value).

Parameters

cerberusd
CLI param Environment var Default Description
http.host HTTP_HOST 0.0.0.0 host to bind server
http.port HTTP_PORT 8080 port to listen
http.max-body-size HTTP_MAX_BODY_SIZE 8000000 max requests' body size in bytes
postgres POSTGRES host=localhost port=5432 user=postgres password=root sslmode=disable postgres dsn
postgres.max_open_connections POSTGRES_MAX_OPEN_CONNECTIONS 0 postgres maximal open connections count, 0 means unlimited
postgres.max_idle_connections POSTGRES_MAX_IDLE_CONNECTIONS 5 postgres maximal idle connections count
postgres.migrations POSTGRES_MIGRATIONS /migrations/postgres postgres migrations directory
s3.endpoint S3_ENDPOINT localhost:9000 s3 storage endpoint
s3.region S3_REGION s3 storage region
s3.access-key-id S3_ACCESS_KEY_ID Access KeyID for S3 storage
s3.secret-access-key S3_SECRET_ACCESS_KEY Secret Key for S3 storage
s3.use-ssl S3_USE_SSL false do use ssl for S3 storage connection?
s3.bucket S3_BUCKET cerberus bucket name for S3 storage
save-pdv-throttle-period SAVE_PDV_THROTTLE_PERIOD 10m how often the user can send PDV to save
blockchain.node BLOCKCHAIN_NODE http://zeus.testnet.decentr.xyz:26657 decentr node address
blockchain.from BLOCKCHAIN_FROM decentr account name to send stakes
blockchain.tx_memo BLOCKCHAIN_TX_MEMO decentr tx's memo
blockchain.chain_id BLOCKCHAIN_CHAIN_ID testnet decentr chain id
blockchain.client_home BLOCKCHAIN_CLIENT_HOME ~/.decentrcli decentrcli home directory
blockchain.keyring_backend BLOCKCHAIN_KEYRING_BACKEND test decentrcli keyring backend
blockchain.keyring_prompt_input BLOCKCHAIN_KEYRING_PROMPT_INPUT decentrcli keyring prompt input
blockchain.gas BLOCKCHAIN_GAS 10 gas amount
blockchain.fee BLOCKCHAIN_FEE 1udec transaction fee
reward-map-config REWARD_MAP_CONFIG configs/rewards.yml path to yaml config with pdv rewards
min-pdv-count MIN_PDV_COUNT 100 minimal count of pdv to save
max-pdv-count MAX_PDV_COUNT 100 maximal count of pdv to save
encrypt-key ENCRYPT_KEY private key for data encryption in hex
sentry.dsn SENTRY_DSN sentry dsn
log.level LOG_LEVEL info level of logger (debug,info,warn,error)
syncd
CLI param Environment var Default Description
blockchain.node BLOCKCHAIN_NODE http://zeus.testnet.decentr.xyz:26657 true
blockchain.timeout BLOCKCHAIN_TIMEOUT 5s true
blockchain.retry_interval BLOCKCHAIN_RETRY_INTERVAL 2s true
blockchain.last_block_retry_interval BLOCKCHAIN_LAST_BLOCK_RETRY_INTERVAL 1s true
postgres POSTGRES host=localhost port=5432 user=postgres password=root sslmode=disable postgres dsn
postgres.max_open_connections POSTGRES_MAX_OPEN_CONNECTIONS 0 postgres maximal open connections count, 0 means unlimited
postgres.max_idle_connections POSTGRES_MAX_IDLE_CONNECTIONS 5 postgres maximal idle connections count
postgres.migrations POSTGRES_MIGRATIONS /migrations/postgres postgres migrations directory
s3.endpoint S3_ENDPOINT localhost:9000 s3 storage endpoint
s3.region S3_REGION s3 storage region
s3.access-key-id S3_ACCESS_KEY_ID Access KeyID for S3 storage
s3.secret-access-key S3_SECRET_ACCESS_KEY Secret Key for S3 storage
s3.use-ssl S3_USE_SSL false do use ssl for S3 storage connection?
s3.bucket S3_BUCKET cerberus bucket name for S3 storage
sentry.dsn SENTRY_DSN sentry dsn
log.level LOG_LEVEL info level of logger (debug,info,warn,error)

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 cerberus-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

Directories

Path Synopsis
cmd
internal
blockchain
Package blockchain contains code for interacting with the decentr blockchain.
Package blockchain contains code for interacting with the decentr blockchain.
blockchain/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
consumer
Package consumer contains interface of blocks consumer.
Package consumer contains interface of blocks consumer.
consumer/blockchain
Package blockchain is a consumer interface.
Package blockchain is a consumer interface.
consumer/mock
Package consumer is a generated GoMock package.
Package consumer is a generated GoMock package.
crypto
Package crypto contains encrypting and decrypting reader.
Package crypto contains encrypting and decrypting reader.
crypto/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
crypto/sio
Package sio contains minio/sio implementation of crypto.Crypto interface.
Package sio contains minio/sio implementation of crypto.Crypto interface.
health
Package health provides handler for health checks.
Package health provides handler for health checks.
schema
Package schema provides schemas and validation functions for it.
Package schema provides schemas and validation functions for it.
schema/types
Package types contains shared types and constants for schema package.
Package types contains shared types and constants for schema package.
schema/v1
Package schema implements schema for version v2.
Package schema implements schema for version v2.
server
Package server Cerberus The Cerberus is an users' data keeper.
Package server Cerberus The Cerberus is an users' data keeper.
service
Package service contains business logic of application.
Package service contains business logic of application.
service/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
storage
Package storage contains FileStorage interface and its mock.
Package storage contains FileStorage interface and its mock.
storage/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
storage/postgres
Package postgres is implementation of storage interface.
Package postgres is implementation of storage interface.
storage/s3
Package s3 contains implementation FileStorage interface with any s3-compatible storage.
Package s3 contains implementation FileStorage interface with any s3-compatible storage.
throttler
Package throttler provides functionality to throttle http requests
Package throttler provides functionality to throttle http requests
scripts

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL