-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use specific configuration in conductor tests (#923)
Co-authored-by: shahnawaz-creator <117025384+shahnawaz-creator@users.noreply.github.com>
- Loading branch information
1 parent
8056c1b
commit 0115fcb
Showing
6 changed files
with
299 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
version: "3" | ||
services: | ||
postgres: | ||
image: postgres:14 | ||
environment: | ||
POSTGRES_PORT: 5432 | ||
POSTGRES_HOST: postgres | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: secret | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
#expose_ci_port | ||
volumes: | ||
- ./blobber${BLOBBER}/data/postgresql:/var/lib/postgresql/data | ||
networks: | ||
default: | ||
postgres-post: | ||
image: postgres:14 | ||
environment: | ||
POSTGRES_PORT: 5432 | ||
POSTGRES_HOST: postgres | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: secret | ||
volumes: | ||
- ../bin:/blobber/bin | ||
- ../sql:/blobber/sql | ||
command: bash /blobber/bin/postgres-entrypoint.sh | ||
links: | ||
- postgres:postgres | ||
validator: | ||
image: validator | ||
environment: | ||
- DOCKER= true | ||
depends_on: | ||
- postgres-post | ||
links: | ||
- postgres-post:postgres-post | ||
volumes: | ||
- ./conductor-config:/validator/config | ||
- ./blobber${BLOBBER}/data:/validator/data | ||
- ./blobber${BLOBBER}/log:/validator/log | ||
- ./keys_config:/validator/keysconfig | ||
ports: | ||
- "506${BLOBBER}:506${BLOBBER}" | ||
command: ./bin/validator --port 506${BLOBBER} --hostname 198.18.0.6${BLOBBER} --deployment_mode 0 --keys_file keysconfig/b0vnode${BLOBBER}_keys.txt --log_dir /validator/log | ||
networks: | ||
default: | ||
testnet0: | ||
ipv4_address: 198.18.0.6${BLOBBER} | ||
|
||
blobber: | ||
image: blobber | ||
environment: | ||
- DOCKER= true | ||
depends_on: | ||
- validator | ||
links: | ||
- validator:validator | ||
volumes: | ||
- ./conductor-config:/blobber/config | ||
- ./blobber${BLOBBER}/files:/blobber/files | ||
- ./blobber${BLOBBER}/data:/blobber/data | ||
- ./blobber${BLOBBER}/log:/blobber/log | ||
- ./keys_config:/blobber/keysconfig | ||
- ./blobber${BLOBBER}/data/tmp:/tmp | ||
ports: | ||
- "505${BLOBBER}:505${BLOBBER}" | ||
- "3150${BLOBBER}:3150${BLOBBER}" | ||
command: ./bin/blobber --port 505${BLOBBER} --grpc_port 3150${BLOBBER} --hostname 198.18.0.9${BLOBBER} --deployment_mode 0 --keys_file keysconfig/b0bnode${BLOBBER}_keys.txt --files_dir /blobber/files --log_dir /blobber/log --db_dir /blobber/data | ||
networks: | ||
default: | ||
testnet0: | ||
ipv4_address: 198.18.0.9${BLOBBER} | ||
|
||
networks: | ||
default: | ||
driver: bridge | ||
testnet0: | ||
external: true | ||
# driver: bridge | ||
# ipam: | ||
# config: | ||
# - subnet: 198.18.0.0/15 | ||
# - gateway: 198.18.0.255 | ||
|
||
|
||
volumes: | ||
data: | ||
config: | ||
bin: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
version: "1.0" | ||
|
||
logging: | ||
level: "info" | ||
console: true # printing log to console is only supported in development mode | ||
|
||
info: | ||
name: my_blobber | ||
logo_url: https://google.com | ||
description: this is my test blobber | ||
website_url: https://google.com | ||
|
||
|
||
# for testing | ||
# 500 MB - 536870912 | ||
# 1 GB - 1073741824 | ||
# 2 GB - 2147483648 | ||
# 3 GB - 3221225472 | ||
# 100 GB - 107374182400 | ||
capacity: 1073741824 # 1 GB bytes total blobber capacity | ||
read_price: 0.01 # token / GB for reading | ||
write_price: 0.10 # token / GB / time_unit for writing | ||
price_in_usd: false | ||
price_worker_in_hours: 12 | ||
# the time_unit configured in Storage SC and can be given using | ||
# | ||
# ./zbox sc-config | ||
# | ||
|
||
# min_lock_demand is value in [0; 1] range; it represents number of tokens the | ||
# blobber earned even if a user will not read or write something | ||
# to an allocation; the number of tokens will be calculated by the following | ||
# formula (regarding the time_unit and allocation duration) | ||
# | ||
# allocation_size * write_price * min_lock_demand | ||
# | ||
min_lock_demand: 0.1 | ||
# max_offer_duration restrict long contracts where, | ||
# in the future, prices can be changed | ||
max_offer_duration: 744h # 31 day | ||
|
||
# these timeouts required by blobber to check client pools, perform | ||
# a task and redeem tokens, it should be big enough | ||
read_lock_timeout: 1m | ||
write_lock_timeout: 1m | ||
|
||
# update_allocations_interval used to refresh known allocation objects from SC | ||
update_allocations_interval: 1m | ||
|
||
# maximum limit on the number of combined directories and files on each allocation | ||
max_dirs_files: 50000 | ||
|
||
# delegate wallet (must be set) | ||
delegate_wallet: '9c693cb14f29917968d6e8c909ebbea3425b4c1bc64b6732cadc2a1869f49be9' | ||
# min stake allowed, tokens | ||
min_stake: 1.0 | ||
# max stake allowed, tokens | ||
max_stake: 100.0 | ||
# maximum allowed number of stake holders | ||
num_delegates: 50 | ||
# service charge of the blobber | ||
service_charge: 0.10 | ||
# min submit from miners | ||
min_submit: 50 | ||
# min confirmation from sharder | ||
min_confirmation: 50 | ||
|
||
block_worker: http://198.18.0.98:9091 | ||
|
||
|
||
rate_limiters: | ||
# Rate limiters will use this duration to clean unused token buckets. | ||
# If it is 0 then token will expire in 10 years. | ||
default_token_expire_duration: 5m | ||
# If blobber is behind some proxy eg. nginx, cloudflare, etc. | ||
proxy: true | ||
|
||
# Rate limiter is applied with two parameters. One is ip-address and other is clientID. | ||
# Rate limiter will track both parameters independently and will block request if both | ||
# ip-address or clientID has reached its limit | ||
# Blobber may not provide any rps values and default will work fine. | ||
|
||
# Commit Request Per second. Commit endpoint is resource intensive. | ||
# Default is 0.5 | ||
commit_rps: 1600 | ||
# File Request Per Second. This rps is used to rate limit basically upload and download requests. | ||
# Its better to have 2 request per second. Default is 1 | ||
file_rps: 1600 | ||
# Object Request Per Second. This rps is used to rate limit GetReferencePath, GetObjectTree, etc. | ||
# which is resource intensive. Default is 0.5 | ||
object_rps: 1600 | ||
# General Request Per Second. This rps is used to rate limit endpoints like copy, rename, get file metadata, | ||
# get paginated refs, etc. Default is 5 | ||
general_rps: 1600 | ||
|
||
server_chain: | ||
id: "0afc093ffb509f059c55478bc1a60351cef7b4e9c008a53a6cc8241ca8617dfe" | ||
owner: "edb90b850f2e7e7cbd0a1fa370fdcc5cd378ffbec95363a7bc0e5a98b8ba5759" | ||
genesis_block: | ||
id: "ed79cae70d439c11258236da1dfa6fc550f7cc569768304623e8fbd7d70efae4" | ||
signature_scheme: "bls0chain" | ||
|
||
contentref_cleaner: | ||
frequency: 30 | ||
tolerance: 3600 | ||
openconnection_cleaner: | ||
frequency: 30 | ||
tolerance: 3600 # 60 * 60 | ||
writemarker_redeem: | ||
frequency: 10 | ||
num_workers: 5 | ||
readmarker_redeem: | ||
frequency: 10 | ||
num_workers: 5 | ||
challenge_response: | ||
frequency: 10 | ||
num_workers: 5 | ||
max_retries: 20 | ||
|
||
healthcheck: | ||
frequency: 60s # send healthcheck to miners every 60 seconds | ||
|
||
pg: | ||
user: postgres | ||
password: postgres | ||
db: | ||
name: blobber_meta | ||
user: blobber_user | ||
password: blobber | ||
host: postgres | ||
port: 5432 | ||
|
||
|
||
geolocation: | ||
latitude: 0 | ||
longitude: 0 | ||
|
||
storage: | ||
files_dir: "/path/to/hdd" | ||
# sha256 hash will have 64 characters of hex encoded length. So if dir_level is [2,2] this means for an allocation id | ||
# "4c9bad252272bc6e3969be637610d58f3ab2ff8ca336ea2fadd6171fc68fdd56" directory below will be created. | ||
# alloc_dir = {files_dir}/4c/9b/ad252272bc6e3969be637610d58f3ab2ff8ca336ea2fadd6171fc68fdd56 | ||
# | ||
# So this means, there will maximum of 16^4 = 65536 numbers directories for all allocations stored by blobber. | ||
# Similarly for some file_hash "ef935503b66b1ce026610edf18bffd756a79676a8fe317d951965b77a77c0227" with dir_level [2, 2, 1] | ||
# following path is created for the file: | ||
# {alloc_dir}/ef/93/5/503b66b1ce026610edf18bffd756a79676a8fe317d951965b77a77c0227 | ||
alloc_dir_level: [2, 1] | ||
file_dir_level: [2, 2, 1] | ||
|
||
disk_update: | ||
# defaults to true. If false, blobber has to manually update blobber's capacity upon increase/decrease | ||
# If blobber has to limit its capacity to 5% of its capacity then it should turn automaci_update to false. | ||
automatic_update: true | ||
blobber_update_interval: 5m # In minutes | ||
# integration tests related configurations | ||
integration_tests: | ||
# address of the server | ||
address: host.docker.internal:15210 | ||
# lock_interval used by nodes to request server to connect to blockchain | ||
# after start | ||
lock_interval: 1s | ||
admin: | ||
username: "admin" | ||
password: "password" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
version: 1.0 | ||
|
||
# delegate wallet (must be set) | ||
delegate_wallet: '9c693cb14f29917968d6e8c909ebbea3425b4c1bc64b6732cadc2a1869f49be9' | ||
# min stake allowed, tokens | ||
min_stake: 1.0 | ||
# max stake allowed, tokens | ||
max_stake: 100.0 | ||
# maximum allowed number of stake holders | ||
num_delegates: 50 | ||
# service charge of related blobber | ||
service_charge: 0.10 | ||
|
||
block_worker: http://198.18.0.98:9091 | ||
|
||
rate_limiters: | ||
# Rate limiters will use this duration to clean unused token buckets. | ||
# If it is 0 then token will expire in 10 years. | ||
default_token_expire_duration: 5m | ||
# If blobber is behind some proxy eg. nginx, cloudflare, etc. | ||
proxy: true | ||
|
||
logging: | ||
level: "error" | ||
console: true # printing log to console is only supported in development mode | ||
|
||
server_chain: | ||
id: "0afc093ffb509f059c55478bc1a60351cef7b4e9c008a53a6cc8241ca8617dfe" | ||
owner: "edb90b850f2e7e7cbd0a1fa370fdcc5cd378ffbec95363a7bc0e5a98b8ba5759" | ||
genesis_block: | ||
id: "ed79cae70d439c11258236da1dfa6fc550f7cc569768304623e8fbd7d70efae4" | ||
network: | ||
relay_time: 100 # milliseconds | ||
signature_scheme: "bls0chain" | ||
# integration tests related configurations | ||
integration_tests: | ||
# address of the server | ||
address: host.docker.internal:15210 | ||
# lock_interval used by nodes to request server to connect to blockchain | ||
# after start | ||
lock_interval: 1s |