Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy sidechain environment with neofs-adm #212

Merged
merged 7 commits into from
Sep 13, 2022

Conversation

alexvanin
Copy link
Contributor

make up/basic now consist of three steps:

  1. start essential services (basenet + chains)
  2. deploy environment
  3. start storage services

Before that, scripts download neofs-adm and compiled version of contract.
For CI use path variables and compile neofs-adm binary and smart contracts on a runner locally.

To deploy sidechain neofs-adm config was expand with network section. Feel free to suggest different defaults (used from sidechain dumps).

Also MaxGasInvoke was changed even though we decided to keep value the same in #207. Sidechain deploy is really heavy.

Essential services run chains. Between basic
and essential runs adm tool can deploy environment.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
These artifacts are required for environment deploy.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
cthulhu-rider
cthulhu-rider previously approved these changes Sep 9, 2022
Copy link
Contributor

@cthulhu-rider cthulhu-rider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine 👍

Makefile Outdated
@@ -72,6 +72,9 @@ up/basic: up/essential
.PHONY: up/essential
up/essential: get vendor/hosts
@$(foreach SVC, $(START_ESSENTIAL), $(shell docker-compose -f services/$(SVC)/docker-compose.yml up -d))
@./vendor/neofs-adm --config services/ir/neofs-adm.yml morph init --alphabet-wallets ./services/ir --contracts vendor/contracts
@for f in $(shell ls ./services/storage/wallet*.json); do ./vendor/neofs-adm -c services/ir/neofs-adm.yml morph refill-gas --storage-wallet $${f} --gas 10.0 --alphabet-wallets services/ir; done
Copy link
Contributor

@fyrchik fyrchik Sep 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be just a glob without $(shell ls wrapping.

Also the output is 4 times Waiting for transactions to persist, could you add some logging like (Transfer GAS to wallet $${f})?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide an example with glob, please? Not sure I understand what you mean.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@for f in $(shell ls ./services/storage/wallet*.json); do
vs
@for f in ./services/storage/wallet*.json; do

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks.

@@ -1,4 +1,15 @@
rpc-endpoint: http://morph-chain.neofs.devenv:30333
network:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neofs-adm config must be moved to repo root.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved.

@@ -30,7 +30,7 @@ ApplicationConfiguration:
RPC:
Enabled: true
EnableCORSWorkaround: false
MaxGasInvoke: 15
MaxGasInvoke: 50
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mainnet has 100. Think, we can safely mirror this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Changed.

Environment deploy requires bigger GAS limit for
complex contract deploy transactions.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
Network section is required for environment deploy.
Values are taken from neo-preodolenie.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
@fyrchik
Copy link
Contributor

fyrchik commented Sep 13, 2022

Btw, what about using neofs-adm in bin/tick.sh?

@alexvanin
Copy link
Contributor Author

Btw, what about using neofs-adm in bin/tick.sh?

It should be done in #204

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants