Categorygithub.com/Decentr-net/cerberus
module
1.6.3
Repository: https://github.com/decentr-net/cerberus.git
Documentation: pkg.go.dev

# README

Cerberus

img img img

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

cerberusd

cerberusd provides http API to pdv storing functionality. It receives and validates user PDV and sends it to SQS queue.

Parameters

CLI paramEnvironment varDefaultDescription
http.hostHTTP_HOST0.0.0.0host to bind server
http.portHTTP_PORT8080port to listen
http.max-body-sizeHTTP_MAX_BODY_SIZE8000000max requests' body size in bytes
postgresPOSTGREShost=localhost port=5432 user=postgres password=root sslmode=disablepostgres dsn
postgres.max_open_connectionsPOSTGRES_MAX_OPEN_CONNECTIONS0postgres maximal open connections count, 0 means unlimited
postgres.max_idle_connectionsPOSTGRES_MAX_IDLE_CONNECTIONS5postgres maximal idle connections count
postgres.migrationsPOSTGRES_MIGRATIONS/migrations/postgrespostgres migrations directory
s3.endpointS3_ENDPOINTlocalhost:9000s3 storage endpoint
s3.regionS3_REGIONs3 storage region
s3.access-key-idS3_ACCESS_KEY_IDAccess KeyID for S3 storage
s3.secret-access-keyS3_SECRET_ACCESS_KEYSecret Key for S3 storage
s3.use-sslS3_USE_SSLfalsedo use ssl for S3 storage connection?
s3.bucketS3_BUCKETcerberusbucket name for S3 storage
sqs.regionSQS_REGIONsqs region
sqs.access-key-idSQS_ACCESS_KEY_IDaccess key id for SQS
sqs.secret-access-keySQS_SECRET_ACCESS_KEYsecret access key for SQS
sqs.queueSQS_QUEUEtestnetSQS queue name
save-pdv-throttle-periodSAVE_PDV_THROTTLE_PERIOD10mhow often the user can send PDV to save
reward-map-configREWARD_MAP_CONFIGconfigs/rewards.ymlpath to yaml config with pdv rewards
min-pdv-countMIN_PDV_COUNT100minimal count of pdv to save
max-pdv-countMAX_PDV_COUNT100maximal count of pdv to save
encrypt-keyENCRYPT_KEYprivate key for data encryption in hex
sentry.dsnSENTRY_DSNsentry dsn
log.levelLOG_LEVELinfolevel of logger (debug,info,warn,error)
pdv-rewards.pool-sizePDV_REWARDS_POOL_SIZE100000000000PDV rewards (uDEC)
pdv-rewards.intervalPDV_REWARDS_INTERVAL720hhow often to pay PDV rewards
hades.urlHADES_URLHades service url

processord

processord receives PDVs from SQS, rewards users and stores data into FileStorage

Parameters

CLI paramEnvironment varDefaultDescription
http.hostHTTP_HOST0.0.0.0host to bind server
http.portHTTP_PORT8080port to listen
postgresPOSTGREShost=localhost port=5432 user=postgres password=root sslmode=disablepostgres dsn
postgres.max_open_connectionsPOSTGRES_MAX_OPEN_CONNECTIONS0postgres maximal open connections count, 0 means unlimited
postgres.max_idle_connectionsPOSTGRES_MAX_IDLE_CONNECTIONS5postgres maximal idle connections count
postgres.migrationsPOSTGRES_MIGRATIONS/migrations/postgrespostgres migrations directory
s3.endpointS3_ENDPOINTlocalhost:9000s3 storage endpoint
s3.regionS3_REGIONs3 storage region
s3.access-key-idS3_ACCESS_KEY_IDAccess KeyID for S3 storage
s3.secret-access-keyS3_SECRET_ACCESS_KEYSecret Key for S3 storage
s3.use-sslS3_USE_SSLfalsedo use ssl for S3 storage connection?
s3.bucketS3_BUCKETcerberusbucket name for S3 storage
sqs.regionSQS_REGIONsqs region
sqs.access-key-idSQS_ACCESS_KEY_IDaccess key id for SQS
sqs.secret-access-keySQS_SECRET_ACCESS_KEYsecret access key for SQS
sqs.queueSQS_QUEUEtestnetSQS queue name
blockchain.nodeBLOCKCHAIN_NODEhttp://zeus.testnet.decentr.xyz:26657decentr node address
blockchain.fromBLOCKCHAIN_FROMdecentr account name to send stakes
blockchain.tx_memoBLOCKCHAIN_TX_MEMOdecentr tx's memo
blockchain.chain_idBLOCKCHAIN_CHAIN_IDtestnetdecentr chain id
blockchain.client_homeBLOCKCHAIN_CLIENT_HOME~/.decentrclidecentrcli home directory
blockchain.keyring_backendBLOCKCHAIN_KEYRING_BACKENDtestdecentrcli keyring backend
blockchain.keyring_prompt_inputBLOCKCHAIN_KEYRING_PROMPT_INPUTdecentrcli keyring prompt input
blockchain.gasBLOCKCHAIN_GAS10gas amount
blockchain.feeBLOCKCHAIN_FEE1udectransaction fee
sentry.dsnSENTRY_DSNsentry dsn
log.levelLOG_LEVELinfolevel of logger (debug,info,warn,error)

