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

avoid overwriting validator balances #672

Closed
bernardoaraujor opened this issue Jan 3, 2023 · 0 comments · Fixed by #989
Closed

avoid overwriting validator balances #672

bernardoaraujor opened this issue Jan 3, 2023 · 0 comments · Fixed by #989
Assignees
Labels
bug Something isn't working support

Comments

@bernardoaraujor
Copy link

We need to use polkadot-local chain for polkadot-stps.

The project also relies on the feature of setting genesis balances.

We're running into a problem where the validator balances are also being overwritten:

   "Thread 'main' panicked at 'Stash does not have enough balance to bond.', /Users/pepo/.cargo/git/checkouts/substrate-7e08433d4c370a21/20037d5/frame/staking/src/pallet/mod.rs:578\n" +

No blocks are even produced on the chain.

Steps to reproduce:

  1. Clone polkadot-stps
  2. Apply this change:
diff --git a/tests/relay-single-node-native.json b/tests/relay-single-node-native.json
index 538dc2d..9afb081 100644
--- a/tests/relay-single-node-native.json
+++ b/tests/relay-single-node-native.json
@@ -5,14 +5,12 @@
     },
     "relaychain": {
       "default_image": "docker.io/parity/polkadot:latest",
-      "chain": "rococo-local",
+      "chain": "polkadot-local",
       "default_command": "./polkadot",
       "genesis": {
         "runtime": {
-          "runtime_genesis_config": {
-            "balances": {
-              "balances": {% include "./funded-accounts.json" %}
-            }
+          "balances": {
+            "balances": {% include "./funded-accounts.json" %}
           }
         }
       },
  1. Run:
./polkadot-stps.sh test_native tests/relay-single-node-native.zndsl

It's weird that this feature works with rococo-local but not polkadot-local, so this could perhaps be a bug?

One possible solution discussed with @pepoviola was to add the possibility of zombienet supporting the use of append_balances: <string to file> instead of balances. It would avoid overwriting any validator balances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants