Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ up/bootstrap: check_nodes get vendor/hosts
docker-compose -f services/$${svc}/docker-compose.yml up -d 2>&1 | tee -a docker-compose.err; \
done
@source ./bin/helper.sh
@docker exec main_chain neo-go wallet nep17 transfer --force --await --wallet-config /wallets/config.yml -r http://main-chain.neofs.devenv:30333 --from NfgHwwTi3wHAS8aFAN243C5vGbkYDpqLHP --to NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM --token GAS --amount 1000
@./vendor/neo-go contract deploy --wallet-config wallets/config.yml --in vendor/contracts/neofs/contract.nef --manifest vendor/contracts/neofs/manifest.json --force --await -r http://main-chain.neofs.devenv:30333 [ true ffffffffffffffffffffffffffffffffffffffff [ 02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2 ] [ InnerRingCandidateFee 10000000000 WithdrawFee 100000000 ] ]
@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
@./bin/contractDeploy.sh
@NEOGO=vendor/neo-go WALLET=wallets/wallet.json CONFIG=wallets/config.yml ./bin/deposit.sh
@for f in ./services/storage/wallet*.json; do \
echo "Transfer GAS to wallet $${f}" && \
Expand Down Expand Up @@ -229,9 +229,11 @@ env:
.PHONY: restart.storage-clean
restart.storage-clean:
@docker-compose -f ./services/storage/docker-compose.yml down 2>&1 | tee -a docker-compose.err
@$(foreach vol, \
$(shell docker-compose -f services/storage/docker-compose.yml config --volumes 2>&1 | tee -a docker-compose.err),\
$(call error_handler,$@ for storage_$${vol}); \,\
docker volume rm storage_$(vol);)
docker-compose -f ./services/storage/docker-compose.yml up -d 2>&1 | tee -a docker-compose.err
vols=`docker-compose -f services/storage/docker-compose.yml config --volumes 2>&1 | tee -a docker-compose.err`
if [ ! -z "$${vols}" ]; then
for vol in $${vols}; do
docker volume rm -f "storage_$${vol}" 2> /dev/null
done
fi
@docker-compose -f ./services/storage/docker-compose.yml up -d 2>&1 | tee -a docker-compose.err
$(call error_handler,$@);
37 changes: 37 additions & 0 deletions bin/contractDeploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash

echo "Running bin/contractDeploy.sh"

# Source env settings
. .env
. services/ir${IR_NUMBER_OF_NODES}/.ir.env
source bin/helper.sh

# NeoGo binary path.
NEOGO="${NEOGO:-./vendor/neo-go}"

CONFIG="${CONFIG:-./wallets/config.yml}"

CONTRACT_ADDR=$(${NEOGO} util convert "${NEOFS_IR_CONTRACTS_NEOFS}" \
| grep 'LE ScriptHash to Address' \
| awk '{print $5}' \
| grep -oP "[A-z0-9]+" \
|| die "Cannot parse contract address: ${NEOFS_IR_CONTRACTS_NEOFS}")

keys=$(${NEOGO} wallet dump-keys -w services/ir${IR_NUMBER_OF_NODES}/alphabet/az.json \
| awk -v RS=':' 'END {print $0}' \
| grep -Eo '[0-9a-z]{66}' \
| tr '\n' ' ' \
|| die "Cannot parse dump keys")

echo "${keys}"

${NEOGO} contract deploy \
--wallet-config ${CONFIG} \
--in vendor/contracts/neofs/contract.nef \
--manifest vendor/contracts/neofs/manifest.json --force --await \
-r http://main-chain.${LOCAL_DOMAIN}:30333 \
[ true ffffffffffffffffffffffffffffffffffffffff \
[ ${keys} ] \
[ InnerRingCandidateFee 10000000000 WithdrawFee 100000000 ] ]

