├── services ├── ir1 │ ├── .env │ ├── cli-cfg.yml │ ├── contract.json │ ├── docker-compose.yml │ ├── alphabet │ │ └── az.json │ └── cfg │ │ └── config.yml ├── ir4 │ ├── .env │ ├── cli-cfg.yml │ ├── alphabet │ │ ├── az.json │ │ ├── buky.json │ │ ├── glagoli.json │ │ └── vedi.json │ ├── cfg │ │ └── config.yml │ └── docker-compose.yml ├── ir7 │ ├── .env │ ├── cli-cfg.yml │ ├── cfg │ │ └── config.yml │ ├── alphabet │ │ ├── az.json │ │ ├── buky.json │ │ ├── vedi.json │ │ ├── yest.json │ │ ├── dobro.json │ │ ├── glagoli.json │ │ └── zhivete.json │ └── docker-compose.yml ├── s3_gate │ ├── .s3.env │ ├── .env │ ├── .hosts │ ├── wallet.json │ ├── cfg │ │ └── config.yml │ ├── docker-compose.yml │ ├── tls.crt │ └── tls.key ├── basenet │ ├── .env │ ├── .hosts │ └── docker-compose.yml ├── chain │ ├── .env │ ├── .hosts │ ├── config.yml │ ├── docker-compose.yml │ ├── protocol.privnet1.yml │ ├── node-wallet.json │ ├── protocol.privnet4.yml │ └── protocol.privnet7.yml ├── neo-go │ ├── .env │ └── artifacts.mk ├── rest_gate │ ├── .env │ ├── .hosts │ ├── cfg │ │ └── config.yml │ ├── wallet.json │ └── docker-compose.yml ├── storage │ ├── .env │ ├── .storage.env │ ├── cli-cfg.yml │ ├── .hosts │ ├── prepare.mk │ ├── artifacts.mk │ ├── generate_cert.sh │ ├── wallet02.json │ ├── wallet03.json │ ├── wallet04.json │ ├── wallet01.json │ ├── cfg │ │ └── config.yml │ └── docker-compose.yml └── ir │ ├── prepare.mk │ ├── .hosts │ └── artifacts.mk ├── .github ├── CODEOWNERS ├── workflows │ └── dco.yml └── logo.svg ├── .dockerignore ├── wallets ├── config.yml └── wallet.json ├── bin ├── helper.sh ├── addCert.sh ├── tick.sh ├── resolve.sh ├── config.sh ├── contractDeploy.sh ├── deposit.sh └── update_hosts.sh ├── .basic_services ├── .services ├── .bootstrap_services ├── neofs-adm.yml ├── .gitignore ├── .editorconfig ├── docs ├── storage.md ├── s3_gate.md ├── faq.md ├── notary.md ├── basenet.md ├── rest_gate.md ├── ir.md ├── chain.md └── macos.md ├── help.mk ├── neofs_config.mk ├── .env ├── README.md ├── CONTRIBUTING.md ├── Makefile └── LICENSE /services/ir1/.env: -------------------------------------------------------------------------------- 1 | ../../.env -------------------------------------------------------------------------------- /services/ir4/.env: -------------------------------------------------------------------------------- 1 | ../../.env -------------------------------------------------------------------------------- /services/ir7/.env: -------------------------------------------------------------------------------- 1 | ../../.env -------------------------------------------------------------------------------- /services/s3_gate/.s3.env: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /services/basenet/.env: -------------------------------------------------------------------------------- 1 | ../../.env -------------------------------------------------------------------------------- /services/chain/.env: -------------------------------------------------------------------------------- 1 | ../../.env -------------------------------------------------------------------------------- /services/neo-go/.env: -------------------------------------------------------------------------------- 1 | ../../.env -------------------------------------------------------------------------------- /services/rest_gate/.env: -------------------------------------------------------------------------------- 1 | ../../.env -------------------------------------------------------------------------------- /services/s3_gate/.env: -------------------------------------------------------------------------------- 1 | ../../.env -------------------------------------------------------------------------------- /services/storage/.env: -------------------------------------------------------------------------------- 1 | ../../.env -------------------------------------------------------------------------------- /services/storage/.storage.env: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /services/basenet/.hosts: -------------------------------------------------------------------------------- 1 | IPV4_PREFIX.10 bastion.LOCAL_DOMAIN 2 | -------------------------------------------------------------------------------- /services/rest_gate/.hosts: -------------------------------------------------------------------------------- 1 | IPV4_PREFIX.83 rest.LOCAL_DOMAIN 2 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @carpawell @cthulhu-rider @roman-khimov 2 | -------------------------------------------------------------------------------- /services/chain/.hosts: -------------------------------------------------------------------------------- 1 | IPV4_PREFIX.50 main-chain.LOCAL_DOMAIN 2 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .docker 2 | .github 3 | vendor 4 | tmp 5 | .secrets 6 | -------------------------------------------------------------------------------- /services/ir1/cli-cfg.yml: -------------------------------------------------------------------------------- 1 | wallet: /wallet.json 2 | password: "one" 3 | -------------------------------------------------------------------------------- /services/ir4/cli-cfg.yml: -------------------------------------------------------------------------------- 1 | wallet: /wallet.json 2 | password: "one" 3 | -------------------------------------------------------------------------------- /services/ir7/cli-cfg.yml: -------------------------------------------------------------------------------- 1 | wallet: /wallet.json 2 | password: "one" 3 | -------------------------------------------------------------------------------- /services/storage/cli-cfg.yml: -------------------------------------------------------------------------------- 1 | wallet: /wallet.json 2 | password: "" 3 | -------------------------------------------------------------------------------- /wallets/config.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | Path: "wallets/wallet.json" 4 | Password: "" 5 | -------------------------------------------------------------------------------- /services/chain/config.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | Path: "/wallets/node-wallet.json" 4 | Password: "one" 5 | -------------------------------------------------------------------------------- /services/s3_gate/.hosts: -------------------------------------------------------------------------------- 1 | IPV4_PREFIX.82 s3.LOCAL_DOMAIN 2 | IPV4_PREFIX.82 *.s3.LOCAL_DOMAIN 3 | -------------------------------------------------------------------------------- /bin/helper.sh: -------------------------------------------------------------------------------- 1 | set -eo pipefail 2 | 3 | die() { 4 | echo "$(caller 0):" "$*" >&2 5 | exit 1 6 | } 7 | -------------------------------------------------------------------------------- /.basic_services: -------------------------------------------------------------------------------- 1 | # Services start/stop order 2 | # Will start from top to bottom and stop in reverse 3 | storage 4 | -------------------------------------------------------------------------------- /.services: -------------------------------------------------------------------------------- 1 | # Services start/stop order 2 | # Will start from top to bottom and stop in reverse 3 | s3_gate 4 | rest_gate 5 | -------------------------------------------------------------------------------- /services/ir/prepare.mk: -------------------------------------------------------------------------------- 1 | # Deposit GAS from default wallet to NeoFS privnet contract 2 | prepare.ir: 3 | @./bin/deposit.sh 4 | -------------------------------------------------------------------------------- /.bootstrap_services: -------------------------------------------------------------------------------- 1 | # Services start/stop order 2 | # Will start from top to bottom and stop in reverse 3 | basenet 4 | chain 5 | ir 6 | -------------------------------------------------------------------------------- /services/storage/.hosts: -------------------------------------------------------------------------------- 1 | IPV4_PREFIX.71 s01.LOCAL_DOMAIN 2 | IPV4_PREFIX.72 s02.LOCAL_DOMAIN 3 | IPV4_PREFIX.73 s03.LOCAL_DOMAIN 4 | IPV4_PREFIX.74 s04.LOCAL_DOMAIN 5 | -------------------------------------------------------------------------------- /services/storage/prepare.mk: -------------------------------------------------------------------------------- 1 | # Add self-signed node TLS certificate to trusted store 2 | 3 | prepare.storage: 4 | @echo "Adding self-signed TLS certs to trusted store" 5 | @./bin/addCert.sh 6 | -------------------------------------------------------------------------------- /.github/workflows/dco.yml: -------------------------------------------------------------------------------- 1 | name: DCO check 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | commits_check_job: 10 | uses: nspcc-dev/.github/.github/workflows/dco.yml@master 11 | -------------------------------------------------------------------------------- /bin/addCert.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Source env settings 4 | . .env 5 | 6 | mkdir -p "${CA_CERTS_TRUSTED_STORE}" 7 | ln -sf "$(pwd)/services/storage/s04tls.crt" "${CA_CERTS_TRUSTED_STORE}/s04.${LOCAL_DOMAIN}.tls.crt" 8 | -------------------------------------------------------------------------------- /neofs-adm.yml: -------------------------------------------------------------------------------- 1 | rpc-endpoint: http://ir01.neofs.devenv:30333 2 | credentials: 3 | az: "one" 4 | buky: "one" 5 | glagoli: "one" 6 | vedi: "one" 7 | dobro: "one" 8 | yest: "one" 9 | zhivete: "one" 10 | contract: "one" 11 | -------------------------------------------------------------------------------- /services/rest_gate/cfg/config.yml: -------------------------------------------------------------------------------- 1 | server: 2 | listen-address: 0.0.0.0:8090 # The IP and port to listen on 3 | 4 | # Wallet settings 5 | wallet: 6 | path: /wallet.json # Path to wallet 7 | passphrase: one # Password to decrypt wallet 8 | -------------------------------------------------------------------------------- /services/storage/artifacts.mk: -------------------------------------------------------------------------------- 1 | # Create new TLS certs to NeoFS node 2 | 3 | STORAGE_DIR=$(abspath services/storage) 4 | 5 | get.storage: 6 | @echo "⇒ Creating TLS certs to NeoFS node" 7 | ${STORAGE_DIR}/generate_cert.sh ${LOCAL_DOMAIN} > /dev/null 8 | -------------------------------------------------------------------------------- /services/ir/.hosts: -------------------------------------------------------------------------------- 1 | IPV4_PREFIX.61 ir01.LOCAL_DOMAIN 2 | IPV4_PREFIX.62 ir02.LOCAL_DOMAIN 3 | IPV4_PREFIX.63 ir03.LOCAL_DOMAIN 4 | IPV4_PREFIX.64 ir04.LOCAL_DOMAIN 5 | IPV4_PREFIX.65 ir05.LOCAL_DOMAIN 6 | IPV4_PREFIX.66 ir06.LOCAL_DOMAIN 7 | IPV4_PREFIX.67 ir07.LOCAL_DOMAIN 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # IDE 2 | .idea 3 | .vscode 4 | 5 | # Vendoring 6 | vendor 7 | 8 | temp 9 | tmp 10 | docker-compose.err 11 | 12 | .secrets 13 | sites/* 14 | !sites/.gitkeep 15 | 16 | # Runtime generation keys 17 | services/storage/*tls.crt 18 | services/storage/*tls.key 19 | 20 | # IR NeoFS contract configuration 21 | .ir.env 22 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | trim_trailing_whitespace = false 8 | 9 | [Makefile] 10 | indent_style = tab 11 | 12 | [*.conf] 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [*.{yml,yaml}] 17 | indent_style = space 18 | indent_size = 2 19 | -------------------------------------------------------------------------------- /docs/storage.md: -------------------------------------------------------------------------------- 1 | # Storage service 2 | 3 | ## .env settings 4 | 5 | ### NODE_VERSION 6 | 7 | Image version label to use for Storage docker containers. 8 | 9 | If you want to use locally built image, just set it's label here. Instead of 10 | pulling from DockerHub, the local image will be used. 11 | 12 | ### NODE_IMAGE=nspccdev/neofs-storage 13 | 14 | Image label prefix to use for Storage docker containers. 15 | -------------------------------------------------------------------------------- /help.mk: -------------------------------------------------------------------------------- 1 | .PHONY: help 2 | 3 | HELP_MAKEFILE_LIST=$(filter-out %/artifacts.mk, $(MAKEFILE_LIST)) 4 | 5 | # Show this help prompt 6 | help: 7 | @echo ' Usage:' 8 | @echo '' 9 | @echo ' make ' 10 | @echo '' 11 | @echo ' Targets:' 12 | @echo '' 13 | @awk '/^#/{ comment = substr($$0,3) } comment && /^[a-zA-Z][a-zA-Z0-9._/-]+ ?:/{ print " ", $$1, comment }' $(HELP_MAKEFILE_LIST) | column -t -s ':' | grep -v 'IGNORE' | sort -u 14 | -------------------------------------------------------------------------------- /bin/tick.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Running bin/tick.sh" 4 | 5 | # Source env settings 6 | . .env 7 | source bin/helper.sh 8 | 9 | # NeoFS ADM binary path and config path. 10 | NEOFS_ADM="${NEOFS_ADM:-./vendor/neofs-adm}" 11 | CONFIG_ADM="${CONFIG_ADM:-./neofs-adm.yml}" 12 | 13 | ${NEOFS_ADM} fschain force-new-epoch --alphabet-wallets services/ir${IR_NUMBER_OF_NODES}/alphabet \ 14 | -r http://ir01.${LOCAL_DOMAIN}:30333 -c ${CONFIG_ADM} 15 | -------------------------------------------------------------------------------- /services/neo-go/artifacts.mk: -------------------------------------------------------------------------------- 1 | # Download neo-go to deploy tests environment 2 | 3 | # Download neo-go binaries 4 | get.neo-go: NEO_GO_DEST=./vendor 5 | get.neo-go: NEO_GO_BIN=neo-go 6 | get.neo-go: 7 | @mkdir -p ${NEO_GO_DEST} 8 | 9 | ifeq (${NEO_GO_PATH},) 10 | @echo "⇒ Download compiled neo-go from ${NEO_GO_URL}" 11 | @curl -sSL ${NEO_GO_URL} -o ${NEO_GO_DEST}/${NEO_GO_BIN} 12 | else 13 | @echo "⇒ Copy compiled neo-go from ${NEO_GO_PATH}" 14 | @cp -r ${NEO_GO_PATH}/* ${NEO_GO_DEST} 15 | endif 16 | @chmod +x ${NEO_GO_DEST}/${NEO_GO_BIN} 17 | -------------------------------------------------------------------------------- /docs/s3_gate.md: -------------------------------------------------------------------------------- 1 | # S3 Protocol gateway 2 | 3 | Protocol Gateway to access data in NeoFS using AWS S3 protocol 4 | 5 | Source code and more information can be found in [project's GitHub repository](https://github.com/nspcc-dev/neofs-s3-gw) 6 | 7 | ## .env settings 8 | 9 | ### S3_GW_VERSION=0.29.0 10 | 11 | Image version label to use for containers. 12 | 13 | If you want to use locally built image, just set it's label here. Instead of 14 | pulling from DockerHub, the local image will be used. 15 | 16 | ### S3_GW_IMAGE=nspccdev/neofs-s3-gw 17 | 18 | Image label prefix to use for containers. 19 | -------------------------------------------------------------------------------- /services/storage/generate_cert.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source bin/helper.sh 4 | 5 | WORKDIR=$(dirname "$0") 6 | LOCAL_DOMAIN="$1" 7 | CERT="${WORKDIR}/s04tls.crt" 8 | KEY="${WORKDIR}/s04tls.key" 9 | 10 | [[ -f ${CERT} ]] || 11 | openssl req \ 12 | -new \ 13 | -newkey rsa:4096 \ 14 | -x509 \ 15 | -sha256 \ 16 | -days 365 \ 17 | -nodes \ 18 | -subj "/C=RU/ST=SPB/L=St.Petersburg/O=NSPCC/OU=NSPCC/CN=s04.${LOCAL_DOMAIN}" \ 19 | -keyout "${KEY}" \ 20 | -out "${CERT}" \ 21 | -addext "subjectAltName=DNS:s04.${LOCAL_DOMAIN}" &> /dev/null || 22 | die "Failed to generate SSL certificate for s04" 23 | -------------------------------------------------------------------------------- /services/basenet/docker-compose.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | services: 4 | 5 | basenet: 6 | container_name: bastion 7 | image: ${BASTION_IMAGE}:${BASTION_VERSION} 8 | domainname: ${LOCAL_DOMAIN} 9 | hostname: bastion 10 | command: ["/bin/sleep", "infinity"] 11 | restart: always 12 | stop_signal: SIGKILL 13 | environment: 14 | - TZ=Etc/UTC 15 | networks: 16 | internet: 17 | ipv4_address: ${IPV4_PREFIX}.10 18 | volumes: 19 | - ./../../vendor/hosts:/etc/hosts 20 | networks: 21 | internet: 22 | driver: bridge 23 | ipam: 24 | driver: default 25 | config: 26 | - subnet: ${IPV4_PREFIX}.0/24 27 | -------------------------------------------------------------------------------- /wallets/wallet.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "3.0", 3 | "accounts": [ 4 | { 5 | "address": "NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM", 6 | "key": "6PYP7YrwGnLuu4WYQbEe3WJiC44aKmqwqawLsp7H3oh5vocS9xTv2ZfTp3", 7 | "label": "", 8 | "contract": { 9 | "script": "DCEDGmxvu98CyjUXRfqGubpalFLXhaxPf8K3VIyipGxPz0pBVuezJw==", 10 | "parameters": [ 11 | { 12 | "name": "parameter0", 13 | "type": "Signature" 14 | } 15 | ], 16 | "deployed": false 17 | }, 18 | "lock": false, 19 | "isdefault": false 20 | } 21 | ], 22 | "scrypt": { 23 | "n": 16384, 24 | "r": 8, 25 | "p": 8 26 | }, 27 | "extra": { 28 | "Tokens": null 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /services/ir1/contract.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "3.0", 3 | "accounts": [ 4 | { 5 | "address": "Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn", 6 | "key": "6PYM8VdX2BSm7BSXKzV4Fz6S3R9cDLLWNrD9nMjxW352jEv3fsC8N3wNLY", 7 | "label": "", 8 | "contract": { 9 | "script": "DCECs2Ir9AF73+MXxYrtX0x1PyBrfbiWBG+n13S7xL9/jcJBVuezJw==", 10 | "parameters": [ 11 | { 12 | "name": "parameter0", 13 | "type": "Signature" 14 | } 15 | ], 16 | "deployed": false 17 | }, 18 | "lock": false, 19 | "isDefault": false 20 | } 21 | ], 22 | "scrypt": { 23 | "n": 16384, 24 | "r": 8, 25 | "p": 8 26 | }, 27 | "extra": { 28 | "Tokens": null 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /services/rest_gate/wallet.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "3.0", 3 | "accounts": [ 4 | { 5 | "address": "NPFCqWHfi9ixCJRu7DABRbVfXRbkSEr9Vo", 6 | "key": "6PYTAGjdaeicUDPqGv9mmgwb9kTwimWJJmmfNqJSDGH9qM79zSRcL9oHiB", 7 | "label": "REST Gateway", 8 | "contract": { 9 | "script": "DCECcuPzZCZ2VyDsm2jKEOMnU6xEWO2bF1dvOvBWTDFYB1ZBVuezJw==", 10 | "parameters": [ 11 | { 12 | "name": "parameter0", 13 | "type": "Signature" 14 | } 15 | ], 16 | "deployed": false 17 | }, 18 | "lock": false, 19 | "isDefault": false 20 | } 21 | ], 22 | "scrypt": { 23 | "n": 16384, 24 | "r": 8, 25 | "p": 8 26 | }, 27 | "extra": { 28 | "Tokens": null 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/faq.md: -------------------------------------------------------------------------------- 1 | # F.A.Q, tips and tricks 2 | 3 | ### How to see what's inside running container if there's no shell? 4 | 5 | You can run any program in container's namespace using `nsenter` utility. 6 | 7 | ``` 8 | $ docker inspect -f '{{.State.Pid}}' fs.neo.org 9 | 27242 10 | 11 | $ sudo nsenter -t 27242 -n netstat -antp 12 | Active Internet connections (servers and established) 13 | Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name 14 | tcp 0 0 127.0.0.11:43783 0.0.0.0:* LISTEN 1376/dockerd 15 | tcp6 0 0 :::443 :::* LISTEN 27242/nginx: master 16 | tcp6 0 0 :::80 :::* LISTEN 27242/nginx: master 17 | ``` 18 | -------------------------------------------------------------------------------- /services/s3_gate/wallet.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "3.0", 3 | "name":null, 4 | "accounts": [ 5 | { 6 | "address": "NUUb82KR2JrVByHs2YSKgtK29gKnF5q6Vt", 7 | "key": "6PYSPET41jKtqie2cfkqgy7q9ueeucH8bX9Gotm2HwdNEDptj6aBe8dDg8", 8 | "label": "NeoFS S3 Gate", 9 | "contract": { 10 | "script": "DCEDE7GsOoB24VWn55eyTwtlDMytWUHqWdfP1RoCSosqBr9BVuezJw==", 11 | "parameters": [ 12 | { 13 | "name": "parameter0", 14 | "type": "Signature" 15 | } 16 | ], 17 | "deployed": false 18 | }, 19 | "lock": false, 20 | "extra":null, 21 | "isDefault": false 22 | } 23 | ], 24 | "scrypt": { 25 | "n": 16384, 26 | "r": 8, 27 | "p": 8 28 | }, 29 | "extra": { 30 | "Tokens": null 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /bin/resolve.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Source env settings 4 | . .env 5 | source bin/helper.sh 6 | 7 | # NeoGo binary path. 8 | NEOGO="${NEOGO:-docker exec main_chain neo-go}" 9 | # NNS contract script hash 10 | output=$(curl -s --data '{ "id": 1, "jsonrpc": "2.0", "method": "getcontractstate", "params": [1] }' \ 11 | "http://ir01.${LOCAL_DOMAIN}:30333/") \ 12 | || die "Cannot fetch NNS contract state" 13 | 14 | NNS_ADDR=$(jq -r '.result.hash' <<< "$output") \ 15 | || die "Cannot parse NNS contract hash: $NNS_ADDR" 16 | 17 | ${NEOGO} contract testinvokefunction \ 18 | -r "http://ir01.${LOCAL_DOMAIN}:30333" \ 19 | "${NNS_ADDR}" resolve string:"${1}" int:16 \ 20 | | jq -r '.stack[0].value | if type=="array" then .[0].value else . end' \ 21 | | base64 -d \ 22 | || die "Cannot invoke 'NNS.resolve' $output" 23 | -------------------------------------------------------------------------------- /services/storage/wallet02.json: -------------------------------------------------------------------------------- 1 | { 2 | "version":"3.0", 3 | "accounts":[ 4 | { 5 | "address":"NVXXy3hNTvwVEZa2dAibALyJB3Q86aiHvL", 6 | "key":"6PYXd9hxMYfaCkgeZp3q1RoMB921RQFkRxYftcacTJ2S7MUwnivrxi6Yk5", 7 | "label":"", 8 | "contract":{ 9 | "script":"DCED/2W2rnkTSk3OnQ0504Uem6tO6Xq/hugeHFu8UM0oJq5BVuezJw==", 10 | "parameters":[ 11 | { 12 | "name":"parameter0", 13 | "type":"Signature" 14 | } 15 | ], 16 | "deployed":false 17 | }, 18 | "lock":false, 19 | "isDefault":false 20 | } 21 | ], 22 | "scrypt":{ 23 | "n":16384, 24 | "r":8, 25 | "p":8 26 | }, 27 | "extra":{ 28 | "Tokens":null 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /services/storage/wallet03.json: -------------------------------------------------------------------------------- 1 | { 2 | "version":"3.0", 3 | "accounts":[ 4 | { 5 | "address":"NPTmih9X14Y7xLvmD6RVtDHdH1Y9qJwoTe", 6 | "key":"6PYXNeQzge9fWztVnWYRbr5Mh9q1y4npKVARHYGb484Hct1iNd3vXGR1kk", 7 | "label":"", 8 | "contract":{ 9 | "script":"DCECrJIM198LYbKJBy5rlG4tpOGjG5qxxiG7R14w+kqxAsNBVuezJw==", 10 | "parameters":[ 11 | { 12 | "name":"parameter0", 13 | "type":"Signature" 14 | } 15 | ], 16 | "deployed":false 17 | }, 18 | "lock":false, 19 | "isDefault":false 20 | } 21 | ], 22 | "scrypt":{ 23 | "n":16384, 24 | "r":8, 25 | "p":8 26 | }, 27 | "extra":{ 28 | "Tokens":null 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /services/storage/wallet04.json: -------------------------------------------------------------------------------- 1 | { 2 | "version":"3.0", 3 | "accounts":[ 4 | { 5 | "address":"Ne2DAQbWvP1s7TbtFc7BStKMnjKJdBaVRm", 6 | "key":"6PYWCsGWx8uSVYK94tvK7Ccit8x8Z3f3dHADTFTgLhT9NBXTBqBECL8AyC", 7 | "label":"", 8 | "contract":{ 9 | "script":"DCEDjIYpWeVrQ+IPeRh8T+ngvHyMZsFgPmzw7H+Hq2sI3DVBVuezJw==", 10 | "parameters":[ 11 | { 12 | "name":"parameter0", 13 | "type":"Signature" 14 | } 15 | ], 16 | "deployed":false 17 | }, 18 | "lock":false, 19 | "isDefault":false 20 | } 21 | ], 22 | "scrypt":{ 23 | "n":16384, 24 | "r":8, 25 | "p":8 26 | }, 27 | "extra":{ 28 | "Tokens":null 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /services/s3_gate/cfg/config.yml: -------------------------------------------------------------------------------- 1 | logger: 2 | level: debug 3 | 4 | # Interval to check node health 5 | rebalance_interval: 30s 6 | 7 | # Timeout to check node health during rebalance 8 | healthcheck_timeout: 15s 9 | 10 | # Timeout to connect to a node 11 | connect_timeout: 10s 12 | 13 | # Limits for processing of clients' requests 14 | max_clients_count: 100 15 | 16 | # Deadline after which the gate sends error `RequestTimeout` to a client 17 | max_clients_deadline: 30s 18 | 19 | server: 20 | - address: 0.0.0.0:8080 21 | tls: 22 | enabled: true 23 | cert_file: /tls.crt 24 | key_file: /tls.key 25 | 26 | # Wallet configuration 27 | wallet: 28 | path: /wallet.json # Path to wallet 29 | passphrase: "s3" # Passphrase to decrypt wallet 30 | 31 | # RPC endpoint 32 | fschain: 33 | endpoints: 34 | - http://ir01.neofs.devenv:30333 35 | -------------------------------------------------------------------------------- /services/storage/wallet01.json: -------------------------------------------------------------------------------- 1 | { 2 | "version":"3.0", 3 | "accounts":[ 4 | { 5 | "address":"NejLbQpojKJWec4NQRMBhzsrmCyhXfGJJe", 6 | "key":"6PYSS8ccmBcttfcw2YJh8VcNSoeQbQLuJLQ7HoKeYF5roRmGs9LUvmKcWz", 7 | "label":"", 8 | "contract":{ 9 | "script":"DCECK7QEHFDWB/+HHex+TNd3g4jg6mhJ2EzL2aqPMuFqgTFBVuezJw==", 10 | "parameters":[ 11 | { 12 | "name":"parameter0", 13 | "type":"Signature" 14 | } 15 | ], 16 | "deployed":false 17 | }, 18 | "lock":false, 19 | "extra":null, 20 | "isDefault":true 21 | } 22 | ], 23 | "name":null, 24 | "scrypt":{ 25 | "n":16384, 26 | "r":8, 27 | "p":8 28 | }, 29 | "extra":{ 30 | "Tokens":null 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /bin/config.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Running bin/config.sh" 4 | 5 | # Source env settings 6 | . .env 7 | source bin/helper.sh 8 | 9 | # NeoFS ADM binary path and config path. 10 | NEOFS_ADM="${NEOFS_ADM:-./vendor/neofs-adm}" 11 | CONFIG_ADM="${CONFIG_ADM:-./neofs-adm.yml}" 12 | 13 | # NeoFS configuration record: 14 | # key is a string and value is a constant of [string|int|etc] type 15 | KEY=${1} 16 | VALUE="${2}" 17 | 18 | [ -z "$KEY" ] && echo "Empty config key" && exit 1 19 | [ -z "$VALUE" ] && echo "Empty config value" && exit 1 20 | 21 | # Change config value in side chain 22 | echo "Changing ${KEY} configuration value to ${VALUE}" 23 | 24 | ${NEOFS_ADM} fschain set-config --alphabet-wallets services/ir${IR_NUMBER_OF_NODES}/alphabet \ 25 | -r http://ir01.${LOCAL_DOMAIN}:30333 -c ${CONFIG_ADM} ${KEY}=${VALUE} --force 26 | 27 | # Update epoch to apply new configuration value 28 | ./bin/tick.sh 29 | -------------------------------------------------------------------------------- /services/rest_gate/docker-compose.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | services: 4 | rest_gate: 5 | image: ${REST_GW_IMAGE}:${REST_GW_VERSION} 6 | domainname: ${LOCAL_DOMAIN} 7 | hostname: rest 8 | container_name: rest_gate 9 | restart: "no" 10 | networks: 11 | rest_gate_int: 12 | internet: 13 | ipv4_address: ${IPV4_PREFIX}.83 14 | volumes: 15 | - ./wallet.json:/wallet.json 16 | - ./../../vendor/hosts:/etc/hosts 17 | - ./cfg:/etc/neofs/rest 18 | stop_signal: SIGKILL 19 | env_file: [ ".env" ] 20 | command: [ "neofs-rest-gw", "--config", "/etc/neofs/rest/config.yml" ] 21 | environment: 22 | - REST_GW_POOL_PEERS_0_ADDRESS=s01.${LOCAL_DOMAIN}:8080 23 | - REST_GW_POOL_PEERS_1_ADDRESS=s02.${LOCAL_DOMAIN}:8080 24 | - REST_GW_POOL_PEERS_2_ADDRESS=s03.${LOCAL_DOMAIN}:8080 25 | - REST_GW_POOL_PEERS_3_ADDRESS=s04.${LOCAL_DOMAIN}:8080 26 | 27 | networks: 28 | rest_gate_int: 29 | internet: 30 | external: true 31 | name: basenet_internet 32 | -------------------------------------------------------------------------------- /bin/contractDeploy.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Running bin/contractDeploy.sh" 4 | 5 | # Source env settings 6 | . .env 7 | . services/ir${IR_NUMBER_OF_NODES}/.ir.env 8 | source bin/helper.sh 9 | 10 | # NeoGo binary path. 11 | NEOGO="${NEOGO:-./vendor/neo-go}" 12 | 13 | CONFIG="${CONFIG:-./wallets/config.yml}" 14 | 15 | CONTRACT_ADDR=$(${NEOGO} util convert "${NEOFS_IR_MAINNET_CONTRACTS_NEOFS}" \ 16 | | grep 'LE ScriptHash to Address' \ 17 | | awk '{print $5}' \ 18 | | grep -oP "[A-z0-9]+" \ 19 | || die "Cannot parse contract address: ${NEOFS_IR_MAINNET_CONTRACTS_NEOFS}") 20 | 21 | keys=$(${NEOGO} wallet dump-keys -w services/ir${IR_NUMBER_OF_NODES}/alphabet/az.json \ 22 | | awk -v RS=':' 'END {print $0}' \ 23 | | grep -Eo '[0-9a-z]{66}' \ 24 | | tr '\n' ' ' \ 25 | || die "Cannot parse dump keys") 26 | 27 | echo "${keys}" 28 | 29 | ${NEOGO} contract deploy \ 30 | --wallet-config ${CONFIG} \ 31 | --in vendor/contracts/neofs/contract.nef \ 32 | --manifest vendor/contracts/neofs/manifest.json --force --await \ 33 | -r http://main-chain.${LOCAL_DOMAIN}:30333 \ 34 | [ true ffffffffffffffffffffffffffffffffffffffff \ 35 | [ ${keys} ] \ 36 | [ InnerRingCandidateFee 10000000000 WithdrawFee 100000000 ] ] 37 | 38 | -------------------------------------------------------------------------------- /bin/deposit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Running bin/deposit.sh" 4 | 5 | # Source env settings 6 | . .env 7 | . services/ir${IR_NUMBER_OF_NODES}/.ir.env 8 | source bin/helper.sh 9 | 10 | # NeoGo binary path. 11 | NEOGO="${NEOGO:-docker exec main_chain neo-go}" 12 | # Wallet file to use for deposit GAS from 13 | WALLET="${WALLET:-services/chain/node-wallet.json}" 14 | CONFIG="${CONFIG:-/wallets/config.yml}" 15 | # How much GAS to deposit. First cli argument or 50 by default 16 | DEPOSIT="${1:-50}" 17 | 18 | # Internal variables 19 | ADDR=$(jq -r .accounts[0].address < "${WALLET}" \ 20 | || die "Cannot get address from wallet: ${WALLET}") 21 | CONTRACT_ADDR=$(${NEOGO} util convert "${NEOFS_IR_MAINNET_CONTRACTS_NEOFS}" \ 22 | | grep 'LE ScriptHash to Address' \ 23 | | awk '{print $5}' \ 24 | | grep -oP "[A-z0-9]+" \ 25 | || die "Cannot parse contract address: ${NEOFS_IR_MAINNET_CONTRACTS_NEOFS}") 26 | 27 | # Make deposit 28 | # shellcheck disable=SC2086 29 | ${NEOGO} wallet nep17 transfer \ 30 | --wallet-config ${CONFIG} \ 31 | -r http://main-chain.${LOCAL_DOMAIN}:30333 \ 32 | --from ${ADDR} --force \ 33 | --to ${CONTRACT_ADDR} \ 34 | --token GAS \ 35 | --amount ${DEPOSIT} || die "Cannot transfer GAS to NeoFS contract" 36 | -------------------------------------------------------------------------------- /services/chain/docker-compose.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | services: 4 | neofs_main_chain: 5 | image: ${NEOGO_IMAGE}:${NEOGO_VERSION} 6 | container_name: main_chain 7 | command: ["node", "--config-path", "/config", "--privnet", "--debug"] 8 | healthcheck: 9 | test: [ "CMD", "/neo-go", "query", "height", "-r", "http://127.0.0.1:30333" ] 10 | interval: 5s 11 | timeout: 1s 12 | retries: 5 13 | start_period: 5s 14 | domainname: ${LOCAL_DOMAIN} 15 | hostname: main-chain 16 | restart: "no" 17 | networks: 18 | chain_int: 19 | internet: 20 | ipv4_address: ${IPV4_PREFIX}.50 21 | stop_signal: SIGKILL 22 | volumes: 23 | - ./protocol.privnet${IR_NUMBER_OF_NODES}.yml:/config/protocol.privnet.yml 24 | - ./node-wallet.json:/wallets/node-wallet.json 25 | - ./config.yml:/wallets/config.yml 26 | - ./../../vendor/hosts:/etc/hosts 27 | - ./../../vendor/neo-go:/neo-go 28 | 29 | main-chain-healthcheck: 30 | container_name: main-chain-healthcheck 31 | image: debian:10 32 | depends_on: 33 | neofs_main_chain: 34 | condition: service_healthy 35 | 36 | networks: 37 | chain_int: 38 | internet: 39 | external: true 40 | name: basenet_internet 41 | -------------------------------------------------------------------------------- /services/s3_gate/docker-compose.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | services: 4 | s3_gate: 5 | image: ${S3_GW_IMAGE}:${S3_GW_VERSION} 6 | domainname: ${LOCAL_DOMAIN} 7 | hostname: s3_gate 8 | container_name: s3_gate 9 | restart: "no" 10 | dns: 11 | - ${IPV4_PREFIX}.53 12 | networks: 13 | s3_gate_int: 14 | internet: 15 | ipv4_address: ${IPV4_PREFIX}.82 16 | volumes: 17 | - ./wallet.json:/wallet.json 18 | - ./tls.key:/tls.key 19 | - ./tls.crt:/tls.crt 20 | - ./../../vendor/hosts:/etc/hosts 21 | - ./cfg:/etc/neofs/s3 22 | stop_signal: SIGKILL 23 | env_file: [ ".env", ".s3.env" ] 24 | command: [ "neofs-s3-gw", "--config", "/etc/neofs/s3/config.yml" ] 25 | environment: 26 | - S3_GW_SERVER_0_ADDRESS=s3.${LOCAL_DOMAIN}:8080 27 | - S3_GW_LISTEN_DOMAINS=s3.${LOCAL_DOMAIN} 28 | - S3_GW_TREE_SERVICE=s01.${LOCAL_DOMAIN}:8080 29 | - S3_GW_PEERS_0_ADDRESS=s01.${LOCAL_DOMAIN}:8080 30 | - S3_GW_PEERS_0_WEIGHT=0.2 31 | - S3_GW_PEERS_1_ADDRESS=s02.${LOCAL_DOMAIN}:8080 32 | - S3_GW_PEERS_1_WEIGHT=0.2 33 | - S3_GW_PEERS_2_ADDRESS=s03.${LOCAL_DOMAIN}:8080 34 | - S3_GW_PEERS_2_WEIGHT=0.2 35 | - S3_GW_PEERS_3_ADDRESS=s04.${LOCAL_DOMAIN}:8080 36 | - S3_GW_PEERS_3_WEIGHT=0.2 37 | 38 | networks: 39 | s3_gate_int: 40 | internet: 41 | external: true 42 | name: basenet_internet 43 | -------------------------------------------------------------------------------- /services/s3_gate/tls.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDpDCCAowCCQDXZEH0aQRqFzANBgkqhkiG9w0BAQsFADCBkzELMAkGA1UEBhMC 3 | UlUxFjAUBgNVBAgMDVN0LlBldGVyc2J1cmcxGTAXBgNVBAcMEFNhaW50IFBldGVy 4 | c2J1cmcxDjAMBgNVBAoMBU5TUENDMREwDwYDVQQLDAhOZW8gU1BDQzERMA8GA1UE 5 | AwwIbnNwY2MucnUxGzAZBgkqhkiG9w0BCQEWDG9wc0Buc3BjYy5ydTAeFw0yMDA3 6 | MTMxNTQyMzZaFw0zMDA3MTExNTQyMzZaMIGTMQswCQYDVQQGEwJSVTEWMBQGA1UE 7 | CAwNU3QuUGV0ZXJzYnVyZzEZMBcGA1UEBwwQU2FpbnQgUGV0ZXJzYnVyZzEOMAwG 8 | A1UECgwFTlNQQ0MxETAPBgNVBAsMCE5lbyBTUENDMREwDwYDVQQDDAhuc3BjYy5y 9 | dTEbMBkGCSqGSIb3DQEJARYMb3BzQG5zcGNjLnJ1MIIBIjANBgkqhkiG9w0BAQEF 10 | AAOCAQ8AMIIBCgKCAQEAwqo2l4fS0U6wZCLh7VjQn1LXN8pZlVaA62C+g1SwoWV2 11 | Q5qM8FDihWj3UBO3F+6vUVJl8N5S0JroxxU6L48Wmshei145SLSl/F28tsk7Bbuz 12 | NOchonlelW77Xr6l7cDJBWUWGkDoq6a/S6w6jjCGhZq+X0gyS5nZ4HTouVNv2oFK 13 | eeJGtueLsS4zoVovrHdLSYdZH9/yC+E1WVCzQB+vdUF/vJLTuULgqncLV0sELmRl 14 | +xsnnAV/REJswtCmKgrmAv9pMebBw5EEgROTGazdToWdD5X44xTlHjUb1bMuF9tL 15 | YtUMdLxXceXZFhYhiTBO7ev9awKaNYslbxh+goJo1wIDAQABMA0GCSqGSIb3DQEB 16 | CwUAA4IBAQBDEGhAyOtfsNwbZ0oZIw06e0JXCmri+8jsn5Ly/yHU0+ecHgMA5AAQ 17 | AG2QRpZZtZCtD/Cj4i6nSTWbRhS0FgqY998p5Lnh/AXTZHBx0t3LKJupN59CIjCK 18 | 1eMEfQChoAZg66oO/obAFkq72gj8gpagMY9vFNVcszmse3FWrvlKmO1TwTEh+CzM 19 | 7wbmiL/ujm0lIf44pp0U4qYFcSimSDqbwOfeDPif9lMinzylDxMfaAKBHBHPj5Vt 20 | fX8dgf6MIqyz51u/2G0gHfXMDxXec8huYKt2EtPyavh6kFxxGvcA15m6seJTcu+h 21 | 6WzeQFa2NBg7Z3ai4DiPXirNtcHWeqxK 22 | -----END CERTIFICATE----- 23 | -------------------------------------------------------------------------------- /services/storage/cfg/config.yml: -------------------------------------------------------------------------------- 1 | # Logger section 2 | logger: 3 | level: debug # Minimum enabled logging level 4 | 5 | # Profiler section 6 | pprof: 7 | enabled: true 8 | address: :6060 # Server address 9 | shutdown_timeout: 15s # Timeout for profiling HTTP server graceful shutdown 10 | 11 | # Application metrics section 12 | prometheus: 13 | enabled: true 14 | address: :9090 # Server address 15 | shutdown_timeout: 15s # Timeout for metrics HTTP server graceful shutdown 16 | 17 | # NeoFS chain section 18 | fschain: 19 | dial_timeout: 30s # Timeout for side chain NEO RPC client connection 20 | quota_ttl: -1s 21 | endpoints: # Side chain NEO RPC endpoints 22 | - ws://ir01.neofs.devenv:30333/ws 23 | 24 | # Storage engine configuration 25 | storage: 26 | shards: 27 | - writecache: 28 | enabled: false 29 | path: /storage/wc0 # Write-cache root directory 30 | 31 | metabase: 32 | path: /storage/meta0 # Path to the metabase 33 | 34 | blobstor: 35 | type: fstree 36 | path: /storage/fstree0 # FSTree root directory 37 | depth: 2 38 | 39 | - writecache: 40 | enabled: false 41 | path: /storage/wc1 # Write-cache root directory 42 | 43 | metabase: 44 | path: /storage/meta1 # Path to the metabase 45 | 46 | blobstor: 47 | type: fstree 48 | path: /storage/fstree1 # FSTree root directory 49 | depth: 2 50 | -------------------------------------------------------------------------------- /services/ir1/docker-compose.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | services: 4 | 5 | ir01: 6 | image: ${IR_IMAGE}:${IR_VERSION} 7 | domainname: ${LOCAL_DOMAIN} 8 | hostname: ir01 9 | container_name: ir01 10 | restart: "no" 11 | networks: 12 | ir_int: 13 | internet: 14 | ipv4_address: ${IPV4_PREFIX}.61 15 | stop_signal: SIGKILL 16 | environment: 17 | - NEOFS_IR_CONTROL_GRPC_ENDPOINT=${NEOFS_IR_CONTROL_GRPC_ENDPOINT_1} 18 | volumes: 19 | - neofs_chain_ir01:/neofs_chain/ 20 | - ./alphabet/az.json:/wallet.json 21 | - ./../../vendor/hosts:/etc/hosts 22 | - ./../../vendor/neofs-cli:/neofs-cli 23 | - ./cli-cfg.yml:/cli-cfg.yml 24 | - ./cfg:/etc/neofs/ir 25 | - ${CA_CERTS_TRUSTED_STORE}/s04.${LOCAL_DOMAIN}.tls.crt:/etc/ssl/certs/s04tls.crt 26 | env_file: [ ".env", ".ir.env" ] 27 | command: [ "neofs-ir", "--config", "/etc/neofs/ir/config.yml" ] 28 | healthcheck: 29 | test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_IR_CONTROL_GRPC_ENDPOINT_1}", "--ir"] 30 | interval: 1s 31 | timeout: 1s 32 | retries: 300 33 | start_period: 5s 34 | 35 | ir-healthcheck: 36 | container_name: ir-healthcheck 37 | image: debian:10 38 | depends_on: 39 | ir01: 40 | condition: service_healthy 41 | 42 | networks: 43 | ir_int: 44 | internet: 45 | external: true 46 | name: basenet_internet 47 | 48 | volumes: 49 | neofs_chain_ir01: 50 | -------------------------------------------------------------------------------- /docs/notary.md: -------------------------------------------------------------------------------- 1 | # Notary service in chains 2 | 3 | [Notary service](https://github.com/neo-project/neo/issues/1573#issuecomment-704874472) 4 | is a service that provides on-chain network assistance to form multisignature 5 | transactions. Inner Ring (Alphabet) nodes use multisignature transactions to 6 | create containers, approve balance changes, update network map, tick epochs, 7 | etc. With notary service, it takes up to seven times fewer transactions 8 | to do these operations. Notary service calculates the exact amount of GAS 9 | to execute transaction, therefore operations are cheaper (withdraw fee **with** 10 | notary is less than 0.5 GAS; withdraw fee **without** notary is up to 7.0 GAS). 11 | 12 | By default, main chain service is running without notary service. However, you 13 | can change that in configuration. 14 | 15 | # Enable notary service in main chain 16 | 17 | To enable notary service in main chain do these steps. 18 | 19 | 1. Deploy processing contract to the chain. 20 | 21 | See up/bootstrap target in the Makefile and set its hash as a parameter during 22 | neofs contract deployment. 23 | 24 | Set notary_disabled to false for neofs deployments at the same time. 25 | 26 | 2. Update `service/chain/protocol.privnet.yml` and enable notary settings. 27 | 28 | ```yaml 29 | ProtocolConfiguration: 30 | P2PSigExtensions: true 31 | ApplicationConfiguration: 32 | P2PNotary: 33 | Enabled: true 34 | ``` 35 | 36 | Main chain generates a block once per 15 seconds, so Inner Ring takes about 37 | 15-30 seconds to make a notary deposit in main chain after startup. Then 38 | neofs-dev-env is ready to work. 39 | -------------------------------------------------------------------------------- /neofs_config.mk: -------------------------------------------------------------------------------- 1 | # Update epoch duration in side chain blocks (make update.epoch_duration val=30) 2 | update.epoch_duration: 3 | @./bin/config.sh EpochDuration $(val) 4 | 5 | # Update max object size in bytes (make update.max_object_size val=1000) 6 | update.max_object_size: 7 | @./bin/config.sh MaxObjectSize $(val) 8 | 9 | # Update container fee per alphabet node in fixed 12 (make update.container_fee val=500) 10 | update.container_fee: 11 | @./bin/config.sh ContainerFee $(val) 12 | 13 | # Update container alias fee per alphabet node in fixed 12 (make update.container_alias_fee val=100) 14 | update.container_alias_fee: 15 | @./bin/config.sh ContainerAliasFee $(val) 16 | 17 | # Update amount of EigenTrust iterations (make update.eigen_trust_iterations val=2) 18 | update.eigen_trust_iterations: 19 | @./bin/config.sh EigenTrustIterations $(val) 20 | 21 | 22 | # Update system dns to resolve container names (make update.system_dns val=container) 23 | update.system_dns: 24 | @./bin/config.sh SystemDNS $(val) 25 | 26 | # Update alpha parameter of EigenTrust algorithm in 0 <= f <= 1.0 (make update.eigen_trust_alpha val=0.2) 27 | update.eigen_trust_alpha: 28 | @./bin/config.sh EigenTrustAlpha $(val) 29 | 30 | # Update basic income rate in fixed 12 (make update.basic_income_rate val=1000) 31 | update.basic_income_rate: 32 | @./bin/config.sh BasicIncomeRate $(val) 33 | 34 | # Update homomorphic hashing disabled flag (make update.homomorphic_hashing_disable val=true) 35 | update.homomorphic_hashing_disable: 36 | @./bin/config.sh HomomorphicHashingDisabled $(val) 37 | 38 | # Tick new epoch in side chain 39 | tick.epoch: 40 | @./bin/tick.sh 41 | -------------------------------------------------------------------------------- /docs/basenet.md: -------------------------------------------------------------------------------- 1 | # basenet service 2 | 3 | The `basenet` service defines the common network to use as "Internet" to let 4 | services communicate to external world. It's a bridge network connected to the 5 | host machine, so all programs running on host can connect to services exposed to 6 | `basenet_internet` from devenv containers. 7 | 8 | ## .env settings 9 | 10 | ### LOCAL_DOMAIN=neofs.devenv 11 | 12 | Domain to use for all containers exposed to `basenet_internet`. 13 | 14 | ### IPV4_PREFIX=192.168.130 15 | 16 | IPv4 /24 subnet to use for all containers exposed to `basenet_internet`. Last 17 | octet will be defined in `docker-compose.yml` file for each container inside 18 | service. For simplicity, each service reserves ten host addresses. 19 | 20 | ### CA_CERTS_TRUSTED_STORE=/usr/local/share/ca-certificates 21 | Trusted store location to add node self-signed tls certificates. 22 | 23 | ## bastion container 24 | 25 | There is a `bastion` container with debian 10 userspace to simplify access to 26 | devenv services. 27 | 28 | Run shell in bastion: 29 | 30 | ``` 31 | neofs-dev-env$ docker exec -ti bastion /bin/bash 32 | root@bastion:/# ip a sh 33 | 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 34 | link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 35 | inet 127.0.0.1/8 scope host lo 36 | valid_lft forever preferred_lft forever 37 | 1569: eth0@if1570: mtu 1500 qdisc noqueue state UP group default 38 | link/ether 02:42:c0:a8:82:0a brd ff:ff:ff:ff:ff:ff link-netnsid 0 39 | inet 192.168.130.10/24 brd 192.168.130.255 scope global eth0 40 | valid_lft forever preferred_lft forever 41 | ``` 42 | -------------------------------------------------------------------------------- /services/s3_gate/tls.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEowIBAAKCAQEAwqo2l4fS0U6wZCLh7VjQn1LXN8pZlVaA62C+g1SwoWV2Q5qM 3 | 8FDihWj3UBO3F+6vUVJl8N5S0JroxxU6L48Wmshei145SLSl/F28tsk7BbuzNOch 4 | onlelW77Xr6l7cDJBWUWGkDoq6a/S6w6jjCGhZq+X0gyS5nZ4HTouVNv2oFKeeJG 5 | tueLsS4zoVovrHdLSYdZH9/yC+E1WVCzQB+vdUF/vJLTuULgqncLV0sELmRl+xsn 6 | nAV/REJswtCmKgrmAv9pMebBw5EEgROTGazdToWdD5X44xTlHjUb1bMuF9tLYtUM 7 | dLxXceXZFhYhiTBO7ev9awKaNYslbxh+goJo1wIDAQABAoIBAEIp3mJEjPgNOdDf 8 | NlEYpdfxLStOQIKMo0bdXAOBToOc28SAjDTGGSflFGIIQWwF+Vq3meRzfExgyouY 9 | AG3XwYQcZF4USX4XwG71YUXzQXdiY7ewc3Mos2gxD4kVXYpgwzJtOET2GN72zwAm 10 | asSXY7GXdesmu8mMYkxzEAKlhFgMj+bGE/4QQUBKG9ylGIdo07zmU6rAsVhnwQTb 11 | LE3cf+AxCeTVA7OsJCUUR4S9qsgXUN1WeaV8LNg0lYx8UTu1xlbrpSjx7B4eYy6J 12 | FGJWuT9b3X+cBLcGk3BzheUAfqBG2UFDxUCt0grqmmTBkB850MtCDhffhPjxxrD7 13 | KrwAcpECgYEA6HApn2VtWI/tDYCbNix6yxeqq73fO3ng6yFry1u7EYvl8hJXBgR4 14 | b6kAVc3y/9pZO/5D23dHl1PQtnU5401/j6dQrb8A2TMqZ1vA8XIdIMjOiVjZtYMF 15 | nXzmf78PEbw9jWlDVARJdAwkJeuDI4/HVvgiDAh3zxx5F8uDVP16/r8CgYEA1mXS 16 | 9owfLIPtPSxyMJoGU0jP7OP+HVwlKkXpvg7uBtINKSDW4UU4rnpIGW5MohR3ACWO 17 | ReFliOnGA5FXBp9GzkbJ+wIYovPIsGuBdxSsBlPY1S0yPlo30hr7E6cK3B3EuxDg 18 | SkbJcWp2EwXYEIyEcopbVUTTlBO3wmBFgm/Ps+kCgYA/+Kar9OlMR4hRgAS3uzQs 19 | cx4I2F/46YlKjU8yj9ODd8JYhk2nHVHcQWITO3RWkEyg41DftQtiDbJSlR7SfUDP 20 | U5gzyW69WISiH7GRgfucS0f0qxx4BVBlULvLitTl5631HnRmSivBIZpNSW01O1v8 21 | hpwwPaBjww1czCkgGgdg1wKBgQCkaSdTW/bX+z9lpvzWWnc5TN/uSJRpTW1Osphh 22 | 4C8WWeQvwvglfiDOZAWAQv5PWKQ9H4+v9P4Y9TSdLcpv0JrKuqxPabcc1xfyei6o 23 | 89hLbecc6vDZsfOWkowx8Oo6DDX+Qh3Nt+TorXxocBXV8vvqnkEV7ZbWuhwz2gHT 24 | 2gyMaQKBgEE7rNzm8Q03IqQ08eYaRw8gWz8EpLeVebrGqtoH9AR5cd4OeTeZAEqc 25 | iPehXctke2pUgS47XgG98G7Yg3E9UuOYM+H2nzQCoT7jrM0dZrVGZ0ty7z1a8QGe 26 | UrjaAC/cyIGdszhf0Rf3qA7450nit9Txh+ilLiumgnUezl+eJXyI 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /services/chain/protocol.privnet1.yml: -------------------------------------------------------------------------------- 1 | ProtocolConfiguration: 2 | Magic: 56753 3 | MaxTraceableBlocks: 200000 4 | TimePerBlock: 1s 5 | MemPoolSize: 50000 6 | StandbyCommittee: 7 | - 032ec21f003a9946430662c7287ba81bd9d60fa1faf18206434feadbd008f5ae00 8 | ValidatorsCount: 1 9 | VerifyTransactions: true 10 | P2PSigExtensions: false 11 | Genesis: 12 | Roles: 13 | NeoFSAlphabet: 14 | - 02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2 15 | 16 | ApplicationConfiguration: 17 | SkipBlockVerification: false 18 | DBConfiguration: 19 | Type: "boltdb" 20 | BoltDBOptions: 21 | FilePath: "./db/privnet.bolt" 22 | P2P: 23 | Addresses: 24 | - ":20333" 25 | DialTimeout: 3s 26 | ProtoTickInterval: 2s 27 | PingInterval: 30s 28 | PingTimeout: 90s 29 | MaxPeers: 10 30 | AttemptConnPeers: 5 31 | MinPeers: 0 32 | Relay: true 33 | RPC: 34 | Addresses: 35 | - ":30333" 36 | Enabled: true 37 | SessionEnabled: true 38 | EnableCORSWorkaround: false 39 | MaxGasInvoke: 15 40 | Prometheus: 41 | Addresses: 42 | - ":20001" 43 | Enabled: true 44 | Pprof: 45 | Addresses: 46 | - ":20011" 47 | Enabled: true 48 | Consensus: 49 | Enabled: true 50 | UnlockWallet: 51 | Path: "./wallets/node-wallet.json" 52 | Password: "one" 53 | Oracle: 54 | Enabled: true 55 | NeoFS: 56 | Nodes: 57 | - s01.neofs.devenv:8080 58 | - s02.neofs.devenv:8080 59 | - s03.neofs.devenv:8080 60 | - s04.neofs.devenv:8080 61 | UnlockWallet: 62 | Path: "./wallets/node-wallet.json" 63 | Password: "one" 64 | P2PNotary: 65 | Enabled: false 66 | UnlockWallet: 67 | Path: "./wallets/node-wallet.json" 68 | Password: "one" 69 | -------------------------------------------------------------------------------- /services/chain/node-wallet.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "accounts": [ 4 | { 5 | "address": "NZBEUULRXo79EqBQVPpUTziicepFc7kuXU", 6 | "key": "6PYPBU46oBC5E1BrDEGzRvvsMEQZCzLsDChQi3GyVGtWLTrtPo3o3n7fYU", 7 | "label": "single", 8 | "contract": { 9 | "script": "DCEDLsIfADqZRkMGYscoe6gb2dYPofrxggZDT+rb0Aj1rgBBVuezJw==", 10 | "parameters": [ 11 | { 12 | "name": "parameter0", 13 | "type": "Signature" 14 | } 15 | ], 16 | "deployed": false 17 | }, 18 | "lock": false, 19 | "isDefault": false 20 | }, 21 | { 22 | "address": "NPpKskku5gC6g59f2gVRR8fmvUTLDp9w7Y", 23 | "key": "6PYPBU46oBC5E1BrDEGzRvvsMEQZCzLsDChQi3GyVGtWLTrtPo3o3n7fYU", 24 | "label": "committee", 25 | "contract": { 26 | "script": "EQwhAy7CHwA6mUZDBmLHKHuoG9nWD6H68YIGQ0/q29AI9a4AEUGe0Nw6", 27 | "parameters": [ 28 | { 29 | "name": "parameter0", 30 | "type": "Signature" 31 | } 32 | ], 33 | "deployed": false 34 | }, 35 | "lock": false, 36 | "isDefault": false 37 | }, 38 | { 39 | "address": "NPpKskku5gC6g59f2gVRR8fmvUTLDp9w7Y", 40 | "key": "6PYPBU46oBC5E1BrDEGzRvvsMEQZCzLsDChQi3GyVGtWLTrtPo3o3n7fYU", 41 | "label": "consensus", 42 | "contract": { 43 | "script": "EQwhAy7CHwA6mUZDBmLHKHuoG9nWD6H68YIGQ0/q29AI9a4AEUGe0Nw6", 44 | "parameters": [ 45 | { 46 | "name": "parameter0", 47 | "type": "Signature" 48 | } 49 | ], 50 | "deployed": false 51 | }, 52 | "lock": false, 53 | "isDefault": false 54 | } 55 | ], 56 | "scrypt": { 57 | "n": 16384, 58 | "r": 8, 59 | "p": 8 60 | }, 61 | "extra": { 62 | "Tokens": null 63 | } 64 | } -------------------------------------------------------------------------------- /services/ir/artifacts.mk: -------------------------------------------------------------------------------- 1 | # Get NeoFS IR artifacts (NeoFS contracts, ADM and CLI) 2 | 3 | get.ir: get.cli get.contracts get.adm get.storage prepare.storage 4 | 5 | # Download NeoFS CLI 6 | .ONESHELL: 7 | get.cli: NEOFS_CLI_FILE=./vendor/neofs-cli 8 | get.cli: NEOFS_CLI_PATH?= 9 | get.cli: 10 | @touch services/ir${IR_NUMBER_OF_NODES}/.ir.env # https://github.com/docker/compose/issues/3560 11 | @mkdir -p ./vendor 12 | 13 | ifeq (${NEOFS_CLI_PATH},) 14 | @echo "⇒ Download NeoFS CLI binary from ${NEOFS_CLI_URL}" 15 | @curl -sSL "${NEOFS_CLI_URL}" -o ${NEOFS_CLI_FILE} 16 | @chmod 755 ${NEOFS_CLI_FILE} 17 | else 18 | @echo "⇒ Copy local binary from ${NEOFS_CLI_PATH}" 19 | @cp ${NEOFS_CLI_PATH} ${NEOFS_CLI_FILE} 20 | endif 21 | 22 | # Download NeoFS Contracts 23 | get.contracts: NEOFS_CONTRACTS_DEST=./vendor/contracts 24 | get.contracts: NEOFS_CONTRACTS_ARCHIVE=neofs-contracts.tar.gz 25 | get.contracts: 26 | @mkdir -p ${NEOFS_CONTRACTS_DEST} 27 | 28 | # TODO(#303): pull only NeoFS contract, others are not needed 29 | ifeq (${NEOFS_CONTRACTS_PATH},) 30 | @echo "⇒ Download compiled NeoFS contracts from ${NEOFS_CONTRACTS_URL}" 31 | @curl -sSL ${NEOFS_CONTRACTS_URL} -o ${NEOFS_CONTRACTS_ARCHIVE} 32 | @tar -xf ${NEOFS_CONTRACTS_ARCHIVE} -C ${NEOFS_CONTRACTS_DEST} --strip-components 1 33 | @rm ${NEOFS_CONTRACTS_ARCHIVE} 34 | else 35 | @echo "⇒ Copy compiled contracts from ${NEOFS_CONTRACTS_PATH}" 36 | @cp -r ${NEOFS_CONTRACTS_PATH}/* ${NEOFS_CONTRACTS_DEST} 37 | endif 38 | 39 | # Download NeoFS ADM tool 40 | get.adm: NEOFS_ADM_DEST=./vendor/neofs-adm 41 | get.adm: 42 | 43 | ifeq (${NEOFS_ADM_PATH},) 44 | @echo "⇒ Download NeoFS ADM binary from ${NEOFS_ADM_URL}" 45 | @curl -sSL ${NEOFS_ADM_URL} -o ${NEOFS_ADM_DEST} 46 | @chmod 755 ${NEOFS_ADM_DEST} 47 | else 48 | @echo "⇒ Copy neofs-adm binary from ${NEOFS_ADM_PATH}" 49 | @cp ${NEOFS_ADM_PATH} ${NEOFS_ADM_DEST} 50 | endif 51 | -------------------------------------------------------------------------------- /services/ir1/alphabet/az.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "3.0", 3 | "name": null, 4 | "accounts": [ 5 | { 6 | "address": "Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn", 7 | "key": "6PYM8VdX2BSm7BSXKzV4Fz6S3R9cDLLWNrD9nMjxW352jEv3fsC8N3wNLY", 8 | "label": "single", 9 | "contract": { 10 | "script": "DCECs2Ir9AF73+MXxYrtX0x1PyBrfbiWBG+n13S7xL9/jcJBVuezJw==", 11 | "parameters": [ 12 | { 13 | "name": "parameter0", 14 | "type": "Signature" 15 | } 16 | ], 17 | "deployed": false 18 | }, 19 | "lock": false, 20 | "extra": null, 21 | "isDefault": false 22 | }, 23 | { 24 | "address": "NfgHwwTi3wHAS8aFAN243C5vGbkYDpqLHP", 25 | "key": "6PYM8VdX2BSm7BSXKzV4Fz6S3R9cDLLWNrD9nMjxW352jEv3fsC8N3wNLY", 26 | "label": "consensus", 27 | "contract": { 28 | "script": "EQwhArNiK/QBe9/jF8WK7V9MdT8ga324lgRvp9d0u8S/f43CEUGe0Nw6", 29 | "parameters": [ 30 | { 31 | "name": "parameter0", 32 | "type": "Signature" 33 | } 34 | ], 35 | "deployed": false 36 | }, 37 | "lock": false, 38 | "extra": null, 39 | "isDefault": false 40 | }, 41 | { 42 | "address": "NfgHwwTi3wHAS8aFAN243C5vGbkYDpqLHP", 43 | "key": "6PYM8VdX2BSm7BSXKzV4Fz6S3R9cDLLWNrD9nMjxW352jEv3fsC8N3wNLY", 44 | "label": "committee", 45 | "contract": { 46 | "script": "EQwhArNiK/QBe9/jF8WK7V9MdT8ga324lgRvp9d0u8S/f43CEUGe0Nw6", 47 | "parameters": [ 48 | { 49 | "name": "parameter0", 50 | "type": "Signature" 51 | } 52 | ], 53 | "deployed": false 54 | }, 55 | "lock": false, 56 | "extra": null, 57 | "isDefault": true 58 | } 59 | ], 60 | "scrypt": { 61 | "n": 16384, 62 | "r": 8, 63 | "p": 8 64 | }, 65 | "extra": { 66 | "Tokens": null 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /docs/rest_gate.md: -------------------------------------------------------------------------------- 1 | # REST Gateway 2 | 3 | REST Gateway to access data in NeoFS using REST. 4 | 5 | Source code and more information can be found in [project's GitHub repository](https://github.com/nspcc-dev/neofs-rest-gw) 6 | 7 | ## .env settings 8 | 9 | ### REST_GW_VERSION=0.4.0 10 | 11 | Image version label to use for containers. 12 | 13 | If you want to use locally built image, just set its label here. 14 | Instead of pulling from DockerHub, the local image will be used. 15 | 16 | ### REST_GW_IMAGE=nspccdev/neofs-rest-gw 17 | 18 | Image label prefix to use for containers. 19 | 20 | ## Usage example 21 | 22 | - List container for specific owner: 23 | 24 | ```shell 25 | $ curl http://rest.neofs.devenv:8090/v1/containers?ownerId=NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM | jq 26 | { 27 | "containers": [ 28 | { 29 | "attributes": [ 30 | { 31 | "key": "Timestamp", 32 | "value": "1663755230" 33 | } 34 | ], 35 | "basicAcl": "fbfbfff", 36 | "cannedAcl": "eacl-public-read-write", 37 | "containerId": "BKcAvz8awKKy9NGsGKi1Hoxxu9AjTGvjKMNMQamvdLmX", 38 | "containerName": "", 39 | "ownerId": "NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM", 40 | "placementPolicy": "REP 1 IN X\nCBF 1\nSELECT 1 FROM * AS X", 41 | "version": "v2.13" 42 | } 43 | ], 44 | "size": 1 45 | } 46 | ``` 47 | 48 | 49 | - Get container info: 50 | 51 | ```shell 52 | $ curl http://rest.neofs.devenv:8090/v1/containers/BKcAvz8awKKy9NGsGKi1Hoxxu9AjTGvjKMNMQamvdLmX | jq 53 | { 54 | "attributes": [ 55 | { 56 | "key": "Timestamp", 57 | "value": "1663755230" 58 | } 59 | ], 60 | "basicAcl": "fbfbfff", 61 | "cannedAcl": "eacl-public-read-write", 62 | "containerId": "BKcAvz8awKKy9NGsGKi1Hoxxu9AjTGvjKMNMQamvdLmX", 63 | "containerName": "", 64 | "ownerId": "NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM", 65 | "placementPolicy": "REP 1 IN X\nCBF 1\nSELECT 1 FROM * AS X", 66 | "version": "v2.13" 67 | } 68 | ``` 69 | 70 | See all available routes http://rest.neofs.devenv:8090/v1/docs 71 | -------------------------------------------------------------------------------- /services/chain/protocol.privnet4.yml: -------------------------------------------------------------------------------- 1 | ProtocolConfiguration: 2 | Magic: 56753 3 | MaxTraceableBlocks: 200000 4 | TimePerBlock: 1s 5 | MemPoolSize: 50000 6 | StandbyCommittee: 7 | - 032ec21f003a9946430662c7287ba81bd9d60fa1faf18206434feadbd008f5ae00 8 | ValidatorsCount: 1 9 | VerifyTransactions: true 10 | P2PSigExtensions: false 11 | Genesis: 12 | Roles: 13 | NeoFSAlphabet: 14 | - 0345eefc50545e83dfc7ec9ab648210dddbeb3996912a8ff6416e2d3ec51a8e324 15 | - 039a1c33ed18bb57f6e6b3e712b54b924d2b9137c4906cf433ee8693a3810e380e 16 | - 02d3088931c034a390c5bea16d19ef2debe9702019270c94913528a8ac30e17373 17 | - 02fb7531661401222dcf2711bbd78597e8152ba886612e44ea530a08bbe4eba810 18 | 19 | ApplicationConfiguration: 20 | SkipBlockVerification: false 21 | DBConfiguration: 22 | Type: "boltdb" 23 | BoltDBOptions: 24 | FilePath: "./db/privnet.bolt" 25 | P2P: 26 | Addresses: 27 | - ":20333" 28 | DialTimeout: 3s 29 | ProtoTickInterval: 2s 30 | PingInterval: 30s 31 | PingTimeout: 90s 32 | MaxPeers: 10 33 | AttemptConnPeers: 5 34 | MinPeers: 0 35 | Relay: true 36 | RPC: 37 | Addresses: 38 | - ":30333" 39 | Enabled: true 40 | SessionEnabled: true 41 | EnableCORSWorkaround: false 42 | MaxGasInvoke: 15 43 | Prometheus: 44 | Addresses: 45 | - ":20001" 46 | Enabled: true 47 | Pprof: 48 | Addresses: 49 | - ":20011" 50 | Enabled: true 51 | Consensus: 52 | Enabled: true 53 | UnlockWallet: 54 | Path: "./wallets/node-wallet.json" 55 | Password: "one" 56 | Oracle: 57 | Enabled: true 58 | NeoFS: 59 | Nodes: 60 | - s01.neofs.devenv:8080 61 | - s02.neofs.devenv:8080 62 | - s03.neofs.devenv:8080 63 | - s04.neofs.devenv:8080 64 | UnlockWallet: 65 | Path: "./wallets/node-wallet.json" 66 | Password: "one" 67 | P2PNotary: 68 | Enabled: false 69 | UnlockWallet: 70 | Path: "./wallets/node-wallet.json" 71 | Password: "one" 72 | -------------------------------------------------------------------------------- /bin/update_hosts.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | : "${HOSTS_FILE:=/etc/hosts}" 5 | : "${NEOFS_CHAIN_CONFIG:=services/ir/cfg/config.yml}" 6 | temp_file=$(mktemp) 7 | 8 | # Get default hosts 9 | make hosts > "$temp_file" 10 | 11 | # Get the NeoFS chain IP address from the hosts file 12 | neofs_chain_ip=$(grep "ir01.neofs.devenv" "$temp_file" | awk '{print $1}') 13 | 14 | # Get the line numbers of "Addresses:" 15 | # FIXME(#302): grep by 'listen:' is unstable, jump to exact YAML fields 16 | addresses_lines=$(grep -n "listen:" "$NEOFS_CHAIN_CONFIG" | cut -d ':' -f 1) 17 | 18 | # Loop through each line number with "Addresses:" 19 | for addresses_line in $addresses_lines; do 20 | # Increment the line number to find the line with the IP and port 21 | target_line=$((addresses_line + 1)) 22 | 23 | # Replace the IP address in the target line in the NEOFS_CHAIN_CONFIG file 24 | sed -i "${target_line}s/\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}/$neofs_chain_ip/" "$NEOFS_CHAIN_CONFIG" 25 | done 26 | 27 | while IFS=" " read -r ip domain; do 28 | updated=false 29 | 30 | # Check if the domain starts with "*", and if so, escape it for use in regex 31 | if [[ "${domain:0:1}" == "*" ]]; then 32 | domain_escaped="\\${domain}" 33 | else 34 | domain_escaped="${domain//./\\.}" 35 | fi 36 | 37 | # Check if the IP and domain pair already exists in the hosts file 38 | if grep -Eq "^(([0-9]{1,3}[.]){3}[0-9]{1,3})[[:space:]]+${domain_escaped}$" "$HOSTS_FILE"; then 39 | existing_ip=$(grep -Eo "^(([0-9]{1,3}[.]){3}[0-9]{1,3})[[:space:]]+${domain_escaped}$" "$HOSTS_FILE" | awk '{print $1}') 40 | 41 | # If the IP addresses don't match, update the entry in the hosts file 42 | if [[ "$existing_ip" != "$ip" ]]; then 43 | sed -i -r "s/(([0-9]{1,3}[.]){3}[0-9]{1,3})[[:space:]]+${domain_escaped}/$ip $domain/" "$HOSTS_FILE" 44 | updated=true 45 | fi 46 | else 47 | # If the IP and domain pair doesn't exist in the hosts file, append it 48 | echo "$ip $domain" >> "$HOSTS_FILE" 49 | echo "Added: $ip $domain" 50 | fi 51 | 52 | # Print an update message if an entry has been updated 53 | if [[ "$updated" = true ]]; then 54 | echo "Updated: $ip $domain" 55 | fi 56 | done < "$temp_file" 57 | 58 | rm "$temp_file" 59 | -------------------------------------------------------------------------------- /services/chain/protocol.privnet7.yml: -------------------------------------------------------------------------------- 1 | ProtocolConfiguration: 2 | Magic: 56753 3 | MaxTraceableBlocks: 200000 4 | TimePerBlock: 1s 5 | MemPoolSize: 50000 6 | StandbyCommittee: 7 | - 032ec21f003a9946430662c7287ba81bd9d60fa1faf18206434feadbd008f5ae00 8 | ValidatorsCount: 1 9 | VerifyTransactions: true 10 | P2PSigExtensions: false 11 | Genesis: 12 | Roles: 13 | NeoFSAlphabet: 14 | - 022c0bf9e1a0c864905d2b8909555ae421db9a52f86ab268a84d9be42a6ad9d858 15 | - 024a640c8cbe3e34f0cd927950c64f6d0d239770397fe645d52bf920fddd655bf8 16 | - 024f19ec7a8e35722c8cdd7d21fcc2090f2658b2fd67b7b23f1936dc5e7b54b216 17 | - 03797de54a6abb6d19c22a5afabf30d320a9348b0f294315e74cb3b423b1ac9dc9 18 | - 03a90f6e7dcb49cf9603dde786781c4fdbd43f8a57c5b23fe93d4ecc33952599fd 19 | - 03c7aa35ab64aad9b85a35647b1f0aec59344271a6c2ed7644faf1997ee098bbab 20 | - 02ca9097295d28e28e2ae55eb62ca0b1ac48b2d9b6dcb64ddb936a64d80cb8b795 21 | 22 | ApplicationConfiguration: 23 | SkipBlockVerification: false 24 | DBConfiguration: 25 | Type: "boltdb" 26 | BoltDBOptions: 27 | FilePath: "./db/privnet.bolt" 28 | P2P: 29 | Addresses: 30 | - ":20333" 31 | DialTimeout: 3s 32 | ProtoTickInterval: 2s 33 | PingInterval: 30s 34 | PingTimeout: 90s 35 | MaxPeers: 10 36 | AttemptConnPeers: 5 37 | MinPeers: 0 38 | Relay: true 39 | RPC: 40 | Addresses: 41 | - ":30333" 42 | Enabled: true 43 | SessionEnabled: true 44 | EnableCORSWorkaround: false 45 | MaxGasInvoke: 15 46 | Prometheus: 47 | Addresses: 48 | - ":20001" 49 | Enabled: true 50 | Pprof: 51 | Addresses: 52 | - ":20011" 53 | Enabled: true 54 | Consensus: 55 | Enabled: true 56 | UnlockWallet: 57 | Path: "./wallets/node-wallet.json" 58 | Password: "one" 59 | Oracle: 60 | Enabled: true 61 | NeoFS: 62 | Nodes: 63 | - s01.neofs.devenv:8080 64 | - s02.neofs.devenv:8080 65 | - s03.neofs.devenv:8080 66 | - s04.neofs.devenv:8080 67 | UnlockWallet: 68 | Path: "./wallets/node-wallet.json" 69 | Password: "one" 70 | P2PNotary: 71 | Enabled: false 72 | UnlockWallet: 73 | Path: "./wallets/node-wallet.json" 74 | Password: "one" 75 | -------------------------------------------------------------------------------- /services/ir4/alphabet/az.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "accounts": [ 4 | { 5 | "address": "NVvgwaqoKJKWe9JYZbUH2pDNSuHdMvCayr", 6 | "key": "6PYRvQ8JfJrAgviGtGLXXDVcBFWksLHo8DUT3a2vBSe6EvBmpUyQ21XSPU", 7 | "label": "single", 8 | "contract": { 9 | "script": "DCEDRe78UFReg9/H7Jq2SCEN3b6zmWkSqP9kFuLT7FGo4yRBVuezJw==", 10 | "parameters": [ 11 | { 12 | "name": "parameter0", 13 | "type": "Signature" 14 | } 15 | ], 16 | "deployed": false 17 | }, 18 | "lock": false, 19 | "isDefault": false 20 | }, 21 | { 22 | "address": "NWXweiZSaJ31iCDD8VpuxoWfoMwUkJnaXC", 23 | "key": "6PYRvQ8JfJrAgviGtGLXXDVcBFWksLHo8DUT3a2vBSe6EvBmpUyQ21XSPU", 24 | "label": "committee", 25 | "contract": { 26 | "script": "EwwhA0Xu/FBUXoPfx+yatkghDd2+s5lpEqj/ZBbi0+xRqOMkDCEDmhwz7Ri7V/bms+cStUuSTSuRN8SQbPQz7oaTo4EOOA4MIQLTCIkxwDSjkMW+oW0Z7y3r6XAgGScMlJE1KKisMOFzcwwhAvt1MWYUASItzycRu9eFl+gVK6iGYS5E6lMKCLvk66gQFEGe0Nw6", 27 | "parameters": [ 28 | { 29 | "name": "parameter0", 30 | "type": "Signature" 31 | }, 32 | { 33 | "name": "parameter1", 34 | "type": "Signature" 35 | }, 36 | { 37 | "name": "parameter2", 38 | "type": "Signature" 39 | } 40 | ], 41 | "deployed": false 42 | }, 43 | "lock": false, 44 | "isDefault": false 45 | }, 46 | { 47 | "address": "NWXweiZSaJ31iCDD8VpuxoWfoMwUkJnaXC", 48 | "key": "6PYRvQ8JfJrAgviGtGLXXDVcBFWksLHo8DUT3a2vBSe6EvBmpUyQ21XSPU", 49 | "label": "consensus", 50 | "contract": { 51 | "script": "EwwhA0Xu/FBUXoPfx+yatkghDd2+s5lpEqj/ZBbi0+xRqOMkDCEDmhwz7Ri7V/bms+cStUuSTSuRN8SQbPQz7oaTo4EOOA4MIQLTCIkxwDSjkMW+oW0Z7y3r6XAgGScMlJE1KKisMOFzcwwhAvt1MWYUASItzycRu9eFl+gVK6iGYS5E6lMKCLvk66gQFEGe0Nw6", 52 | "parameters": [ 53 | { 54 | "name": "parameter0", 55 | "type": "Signature" 56 | }, 57 | { 58 | "name": "parameter1", 59 | "type": "Signature" 60 | }, 61 | { 62 | "name": "parameter2", 63 | "type": "Signature" 64 | } 65 | ], 66 | "deployed": false 67 | }, 68 | "lock": false, 69 | "isDefault": false 70 | } 71 | ], 72 | "scrypt": { 73 | "n": 16384, 74 | "r": 8, 75 | "p": 8 76 | }, 77 | "extra": { 78 | "Tokens": null 79 | } 80 | } -------------------------------------------------------------------------------- /services/ir4/alphabet/buky.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "accounts": [ 4 | { 5 | "address": "NYsJkMH9nPd6K345PNxLtWRdzNwKYy4KY7", 6 | "key": "6PYT2HbyT9cUBeV1jpoWXLhfSkVCHGnqig2qhmAY1ipKMtCFj7YfaDHWVu", 7 | "label": "single", 8 | "contract": { 9 | "script": "DCEDmhwz7Ri7V/bms+cStUuSTSuRN8SQbPQz7oaTo4EOOA5BVuezJw==", 10 | "parameters": [ 11 | { 12 | "name": "parameter0", 13 | "type": "Signature" 14 | } 15 | ], 16 | "deployed": false 17 | }, 18 | "lock": false, 19 | "isDefault": false 20 | }, 21 | { 22 | "address": "NWXweiZSaJ31iCDD8VpuxoWfoMwUkJnaXC", 23 | "key": "6PYT2HbyT9cUBeV1jpoWXLhfSkVCHGnqig2qhmAY1ipKMtCFj7YfaDHWVu", 24 | "label": "committee", 25 | "contract": { 26 | "script": "EwwhA0Xu/FBUXoPfx+yatkghDd2+s5lpEqj/ZBbi0+xRqOMkDCEDmhwz7Ri7V/bms+cStUuSTSuRN8SQbPQz7oaTo4EOOA4MIQLTCIkxwDSjkMW+oW0Z7y3r6XAgGScMlJE1KKisMOFzcwwhAvt1MWYUASItzycRu9eFl+gVK6iGYS5E6lMKCLvk66gQFEGe0Nw6", 27 | "parameters": [ 28 | { 29 | "name": "parameter0", 30 | "type": "Signature" 31 | }, 32 | { 33 | "name": "parameter1", 34 | "type": "Signature" 35 | }, 36 | { 37 | "name": "parameter2", 38 | "type": "Signature" 39 | } 40 | ], 41 | "deployed": false 42 | }, 43 | "lock": false, 44 | "isDefault": false 45 | }, 46 | { 47 | "address": "NWXweiZSaJ31iCDD8VpuxoWfoMwUkJnaXC", 48 | "key": "6PYT2HbyT9cUBeV1jpoWXLhfSkVCHGnqig2qhmAY1ipKMtCFj7YfaDHWVu", 49 | "label": "consensus", 50 | "contract": { 51 | "script": "EwwhA0Xu/FBUXoPfx+yatkghDd2+s5lpEqj/ZBbi0+xRqOMkDCEDmhwz7Ri7V/bms+cStUuSTSuRN8SQbPQz7oaTo4EOOA4MIQLTCIkxwDSjkMW+oW0Z7y3r6XAgGScMlJE1KKisMOFzcwwhAvt1MWYUASItzycRu9eFl+gVK6iGYS5E6lMKCLvk66gQFEGe0Nw6", 52 | "parameters": [ 53 | { 54 | "name": "parameter0", 55 | "type": "Signature" 56 | }, 57 | { 58 | "name": "parameter1", 59 | "type": "Signature" 60 | }, 61 | { 62 | "name": "parameter2", 63 | "type": "Signature" 64 | } 65 | ], 66 | "deployed": false 67 | }, 68 | "lock": false, 69 | "isDefault": false 70 | } 71 | ], 72 | "scrypt": { 73 | "n": 16384, 74 | "r": 8, 75 | "p": 8 76 | }, 77 | "extra": { 78 | "Tokens": null 79 | } 80 | } -------------------------------------------------------------------------------- /services/ir4/alphabet/glagoli.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "accounts": [ 4 | { 5 | "address": "NLcjoCwaoKN5Uz5QB7sqcwLfszoJuiCyzZ", 6 | "key": "6PYSVxG38nYuKj9rLZy7JinkNgnm3aZXWAQdx2QWB7PPYKymruybsjMqKC", 7 | "label": "single", 8 | "contract": { 9 | "script": "DCEC0wiJMcA0o5DFvqFtGe8t6+lwIBknDJSRNSiorDDhc3NBVuezJw==", 10 | "parameters": [ 11 | { 12 | "name": "parameter0", 13 | "type": "Signature" 14 | } 15 | ], 16 | "deployed": false 17 | }, 18 | "lock": false, 19 | "isDefault": false 20 | }, 21 | { 22 | "address": "NWXweiZSaJ31iCDD8VpuxoWfoMwUkJnaXC", 23 | "key": "6PYSVxG38nYuKj9rLZy7JinkNgnm3aZXWAQdx2QWB7PPYKymruybsjMqKC", 24 | "label": "committee", 25 | "contract": { 26 | "script": "EwwhA0Xu/FBUXoPfx+yatkghDd2+s5lpEqj/ZBbi0+xRqOMkDCEDmhwz7Ri7V/bms+cStUuSTSuRN8SQbPQz7oaTo4EOOA4MIQLTCIkxwDSjkMW+oW0Z7y3r6XAgGScMlJE1KKisMOFzcwwhAvt1MWYUASItzycRu9eFl+gVK6iGYS5E6lMKCLvk66gQFEGe0Nw6", 27 | "parameters": [ 28 | { 29 | "name": "parameter0", 30 | "type": "Signature" 31 | }, 32 | { 33 | "name": "parameter1", 34 | "type": "Signature" 35 | }, 36 | { 37 | "name": "parameter2", 38 | "type": "Signature" 39 | } 40 | ], 41 | "deployed": false 42 | }, 43 | "lock": false, 44 | "isDefault": false 45 | }, 46 | { 47 | "address": "NWXweiZSaJ31iCDD8VpuxoWfoMwUkJnaXC", 48 | "key": "6PYSVxG38nYuKj9rLZy7JinkNgnm3aZXWAQdx2QWB7PPYKymruybsjMqKC", 49 | "label": "consensus", 50 | "contract": { 51 | "script": "EwwhA0Xu/FBUXoPfx+yatkghDd2+s5lpEqj/ZBbi0+xRqOMkDCEDmhwz7Ri7V/bms+cStUuSTSuRN8SQbPQz7oaTo4EOOA4MIQLTCIkxwDSjkMW+oW0Z7y3r6XAgGScMlJE1KKisMOFzcwwhAvt1MWYUASItzycRu9eFl+gVK6iGYS5E6lMKCLvk66gQFEGe0Nw6", 52 | "parameters": [ 53 | { 54 | "name": "parameter0", 55 | "type": "Signature" 56 | }, 57 | { 58 | "name": "parameter1", 59 | "type": "Signature" 60 | }, 61 | { 62 | "name": "parameter2", 63 | "type": "Signature" 64 | } 65 | ], 66 | "deployed": false 67 | }, 68 | "lock": false, 69 | "isDefault": false 70 | } 71 | ], 72 | "scrypt": { 73 | "n": 16384, 74 | "r": 8, 75 | "p": 8 76 | }, 77 | "extra": { 78 | "Tokens": null 79 | } 80 | } -------------------------------------------------------------------------------- /services/ir4/alphabet/vedi.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "accounts": [ 4 | { 5 | "address": "NbMyB2qx4EBSsMmjxnSpvJ8FD43tLyfGMq", 6 | "key": "6PYXXyCMHSXy1tttqPkBeZ3yJEojJTWRKKPQiXbPCwiBZ4Kki8GosrMsbv", 7 | "label": "single", 8 | "contract": { 9 | "script": "DCEC+3UxZhQBIi3PJxG714WX6BUrqIZhLkTqUwoIu+TrqBBBVuezJw==", 10 | "parameters": [ 11 | { 12 | "name": "parameter0", 13 | "type": "Signature" 14 | } 15 | ], 16 | "deployed": false 17 | }, 18 | "lock": false, 19 | "isDefault": false 20 | }, 21 | { 22 | "address": "NWXweiZSaJ31iCDD8VpuxoWfoMwUkJnaXC", 23 | "key": "6PYXXyCMHSXy1tttqPkBeZ3yJEojJTWRKKPQiXbPCwiBZ4Kki8GosrMsbv", 24 | "label": "committee", 25 | "contract": { 26 | "script": "EwwhA0Xu/FBUXoPfx+yatkghDd2+s5lpEqj/ZBbi0+xRqOMkDCEDmhwz7Ri7V/bms+cStUuSTSuRN8SQbPQz7oaTo4EOOA4MIQLTCIkxwDSjkMW+oW0Z7y3r6XAgGScMlJE1KKisMOFzcwwhAvt1MWYUASItzycRu9eFl+gVK6iGYS5E6lMKCLvk66gQFEGe0Nw6", 27 | "parameters": [ 28 | { 29 | "name": "parameter0", 30 | "type": "Signature" 31 | }, 32 | { 33 | "name": "parameter1", 34 | "type": "Signature" 35 | }, 36 | { 37 | "name": "parameter2", 38 | "type": "Signature" 39 | } 40 | ], 41 | "deployed": false 42 | }, 43 | "lock": false, 44 | "isDefault": false 45 | }, 46 | { 47 | "address": "NWXweiZSaJ31iCDD8VpuxoWfoMwUkJnaXC", 48 | "key": "6PYXXyCMHSXy1tttqPkBeZ3yJEojJTWRKKPQiXbPCwiBZ4Kki8GosrMsbv", 49 | "label": "consensus", 50 | "contract": { 51 | "script": "EwwhA0Xu/FBUXoPfx+yatkghDd2+s5lpEqj/ZBbi0+xRqOMkDCEDmhwz7Ri7V/bms+cStUuSTSuRN8SQbPQz7oaTo4EOOA4MIQLTCIkxwDSjkMW+oW0Z7y3r6XAgGScMlJE1KKisMOFzcwwhAvt1MWYUASItzycRu9eFl+gVK6iGYS5E6lMKCLvk66gQFEGe0Nw6", 52 | "parameters": [ 53 | { 54 | "name": "parameter0", 55 | "type": "Signature" 56 | }, 57 | { 58 | "name": "parameter1", 59 | "type": "Signature" 60 | }, 61 | { 62 | "name": "parameter2", 63 | "type": "Signature" 64 | } 65 | ], 66 | "deployed": false 67 | }, 68 | "lock": false, 69 | "isDefault": false 70 | } 71 | ], 72 | "scrypt": { 73 | "n": 16384, 74 | "r": 8, 75 | "p": 8 76 | }, 77 | "extra": { 78 | "Tokens": null 79 | } 80 | } -------------------------------------------------------------------------------- /services/ir4/cfg/config.yml: -------------------------------------------------------------------------------- 1 | # Logger section 2 | logger: 3 | level: debug # Minimum enabled logging level 4 | 5 | # Wallet settings 6 | wallet: 7 | path: /wallet.json # Path to NEP-6 NEO wallet file 8 | password: one # Account password in the wallet 9 | 10 | # Profiler section 11 | pprof: 12 | enabled: true 13 | address: :6060 # Endpoint for application pprof profiling; disabled by default 14 | shutdown_timeout: 30s # Timeout for profiling HTTP server graceful shutdown 15 | 16 | # Application metrics section 17 | prometheus: 18 | enabled: true 19 | address: :9090 # Endpoint for application prometheus metrics; disabled by default 20 | shutdown_timeout: 30s # Timeout for metrics HTTP server graceful shutdown 21 | 22 | # Neo main chain RPC settings 23 | mainnet: 24 | enabled: true # Enable connection to mainchain; by default, 'false', run application in single chain environment 25 | endpoints: # List of websocket RPC endpoints in mainchain; ignore if mainchain is disabled 26 | - ws://main-chain:30333/ws 27 | 28 | # NeoFS chain RPC settings 29 | fschain: 30 | consensus: 31 | magic: 15405 32 | committee: 33 | - 0345eefc50545e83dfc7ec9ab648210dddbeb3996912a8ff6416e2d3ec51a8e324 34 | - 039a1c33ed18bb57f6e6b3e712b54b924d2b9137c4906cf433ee8693a3810e380e 35 | - 02d3088931c034a390c5bea16d19ef2debe9702019270c94913528a8ac30e17373 36 | - 02fb7531661401222dcf2711bbd78597e8152ba886612e44ea530a08bbe4eba810 37 | storage: 38 | type: boltdb 39 | path: /neofs_chain/db.bolt 40 | time_per_block: 1s 41 | max_traceable_blocks: 200000 42 | seed_nodes: 43 | - ir01 44 | - ir02 45 | - ir03 46 | - ir04 47 | rpc: 48 | listen: 49 | - ":30333" 50 | p2p: 51 | listen: 52 | - ":20333" 53 | set_roles_in_genesis: true 54 | 55 | # Network time settings 56 | timers: 57 | collect_basic_income: 58 | mul: 1 # Multiplier in x/y relation of when to start basic income asset collection within the epoch 59 | div: 2 # Divider in x/y relation of when to start basic income asset collecting within the epoch 60 | 61 | # Storage node GAS emission settings 62 | emit: 63 | storage: 64 | amount: 1000000000 # Fixed8 value of sidechain GAS emitted to all storage nodes once per GAS emission cycle; disabled by default 65 | 66 | # Settlement settings 67 | settlement: 68 | basic_income_rate: 100000000 # Optional: override basic income rate value from network config; applied only in debug mode 69 | 70 | experimental: 71 | chain_meta_data: true # Optional: allows creating containers with metadata handled via FS chain 72 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | # Basenet settings 2 | LOCAL_DOMAIN=neofs.devenv 3 | IPV4_PREFIX=192.168.130 4 | CA_CERTS_TRUSTED_STORE="${PWD}/vendor/certs" 5 | 6 | # Bastion image 7 | BASTION_VERSION=10 8 | BASTION_IMAGE=debian 9 | 10 | #NEOGO 11 | NEOGO_VERSION=0.114.0 12 | NEOGO_IMAGE=nspccdev/neo-go 13 | NEO_GO_PLATFORM=linux-amd64 14 | NEO_GO_URL="https://github.com/nspcc-dev/neo-go/releases/download/v${NEOGO_VERSION}/neo-go-${NEO_GO_PLATFORM}" 15 | 16 | # NeoFS InnerRing nodes 17 | IR_VERSION=0.50.2 18 | IR_IMAGE=nspccdev/neofs-ir 19 | IR_NUMBER_OF_NODES=1 20 | 21 | # NeoFS Storage nodes 22 | NODE_VERSION=0.50.2 23 | NODE_IMAGE=nspccdev/neofs-storage 24 | 25 | # REST Gate 26 | REST_GW_VERSION=0.8.2 27 | REST_GW_IMAGE=nspccdev/neofs-rest-gw 28 | 29 | # S3 Gate 30 | S3_GW_VERSION=0.31.0 31 | S3_GW_IMAGE=nspccdev/neofs-s3-gw 32 | #S3_GW_PLATFORM=linux-amd64 33 | #S3_AUTHMATE_URL=https://github.com/nspcc-dev/neofs-s3-gw/releases/download/v${S3_GW_VERSION}/neofs-s3-authmate-${S3_GW_PLATFORM} 34 | #S3_GW_URL=https://github.com/nspcc-dev/neofs-s3-gw/releases/download/v${S3_GW_VERSION}/neofs-s3-gw-${S3_GW_PLATFORM} 35 | 36 | # NeoFS CLI binary 37 | NEOFS_CLI_VERSION=v0.50.2 38 | NEOFS_CLI_URL="https://github.com/nspcc-dev/neofs-node/releases/download/${NEOFS_CLI_VERSION}/neofs-cli-linux-amd64" 39 | #NEOFS_CLI_PATH=/path/to/neofs-cli-binary 40 | 41 | # NeoFS ADM tool binary 42 | NEOFS_ADM_VERSION=v0.50.2 43 | NEOFS_ADM_URL="https://github.com/nspcc-dev/neofs-node/releases/download/${NEOFS_ADM_VERSION}/neofs-adm-linux-amd64" 44 | #NEOFS_ADM_PATH=/path/to/neofs-adm-binary 45 | 46 | # Compiled NeoFS Smart Contracts 47 | NEOFS_CONTRACTS_VERSION=v0.25.1 48 | NEOFS_CONTRACTS_URL="https://github.com/nspcc-dev/neofs-contract/releases/download/${NEOFS_CONTRACTS_VERSION}/neofs-contract-${NEOFS_CONTRACTS_VERSION}.tar.gz" 49 | #NEOFS_CONTRACTS_PATH=/path/to/unpacked/neofs-contracts-dir 50 | 51 | # Control service addresses used for healthchecks 52 | NEOFS_IR_CONTROL_GRPC_ENDPOINT_1="ir01.${LOCAL_DOMAIN}:16512" 53 | NEOFS_IR_CONTROL_GRPC_ENDPOINT_2="ir02.${LOCAL_DOMAIN}:16512" 54 | NEOFS_IR_CONTROL_GRPC_ENDPOINT_3="ir03.${LOCAL_DOMAIN}:16512" 55 | NEOFS_IR_CONTROL_GRPC_ENDPOINT_4="ir04.${LOCAL_DOMAIN}:16512" 56 | NEOFS_IR_CONTROL_GRPC_ENDPOINT_5="ir05.${LOCAL_DOMAIN}:16512" 57 | NEOFS_IR_CONTROL_GRPC_ENDPOINT_6="ir06.${LOCAL_DOMAIN}:16512" 58 | NEOFS_IR_CONTROL_GRPC_ENDPOINT_7="ir07.${LOCAL_DOMAIN}:16512" 59 | NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_1="s01.${LOCAL_DOMAIN}:8081" 60 | NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_2="s02.${LOCAL_DOMAIN}:8081" 61 | NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_3="s03.${LOCAL_DOMAIN}:8081" 62 | NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_4="s04.${LOCAL_DOMAIN}:8081" 63 | -------------------------------------------------------------------------------- /docs/ir.md: -------------------------------------------------------------------------------- 1 | # NeoFS Inner Ring 2 | 3 | NeoFS Inner Ring (Alphabet) node. According to governance scheme, Inner Ring 4 | should contain Alphabet nodes that share key with one of side chain consensus 5 | nodes. In basic setup there is a single Inner Ring (Alphabet) node running 6 | consensus node internally. 7 | 8 | Deployed contracts: 9 | - [executables](https://github.com/nspcc-dev/neofs-node/tree/v0.39.1/contracts). 10 | - [source code](https://github.com/nspcc-dev/neofs-contract/tree/v0.19.1) 11 | 12 | N3 RPC service is served on `http://ir01.neofs.devenv:30333`. 13 | 14 | ## .env settings 15 | 16 | ### IR_VERSION 17 | 18 | Image version label to use for Inner Ring docker containers. 19 | 20 | If you want to use locally built image, just set it's label here. Instead of 21 | pulling from DockerHub, the local image will be used. 22 | 23 | ### IR_IMAGE=nspccdev/neofs-ir 24 | 25 | Image label prefix to use for Inner Ring docker containers. 26 | 27 | ### IR_NUMBER_OF_NODES 28 | 29 | The number of IR nodes that will work. The value must be either 1, 4, or 7. 30 | 31 | ## NeoFS global config 32 | 33 | NeoFS uses global configuration to store epoch duration, maximum object size, 34 | container fee and other network parameters. Global configuration is recorded in 35 | NeoFS chain and managed by Inner Ring (Alphabet) nodes. 36 | 37 | To change these parameters use `make update.*` commands. Command down below 38 | changes epoch duration from 300 blocks (about 300 seconds with 1bps) to 30. 39 | Script enters passwords automatically with `expect` utility. 40 | 41 | ``` 42 | $ make update.epoch_duration val=30 43 | Changing EpochDuration configuration value to 30 44 | Enter account NfgHwwTi3wHAS8aFAN243C5vGbkYDpqLHP password > 45 | Sent invocation transaction bdc0fa88cd6719ef6df2b9c82de423ddec6141ca24255c2d0072688083b1de9d 46 | Updating NeoFS epoch to 20 47 | Enter account NfgHwwTi3wHAS8aFAN243C5vGbkYDpqLHP password > 48 | Sent invocation transaction 12296e1ce24dd6c04edb9c56d0a1d0e26d3226adefb0333c74a28788f44a8d0f 49 | ``` 50 | 51 | Read more about available configuration in Makefile help. 52 | 53 | ``` 54 | $ make help 55 | ... 56 | Targets: 57 | ... 58 | update.basic_income_rate Update basic income rate in fixed 12 (make update.basic_income_rate val=1000) 59 | update.container_fee Update container fee per alphabet node in fixed 12 (make update.container_fee val=500) 60 | update.eigen_trust_iterations Update amount of EigenTrust iterations (make update.eigen_trust_iterations val=2) 61 | update.epoch_duration Update epoch duration in side chain blocks (make update.epoch_duration val=30) 62 | update.max_object_size Update max object size in bytes (make update.max_object_size val=1000) 63 | ``` 64 | -------------------------------------------------------------------------------- /services/ir1/cfg/config.yml: -------------------------------------------------------------------------------- 1 | # Logger section 2 | logger: 3 | level: debug # Minimum enabled logging level 4 | 5 | # Wallet settings 6 | wallet: 7 | path: /wallet.json # Path to NEP-6 NEO wallet file 8 | address: Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn # Account address in the wallet; ignore to use default address 9 | password: one # Account password in the wallet 10 | 11 | # Profiler section 12 | pprof: 13 | enabled: true 14 | address: :6060 # Endpoint for application pprof profiling; disabled by default 15 | shutdown_timeout: 30s # Timeout for profiling HTTP server graceful shutdown 16 | 17 | # Application metrics section 18 | prometheus: 19 | enabled: true 20 | address: :9090 # Endpoint for application prometheus metrics; disabled by default 21 | shutdown_timeout: 30s # Timeout for metrics HTTP server graceful shutdown 22 | 23 | # Neo main chain RPC settings 24 | mainnet: 25 | enabled: true # Enable connection to mainchain; by default, 'false', run application in single chain environment 26 | endpoints: # List of websocket RPC endpoints in mainchain; ignore if mainchain is disabled 27 | - ws://main-chain:30333/ws 28 | 29 | # NeoFS chain RPC settings 30 | fschain: 31 | validators: # List of hex-encoded 33-byte public keys of sidechain validators to vote for at application startup 32 | - 02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2 33 | consensus: 34 | magic: 15405 35 | committee: 36 | - 02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2 37 | storage: 38 | type: boltdb 39 | path: /neofs_chain/db.bolt 40 | time_per_block: 1s 41 | max_traceable_blocks: 200000 42 | seed_nodes: 43 | - :20333 44 | rpc: 45 | listen: 46 | - ":30333" 47 | p2p: 48 | dial_timeout: 3s 49 | proto_tick_interval: 50 | listen: 51 | - ":20333" 52 | peers: 53 | min: 0 54 | max: 10 55 | attempts: 5 56 | ping: 57 | interval: 30s 58 | timeout: 90s 59 | set_roles_in_genesis: true 60 | 61 | # Network time settings 62 | timers: 63 | collect_basic_income: 64 | mul: 1 # Multiplier in x/y relation of when to start basic income asset collection within the epoch 65 | div: 2 # Divider in x/y relation of when to start basic income asset collecting within the epoch 66 | 67 | # Storage node GAS emission settings 68 | emit: 69 | storage: 70 | amount: 1000000000 # Fixed8 value of sidechain GAS emitted to all storage nodes once per GAS emission cycle; disabled by default 71 | 72 | # Settlement settings 73 | settlement: 74 | basic_income_rate: 100000000 # Optional: override basic income rate value from network config; applied only in debug mode 75 | 76 | experimental: 77 | chain_meta_data: true # Optional: allows creating containers with metadata handled via FS chain 78 | -------------------------------------------------------------------------------- /services/ir7/cfg/config.yml: -------------------------------------------------------------------------------- 1 | # Logger section 2 | logger: 3 | level: debug # Minimum enabled logging level 4 | 5 | # Wallet settings 6 | wallet: 7 | path: /wallet.json # Path to NEP-6 NEO wallet file 8 | password: one # Account password in the wallet 9 | 10 | # Profiler section 11 | pprof: 12 | enabled: true 13 | address: :6060 # Endpoint for application pprof profiling; disabled by default 14 | shutdown_timeout: 30s # Timeout for profiling HTTP server graceful shutdown 15 | 16 | # Application metrics section 17 | prometheus: 18 | enabled: true 19 | address: :9090 # Endpoint for application prometheus metrics; disabled by default 20 | shutdown_timeout: 30s # Timeout for metrics HTTP server graceful shutdown 21 | 22 | # Neo main chain RPC settings 23 | mainnet: 24 | enabled: true # Enable connection to mainchain; by default, 'false', run application in single chain environment 25 | endpoints: # List of websocket RPC endpoints in mainchain; ignore if mainchain is disabled 26 | - ws://main-chain:30333/ws 27 | 28 | # NeoFS chain RPC settings 29 | fschain: 30 | consensus: 31 | magic: 15405 32 | committee: 33 | - 022c0bf9e1a0c864905d2b8909555ae421db9a52f86ab268a84d9be42a6ad9d858 34 | - 024a640c8cbe3e34f0cd927950c64f6d0d239770397fe645d52bf920fddd655bf8 35 | - 024f19ec7a8e35722c8cdd7d21fcc2090f2658b2fd67b7b23f1936dc5e7b54b216 36 | - 03797de54a6abb6d19c22a5afabf30d320a9348b0f294315e74cb3b423b1ac9dc9 37 | - 03a90f6e7dcb49cf9603dde786781c4fdbd43f8a57c5b23fe93d4ecc33952599fd 38 | - 03c7aa35ab64aad9b85a35647b1f0aec59344271a6c2ed7644faf1997ee098bbab 39 | - 02ca9097295d28e28e2ae55eb62ca0b1ac48b2d9b6dcb64ddb936a64d80cb8b795 40 | storage: 41 | type: boltdb 42 | path: /neofs_chain/db.bolt 43 | time_per_block: 1s 44 | max_traceable_blocks: 200000 45 | seed_nodes: 46 | - ir01 47 | - ir02 48 | - ir03 49 | - ir04 50 | - ir05 51 | - ir06 52 | - ir07 53 | rpc: 54 | listen: 55 | - ":30333" 56 | p2p: 57 | listen: 58 | - ":20333" 59 | set_roles_in_genesis: true 60 | 61 | # Network time settings 62 | timers: 63 | collect_basic_income: 64 | mul: 1 # Multiplier in x/y relation of when to start basic income asset collection within the epoch 65 | div: 2 # Divider in x/y relation of when to start basic income asset collecting within the epoch 66 | 67 | # Storage node GAS emission settings 68 | emit: 69 | storage: 70 | amount: 1000000000 # Fixed8 value of sidechain GAS emitted to all storage nodes once per GAS emission cycle; disabled by default 71 | 72 | # Settlement settings 73 | settlement: 74 | basic_income_rate: 100000000 # Optional: override basic income rate value from network config; applied only in debug mode 75 | 76 | experimental: 77 | chain_meta_data: true # Optional: allows creating containers with metadata handled via FS chain 78 | -------------------------------------------------------------------------------- /services/ir7/alphabet/az.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "accounts": [ 4 | { 5 | "address": "NPa49xr5Fp3wZrvUqbdW1SArhpSGRqKS8d", 6 | "key": "6PYNhVyQuRgZWjM9oeTV9ESrybsJ57aQ6zfydm1jaRn7cvn5A7XgJyMLRG", 7 | "label": "single", 8 | "contract": { 9 | "script": "DCECSmQMjL4+NPDNknlQxk9tDSOXcDl/5kXVK/kg/d1lW/hBVuezJw==", 10 | "parameters": [ 11 | { 12 | "name": "parameter0", 13 | "type": "Signature" 14 | } 15 | ], 16 | "deployed": false 17 | }, 18 | "lock": false, 19 | "isDefault": false 20 | }, 21 | { 22 | "address": "NMkB37Z5ey3Lygck273aU2TQHTK6NhL8hC", 23 | "key": "6PYNhVyQuRgZWjM9oeTV9ESrybsJ57aQ6zfydm1jaRn7cvn5A7XgJyMLRG", 24 | "label": "committee", 25 | "contract": { 26 | "script": "FAwhAiwL+eGgyGSQXSuJCVVa5CHbmlL4arJoqE2b5Cpq2dhYDCECSmQMjL4+NPDNknlQxk9tDSOXcDl/5kXVK/kg/d1lW/gMIQJPGex6jjVyLIzdfSH8wgkPJliy/We3sj8ZNtxee1SyFgwhA3l95Upqu20Zwipa+r8w0yCpNIsPKUMV50yztCOxrJ3JDCEDqQ9ufctJz5YD3eeGeBxP29Q/ilfFsj/pPU7MM5Ulmf0MIQPHqjWrZKrZuFo1ZHsfCuxZNEJxpsLtdkT68Zl+4Ji7qwwhAsqQlyldKOKOKuVetiygsaxIstm23LZN25NqZNgMuLeVF0Ge0Nw6", 27 | "parameters": [ 28 | { 29 | "name": "parameter0", 30 | "type": "Signature" 31 | }, 32 | { 33 | "name": "parameter1", 34 | "type": "Signature" 35 | }, 36 | { 37 | "name": "parameter2", 38 | "type": "Signature" 39 | }, 40 | { 41 | "name": "parameter3", 42 | "type": "Signature" 43 | } 44 | ], 45 | "deployed": false 46 | }, 47 | "lock": false, 48 | "isDefault": false 49 | }, 50 | { 51 | "address": "NZxoqHeWp6XfKwHNMqJsdzFyHQMDPnKqAW", 52 | "key": "6PYNhVyQuRgZWjM9oeTV9ESrybsJ57aQ6zfydm1jaRn7cvn5A7XgJyMLRG", 53 | "label": "consensus", 54 | "contract": { 55 | "script": "FQwhAiwL+eGgyGSQXSuJCVVa5CHbmlL4arJoqE2b5Cpq2dhYDCECSmQMjL4+NPDNknlQxk9tDSOXcDl/5kXVK/kg/d1lW/gMIQJPGex6jjVyLIzdfSH8wgkPJliy/We3sj8ZNtxee1SyFgwhA3l95Upqu20Zwipa+r8w0yCpNIsPKUMV50yztCOxrJ3JDCEDqQ9ufctJz5YD3eeGeBxP29Q/ilfFsj/pPU7MM5Ulmf0MIQPHqjWrZKrZuFo1ZHsfCuxZNEJxpsLtdkT68Zl+4Ji7qwwhAsqQlyldKOKOKuVetiygsaxIstm23LZN25NqZNgMuLeVF0Ge0Nw6", 56 | "parameters": [ 57 | { 58 | "name": "parameter0", 59 | "type": "Signature" 60 | }, 61 | { 62 | "name": "parameter1", 63 | "type": "Signature" 64 | }, 65 | { 66 | "name": "parameter2", 67 | "type": "Signature" 68 | }, 69 | { 70 | "name": "parameter3", 71 | "type": "Signature" 72 | }, 73 | { 74 | "name": "parameter4", 75 | "type": "Signature" 76 | } 77 | ], 78 | "deployed": false 79 | }, 80 | "lock": false, 81 | "isDefault": false 82 | } 83 | ], 84 | "scrypt": { 85 | "n": 16384, 86 | "r": 8, 87 | "p": 8 88 | }, 89 | "extra": { 90 | "Tokens": null 91 | } 92 | } -------------------------------------------------------------------------------- /services/ir7/alphabet/buky.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "accounts": [ 4 | { 5 | "address": "NhGnZcSeSsXG4wU1uKfCLatSFYNf4ufaF9", 6 | "key": "6PYVzjqEm4DMdNq8hPxDfbgAqKuSKzEcGSUCxRSpp8EGzXrkTbvao8ejfn", 7 | "label": "single", 8 | "contract": { 9 | "script": "DCEDx6o1q2Sq2bhaNWR7HwrsWTRCcabC7XZE+vGZfuCYu6tBVuezJw==", 10 | "parameters": [ 11 | { 12 | "name": "parameter0", 13 | "type": "Signature" 14 | } 15 | ], 16 | "deployed": false 17 | }, 18 | "lock": false, 19 | "isDefault": false 20 | }, 21 | { 22 | "address": "NMkB37Z5ey3Lygck273aU2TQHTK6NhL8hC", 23 | "key": "6PYVzjqEm4DMdNq8hPxDfbgAqKuSKzEcGSUCxRSpp8EGzXrkTbvao8ejfn", 24 | "label": "committee", 25 | "contract": { 26 | "script": "FAwhAiwL+eGgyGSQXSuJCVVa5CHbmlL4arJoqE2b5Cpq2dhYDCECSmQMjL4+NPDNknlQxk9tDSOXcDl/5kXVK/kg/d1lW/gMIQJPGex6jjVyLIzdfSH8wgkPJliy/We3sj8ZNtxee1SyFgwhA3l95Upqu20Zwipa+r8w0yCpNIsPKUMV50yztCOxrJ3JDCEDqQ9ufctJz5YD3eeGeBxP29Q/ilfFsj/pPU7MM5Ulmf0MIQPHqjWrZKrZuFo1ZHsfCuxZNEJxpsLtdkT68Zl+4Ji7qwwhAsqQlyldKOKOKuVetiygsaxIstm23LZN25NqZNgMuLeVF0Ge0Nw6", 27 | "parameters": [ 28 | { 29 | "name": "parameter0", 30 | "type": "Signature" 31 | }, 32 | { 33 | "name": "parameter1", 34 | "type": "Signature" 35 | }, 36 | { 37 | "name": "parameter2", 38 | "type": "Signature" 39 | }, 40 | { 41 | "name": "parameter3", 42 | "type": "Signature" 43 | } 44 | ], 45 | "deployed": false 46 | }, 47 | "lock": false, 48 | "isDefault": false 49 | }, 50 | { 51 | "address": "NZxoqHeWp6XfKwHNMqJsdzFyHQMDPnKqAW", 52 | "key": "6PYVzjqEm4DMdNq8hPxDfbgAqKuSKzEcGSUCxRSpp8EGzXrkTbvao8ejfn", 53 | "label": "consensus", 54 | "contract": { 55 | "script": "FQwhAiwL+eGgyGSQXSuJCVVa5CHbmlL4arJoqE2b5Cpq2dhYDCECSmQMjL4+NPDNknlQxk9tDSOXcDl/5kXVK/kg/d1lW/gMIQJPGex6jjVyLIzdfSH8wgkPJliy/We3sj8ZNtxee1SyFgwhA3l95Upqu20Zwipa+r8w0yCpNIsPKUMV50yztCOxrJ3JDCEDqQ9ufctJz5YD3eeGeBxP29Q/ilfFsj/pPU7MM5Ulmf0MIQPHqjWrZKrZuFo1ZHsfCuxZNEJxpsLtdkT68Zl+4Ji7qwwhAsqQlyldKOKOKuVetiygsaxIstm23LZN25NqZNgMuLeVF0Ge0Nw6", 56 | "parameters": [ 57 | { 58 | "name": "parameter0", 59 | "type": "Signature" 60 | }, 61 | { 62 | "name": "parameter1", 63 | "type": "Signature" 64 | }, 65 | { 66 | "name": "parameter2", 67 | "type": "Signature" 68 | }, 69 | { 70 | "name": "parameter3", 71 | "type": "Signature" 72 | }, 73 | { 74 | "name": "parameter4", 75 | "type": "Signature" 76 | } 77 | ], 78 | "deployed": false 79 | }, 80 | "lock": false, 81 | "isDefault": false 82 | } 83 | ], 84 | "scrypt": { 85 | "n": 16384, 86 | "r": 8, 87 | "p": 8 88 | }, 89 | "extra": { 90 | "Tokens": null 91 | } 92 | } -------------------------------------------------------------------------------- /services/ir7/alphabet/vedi.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "accounts": [ 4 | { 5 | "address": "NLQTN4s6BaDR2Gci6T2KrFQ35sSxQ4PGSq", 6 | "key": "6PYWWXa9Q8JFNEYoQdbezUog3AKs5gKN2tm6EAhdQktKXEev7x6BWSFhgb", 7 | "label": "single", 8 | "contract": { 9 | "script": "DCECypCXKV0o4o4q5V62LKCxrEiy2bbctk3bk2pk2Ay4t5VBVuezJw==", 10 | "parameters": [ 11 | { 12 | "name": "parameter0", 13 | "type": "Signature" 14 | } 15 | ], 16 | "deployed": false 17 | }, 18 | "lock": false, 19 | "isDefault": false 20 | }, 21 | { 22 | "address": "NMkB37Z5ey3Lygck273aU2TQHTK6NhL8hC", 23 | "key": "6PYWWXa9Q8JFNEYoQdbezUog3AKs5gKN2tm6EAhdQktKXEev7x6BWSFhgb", 24 | "label": "committee", 25 | "contract": { 26 | "script": "FAwhAiwL+eGgyGSQXSuJCVVa5CHbmlL4arJoqE2b5Cpq2dhYDCECSmQMjL4+NPDNknlQxk9tDSOXcDl/5kXVK/kg/d1lW/gMIQJPGex6jjVyLIzdfSH8wgkPJliy/We3sj8ZNtxee1SyFgwhA3l95Upqu20Zwipa+r8w0yCpNIsPKUMV50yztCOxrJ3JDCEDqQ9ufctJz5YD3eeGeBxP29Q/ilfFsj/pPU7MM5Ulmf0MIQPHqjWrZKrZuFo1ZHsfCuxZNEJxpsLtdkT68Zl+4Ji7qwwhAsqQlyldKOKOKuVetiygsaxIstm23LZN25NqZNgMuLeVF0Ge0Nw6", 27 | "parameters": [ 28 | { 29 | "name": "parameter0", 30 | "type": "Signature" 31 | }, 32 | { 33 | "name": "parameter1", 34 | "type": "Signature" 35 | }, 36 | { 37 | "name": "parameter2", 38 | "type": "Signature" 39 | }, 40 | { 41 | "name": "parameter3", 42 | "type": "Signature" 43 | } 44 | ], 45 | "deployed": false 46 | }, 47 | "lock": false, 48 | "isDefault": false 49 | }, 50 | { 51 | "address": "NZxoqHeWp6XfKwHNMqJsdzFyHQMDPnKqAW", 52 | "key": "6PYWWXa9Q8JFNEYoQdbezUog3AKs5gKN2tm6EAhdQktKXEev7x6BWSFhgb", 53 | "label": "consensus", 54 | "contract": { 55 | "script": "FQwhAiwL+eGgyGSQXSuJCVVa5CHbmlL4arJoqE2b5Cpq2dhYDCECSmQMjL4+NPDNknlQxk9tDSOXcDl/5kXVK/kg/d1lW/gMIQJPGex6jjVyLIzdfSH8wgkPJliy/We3sj8ZNtxee1SyFgwhA3l95Upqu20Zwipa+r8w0yCpNIsPKUMV50yztCOxrJ3JDCEDqQ9ufctJz5YD3eeGeBxP29Q/ilfFsj/pPU7MM5Ulmf0MIQPHqjWrZKrZuFo1ZHsfCuxZNEJxpsLtdkT68Zl+4Ji7qwwhAsqQlyldKOKOKuVetiygsaxIstm23LZN25NqZNgMuLeVF0Ge0Nw6", 56 | "parameters": [ 57 | { 58 | "name": "parameter0", 59 | "type": "Signature" 60 | }, 61 | { 62 | "name": "parameter1", 63 | "type": "Signature" 64 | }, 65 | { 66 | "name": "parameter2", 67 | "type": "Signature" 68 | }, 69 | { 70 | "name": "parameter3", 71 | "type": "Signature" 72 | }, 73 | { 74 | "name": "parameter4", 75 | "type": "Signature" 76 | } 77 | ], 78 | "deployed": false 79 | }, 80 | "lock": false, 81 | "isDefault": false 82 | } 83 | ], 84 | "scrypt": { 85 | "n": 16384, 86 | "r": 8, 87 | "p": 8 88 | }, 89 | "extra": { 90 | "Tokens": null 91 | } 92 | } -------------------------------------------------------------------------------- /services/ir7/alphabet/yest.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "accounts": [ 4 | { 5 | "address": "NRjbg1cTZoaNtHyLwdciAk8a9YdtgPPaUC", 6 | "key": "6PYSFXGumC9HfffqdwC9K61mLsuXKhru8EKNy6tc4tTprxZuCBKsytpKgT", 7 | "label": "single", 8 | "contract": { 9 | "script": "DCEDqQ9ufctJz5YD3eeGeBxP29Q/ilfFsj/pPU7MM5Ulmf1BVuezJw==", 10 | "parameters": [ 11 | { 12 | "name": "parameter0", 13 | "type": "Signature" 14 | } 15 | ], 16 | "deployed": false 17 | }, 18 | "lock": false, 19 | "isDefault": false 20 | }, 21 | { 22 | "address": "NMkB37Z5ey3Lygck273aU2TQHTK6NhL8hC", 23 | "key": "6PYSFXGumC9HfffqdwC9K61mLsuXKhru8EKNy6tc4tTprxZuCBKsytpKgT", 24 | "label": "committee", 25 | "contract": { 26 | "script": "FAwhAiwL+eGgyGSQXSuJCVVa5CHbmlL4arJoqE2b5Cpq2dhYDCECSmQMjL4+NPDNknlQxk9tDSOXcDl/5kXVK/kg/d1lW/gMIQJPGex6jjVyLIzdfSH8wgkPJliy/We3sj8ZNtxee1SyFgwhA3l95Upqu20Zwipa+r8w0yCpNIsPKUMV50yztCOxrJ3JDCEDqQ9ufctJz5YD3eeGeBxP29Q/ilfFsj/pPU7MM5Ulmf0MIQPHqjWrZKrZuFo1ZHsfCuxZNEJxpsLtdkT68Zl+4Ji7qwwhAsqQlyldKOKOKuVetiygsaxIstm23LZN25NqZNgMuLeVF0Ge0Nw6", 27 | "parameters": [ 28 | { 29 | "name": "parameter0", 30 | "type": "Signature" 31 | }, 32 | { 33 | "name": "parameter1", 34 | "type": "Signature" 35 | }, 36 | { 37 | "name": "parameter2", 38 | "type": "Signature" 39 | }, 40 | { 41 | "name": "parameter3", 42 | "type": "Signature" 43 | } 44 | ], 45 | "deployed": false 46 | }, 47 | "lock": false, 48 | "isDefault": false 49 | }, 50 | { 51 | "address": "NZxoqHeWp6XfKwHNMqJsdzFyHQMDPnKqAW", 52 | "key": "6PYSFXGumC9HfffqdwC9K61mLsuXKhru8EKNy6tc4tTprxZuCBKsytpKgT", 53 | "label": "consensus", 54 | "contract": { 55 | "script": "FQwhAiwL+eGgyGSQXSuJCVVa5CHbmlL4arJoqE2b5Cpq2dhYDCECSmQMjL4+NPDNknlQxk9tDSOXcDl/5kXVK/kg/d1lW/gMIQJPGex6jjVyLIzdfSH8wgkPJliy/We3sj8ZNtxee1SyFgwhA3l95Upqu20Zwipa+r8w0yCpNIsPKUMV50yztCOxrJ3JDCEDqQ9ufctJz5YD3eeGeBxP29Q/ilfFsj/pPU7MM5Ulmf0MIQPHqjWrZKrZuFo1ZHsfCuxZNEJxpsLtdkT68Zl+4Ji7qwwhAsqQlyldKOKOKuVetiygsaxIstm23LZN25NqZNgMuLeVF0Ge0Nw6", 56 | "parameters": [ 57 | { 58 | "name": "parameter0", 59 | "type": "Signature" 60 | }, 61 | { 62 | "name": "parameter1", 63 | "type": "Signature" 64 | }, 65 | { 66 | "name": "parameter2", 67 | "type": "Signature" 68 | }, 69 | { 70 | "name": "parameter3", 71 | "type": "Signature" 72 | }, 73 | { 74 | "name": "parameter4", 75 | "type": "Signature" 76 | } 77 | ], 78 | "deployed": false 79 | }, 80 | "lock": false, 81 | "isDefault": false 82 | } 83 | ], 84 | "scrypt": { 85 | "n": 16384, 86 | "r": 8, 87 | "p": 8 88 | }, 89 | "extra": { 90 | "Tokens": null 91 | } 92 | } -------------------------------------------------------------------------------- /services/ir7/alphabet/dobro.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "accounts": [ 4 | { 5 | "address": "NfnG66ydpw6jsoyyFuvtb4FFYqkHHnqPdu", 6 | "key": "6PYX5fyvcwrdwFJAmfCwbuisrwDtWYr4WT7huMERNVkVQZ12bstUxJH1x5", 7 | "label": "single", 8 | "contract": { 9 | "script": "DCECLAv54aDIZJBdK4kJVVrkIduaUvhqsmioTZvkKmrZ2FhBVuezJw==", 10 | "parameters": [ 11 | { 12 | "name": "parameter0", 13 | "type": "Signature" 14 | } 15 | ], 16 | "deployed": false 17 | }, 18 | "lock": false, 19 | "isDefault": false 20 | }, 21 | { 22 | "address": "NMkB37Z5ey3Lygck273aU2TQHTK6NhL8hC", 23 | "key": "6PYX5fyvcwrdwFJAmfCwbuisrwDtWYr4WT7huMERNVkVQZ12bstUxJH1x5", 24 | "label": "committee", 25 | "contract": { 26 | "script": "FAwhAiwL+eGgyGSQXSuJCVVa5CHbmlL4arJoqE2b5Cpq2dhYDCECSmQMjL4+NPDNknlQxk9tDSOXcDl/5kXVK/kg/d1lW/gMIQJPGex6jjVyLIzdfSH8wgkPJliy/We3sj8ZNtxee1SyFgwhA3l95Upqu20Zwipa+r8w0yCpNIsPKUMV50yztCOxrJ3JDCEDqQ9ufctJz5YD3eeGeBxP29Q/ilfFsj/pPU7MM5Ulmf0MIQPHqjWrZKrZuFo1ZHsfCuxZNEJxpsLtdkT68Zl+4Ji7qwwhAsqQlyldKOKOKuVetiygsaxIstm23LZN25NqZNgMuLeVF0Ge0Nw6", 27 | "parameters": [ 28 | { 29 | "name": "parameter0", 30 | "type": "Signature" 31 | }, 32 | { 33 | "name": "parameter1", 34 | "type": "Signature" 35 | }, 36 | { 37 | "name": "parameter2", 38 | "type": "Signature" 39 | }, 40 | { 41 | "name": "parameter3", 42 | "type": "Signature" 43 | } 44 | ], 45 | "deployed": false 46 | }, 47 | "lock": false, 48 | "isDefault": false 49 | }, 50 | { 51 | "address": "NZxoqHeWp6XfKwHNMqJsdzFyHQMDPnKqAW", 52 | "key": "6PYX5fyvcwrdwFJAmfCwbuisrwDtWYr4WT7huMERNVkVQZ12bstUxJH1x5", 53 | "label": "consensus", 54 | "contract": { 55 | "script": "FQwhAiwL+eGgyGSQXSuJCVVa5CHbmlL4arJoqE2b5Cpq2dhYDCECSmQMjL4+NPDNknlQxk9tDSOXcDl/5kXVK/kg/d1lW/gMIQJPGex6jjVyLIzdfSH8wgkPJliy/We3sj8ZNtxee1SyFgwhA3l95Upqu20Zwipa+r8w0yCpNIsPKUMV50yztCOxrJ3JDCEDqQ9ufctJz5YD3eeGeBxP29Q/ilfFsj/pPU7MM5Ulmf0MIQPHqjWrZKrZuFo1ZHsfCuxZNEJxpsLtdkT68Zl+4Ji7qwwhAsqQlyldKOKOKuVetiygsaxIstm23LZN25NqZNgMuLeVF0Ge0Nw6", 56 | "parameters": [ 57 | { 58 | "name": "parameter0", 59 | "type": "Signature" 60 | }, 61 | { 62 | "name": "parameter1", 63 | "type": "Signature" 64 | }, 65 | { 66 | "name": "parameter2", 67 | "type": "Signature" 68 | }, 69 | { 70 | "name": "parameter3", 71 | "type": "Signature" 72 | }, 73 | { 74 | "name": "parameter4", 75 | "type": "Signature" 76 | } 77 | ], 78 | "deployed": false 79 | }, 80 | "lock": false, 81 | "isDefault": false 82 | } 83 | ], 84 | "scrypt": { 85 | "n": 16384, 86 | "r": 8, 87 | "p": 8 88 | }, 89 | "extra": { 90 | "Tokens": null 91 | } 92 | } -------------------------------------------------------------------------------- /services/ir7/alphabet/glagoli.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "accounts": [ 4 | { 5 | "address": "NRycJKK6S7wdRQPdcTaMDnsgLVFTrbuhJ6", 6 | "key": "6PYP4foM7Lz1EPEvRoDdMbPpMu4K7BSFKcDBmoDPDpy21DwD5GLR6JnkEr", 7 | "label": "single", 8 | "contract": { 9 | "script": "DCEDeX3lSmq7bRnCKlr6vzDTIKk0iw8pQxXnTLO0I7GsnclBVuezJw==", 10 | "parameters": [ 11 | { 12 | "name": "parameter0", 13 | "type": "Signature" 14 | } 15 | ], 16 | "deployed": false 17 | }, 18 | "lock": false, 19 | "isDefault": false 20 | }, 21 | { 22 | "address": "NMkB37Z5ey3Lygck273aU2TQHTK6NhL8hC", 23 | "key": "6PYP4foM7Lz1EPEvRoDdMbPpMu4K7BSFKcDBmoDPDpy21DwD5GLR6JnkEr", 24 | "label": "committee", 25 | "contract": { 26 | "script": "FAwhAiwL+eGgyGSQXSuJCVVa5CHbmlL4arJoqE2b5Cpq2dhYDCECSmQMjL4+NPDNknlQxk9tDSOXcDl/5kXVK/kg/d1lW/gMIQJPGex6jjVyLIzdfSH8wgkPJliy/We3sj8ZNtxee1SyFgwhA3l95Upqu20Zwipa+r8w0yCpNIsPKUMV50yztCOxrJ3JDCEDqQ9ufctJz5YD3eeGeBxP29Q/ilfFsj/pPU7MM5Ulmf0MIQPHqjWrZKrZuFo1ZHsfCuxZNEJxpsLtdkT68Zl+4Ji7qwwhAsqQlyldKOKOKuVetiygsaxIstm23LZN25NqZNgMuLeVF0Ge0Nw6", 27 | "parameters": [ 28 | { 29 | "name": "parameter0", 30 | "type": "Signature" 31 | }, 32 | { 33 | "name": "parameter1", 34 | "type": "Signature" 35 | }, 36 | { 37 | "name": "parameter2", 38 | "type": "Signature" 39 | }, 40 | { 41 | "name": "parameter3", 42 | "type": "Signature" 43 | } 44 | ], 45 | "deployed": false 46 | }, 47 | "lock": false, 48 | "isDefault": false 49 | }, 50 | { 51 | "address": "NZxoqHeWp6XfKwHNMqJsdzFyHQMDPnKqAW", 52 | "key": "6PYP4foM7Lz1EPEvRoDdMbPpMu4K7BSFKcDBmoDPDpy21DwD5GLR6JnkEr", 53 | "label": "consensus", 54 | "contract": { 55 | "script": "FQwhAiwL+eGgyGSQXSuJCVVa5CHbmlL4arJoqE2b5Cpq2dhYDCECSmQMjL4+NPDNknlQxk9tDSOXcDl/5kXVK/kg/d1lW/gMIQJPGex6jjVyLIzdfSH8wgkPJliy/We3sj8ZNtxee1SyFgwhA3l95Upqu20Zwipa+r8w0yCpNIsPKUMV50yztCOxrJ3JDCEDqQ9ufctJz5YD3eeGeBxP29Q/ilfFsj/pPU7MM5Ulmf0MIQPHqjWrZKrZuFo1ZHsfCuxZNEJxpsLtdkT68Zl+4Ji7qwwhAsqQlyldKOKOKuVetiygsaxIstm23LZN25NqZNgMuLeVF0Ge0Nw6", 56 | "parameters": [ 57 | { 58 | "name": "parameter0", 59 | "type": "Signature" 60 | }, 61 | { 62 | "name": "parameter1", 63 | "type": "Signature" 64 | }, 65 | { 66 | "name": "parameter2", 67 | "type": "Signature" 68 | }, 69 | { 70 | "name": "parameter3", 71 | "type": "Signature" 72 | }, 73 | { 74 | "name": "parameter4", 75 | "type": "Signature" 76 | } 77 | ], 78 | "deployed": false 79 | }, 80 | "lock": false, 81 | "isDefault": false 82 | } 83 | ], 84 | "scrypt": { 85 | "n": 16384, 86 | "r": 8, 87 | "p": 8 88 | }, 89 | "extra": { 90 | "Tokens": null 91 | } 92 | } -------------------------------------------------------------------------------- /services/ir7/alphabet/zhivete.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "accounts": [ 4 | { 5 | "address": "NXqebp9T47ZvaMfMgdB1N1W42stk6RpHJp", 6 | "key": "6PYR3VC46tUeg7yF5uLQ1kXR9FmmuYSCzjDjf148qyb95s4bNAL7ziXnpn", 7 | "label": "single", 8 | "contract": { 9 | "script": "DCECTxnseo41ciyM3X0h/MIJDyZYsv1nt7I/GTbcXntUshZBVuezJw==", 10 | "parameters": [ 11 | { 12 | "name": "parameter0", 13 | "type": "Signature" 14 | } 15 | ], 16 | "deployed": false 17 | }, 18 | "lock": false, 19 | "isDefault": false 20 | }, 21 | { 22 | "address": "NMkB37Z5ey3Lygck273aU2TQHTK6NhL8hC", 23 | "key": "6PYR3VC46tUeg7yF5uLQ1kXR9FmmuYSCzjDjf148qyb95s4bNAL7ziXnpn", 24 | "label": "committee", 25 | "contract": { 26 | "script": "FAwhAiwL+eGgyGSQXSuJCVVa5CHbmlL4arJoqE2b5Cpq2dhYDCECSmQMjL4+NPDNknlQxk9tDSOXcDl/5kXVK/kg/d1lW/gMIQJPGex6jjVyLIzdfSH8wgkPJliy/We3sj8ZNtxee1SyFgwhA3l95Upqu20Zwipa+r8w0yCpNIsPKUMV50yztCOxrJ3JDCEDqQ9ufctJz5YD3eeGeBxP29Q/ilfFsj/pPU7MM5Ulmf0MIQPHqjWrZKrZuFo1ZHsfCuxZNEJxpsLtdkT68Zl+4Ji7qwwhAsqQlyldKOKOKuVetiygsaxIstm23LZN25NqZNgMuLeVF0Ge0Nw6", 27 | "parameters": [ 28 | { 29 | "name": "parameter0", 30 | "type": "Signature" 31 | }, 32 | { 33 | "name": "parameter1", 34 | "type": "Signature" 35 | }, 36 | { 37 | "name": "parameter2", 38 | "type": "Signature" 39 | }, 40 | { 41 | "name": "parameter3", 42 | "type": "Signature" 43 | } 44 | ], 45 | "deployed": false 46 | }, 47 | "lock": false, 48 | "isDefault": false 49 | }, 50 | { 51 | "address": "NZxoqHeWp6XfKwHNMqJsdzFyHQMDPnKqAW", 52 | "key": "6PYR3VC46tUeg7yF5uLQ1kXR9FmmuYSCzjDjf148qyb95s4bNAL7ziXnpn", 53 | "label": "consensus", 54 | "contract": { 55 | "script": "FQwhAiwL+eGgyGSQXSuJCVVa5CHbmlL4arJoqE2b5Cpq2dhYDCECSmQMjL4+NPDNknlQxk9tDSOXcDl/5kXVK/kg/d1lW/gMIQJPGex6jjVyLIzdfSH8wgkPJliy/We3sj8ZNtxee1SyFgwhA3l95Upqu20Zwipa+r8w0yCpNIsPKUMV50yztCOxrJ3JDCEDqQ9ufctJz5YD3eeGeBxP29Q/ilfFsj/pPU7MM5Ulmf0MIQPHqjWrZKrZuFo1ZHsfCuxZNEJxpsLtdkT68Zl+4Ji7qwwhAsqQlyldKOKOKuVetiygsaxIstm23LZN25NqZNgMuLeVF0Ge0Nw6", 56 | "parameters": [ 57 | { 58 | "name": "parameter0", 59 | "type": "Signature" 60 | }, 61 | { 62 | "name": "parameter1", 63 | "type": "Signature" 64 | }, 65 | { 66 | "name": "parameter2", 67 | "type": "Signature" 68 | }, 69 | { 70 | "name": "parameter3", 71 | "type": "Signature" 72 | }, 73 | { 74 | "name": "parameter4", 75 | "type": "Signature" 76 | } 77 | ], 78 | "deployed": false 79 | }, 80 | "lock": false, 81 | "isDefault": false 82 | } 83 | ], 84 | "scrypt": { 85 | "n": 16384, 86 | "r": 8, 87 | "p": 8 88 | }, 89 | "extra": { 90 | "Tokens": null 91 | } 92 | } -------------------------------------------------------------------------------- /docs/chain.md: -------------------------------------------------------------------------------- 1 | # N3 main chain privnet service 2 | 3 | A single-node N3 privnet deployment, running on 4 | [neo-go](https://github.com/nspcc-dev/neo-go). Represents N3 MainNet. 5 | 6 | Contracts deployed: 7 | - NeoFS [contract](https://github.com/nspcc-dev/neofs-contract/tree/master/neofs) 8 | - Processing [contract](https://github.com/nspcc-dev/neofs-contract/tree/master/processing) 9 | 10 | RPC available at `http://main-chain.neofs.devenv:30333`. 11 | 12 | ## .env settings 13 | 14 | ### NEOGO_VERSION 15 | 16 | Version of neo-go docker container for main chain deployment. 17 | 18 | ## Main chain wallets 19 | 20 | There is a wallet with GAS that used for contract deployment: 21 | `wallets/wallet.json`. This wallet has one account with **empty password**. 22 | 23 | ``` 24 | $ neo-go wallet nep17 balance \ 25 | -w wallets/wallet.json \ 26 | -r http://main-chain.neofs.devenv:30333 27 | 28 | Account NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM 29 | GAS: GasToken (d2a4cff31913016155e38e474a2c06d08be276cf) 30 | Amount : 9978.0074623 31 | Updated: 34 32 | ``` 33 | 34 | If you want to operate in main chain with your personal wallet (e.g. to make 35 | a deposit in NeoFS contract), you can transfer GAS from there. 36 | 37 | 1. Create new wallet. 38 | 39 | ``` 40 | $ neo-go wallet init -a -w wallets/neofs1.json 41 | 42 | Enter the name of the account > neofs1 43 | Enter passphrase > 44 | Confirm passphrase > 45 | 46 | { 47 | "version": "3.0", 48 | "accounts": [ 49 | { 50 | "address": "NXnzw3J9VvKXjM1BPAJK4QUpTtEQu4TpU6", 51 | ... 52 | wallet successfully created, file location is wallets/neofs1.json 53 | ``` 54 | 55 | 2. Transfer GAS from `wallets/wallet.json`. The password is empty. 56 | 57 | ``` 58 | $ neo-go wallet nep17 transfer \ 59 | -w wallets/wallet.json \ 60 | -r http://main-chain.neofs.devenv:30333 \ 61 | --from NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM \ 62 | --to NXnzw3J9VvKXjM1BPAJK4QUpTtEQu4TpU6 \ 63 | --amount 50 \ 64 | --token GAS 65 | ``` 66 | 67 | 3. Check it's there. 68 | 69 | ``` 70 | $ neo-go wallet nep17 balance \ 71 | -w wallets/neofs1.json \ 72 | -r http://main-chain.neofs.devenv:30333 73 | 74 | Account NXnzw3J9VvKXjM1BPAJK4QUpTtEQu4TpU6 75 | GAS: GasToken (d2a4cff31913016155e38e474a2c06d08be276cf) 76 | Amount : 50 77 | Updated: 14689 78 | ``` 79 | 80 | ## Claim GAS from consensus node 81 | 82 | If there is no enough GAS on `wallets/wallet.json` account, you can claim some 83 | GAS to consensus node's wallet and then transfer it. 84 | 85 | Consensus node is running with `services/chain/node-wallet.json` wallet. It has 86 | multiple accounts with the password `one`. 87 | 88 | 89 | Claim GAS to consensus node's wallet. Use account that contains NEO tokens. 90 | ``` 91 | $ neo-go wallet claim \ 92 | -w services/chain/node-wallet.json \ 93 | -r http://main-chain.neofs.devenv:30333 \ 94 | -a NPpKskku5gC6g59f2gVRR8fmvUTLDp9w7Y \ 95 | Password > 96 | 70e09bbd55846dcc7cee23905b737c63e5a80d32e387bce108bc6db8e641fb90 97 | ``` 98 | 99 | Then you can transfer GAS the same way as it was done in previous section. 100 | 101 | ``` 102 | $ neo-go wallet nep17 transfer \ 103 | -w services/chain/node-wallet.json \ 104 | -r http://main-chain.neofs.devenv:30333 \ 105 | --from NPpKskku5gC6g59f2gVRR8fmvUTLDp9w7Y \ 106 | --to NXnzw3J9VvKXjM1BPAJK4QUpTtEQu4TpU6 \ 107 | --amount 50 \ 108 | --token GAS 109 | ``` 110 | 111 | ## NeoFS GAS deposit 112 | 113 | NeoFS identifies users by their Neo wallet key pair. To start using NeoFS in 114 | devenv you need to transfer some GAS to NeoFS contract in main chain. 115 | 116 | Invoke `bin/deposit.sh` script by running `make prepare.ir` command to transfer 117 | 50 GAS from account in `wallets/wallet.json` file. Script enters passwords 118 | automatically with `expect` utility. 119 | 120 | ``` 121 | $ make prepare.ir 122 | Password > 123 | Can't find matching token in the wallet. Querying RPC-node for balances. 124 | 6713c776f4102300691d9c3c493bcd3402434f5e32e8147e0a5bc72209a1e410 125 | ``` 126 | 127 | Script converts addresses and executes this command: 128 | ``` 129 | $ neo-go wallet nep17 transfer \ 130 | -w wallets/wallet.json \ 131 | -r http://main-chain.neofs.devenv:30333 \ 132 | --from NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM \ 133 | --to NerhjaqJsJt4LxMqUbkkVMpsF2d9TtcpFv \ 134 | --token GAS \ 135 | --amount 50 136 | ``` 137 | 138 | You can specify any wallet address scripthash in the transfer's data argument, 139 | and NeoFS deposit will be transferred to that address. 140 | 141 | ``` 142 | $ neo-go wallet nep17 transfer \ 143 | -w wallets/wallet.json \ 144 | -r http://main-chain.neofs.devenv:30333 \ 145 | --from NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM \ 146 | --to NerhjaqJsJt4LxMqUbkkVMpsF2d9TtcpFv \ 147 | --token GAS \ 148 | --amount 50 \ 149 | hash160:bd711de066e9c2f7b502c7f3f0e0a6f1c8341edd 150 | ``` 151 | -------------------------------------------------------------------------------- /docs/macos.md: -------------------------------------------------------------------------------- 1 | # Setting up DevEnv on macOS 2 | 3 | ## The Problem 4 | 5 | Currently Docker for macOS has no support for network routing into the Host 6 | Virtual Machine that is created using hyperkit. The reason for this is due to 7 | the fact that the network interface options used to create the instance does not 8 | create a bridge interface between the Physical Machine and the Host Virtual 9 | Machine. To make matters worse, the arguments used to create the Host Virtual 10 | Machine is hardcoded into the Docker for macOS binary with no means to configure 11 | it. 12 | 13 | ## How to setup DevEnv on macOS 14 | 15 | - Clone https://github.com/AlmirKadric-Published/docker-tuntap-osx 16 | ```sh 17 | $ git clone git@github.com:AlmirKadric-Published/docker-tuntap-osx.git 18 | ``` 19 | 20 | - Install tuntap for macOS 21 | ``` 22 | $ brew tap caskroom/cask 23 | $ brew cask install tuntap 24 | ``` 25 | 26 | - Restart macOS and allow tuntap kext in settings before 27 | 28 | - Docker for macOS should be run before 29 | 30 | - Install docker-tuntap. This will automatically check if the currently 31 | installed shim is the correct version and make a backup if necessary 32 | 33 | ``` 34 | $ ./sbin/docker_tap_install.sh 35 | ``` 36 | 37 | - After this you will need to bring up the network interfaces every time the 38 | docker Host Virtual Machine is restarted 39 | 40 | ``` 41 | $ ./sbin/docker_tap_up.sh 42 | ``` 43 | 44 | - Bootup devenv 45 | 46 | - See IPV4_PREFIX, for example, now it's 47 | ``` 48 | IPV4_PREFIX=192.168.130 49 | ``` 50 | 51 | - Add route to devenv (.0, for example IPV4_PREFIX=192.168.130) 52 | ``` 53 | $ sudo route add -net 192.168.130.0 -netmask 255.255.255.0 10.0.75.2 54 | ``` 55 | 56 | ## How to uninstall 57 | 58 | The uninstall script will simply revert the installer. Restoring the original 59 | and removing the shim: 60 | 61 | ``` 62 | $ ./sbin/docker_tap_uninstall.sh 63 | ``` 64 | 65 | Remove route to devenv (.0, for example IPV4_PREFIX=192.168.130) 66 | ``` 67 | $ sudo route delete -net 192.168.130.0 -netmask 255.255.255.0 10.0.75.2 68 | ``` 69 | 70 | ## Restart macOS or upgrade Docker for macoS 71 | 72 | When you restart macOS or install new version of Docker, you should do next 73 | steps: 74 | - reinstall docker-tuntap forced 75 | ``` 76 | $ ./sbin/docker_tap_install.sh -f 77 | ``` 78 | 79 | - wait until docker will be restarted 80 | 81 | - up tuntap interface 82 | ``` 83 | $ ./sbin/docker_tap_up.sh 84 | ``` 85 | 86 | - bootup devenv 87 | 88 | - Add route to devenv (.0, for example IPV4_PREFIX=192.168.130) 89 | ``` 90 | $ sudo route add -net 192.168.130.0 -netmask 255.255.255.0 10.0.75.2 91 | ``` 92 | 93 | ## How it works 94 | 95 | This installer (`docker_tap_install.sh`) will move the original hyperkit binary 96 | (`hyperkit.original`) inside the Docker for macOS application and places our shim 97 | (`./sbin/docker.hyperkit.tuntap.sh`) in it's stead. This shim will then inject 98 | the additional arguments required to attach a 99 | [TunTap](http://tuntaposx.sourceforge.net/) interface into the Host Virtual 100 | Machine, creating a bridge interface between the guest and the host (this is 101 | essentially what hvint0 is on Docker for Windows). 102 | 103 | From there the `up` script (`docker_tap_up.sh`) is used to bring the network 104 | interface up on both the Physical Machine and the Host Virtual Machine. Unlike 105 | the install script, which only needs to be run once, this `up` script must be 106 | run for every restart of the Host Virtual Machine. 107 | 108 | Once done, the IP address `10.0.75.2` can be used as a network routing gateway 109 | to reach any containers within the Host Virtual Machine: 110 | 111 | ``` 112 | $ route add -net -netmask 10.0.75.2 113 | ``` 114 | 115 | **Note:** Although as of docker-for-mac version `17.12.0` you do not need the 116 | following, for prior versions you will need to setup IP Forwarding in the 117 | iptables defintion on the Host Virtual Machine: 118 | 119 | (This is not done by the helpers as this is not a OSX or tuntap specific issue. 120 | You would need to do the same for Docker for Windows, as such it should be 121 | handled outside the scope of this project.) 122 | 123 | ``` 124 | $ docker run --rm --privileged --pid=host debian nsenter -t 1 -m -u -n -i iptables -A FORWARD -i eth1 -j ACCEPT 125 | ``` 126 | 127 | **Note:** Although not required for docker-for-mac versions greater than 128 | `17.12.0`, the above command can be replaced with the following if ever needed 129 | and is tested to be working on Docker for Windwos as an alternative. This is in 130 | case Docker for macOS changes something in future and this command ends up being a 131 | necessity once again. 132 | 133 | ``` 134 | $ docker run --rm --privileged --pid=host docker4w/nsenter-dockerd /bin/sh -c 'iptables -A FORWARD -i eth1 -j ACCEPT' 135 | ``` 136 | 137 | ## Dependencies 138 | - [Docker for Mac](https://www.docker.com/docker-mac) 139 | - [TunTap](http://tuntaposx.sourceforge.net/) 140 | - [Docker TunTap](https://github.com/AlmirKadric-Published/docker-tuntap-osx) 141 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | NeoFS 3 |

4 |

5 | NeoFS local Development and Testing environment 6 |

7 | 8 | --- 9 | ## Overview 10 | 11 | Tools to set up local NeoFS network and N3 privnets. Devenv, for short. 12 | 13 | ## Prerequisites 14 | 15 | Make sure you have installed all of the following prerequisites on your machine: 16 | * docker compose 17 | * make (`3.82+`) 18 | * expect 19 | * openssl 20 | * jq 21 | * base64 (coreutils) 22 | 23 | 24 | ## Quick Start 25 | 26 | Clone repo: 27 | 28 | ``` 29 | $ git clone https://github.com/nspcc-dev/neofs-dev-env.git 30 | ``` 31 | 32 | Run next commands from project's root: 33 | 34 | ``` 35 | $ make get 36 | ``` 37 | 38 | This command should be executed for the first run only to execute 39 | `make hosts`. It is part of the `make up` and, if the hosts have 40 | been added already, there is no need to run it separately. 41 | 42 | ``` 43 | $ make hosts 44 | 192.168.130.10 bastion.neofs.devenv 45 | 192.168.130.50 main-chain.neofs.devenv 46 | 192.168.130.61 ir01.neofs.devenv 47 | ... 48 | 192.168.130.74 s04.neofs.devenv 49 | ``` 50 | 51 | This command shows addresses and hostnames of components. Add `make hosts` 52 | output to your local `/etc/hosts` file. 53 | 54 | Run all services with command: 55 | ``` 56 | $ make up 57 | ``` 58 | 59 | When all services are up, you need to make GAS deposit for test wallet to be 60 | able to pay for NeoFS operations. Test wallet is located in 61 | `wallets/wallet.json`. The password is empty. 62 | 63 | ``` 64 | $ make prepare.ir 65 | password > 66 | fa6ba62bffb04030d303dcc95bda7413e03aa3c7e6ca9c2f999d65db9ec9b82c 67 | ``` 68 | 69 | Also you should add self-signed node (`s04.neofs.devenv`) certificate to trusted 70 | store (default location might be changed using `CA_CERTS_TRUSTED_STORE` 71 | variable). This step is required for client services (neofs-rest-gw, 72 | neofs-s3-gw) to interact with the node: 73 | 74 | ``` 75 | $ make prepare.storage 76 | ``` 77 | 78 | Change NeoFS global configuration values with `make update.*` commands. The 79 | password of inner ring wallet is `one`. See examples in `make help`. 80 | 81 | ``` 82 | $ make update.epoch_duration val=30 83 | Changing EpochDuration configuration value to 30 84 | Enter account NNudMSGzEoktFzdYGYoNb3bzHzbmM1genF password > 85 | Sent invocation transaction dbb8c1145b6d10f150135630e13bb0dc282023163f5956c6945a60db0cb45cb0 86 | Updating NeoFS epoch to 2 87 | Enter account NNudMSGzEoktFzdYGYoNb3bzHzbmM1genF password > 88 | Sent invocation transaction 0e6eb5e190f36332e5e5f4e866c7e100826e285fd949e11c085e15224f343ba6 89 | ``` 90 | 91 | For instructions on how to set up DevEnv on macOS, please refer [the 92 | guide](docs/macOS.md) in `docs` directory. 93 | 94 | ## How it's organized 95 | 96 | ``` 97 | . 98 | ├── Makefile # Commands to manage devenv 99 | ├── .services # List of services to work with 100 | ├── services # Services definitions and files 101 | │   ├── basenet 102 | │   ├── chain 103 | │   ├── ir 104 | │   └── storage 105 | ├── vendor # Temporary files and artifacts 106 | └── wallets # Wallet files to manage GAS assets 107 | ``` 108 | 109 | Main commands and targets to manage devenv's services are in `Makefile`. 110 | 111 | Each service is defined in it's own directory under `services/` with all 112 | required files to run and scripts to get external artifacts or dependencies. 113 | 114 | The list of services and the starting order is defined in `.services` file. You 115 | can comment out services you don't want to start or add your own new services. 116 | 117 | You can find more information on each service in `docs` directory. 118 | 119 | Maybe you will find the answer for your question in [F.A.Q.](docs/faq.md) 120 | 121 | ## Using NeoFS Admin Tool in `dev-env` 122 | 123 | Devenv supports NeoFS network management via [neofs-adm](https://github.com/nspcc-dev/neofs-node/tree/master/cmd/neofs-adm). 124 | `services/ir` contains the Alphabet wallet in a proper format, specify it 125 | with `--alphabet-wallets` flag. 126 | 127 | ## Notable make targets 128 | 129 | `make help` will print the brief description of available targets. Here we 130 | describe some of them in a more detailed way. 131 | 132 | ### up 133 | 134 | Start all Devenv services. 135 | 136 | This target call `pull` to get container images, `get` to download required 137 | artifacts, `vendor/hosts` to generate hosts file and then starts all services in 138 | the order defined in `.services` file. 139 | 140 | ### down 141 | 142 | Shutdowns all services. This will destroy all containers and networks. All 143 | changes made inside containers will be lost. 144 | 145 | ### hosts 146 | 147 | Display addresses and host names for each running service, if available. 148 | 149 | ### clean 150 | 151 | Clean up `vendor` directory. Remove services' Docker volumes incl: 152 | - stored NeoFS objects 153 | - NeoFS chain state 154 | 155 | ## Contributing 156 | 157 | Feel free to contribute to this project after reading the [contributing 158 | guidelines](CONTRIBUTING.md). 159 | 160 | Before starting to work on a certain topic, create an new issue first, 161 | describing the feature/topic you are going to implement. 162 | 163 | # License 164 | 165 | - [GNU General Public License v3.0](LICENSE) 166 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution guide 2 | 3 | First, thank you for contributing! We love and encourage pull requests from 4 | everyone. Please follow the guidelines: 5 | 6 | - Check the open [issues](https://github.com/nspcc-dev/neofs-dev-env/issues) and 7 | [pull requests](https://github.com/nspcc-dev/neofs-dev-env/pulls) for existing 8 | discussions. 9 | 10 | - Open an issue first, to discuss a new feature or enhancement. 11 | 12 | - Open a pull request, and reference the relevant issue(s). 13 | 14 | - Make sure your commits are logically separated and have good comments 15 | explaining the details of your change. 16 | 17 | - After receiving feedback, amend your commits or add new ones as 18 | appropriate. 19 | 20 | - **Have fun!** 21 | 22 | ## Development Workflow 23 | 24 | Start by forking the `neofs-dev-env` repository, make changes in a branch and then 25 | send a pull request. We encourage pull requests to discuss code changes. Here 26 | are the steps in details: 27 | 28 | ### Setup your GitHub Repository 29 | Fork [NeoFS node upstream](https://github.com/nspcc-dev/neofs-dev-env/fork) source 30 | repository to your own personal repository. Copy the URL of your fork (you will 31 | need it for the `git clone` command below). 32 | 33 | ```sh 34 | $ git clone https://github.com/nspcc-dev/neofs-dev-env 35 | ``` 36 | 37 | ### Set up git remote as ``upstream`` 38 | ```sh 39 | $ cd neofs-dev-env 40 | $ git remote add upstream https://github.com/nspcc-dev/neofs-dev-env 41 | $ git fetch upstream 42 | $ git merge upstream/master 43 | ... 44 | ``` 45 | 46 | ### Create your feature branch 47 | Before making code changes, make sure you create a separate branch for these 48 | changes. Maybe you will find it convenient to name branch in 49 | `/-` format. 50 | 51 | ``` 52 | $ git checkout -b feature/123-something_awesome 53 | ``` 54 | 55 | ### Test your changes 56 | After your code changes, make sure 57 | 58 | - To add test cases for the new code. 59 | - To run `make lint` 60 | - To squash your commits into a single commit or a series of logically separated 61 | commits run `git rebase -i`. It's okay to force update your pull request. 62 | 63 | ### Commit changes 64 | After verification, commit your changes. This is a [great 65 | post](https://chris.beams.io/posts/git-commit/) on how to write useful commit 66 | messages. Try following this template: 67 | 68 | ``` 69 | [#Issue] Summary 70 | 71 | Description 72 | 73 | 74 | 75 | 76 | ``` 77 | 78 | ``` 79 | $ git commit -am '[#123] Add some feature' 80 | ``` 81 | 82 | ### Push to the branch 83 | Push your locally committed changes to the remote origin (your fork) 84 | ``` 85 | $ git push origin feature/123-something_awesome 86 | ``` 87 | 88 | ### Create a Pull Request 89 | Pull requests can be created via GitHub. Refer to [this 90 | document](https://help.github.com/articles/creating-a-pull-request/) for 91 | detailed steps on how to create a pull request. After a Pull Request gets peer 92 | reviewed and approved, it will be merged. 93 | 94 | ## DCO Sign off 95 | 96 | All authors to the project retain copyright to their work. However, to ensure 97 | that they are only submitting work that they have rights to, we are requiring 98 | everyone to acknowledge this by signing their work. 99 | 100 | Any copyright notices in this repository should specify the authors as "the 101 | contributors". 102 | 103 | To sign your work, just add a line like this at the end of your commit message: 104 | 105 | ``` 106 | Signed-off-by: Samii Sakisaka 107 | ``` 108 | 109 | This can easily be done with the `--signoff` option to `git commit`. 110 | 111 | By doing this you state that you can certify the following (from [The Developer 112 | Certificate of Origin](https://developercertificate.org/): 113 | 114 | ``` 115 | Developer Certificate of Origin 116 | Version 1.1 117 | 118 | Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 119 | 1 Letterman Drive 120 | Suite D4700 121 | San Francisco, CA, 94129 122 | 123 | Everyone is permitted to copy and distribute verbatim copies of this 124 | license document, but changing it is not allowed. 125 | 126 | 127 | Developer's Certificate of Origin 1.1 128 | 129 | By making a contribution to this project, I certify that: 130 | 131 | (a) The contribution was created in whole or in part by me and I 132 | have the right to submit it under the open source license 133 | indicated in the file; or 134 | 135 | (b) The contribution is based upon previous work that, to the best 136 | of my knowledge, is covered under an appropriate open source 137 | license and I have the right under that license to submit that 138 | work with modifications, whether created in whole or in part 139 | by me, under the same open source license (unless I am 140 | permitted to submit under a different license), as indicated 141 | in the file; or 142 | 143 | (c) The contribution was provided directly to me by some other 144 | person who certified (a), (b) or (c) and I have not modified 145 | it. 146 | 147 | (d) I understand and agree that this project and the contribution 148 | are public and that a record of the contribution (including all 149 | personal information I submit with it, including my sign-off) is 150 | maintained indefinitely and may be redistributed consistent with 151 | this project or the open source license(s) involved. 152 | ``` 153 | -------------------------------------------------------------------------------- /services/ir4/docker-compose.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | services: 4 | 5 | ir01: 6 | image: ${IR_IMAGE}:${IR_VERSION} 7 | domainname: ${LOCAL_DOMAIN} 8 | hostname: ir01 9 | container_name: ir01 10 | restart: "no" 11 | networks: 12 | ir_int: 13 | internet: 14 | ipv4_address: ${IPV4_PREFIX}.61 15 | stop_signal: SIGKILL 16 | environment: 17 | - NEOFS_IR_WALLET_ADDRESS=NVvgwaqoKJKWe9JYZbUH2pDNSuHdMvCayr 18 | - NEOFS_IR_CONTROL_GRPC_ENDPOINT=${NEOFS_IR_CONTROL_GRPC_ENDPOINT_1} 19 | volumes: 20 | - neofs_chain_ir01:/neofs_chain/ 21 | - ./alphabet/az.json:/wallet.json 22 | - ./../../vendor/hosts:/etc/hosts 23 | - ./../../vendor/neofs-cli:/neofs-cli 24 | - ./cli-cfg.yml:/cli-cfg.yml 25 | - ./cfg/config.yml:/etc/neofs/ir/config.yml 26 | - ${CA_CERTS_TRUSTED_STORE}/s04.${LOCAL_DOMAIN}.tls.crt:/etc/ssl/certs/s04tls.crt 27 | env_file: [ ".env", ".ir.env" ] 28 | command: [ "neofs-ir", "--config", "/etc/neofs/ir/config.yml" ] 29 | healthcheck: 30 | test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_IR_CONTROL_GRPC_ENDPOINT_1}", "--ir"] 31 | interval: 1s 32 | timeout: 1s 33 | retries: 300 34 | start_period: 5s 35 | 36 | ir02: 37 | image: ${IR_IMAGE}:${IR_VERSION} 38 | domainname: ${LOCAL_DOMAIN} 39 | hostname: ir02 40 | container_name: ir02 41 | restart: "no" 42 | networks: 43 | ir_int: 44 | internet: 45 | ipv4_address: ${IPV4_PREFIX}.62 46 | stop_signal: SIGKILL 47 | environment: 48 | - NEOFS_IR_WALLET_ADDRESS=NYsJkMH9nPd6K345PNxLtWRdzNwKYy4KY7 49 | - NEOFS_IR_CONTROL_GRPC_ENDPOINT=${NEOFS_IR_CONTROL_GRPC_ENDPOINT_2} 50 | volumes: 51 | - neofs_chain_ir02:/neofs_chain/ 52 | - ./alphabet/buky.json:/wallet.json 53 | - ./../../vendor/hosts:/etc/hosts 54 | - ./../../vendor/neofs-cli:/neofs-cli 55 | - ./cli-cfg.yml:/cli-cfg.yml 56 | - ./cfg/config.yml:/etc/neofs/ir/config.yml 57 | - ${CA_CERTS_TRUSTED_STORE}/s04.${LOCAL_DOMAIN}.tls.crt:/etc/ssl/certs/s04tls.crt 58 | env_file: [ ".env", ".ir.env" ] 59 | command: [ "neofs-ir", "--config", "/etc/neofs/ir/config.yml" ] 60 | healthcheck: 61 | test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_IR_CONTROL_GRPC_ENDPOINT_2}", "--ir"] 62 | interval: 1s 63 | timeout: 1s 64 | retries: 300 65 | start_period: 5s 66 | 67 | ir03: 68 | image: ${IR_IMAGE}:${IR_VERSION} 69 | domainname: ${LOCAL_DOMAIN} 70 | hostname: ir03 71 | container_name: ir03 72 | restart: "no" 73 | networks: 74 | ir_int: 75 | internet: 76 | ipv4_address: ${IPV4_PREFIX}.63 77 | stop_signal: SIGKILL 78 | environment: 79 | - NEOFS_IR_WALLET_ADDRESS=NbMyB2qx4EBSsMmjxnSpvJ8FD43tLyfGMq 80 | - NEOFS_IR_CONTROL_GRPC_ENDPOINT=${NEOFS_IR_CONTROL_GRPC_ENDPOINT_3} 81 | volumes: 82 | - neofs_chain_ir03:/neofs_chain/ 83 | - ./alphabet/vedi.json:/wallet.json 84 | - ./../../vendor/hosts:/etc/hosts 85 | - ./../../vendor/neofs-cli:/neofs-cli 86 | - ./cli-cfg.yml:/cli-cfg.yml 87 | - ./cfg/config.yml:/etc/neofs/ir/config.yml 88 | - ${CA_CERTS_TRUSTED_STORE}/s04.${LOCAL_DOMAIN}.tls.crt:/etc/ssl/certs/s04tls.crt 89 | env_file: [ ".env", ".ir.env" ] 90 | command: [ "neofs-ir", "--config", "/etc/neofs/ir/config.yml" ] 91 | healthcheck: 92 | test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_IR_CONTROL_GRPC_ENDPOINT_3}", "--ir"] 93 | interval: 1s 94 | timeout: 1s 95 | retries: 300 96 | start_period: 5s 97 | 98 | ir04: 99 | image: ${IR_IMAGE}:${IR_VERSION} 100 | domainname: ${LOCAL_DOMAIN} 101 | hostname: ir04 102 | container_name: ir04 103 | restart: "no" 104 | networks: 105 | ir_int: 106 | internet: 107 | ipv4_address: ${IPV4_PREFIX}.64 108 | stop_signal: SIGKILL 109 | environment: 110 | - NEOFS_IR_WALLET_ADDRESS=NLcjoCwaoKN5Uz5QB7sqcwLfszoJuiCyzZ 111 | - NEOFS_IR_CONTROL_GRPC_ENDPOINT=${NEOFS_IR_CONTROL_GRPC_ENDPOINT_4} 112 | volumes: 113 | - neofs_chain_ir04:/neofs_chain/ 114 | - ./alphabet/glagoli.json:/wallet.json 115 | - ./../../vendor/hosts:/etc/hosts 116 | - ./../../vendor/neofs-cli:/neofs-cli 117 | - ./cli-cfg.yml:/cli-cfg.yml 118 | - ./cfg/config.yml:/etc/neofs/ir/config.yml 119 | - ${CA_CERTS_TRUSTED_STORE}/s04.${LOCAL_DOMAIN}.tls.crt:/etc/ssl/certs/s04tls.crt 120 | env_file: [ ".env", ".ir.env" ] 121 | command: [ "neofs-ir", "--config", "/etc/neofs/ir/config.yml" ] 122 | healthcheck: 123 | test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_IR_CONTROL_GRPC_ENDPOINT_4}", "--ir"] 124 | interval: 1s 125 | timeout: 1s 126 | retries: 300 127 | start_period: 5s 128 | 129 | ir-healthcheck: 130 | container_name: ir-healthcheck 131 | image: debian:10 132 | depends_on: 133 | ir01: 134 | condition: service_healthy 135 | ir02: 136 | condition: service_healthy 137 | ir03: 138 | condition: service_healthy 139 | ir04: 140 | condition: service_healthy 141 | 142 | networks: 143 | ir_int: 144 | internet: 145 | external: true 146 | name: basenet_internet 147 | 148 | volumes: 149 | neofs_chain_ir01: 150 | neofs_chain_ir02: 151 | neofs_chain_ir03: 152 | neofs_chain_ir04: 153 | 154 | -------------------------------------------------------------------------------- /services/storage/docker-compose.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | services: 4 | storage01: 5 | image: ${NODE_IMAGE}:${NODE_VERSION} 6 | domainname: ${LOCAL_DOMAIN} 7 | hostname: s01 8 | container_name: s01 9 | restart: "no" 10 | networks: 11 | storage_int: 12 | internet: 13 | ipv4_address: ${IPV4_PREFIX}.71 14 | volumes: 15 | - ./wallet01.json:/wallet.json 16 | - ./../../vendor/hosts:/etc/hosts 17 | - storage_s01:/storage 18 | - ./../../vendor/neofs-cli:/neofs-cli 19 | - ./cli-cfg.yml:/cli-cfg.yml 20 | - ./s04tls.crt:/etc/ssl/certs/s04tls.crt 21 | - ./cfg:/etc/neofs/storage 22 | stop_signal: SIGKILL 23 | env_file: [ ".env", ".storage.env" ] 24 | command: [ "neofs-node", "--config", "/etc/neofs/storage/config.yml" ] 25 | environment: 26 | - NEOFS_NODE_WALLET_PATH=./wallet.json 27 | - NEOFS_NODE_WALLET_PASSWORD= 28 | - NEOFS_NODE_ADDRESSES=s01.${LOCAL_DOMAIN}:8080 29 | - NEOFS_GRPC_0_ENDPOINT=s01.${LOCAL_DOMAIN}:8080 30 | - NEOFS_CONTROL_GRPC_ENDPOINT=${NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_1} 31 | - NEOFS_NODE_ATTRIBUTES_0=UN-LOCODE:RU MOW 32 | - NEOFS_NODE_ATTRIBUTES_1=Price:22 33 | healthcheck: 34 | test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_1}"] 35 | interval: 5s 36 | timeout: 5s 37 | retries: 5 38 | start_period: 20s 39 | 40 | storage02: 41 | image: ${NODE_IMAGE}:${NODE_VERSION} 42 | domainname: ${LOCAL_DOMAIN} 43 | hostname: s02 44 | container_name: s02 45 | restart: "no" 46 | networks: 47 | storage_int: 48 | internet: 49 | ipv4_address: ${IPV4_PREFIX}.72 50 | volumes: 51 | - ./wallet02.json:/wallet.json 52 | - ./../../vendor/hosts:/etc/hosts 53 | - storage_s02:/storage 54 | - ./../../vendor/neofs-cli:/neofs-cli 55 | - ./cli-cfg.yml:/cli-cfg.yml 56 | - ./s04tls.crt:/etc/ssl/certs/s04tls.crt 57 | - ./cfg:/etc/neofs/storage 58 | stop_signal: SIGKILL 59 | env_file: [ ".env", ".storage.env" ] 60 | command: [ "neofs-node", "--config", "/etc/neofs/storage/config.yml" ] 61 | environment: 62 | - NEOFS_NODE_WALLET_PATH=./wallet.json 63 | - NEOFS_NODE_WALLET_PASSWORD= 64 | - NEOFS_NODE_ADDRESSES=s02.${LOCAL_DOMAIN}:8080 65 | - NEOFS_GRPC_0_ENDPOINT=s02.${LOCAL_DOMAIN}:8080 66 | - NEOFS_CONTROL_GRPC_ENDPOINT=${NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_2} 67 | - NEOFS_NODE_ATTRIBUTES_0=UN-LOCODE:RU LED 68 | - NEOFS_NODE_ATTRIBUTES_1=Price:33 69 | healthcheck: 70 | test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_2}"] 71 | interval: 5s 72 | timeout: 5s 73 | retries: 5 74 | start_period: 20s 75 | 76 | storage03: 77 | image: ${NODE_IMAGE}:${NODE_VERSION} 78 | domainname: ${LOCAL_DOMAIN} 79 | hostname: s03 80 | container_name: s03 81 | restart: "no" 82 | networks: 83 | storage_int: 84 | internet: 85 | ipv4_address: ${IPV4_PREFIX}.73 86 | volumes: 87 | - ./wallet03.json:/wallet.json 88 | - ./../../vendor/hosts:/etc/hosts 89 | - storage_s03:/storage 90 | - ./../../vendor/neofs-cli:/neofs-cli 91 | - ./cli-cfg.yml:/cli-cfg.yml 92 | - ./s04tls.crt:/etc/ssl/certs/s04tls.crt 93 | - ./cfg:/etc/neofs/storage 94 | stop_signal: SIGKILL 95 | env_file: [ ".env", ".storage.env" ] 96 | command: [ "neofs-node", "--config", "/etc/neofs/storage/config.yml" ] 97 | environment: 98 | - NEOFS_NODE_WALLET_PATH=./wallet.json 99 | - NEOFS_NODE_WALLET_PASSWORD= 100 | - NEOFS_NODE_ADDRESSES=s03.${LOCAL_DOMAIN}:8080 101 | - NEOFS_GRPC_0_ENDPOINT=s03.${LOCAL_DOMAIN}:8080 102 | - NEOFS_CONTROL_GRPC_ENDPOINT=${NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_3} 103 | - NEOFS_NODE_ATTRIBUTES_0=UN-LOCODE:SE STO 104 | - NEOFS_NODE_ATTRIBUTES_1=Price:11 105 | healthcheck: 106 | test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_3}"] 107 | interval: 5s 108 | timeout: 5s 109 | retries: 5 110 | start_period: 20s 111 | 112 | storage04: 113 | image: ${NODE_IMAGE}:${NODE_VERSION} 114 | domainname: ${LOCAL_DOMAIN} 115 | hostname: s04 116 | container_name: s04 117 | restart: "no" 118 | networks: 119 | storage_int: 120 | internet: 121 | ipv4_address: ${IPV4_PREFIX}.74 122 | volumes: 123 | - ./wallet04.json:/wallet.json 124 | - ./../../vendor/hosts:/etc/hosts 125 | - storage_s04:/storage 126 | - ./../../vendor/neofs-cli:/neofs-cli 127 | - ./cli-cfg.yml:/cli-cfg.yml 128 | - ./s04tls.crt:/tls.crt 129 | - ./s04tls.key:/tls.key 130 | - ./cfg:/etc/neofs/storage 131 | stop_signal: SIGKILL 132 | env_file: [ ".env", ".storage.env" ] 133 | command: [ "neofs-node", "--config", "/etc/neofs/storage/config.yml" ] 134 | environment: 135 | - NEOFS_NODE_WALLET_PATH=./wallet.json 136 | - NEOFS_NODE_WALLET_PASSWORD= 137 | - NEOFS_NODE_ADDRESSES=s04.${LOCAL_DOMAIN}:8080 grpcs://s04.${LOCAL_DOMAIN}:8082 138 | - NEOFS_CONTROL_GRPC_ENDPOINT=${NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_4} 139 | - NEOFS_GRPC_NUM=2 140 | - NEOFS_GRPC_0_ENDPOINT=s04.${LOCAL_DOMAIN}:8080 141 | - NEOFS_GRPC_1_ENDPOINT=s04.${LOCAL_DOMAIN}:8082 142 | - NEOFS_GRPC_1_TLS_ENABLED=true 143 | - NEOFS_GRPC_1_TLS_CERTIFICATE=/tls.crt 144 | - NEOFS_GRPC_1_TLS_KEY=/tls.key 145 | - NEOFS_NODE_ATTRIBUTES_0=UN-LOCODE:FI HEL 146 | - NEOFS_NODE_ATTRIBUTES_1=Price:44 147 | healthcheck: 148 | test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_STORAGE_CONTROL_GRPC_ENDPOINT_4}"] 149 | interval: 5s 150 | timeout: 5s 151 | retries: 5 152 | start_period: 20s 153 | 154 | sn-healthcheck: 155 | container_name: sn-healthcheck 156 | image: debian:10 157 | depends_on: 158 | storage01: 159 | condition: service_healthy 160 | storage02: 161 | condition: service_healthy 162 | storage03: 163 | condition: service_healthy 164 | storage04: 165 | condition: service_healthy 166 | 167 | volumes: 168 | storage_s01: 169 | storage_s02: 170 | storage_s03: 171 | storage_s04: 172 | 173 | networks: 174 | storage_int: 175 | internet: 176 | external: true 177 | name: basenet_internet 178 | -------------------------------------------------------------------------------- /.github/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 22 | 25 | 26 | 27 | 48 | 50 | 51 | 53 | image/svg+xml 54 | 56 | 57 | 58 | 59 | 60 | 64 | 67 | 71 | 72 | 75 | 78 | 81 | 85 | 86 | 89 | 93 | 94 | 97 | 101 | 102 | 105 | 109 | 110 | 111 | 112 | 115 | 119 | 120 | 123 | 127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | SHELL = bash 3 | 4 | # Main environment configuration 5 | include .env 6 | 7 | # Optional variables with secrets 8 | -include .secrets 9 | 10 | # help target 11 | include help.mk 12 | 13 | # update NeoFS global config targets 14 | include neofs_config.mk 15 | 16 | # Targets to get required artifacts and external resources for each service 17 | include services/*/artifacts.mk 18 | 19 | # Targets helpful to prepare service environment 20 | include services/*/prepare.mk 21 | 22 | # List of services to run 23 | START_SVCS = $(shell cat .services | grep -v '\#') 24 | START_BASIC = $(shell cat .basic_services | grep -ve '\#') 25 | START_BOOTSTRAP = $(shell cat .bootstrap_services | grep -v '\#' | sed 's/^ir$$/&$(IR_NUMBER_OF_NODES)/') 26 | STOP_SVCS = $(shell tac .services | grep -v '\#') 27 | STOP_BASIC = $(shell tac .basic_services | grep -v '\#') 28 | STOP_BOOTSTRAP = $(shell tac .bootstrap_services | grep -v '\#' | sed 's/^ir$$/&$(IR_NUMBER_OF_NODES)/') 29 | 30 | # Enabled services dirs 31 | ENABLED_SVCS_DIRS = $(shell echo "${START_BOOTSTRAP} ${START_BASIC} ${START_SVCS}" | sed 's|[^ ]* *|./services/&|g') 32 | 33 | # Services that require artifacts 34 | GET_SVCS = $(shell grep -Rl "get.*:" ./services/* | sort -u | grep artifacts.mk | xargs -I {} dirname {} | xargs basename -a) 35 | 36 | # Services that require pulling images 37 | PULL_SVCS = $(shell find ${ENABLED_SVCS_DIRS} -type f -name 'docker-compose.yml' | sort -u | xargs -I {} dirname {} | xargs basename -a) 38 | 39 | # List of hosts available in devenv 40 | HOSTS_LINES = $(shell grep -Rl IPV4_PREFIX ./services/* | grep .hosts) 41 | 42 | # Paths to protocol.privnet.yml 43 | NEOFS_CHAIN_PROTOCOL = './services/ir/cfg/config.yml' 44 | CHAIN_PROTOCOL = './services/chain/protocol.privnet.yml' 45 | 46 | # List of grepped environment variables from *.env 47 | GREP_DOTENV = $(shell find . -name '*.env' -exec grep -rhv -e '^\#' -e '^$$' {} + | sort -u ) 48 | 49 | AVAILABLE_NUMBER_OF_NODES = 1 4 7 50 | 51 | # Error handling function 52 | define error_handler 53 | ret_val=$$?;\ 54 | if [ "$$ret_val" -ne 0 ]; then \ 55 | cat docker-compose.err;\ 56 | echo "Error: The target $1 failed with exit code $$ret_val";\ 57 | rm docker-compose.err;\ 58 | exit "$$ret_val";\ 59 | fi;\ 60 | if grep -q "ERROR" docker-compose.err; then \ 61 | cat docker-compose.err;\ 62 | echo "Error: The target '$1' failed and exit code is $$ret_val";\ 63 | rm docker-compose.err;\ 64 | exit 1;\ 65 | else \ 66 | echo "The target '$1' completed successfully";\ 67 | rm docker-compose.err;\ 68 | exit 0;\ 69 | fi 70 | endef 71 | 72 | # Check if number of IR nodes from .env file is correct 73 | .PHONY: check_nodes 74 | check_nodes: 75 | @if ! echo "$(AVAILABLE_NUMBER_OF_NODES)" | grep -wq "$(IR_NUMBER_OF_NODES)"; then \ 76 | echo "Invalid IR number $(IR_NUMBER_OF_NODES); supported numbers: ($(AVAILABLE_NUMBER_OF_NODES))"; \ 77 | exit 1; \ 78 | fi 79 | 80 | # Pull all required Docker images 81 | .PHONY: pull 82 | pull: 83 | @for svc in $(PULL_SVCS); do \ 84 | echo "$@ for service: $${svc}"; \ 85 | docker compose -f services/$${svc}/docker-compose.yml pull 2>&1 | tee -a docker compose.err; \ 86 | done 87 | $(call error_handler,$@); 88 | @: 89 | 90 | # Get all services artifacts 91 | .PHONY: get 92 | get: 93 | @for svc in $(GET_SVCS); do \ 94 | echo "$@ for service: $${svc}"; \ 95 | make get.$$svc 2>&1 | tee -a docker compose.err; \ 96 | done 97 | $(call error_handler,$@); 98 | @: 99 | 100 | # Start environment 101 | .PHONY: up 102 | up: up/basic 103 | @for svc in $(START_SVCS); do \ 104 | echo "$@ for service: $${svc}"; \ 105 | docker compose -f services/$${svc}/docker-compose.yml up -d 2>&1 | tee -a docker-compose.err; \ 106 | done 107 | $(call error_handler,$@); 108 | @echo "Full NeoFS Developer Environment is ready" 109 | 110 | # Build up NeoFS 111 | .PHONY: up/basic 112 | up/basic: up/bootstrap 113 | @for svc in $(START_BASIC); do \ 114 | echo "$@ for service: $${svc}"; \ 115 | docker compose -f services/$${svc}/docker-compose.yml up -d 2>&1 | tee -a docker-compose.err; \ 116 | done 117 | @./bin/tick.sh 118 | @./bin/config.sh SystemDNS container 119 | $(call error_handler,$@); 120 | @echo "Basic NeoFS Developer Environment is ready" 121 | 122 | # Start bootstrap services 123 | .PHONY: up/bootstrap 124 | up/bootstrap: check_nodes get vendor/hosts 125 | @echo "NEOFS_IR_MAINNET_CONTRACTS_NEOFS="`./vendor/neo-go contract calc-hash -s NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM --in vendor/contracts/neofs/contract.nef -m vendor/contracts/neofs/manifest.json | grep -Eo '[a-fA-F0-9]{40}'` > services/ir${IR_NUMBER_OF_NODES}/.ir.env 126 | @for svc in $(START_BOOTSTRAP); do \ 127 | echo "$@ for service: $${svc}"; \ 128 | docker compose -f services/$${svc}/docker-compose.yml up -d 2>&1 | tee -a docker-compose.err; \ 129 | done 130 | @source ./bin/helper.sh 131 | @docker exec main_chain neo-go wallet nep17 transfer --force --await --wallet-config /wallets/config.yml -r http://main-chain.neofs.devenv:30333 --from NPpKskku5gC6g59f2gVRR8fmvUTLDp9w7Y --to NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM --token GAS --amount 1000 132 | @./bin/contractDeploy.sh 133 | @NEOGO=vendor/neo-go WALLET=wallets/wallet.json CONFIG=wallets/config.yml ./bin/deposit.sh 134 | @for f in ./services/storage/wallet*.json; do \ 135 | echo "Transfer GAS to wallet $${f}" && \ 136 | ./vendor/neofs-adm -c neofs-adm.yml fschain refill-gas --storage-wallet $${f} --gas 10.0 --alphabet-wallets services/ir${IR_NUMBER_OF_NODES}/alphabet || die "Failed to transfer GAS to alphabet wallets"; \ 137 | done 138 | $(call error_handler,$@); 139 | @echo "NeoFS chain environment is deployed" 140 | 141 | # Build up certain service 142 | .PHONY: up/% 143 | up/%: get vendor/hosts 144 | @docker compose -f services/$*/docker-compose.yml up -d 2>&1 | tee -a docker-compose.err 145 | $(call error_handler,$@); 146 | @echo "Developer Environment for $* service is ready" 147 | 148 | # Stop environment 149 | .PHONY: down 150 | down: down/add down/basic down/bootstrap 151 | @echo "Full NeoFS Developer Environment is down" 152 | 153 | .PHONY: down/add 154 | down/add: 155 | @for svc in $(STOP_SVCS); do \ 156 | echo "$@ for service: $${svc}"; \ 157 | docker compose -f services/$${svc}/docker-compose.yml down 2>&1 | tee -a docker-compose.err; \ 158 | done 159 | $(call error_handler,$@); 160 | 161 | # Stop basic environment 162 | .PHONY: down/basic 163 | down/basic: 164 | @for svc in $(STOP_BASIC); do \ 165 | echo "$@ for service: $${svc}"; \ 166 | docker compose -f services/$${svc}/docker-compose.yml down 2>&1 | tee -a docker-compose.err; \ 167 | done 168 | $(call error_handler,$@); 169 | 170 | # Stop bootstrap services 171 | .PHONY: down/bootstrap 172 | down/bootstrap: 173 | @for svc in $(STOP_BOOTSTRAP); do \ 174 | echo "$@ for service: $${svc}"; \ 175 | docker compose -f services/$${svc}/docker-compose.yml down 2>&1 | tee docker-compose.err; \ 176 | done 177 | $(call error_handler,$@); 178 | 179 | # Stop certain service 180 | .PHONY: down/% 181 | down/%: 182 | @docker compose -f services/$*/docker-compose.yml down 2>&1 | tee docker-compose.err 183 | $(call error_handler,$@); 184 | 185 | # Generate changes for /etc/hosts 186 | .PHONY: vendor/hosts 187 | .ONESHELL: 188 | vendor/hosts: 189 | @for file in $(HOSTS_LINES) 190 | do 191 | while read h 192 | do 193 | echo $${h} | \ 194 | sed 's|IPV4_PREFIX|$(IPV4_PREFIX)|g' | \ 195 | sed 's|LOCAL_DOMAIN|$(LOCAL_DOMAIN)|g' 196 | done < $${file}; 197 | done > $@ 198 | 199 | # Generate and display changes for /etc/hosts 200 | .PHONY: hosts 201 | hosts: vendor/hosts 202 | @cat vendor/hosts 203 | 204 | # Clean-up the environment 205 | .PHONY: clean 206 | .ONESHELL: 207 | clean: 208 | @rm -rf vendor/* services/storage/s04tls.* services/k6_node/id_ed25519* 209 | @for svc in $(PULL_SVCS) 210 | do 211 | vols=`docker compose -f services/$${svc}/docker-compose.yml config --volumes 2>&1 | tee -a docker-compose.err` 212 | if [[ ! -z "$${vols}" ]]; then 213 | for vol in $${vols}; do 214 | docker volume rm -f "$${svc}_$${vol}" 2> /dev/null 215 | done 216 | fi 217 | done 218 | $(call error_handler,$@); 219 | 220 | # Generate environment 221 | .PHONY: env 222 | env: 223 | @$(foreach envvar,$(GREP_DOTENV),echo $(envvar);) 224 | @echo NEOFS_CHAIN_BLOCK_TIME=$(shell grep 'time_per_block' $(NEOFS_CHAIN_PROTOCOL) | awk '{print $$2}') 225 | @echo MAINNET_BLOCK_TIME=$(shell grep 'TimePerBlock' $(CHAIN_PROTOCOL) | awk '{print $$2}') 226 | @echo NEOFS_CHAIN_MAGIC=$(shell grep 'magic' $(NEOFS_CHAIN_PROTOCOL) | awk '{print $$2}') 227 | 228 | # Restart storage nodes with clean volumes 229 | .PHONY: restart.storage-clean 230 | restart.storage-clean: 231 | @docker compose -f ./services/storage/docker-compose.yml down 2>&1 | tee -a docker-compose.err 232 | vols=`docker compose -f services/storage/docker-compose.yml config --volumes 2>&1 | tee -a docker-compose.err` 233 | if [ ! -z "$${vols}" ]; then 234 | for vol in $${vols}; do 235 | docker volume rm -f "storage_$${vol}" 2> /dev/null 236 | done 237 | fi 238 | @docker compose -f ./services/storage/docker-compose.yml up -d 2>&1 | tee -a docker-compose.err 239 | $(call error_handler,$@); 240 | -------------------------------------------------------------------------------- /services/ir7/docker-compose.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | services: 4 | 5 | ir01: 6 | image: ${IR_IMAGE}:${IR_VERSION} 7 | domainname: ${LOCAL_DOMAIN} 8 | hostname: ir01 9 | container_name: ir01 10 | restart: "no" 11 | networks: 12 | ir_int: 13 | internet: 14 | ipv4_address: ${IPV4_PREFIX}.61 15 | stop_signal: SIGKILL 16 | environment: 17 | - NEOFS_IR_WALLET_ADDRESS=NPa49xr5Fp3wZrvUqbdW1SArhpSGRqKS8d 18 | - NEOFS_IR_CONTROL_GRPC_ENDPOINT=${NEOFS_IR_CONTROL_GRPC_ENDPOINT_1} 19 | volumes: 20 | - neofs_chain_ir01:/neofs_chain/ 21 | - ./alphabet/az.json:/wallet.json 22 | - ./../../vendor/hosts:/etc/hosts 23 | - ./../../vendor/neofs-cli:/neofs-cli 24 | - ./cli-cfg.yml:/cli-cfg.yml 25 | - ./cfg/config.yml:/etc/neofs/ir/config.yml 26 | - ${CA_CERTS_TRUSTED_STORE}/s04.${LOCAL_DOMAIN}.tls.crt:/etc/ssl/certs/s04tls.crt 27 | env_file: [ ".env", ".ir.env" ] 28 | command: [ "neofs-ir", "--config", "/etc/neofs/ir/config.yml" ] 29 | healthcheck: 30 | test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_IR_CONTROL_GRPC_ENDPOINT_1}", "--ir"] 31 | interval: 1s 32 | timeout: 1s 33 | retries: 300 34 | start_period: 5s 35 | 36 | ir02: 37 | image: ${IR_IMAGE}:${IR_VERSION} 38 | domainname: ${LOCAL_DOMAIN} 39 | hostname: ir02 40 | container_name: ir02 41 | restart: "no" 42 | networks: 43 | ir_int: 44 | internet: 45 | ipv4_address: ${IPV4_PREFIX}.62 46 | stop_signal: SIGKILL 47 | environment: 48 | - NEOFS_IR_WALLET_ADDRESS=NhGnZcSeSsXG4wU1uKfCLatSFYNf4ufaF9 49 | - NEOFS_IR_CONTROL_GRPC_ENDPOINT=${NEOFS_IR_CONTROL_GRPC_ENDPOINT_2} 50 | volumes: 51 | - neofs_chain_ir02:/neofs_chain/ 52 | - ./alphabet/buky.json:/wallet.json 53 | - ./../../vendor/hosts:/etc/hosts 54 | - ./../../vendor/neofs-cli:/neofs-cli 55 | - ./cli-cfg.yml:/cli-cfg.yml 56 | - ./cfg/config.yml:/etc/neofs/ir/config.yml 57 | - ${CA_CERTS_TRUSTED_STORE}/s04.${LOCAL_DOMAIN}.tls.crt:/etc/ssl/certs/s04tls.crt 58 | env_file: [ ".env", ".ir.env" ] 59 | command: [ "neofs-ir", "--config", "/etc/neofs/ir/config.yml" ] 60 | healthcheck: 61 | test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_IR_CONTROL_GRPC_ENDPOINT_2}", "--ir"] 62 | interval: 1s 63 | timeout: 1s 64 | retries: 300 65 | start_period: 5s 66 | 67 | ir03: 68 | image: ${IR_IMAGE}:${IR_VERSION} 69 | domainname: ${LOCAL_DOMAIN} 70 | hostname: ir03 71 | container_name: ir03 72 | restart: "no" 73 | networks: 74 | ir_int: 75 | internet: 76 | ipv4_address: ${IPV4_PREFIX}.63 77 | stop_signal: SIGKILL 78 | environment: 79 | - NEOFS_IR_WALLET_ADDRESS=NLQTN4s6BaDR2Gci6T2KrFQ35sSxQ4PGSq 80 | - NEOFS_IR_CONTROL_GRPC_ENDPOINT=${NEOFS_IR_CONTROL_GRPC_ENDPOINT_3} 81 | volumes: 82 | - neofs_chain_ir03:/neofs_chain/ 83 | - ./alphabet/vedi.json:/wallet.json 84 | - ./../../vendor/hosts:/etc/hosts 85 | - ./../../vendor/neofs-cli:/neofs-cli 86 | - ./cli-cfg.yml:/cli-cfg.yml 87 | - ./cfg/config.yml:/etc/neofs/ir/config.yml 88 | - ${CA_CERTS_TRUSTED_STORE}/s04.${LOCAL_DOMAIN}.tls.crt:/etc/ssl/certs/s04tls.crt 89 | env_file: [ ".env", ".ir.env" ] 90 | command: [ "neofs-ir", "--config", "/etc/neofs/ir/config.yml" ] 91 | healthcheck: 92 | test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_IR_CONTROL_GRPC_ENDPOINT_3}", "--ir"] 93 | interval: 1s 94 | timeout: 1s 95 | retries: 300 96 | start_period: 5s 97 | 98 | ir04: 99 | image: ${IR_IMAGE}:${IR_VERSION} 100 | domainname: ${LOCAL_DOMAIN} 101 | hostname: ir04 102 | container_name: ir04 103 | restart: "no" 104 | networks: 105 | ir_int: 106 | internet: 107 | ipv4_address: ${IPV4_PREFIX}.64 108 | stop_signal: SIGKILL 109 | environment: 110 | - NEOFS_IR_WALLET_ADDRESS=NRycJKK6S7wdRQPdcTaMDnsgLVFTrbuhJ6 111 | - NEOFS_IR_CONTROL_GRPC_ENDPOINT=${NEOFS_IR_CONTROL_GRPC_ENDPOINT_4} 112 | volumes: 113 | - neofs_chain_ir04:/neofs_chain/ 114 | - ./alphabet/glagoli.json:/wallet.json 115 | - ./../../vendor/hosts:/etc/hosts 116 | - ./../../vendor/neofs-cli:/neofs-cli 117 | - ./cli-cfg.yml:/cli-cfg.yml 118 | - ./cfg/config.yml:/etc/neofs/ir/config.yml 119 | - ${CA_CERTS_TRUSTED_STORE}/s04.${LOCAL_DOMAIN}.tls.crt:/etc/ssl/certs/s04tls.crt 120 | env_file: [ ".env", ".ir.env" ] 121 | command: [ "neofs-ir", "--config", "/etc/neofs/ir/config.yml" ] 122 | healthcheck: 123 | test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_IR_CONTROL_GRPC_ENDPOINT_4}", "--ir"] 124 | interval: 1s 125 | timeout: 1s 126 | retries: 300 127 | start_period: 5s 128 | 129 | ir05: 130 | image: ${IR_IMAGE}:${IR_VERSION} 131 | domainname: ${LOCAL_DOMAIN} 132 | hostname: ir05 133 | container_name: ir05 134 | restart: "no" 135 | networks: 136 | ir_int: 137 | internet: 138 | ipv4_address: ${IPV4_PREFIX}.65 139 | stop_signal: SIGKILL 140 | environment: 141 | - NEOFS_IR_WALLET_ADDRESS=NfnG66ydpw6jsoyyFuvtb4FFYqkHHnqPdu 142 | - NEOFS_IR_CONTROL_GRPC_ENDPOINT=${NEOFS_IR_CONTROL_GRPC_ENDPOINT_5} 143 | volumes: 144 | - neofs_chain_ir05:/neofs_chain/ 145 | - ./alphabet/dobro.json:/wallet.json 146 | - ./../../vendor/hosts:/etc/hosts 147 | - ./../../vendor/neofs-cli:/neofs-cli 148 | - ./cli-cfg.yml:/cli-cfg.yml 149 | - ./cfg/config.yml:/etc/neofs/ir/config.yml 150 | - ${CA_CERTS_TRUSTED_STORE}/s04.${LOCAL_DOMAIN}.tls.crt:/etc/ssl/certs/s04tls.crt 151 | env_file: [ ".env", ".ir.env" ] 152 | command: [ "neofs-ir", "--config", "/etc/neofs/ir/config.yml" ] 153 | healthcheck: 154 | test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_IR_CONTROL_GRPC_ENDPOINT_5}", "--ir"] 155 | interval: 1s 156 | timeout: 1s 157 | retries: 300 158 | start_period: 5s 159 | 160 | ir06: 161 | image: ${IR_IMAGE}:${IR_VERSION} 162 | domainname: ${LOCAL_DOMAIN} 163 | hostname: ir06 164 | container_name: ir06 165 | restart: "no" 166 | networks: 167 | ir_int: 168 | internet: 169 | ipv4_address: ${IPV4_PREFIX}.66 170 | stop_signal: SIGKILL 171 | environment: 172 | - NEOFS_IR_WALLET_ADDRESS=NRjbg1cTZoaNtHyLwdciAk8a9YdtgPPaUC 173 | - NEOFS_IR_CONTROL_GRPC_ENDPOINT=${NEOFS_IR_CONTROL_GRPC_ENDPOINT_6} 174 | volumes: 175 | - neofs_chain_ir06:/neofs_chain/ 176 | - ./alphabet/yest.json:/wallet.json 177 | - ./../../vendor/hosts:/etc/hosts 178 | - ./../../vendor/neofs-cli:/neofs-cli 179 | - ./cli-cfg.yml:/cli-cfg.yml 180 | - ./cfg/config.yml:/etc/neofs/ir/config.yml 181 | - ${CA_CERTS_TRUSTED_STORE}/s04.${LOCAL_DOMAIN}.tls.crt:/etc/ssl/certs/s04tls.crt 182 | env_file: [ ".env", ".ir.env" ] 183 | command: [ "neofs-ir", "--config", "/etc/neofs/ir/config.yml" ] 184 | healthcheck: 185 | test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_IR_CONTROL_GRPC_ENDPOINT_6}", "--ir"] 186 | interval: 1s 187 | timeout: 1s 188 | retries: 300 189 | start_period: 5s 190 | 191 | ir07: 192 | image: ${IR_IMAGE}:${IR_VERSION} 193 | domainname: ${LOCAL_DOMAIN} 194 | hostname: ir07 195 | container_name: ir07 196 | restart: "no" 197 | networks: 198 | ir_int: 199 | internet: 200 | ipv4_address: ${IPV4_PREFIX}.67 201 | stop_signal: SIGKILL 202 | environment: 203 | - NEOFS_IR_WALLET_ADDRESS=NXqebp9T47ZvaMfMgdB1N1W42stk6RpHJp 204 | - NEOFS_IR_CONTROL_GRPC_ENDPOINT=${NEOFS_IR_CONTROL_GRPC_ENDPOINT_7} 205 | volumes: 206 | - neofs_chain_ir07:/neofs_chain/ 207 | - ./alphabet/zhivete.json:/wallet.json 208 | - ./../../vendor/hosts:/etc/hosts 209 | - ./../../vendor/neofs-cli:/neofs-cli 210 | - ./cli-cfg.yml:/cli-cfg.yml 211 | - ./cfg/config.yml:/etc/neofs/ir/config.yml 212 | - ${CA_CERTS_TRUSTED_STORE}/s04.${LOCAL_DOMAIN}.tls.crt:/etc/ssl/certs/s04tls.crt 213 | env_file: [ ".env", ".ir.env" ] 214 | command: [ "neofs-ir", "--config", "/etc/neofs/ir/config.yml" ] 215 | healthcheck: 216 | test: ["CMD", "/neofs-cli", "control", "healthcheck", "-c", "/cli-cfg.yml", "--endpoint", "${NEOFS_IR_CONTROL_GRPC_ENDPOINT_7}", "--ir"] 217 | interval: 1s 218 | timeout: 1s 219 | retries: 300 220 | start_period: 5s 221 | 222 | ir-healthcheck: 223 | container_name: ir-healthcheck 224 | image: debian:10 225 | depends_on: 226 | ir01: 227 | condition: service_healthy 228 | ir02: 229 | condition: service_healthy 230 | ir03: 231 | condition: service_healthy 232 | ir04: 233 | condition: service_healthy 234 | ir05: 235 | condition: service_healthy 236 | ir06: 237 | condition: service_healthy 238 | ir07: 239 | condition: service_healthy 240 | 241 | networks: 242 | ir_int: 243 | internet: 244 | external: true 245 | name: basenet_internet 246 | 247 | volumes: 248 | neofs_chain_ir01: 249 | neofs_chain_ir02: 250 | neofs_chain_ir03: 251 | neofs_chain_ir04: 252 | neofs_chain_ir05: 253 | neofs_chain_ir06: 254 | neofs_chain_ir07: 255 | 256 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------