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

Dev network has 0 balance for all accounts (s390x architecture) #235

Closed
mrihn opened this issue Sep 7, 2021 · 15 comments
Closed

Dev network has 0 balance for all accounts (s390x architecture) #235

mrihn opened this issue Sep 7, 2021 · 15 comments
Assignees

Comments

@mrihn
Copy link

mrihn commented Sep 7, 2021

I started a local testnet with the following command:

polkadot --alice -d /tmp/alice --ws-external --rpc-external --rpc-cors all --dev

The node came up and is running without errors. I am able to connect to it with the browser UI, but all of the accounts (ALICE, ALICE_STASH, BOB, etc.) have a balance of 0.

The same thing happened when I brought up a "Local Two-node Testnet" as described in the README.

Is there a separate command (or command line option) to start the accounts with a certain amount of funds?

I am running with Polkadot version 0.9.9

@nuke-web3
Copy link
Contributor

This is likely due to a type mapping issue. you can do a sanity check. Go into the Settings > Developer and clear any custom types. Still not working? Please let me know

@nuke-web3 nuke-web3 self-assigned this Sep 7, 2021
@mrihn
Copy link
Author

mrihn commented Sep 8, 2021

I did not have any custom types set in the Developer settings.

@nuke-web3 nuke-web3 transferred this issue from paritytech/polkadot Sep 8, 2021
@nuke-web3 nuke-web3 reopened this Sep 8, 2021
@nuke-web3
Copy link
Contributor

I have built and am running the release-0.9.9 build and connected to apps UI to the default ws (https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/accounts) :

image

Development
polkadot/9090
---
Parity Polkadot
 v0.9.9
api v5.8.4-1
apps v0.95.2-103

Under the JS tab examples the get system information one yields:

You are connected to chain Development
You are using: Parity Polkadot v0.9.9-5af7db189-x86_64-linux-gnu
Node specific properties:
ss58Format 
tokenDecimals 
tokenSymbol 

Can you verify that you are indeed connecting to the right node and using the same (or otherwise what) versions?

@mrihn
Copy link
Author

mrihn commented Sep 8, 2021

The get system information command shows the following:

You are connected to chain Development
You are using: Parity Polkadot v0.9.9-ccfd5b911-s390x-linux-gnu
Node specific properties:
ss58Format 
tokenDecimals 
tokenSymbol 

This node was built on s390x architecture. That should be the only difference.

@shawntabrizi
Copy link
Member

@mrihn show a screenshot of what you are looking at

@mrihn
Copy link
Author

mrihn commented Sep 8, 2021

image

@nuke-web3
Copy link
Contributor

nuke-web3 commented Sep 8, 2021

You are using: Parity Polkadot v0.9.9-ccfd5b911-s390x-linux-gnu this commit -- It's actually much newer than the one I am using

Notice you are also on the 9100 runtime (top left). I suspect that this is a type issue that isn't covered in the version of the apps / api that you have. You could try the binary in the release , build from that commit, or I can try and track down the custom type mapping for you if it's critical that you use the present version.

@mrihn
Copy link
Author

mrihn commented Sep 8, 2021

Thank you. That would be helpful if you find the custom type mapping for us. It is important that we use this version for our purposes.

@shawntabrizi
Copy link
Member

unable to reproduce the issue

image

You need to be more specific here for us to help you, or provide some kind of docker image or something to reproduce.

@mrihn
Copy link
Author

mrihn commented Sep 8, 2021

The issue seems to be related to the s390x architecture that I am using. When I replicate the scenario on x86, I also see the 10,000 unit account balances, but on s390x I see this:

image

Everything seems to be functional, aside from the accounts having a 0 balance. Is there any way to manually specify a non-zero account balance when the accounts are not automatically funded the 10,000 units?

@nuke-web3
Copy link
Contributor

I don't see how they could be based on the target architecture.

Can you verify that balances are indeed 0 or if this is just a UI issue?
For example, you can use this to read the validator balances: https://polkadot.js.org/docs/api/examples/promise/read-storage
It may be as simple as trying the example in the js tab of the UI (https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/js) and the retrieve historical query data, or this snippet in the UI's console:

// This example set shows how to make queries at a point
const ALICE = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';

// retrieve the balance, once-off at the latest block
const { data: { free } } = await api.query.system.account(ALICE);

console.log('Alice has a current balance of', free.toHuman());

@mrihn
Copy link
Author

mrihn commented Sep 9, 2021

image

retrieve historical query data also shows a balance of 0

@mrihn
Copy link
Author

mrihn commented Sep 9, 2021

image

I tried the Get chain state information example with the alice node up and running
(polkadot/target/release/polkadot --alice -d /tmp/alice --ws-external --rpc-external --rpc-cors all --dev)

This response seems to indicate that the UI doesn't even recognize that the node is up (and also can't print the date for some reason).

@nuke-web3 nuke-web3 changed the title Dev network has 0 balance for all accounts Dev network has 0 balance for all accounts (s390x architecture) Oct 4, 2021
@nuke-web3
Copy link
Contributor

Was there any resolution for this @mrihn ? I am closing here as the issue is stale, please let me know if you did solve this 🙏

@vishwabmc
Copy link

vishwabmc commented Feb 13, 2022

Hello, this issue has not been resolved for s390x architecture. Recently, we built and tested https://github.com/substrate-developer-hub/substrate-node-template/ and ran into same issue.

NOTE: Since s390x is a Big Endian architecture, we ran into an issue when polkadot pulled in Merlin as a dependency.
dalek-cryptography/merlin#58

For now, we went ahead by commenting the code https://github.com/dalek-cryptography/merlin/blob/master/src/lib.rs#L9
polkadot still got compiled and we were able to launch.

/*
|
10 | / compile_error!(
11 | | r#"
12 | | This crate doesn't support big-endian targets, since I didn't
13 | | have one to test correctness on. If you're seeing this message,
14 | | please file an issue!
15 | | "#
16 | | );
| |__^
*/

Is this the reason why the balance is coming as zero ?

@nukemandan @mrihn ^

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

No branches or pull requests

4 participants