rewardsd

rewardsd send PDV rewards

Parameters

CLI paramEnvironment varDefaultDescription
postgresPOSTGREShost=localhost port=5432 user=postgres password=root sslmode=disablepostgres dsn
postgres.max_open_connectionsPOSTGRES_MAX_OPEN_CONNECTIONS0postgres maximal open connections count, 0 means unlimited
postgres.max_idle_connectionsPOSTGRES_MAX_IDLE_CONNECTIONS5postgres maximal idle connections count
postgres.migrationsPOSTGRES_MIGRATIONS/migrations/postgrespostgres migrations directory
blockchain.nodeBLOCKCHAIN_NODEhttp://zeus.testnet.decentr.xyz:26657decentr node address
blockchain.fromBLOCKCHAIN_FROMdecentr account name to send stakes
blockchain.tx_memoBLOCKCHAIN_TX_MEMOdecentr tx's memo
blockchain.chain_idBLOCKCHAIN_CHAIN_IDtestnetdecentr chain id
blockchain.client_homeBLOCKCHAIN_CLIENT_HOME~/.decentrclidecentrcli home directory
blockchain.keyring_backendBLOCKCHAIN_KEYRING_BACKENDtestdecentrcli keyring backend
blockchain.keyring_prompt_inputBLOCKCHAIN_KEYRING_PROMPT_INPUTdecentrcli keyring prompt input
blockchain.gasBLOCKCHAIN_GAS10gas amount
blockchain.feeBLOCKCHAIN_FEE1udectransaction fee
sentry.dsnSENTRY_DSNsentry dsn
log.levelLOG_LEVELinfolevel of logger (debug,info,warn,error)
pdv-rewards.pool-sizePDV_REWARDS_POOL_SIZE100000000000PDV rewards (uDEC)
pdv-rewards.intervalPDV_REWARDS_INTERVAL720hhow often to pay PDV rewards

syncd

syncd binary listens to blockchain and reacts on operations/ResetAccount message.

Parameters

CLI paramEnvironment varDefaultDescription
blockchain.nodeBLOCKCHAIN_NODEzeus.testnet.decentr.xyz:9090true
blockchain.timeoutBLOCKCHAIN_TIMEOUT5strue
blockchain.retry_intervalBLOCKCHAIN_RETRY_INTERVAL2strue
blockchain.last_block_retry_intervalBLOCKCHAIN_LAST_BLOCK_RETRY_INTERVAL1strue
postgresPOSTGREShost=localhost port=5432 user=postgres password=root sslmode=disablepostgres dsn
postgres.max_open_connectionsPOSTGRES_MAX_OPEN_CONNECTIONS0postgres maximal open connections count, 0 means unlimited
postgres.max_idle_connectionsPOSTGRES_MAX_IDLE_CONNECTIONS5postgres maximal idle connections count
postgres.migrationsPOSTGRES_MIGRATIONS/migrations/postgrespostgres migrations directory
s3.endpointS3_ENDPOINTlocalhost:9000s3 storage endpoint
s3.regionS3_REGIONs3 storage region
s3.access-key-idS3_ACCESS_KEY_IDAccess KeyID for S3 storage
s3.secret-access-keyS3_SECRET_ACCESS_KEYSecret Key for S3 storage
s3.use-sslS3_USE_SSLfalsedo use ssl for S3 storage connection?
s3.bucketS3_BUCKETcerberusbucket name for S3 storage
sentry.dsnSENTRY_DSNsentry dsn
log.levelLOG_LEVELinfolevel 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

# Packages

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