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

[QBFT] Besu Tesnet , Not getting token in alloc address #7484

Open
akashsangwan3009 opened this issue Aug 19, 2024 · 8 comments
Open

[QBFT] Besu Tesnet , Not getting token in alloc address #7484

akashsangwan3009 opened this issue Aug 19, 2024 · 8 comments
Labels
non mainnet (private networks) not related to mainnet features - covers privacy, permissioning, IBFT2, QBFT question

Comments

@akashsangwan3009
Copy link

Hi there,

Im trying to run besu QBFT private network , with following genesis file :

{ "genesis": { "config": { "chainId": 7474, "berlinBlock": 0, "shanghaiTime":17034870, "contractSizeLimit": 2147483647, "qbft": { "blockperiodseconds": 60, "epochlength": 30000, "requesttimeoutseconds": 60 } }, "nonce": "0x0", "timestamp": "0x58ee40ba", "gasLimit": "0x1fffffffffffff", "difficulty": "0x1", "mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365", "coinbase": "0x0000000000000000000000000000000000000000", "alloc": { "0xf606b4B10E0B6863165d0E8077e36Bf06e199123": { "balance": "0x3635C9ADC5DEA00000" }, "0x0Ce98c77E8ffB8Da3eea4dC5C985e53Ae0f670F8": { "balance": "0x3635C9ADC5DEA00000" } } }, "blockchain": { "nodes": { "generate": true, "count": 5 } } }

Blocks are getting produced , but im not getting the token in particular wallet address.

@jframe jframe added non mainnet (private networks) not related to mainnet features - covers privacy, permissioning, IBFT2, QBFT question labels Aug 19, 2024
@jframe
Copy link
Contributor

jframe commented Aug 20, 2024

I'm not sure what you mean by getting a token at that address. But you should have a non-zero balance at 0xf606b4B10E0B6863165d0E8077e36Bf06e199123 and 0x0Ce98c77E8ffB8Da3eea4dC5C985e53Ae0f670F8. If you use the eth_balance RPC https://besu.hyperledger.org/development/public-networks/reference/api#eth_getbalance are you getting the expected balances for those accounts?

@akashsangwan3009
Copy link
Author

Hi @jframe What im trying here is i want to allocate 1000 token/crypto to these account , using alloc object in genesis, at the time of creating the genesis file. But this is not happening, even network is configured and up.

And with eth_getbalance also im getting zero balance.

@lucasoliveirabs
Copy link

Hey @akashsangwan3009!
I believe you're saying the network deployment is working fine but the allocation set at config file is not being applied at generated genesis file. So no 'alloc' section is created then no funding. Would be it? If so, I'm just having this issue as well:

qbftConfigFile.json:
{ "genesis": { "config": { "chainId": 1337, "berlinBlock": 0, "contractSizeLimit": 2147483647, "qbft": { "blockperiodseconds": 2, "epochlength": 30000, "requesttimeoutseconds": 4 } }, "nonce": "0x0", "timestamp": "0x58ee40ba", "gasLimit": "0x1fffffffffffff", "difficulty": "0x1", "mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365", "coinbase": "0x0000000000000000000000000000000000000000", "alloc": { "fe3b557e8fb62b89f4916b721be55ceb828dbd73": { "privateKey": "8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63", "comment": "This is Alice's Key. Private key and this comment are ignored. In a real chain, the private key should NOT be stored", "balance": "80000000000000000000000" }, "627306090abaB3A6e1400e9345bC60c78a8BEf57": { "privateKey": "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3", "comment": "This is the contract's Key. Private key and this comment are ignored. In a real chain, the private key should NOT be stored", "balance": "70000000000000000000000" }, "f17f52151EbEF6C7334FAD080c5704D77216b732": { "privateKey": "ae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f", "comment": "This is Bob's Key. Private key and this comment are ignored. In a real chain, the private key should NOT be stored", "balance": "90000000000000000000000" } } }, "blockchain": { "nodes": { "generate": true, "count": 4 } } }

generated genesis.json:
{ "config" : { "chainId" : 1337, "berlinBlock" : 0, "contractSizeLimit" : 2147483647, "qbft" : { "blockperiodseconds" : 2, "epochlength" : 30000, "requesttimeoutseconds" : 4 } }, "nonce" : "0x0", "timestamp" : "0x58ee40ba", "gasLimit" : "0x1fffffffffffff", "difficulty" : "0x1", "mixHash" : "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365", "coinbase" : "0x0000000000000000000000000000000000000000", "extraData" : "0xf87aa00000000000000000000000000000000000000000000000000000000000000000f8549464ca6eb7c825c1b1e7d8bc246aa5ff92413b1080947da9e5a98e1f95c8fec4eb388d43c28d7c71dff2949013f4183c837b2ceff8f64a3854534dbcdbb8e394fc266c00431cbabb803996195c1b4420cdfa1a8cc080c0" }

no 'alloc' at genesis after running
besu operator generate-blockchain-config --config-file=../config/qbftConfigFile.json --to=networkFiles --private-key-file-name=key
Do not know yet what's happening.

@lucasoliveirabs
Copy link

lucasoliveirabs commented Aug 26, 2024

I've besu --genesis-file=genesis/genesis.json to move with tests

@akashsangwan3009
Copy link
Author

@lucasoliveirabs Did it worked for you ? And yes, im also facing the same issue about alloc .

@lucasoliveirabs
Copy link

No, 'alloc' section still not being generated at genesis after besu operator generate-blockchain-config.

@lucasoliveirabs
Copy link

Hey @akashsangwan3009 if your end goal is to fund some accounts at deployment take a look at free gas networks config

@Beh3moth
Copy link

Beh3moth commented Sep 3, 2024

Same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
non mainnet (private networks) not related to mainnet features - covers privacy, permissioning, IBFT2, QBFT question
Projects
None yet
Development

No branches or pull requests

4 participants