4 changes: 2 additions & 2 deletions docs/chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Claim GAS to consensus node's wallet. Use account that contains NEO tokens.
$ neo-go wallet claim \
-w services/chain/node-wallet.json \
-r http://main-chain.neofs.devenv:30333 \
-a NfgHwwTi3wHAS8aFAN243C5vGbkYDpqLHP \
-a NPpKskku5gC6g59f2gVRR8fmvUTLDp9w7Y \
Password >
70e09bbd55846dcc7cee23905b737c63e5a80d32e387bce108bc6db8e641fb90
```
Expand All @@ -102,7 +102,7 @@ Then you can transfer GAS the same way as it was done in previous section.
$ neo-go wallet nep17 transfer \
-w services/chain/node-wallet.json \
-r http://main-chain.neofs.devenv:30333 \
--from NfgHwwTi3wHAS8aFAN243C5vGbkYDpqLHP \
--from NPpKskku5gC6g59f2gVRR8fmvUTLDp9w7Y \
--to NXnzw3J9VvKXjM1BPAJK4QUpTtEQu4TpU6 \
--amount 50 \
--token GAS
Expand Down
36 changes: 25 additions & 11 deletions services/chain/node-wallet.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"version": "3.0",
"name":null,
"version": "1.0",
"accounts": [
{
"address": "Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn",
"key": "6PYM8VdX2BSm7BSXKzV4Fz6S3R9cDLLWNrD9nMjxW352jEv3fsC8N3wNLY",
"address": "NZBEUULRXo79EqBQVPpUTziicepFc7kuXU",
"key": "6PYPBU46oBC5E1BrDEGzRvvsMEQZCzLsDChQi3GyVGtWLTrtPo3o3n7fYU",
"label": "single",
"contract": {
"script": "DCECs2Ir9AF73+MXxYrtX0x1PyBrfbiWBG+n13S7xL9/jcJBVuezJw==",
"script": "DCEDLsIfADqZRkMGYscoe6gb2dYPofrxggZDT+rb0Aj1rgBBVuezJw==",
"parameters": [
{
"name": "parameter0",
Expand All @@ -17,15 +16,31 @@
"deployed": false
},
"lock": false,
"extra":null,
"isDefault": false
},
{
"address": "NfgHwwTi3wHAS8aFAN243C5vGbkYDpqLHP",
"key": "6PYM8VdX2BSm7BSXKzV4Fz6S3R9cDLLWNrD9nMjxW352jEv3fsC8N3wNLY",
"address": "NPpKskku5gC6g59f2gVRR8fmvUTLDp9w7Y",
"key": "6PYPBU46oBC5E1BrDEGzRvvsMEQZCzLsDChQi3GyVGtWLTrtPo3o3n7fYU",
"label": "committee",
"contract": {
"script": "EQwhAy7CHwA6mUZDBmLHKHuoG9nWD6H68YIGQ0/q29AI9a4AEUGe0Nw6",
"parameters": [
{
"name": "parameter0",
"type": "Signature"
}
],
"deployed": false
},
"lock": false,
"isDefault": false
},
{
"address": "NPpKskku5gC6g59f2gVRR8fmvUTLDp9w7Y",
"key": "6PYPBU46oBC5E1BrDEGzRvvsMEQZCzLsDChQi3GyVGtWLTrtPo3o3n7fYU",
"label": "consensus",
"contract": {
"script": "EQwhArNiK/QBe9/jF8WK7V9MdT8ga324lgRvp9d0u8S/f43CEUGe0Nw6",
"script": "EQwhAy7CHwA6mUZDBmLHKHuoG9nWD6H68YIGQ0/q29AI9a4AEUGe0Nw6",
"parameters": [
{
"name": "parameter0",
Expand All @@ -35,7 +50,6 @@
"deployed": false
},
"lock": false,
"extra":null,
"isDefault": false
}
],
Expand All @@ -47,4 +61,4 @@
"extra": {
"Tokens": null
}
}
}
6 changes: 5 additions & 1 deletion services/chain/protocol.privnet1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ ProtocolConfiguration:
TimePerBlock: 1s
MemPoolSize: 50000
StandbyCommittee:
- 02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2
- 032ec21f003a9946430662c7287ba81bd9d60fa1faf18206434feadbd008f5ae00
ValidatorsCount: 1
VerifyTransactions: true
P2PSigExtensions: false
Genesis:
Roles:
NeoFSAlphabet:
- 02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2

ApplicationConfiguration:
SkipBlockVerification: false
Expand Down
2 changes: 1 addition & 1 deletion services/chain/protocol.privnet4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ProtocolConfiguration:
TimePerBlock: 1s
MemPoolSize: 50000
StandbyCommittee:
- 02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2
- 032ec21f003a9946430662c7287ba81bd9d60fa1faf18206434feadbd008f5ae00
ValidatorsCount: 1
VerifyTransactions: true
P2PSigExtensions: false
Expand Down
2 changes: 1 addition & 1 deletion services/chain/protocol.privnet7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ProtocolConfiguration:
TimePerBlock: 1s
MemPoolSize: 50000
StandbyCommittee:
- 02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2
- 032ec21f003a9946430662c7287ba81bd9d60fa1faf18206434feadbd008f5ae00
ValidatorsCount: 1
VerifyTransactions: true
P2PSigExtensions: false
Expand Down