Skip to content

Accounts in alloc field must already exist#20001

Closed
FlashSheridan wants to merge 1 commit intoethereum:masterfrom
FlashSheridan:patch-1
Closed

Accounts in alloc field must already exist#20001
FlashSheridan wants to merge 1 commit intoethereum:masterfrom
FlashSheridan:patch-1

Conversation

@FlashSheridan
Copy link
Copy Markdown
Contributor

Note that accounts in alloc field must already exist, as pointed out by Simeon Vanov in https://gettoshare.com/2017/10/30/how-to-use-genesis-json-alloc-property/

Note that accounts in alloc field must already exist, as pointed out by Simeon Vanov in https://gettoshare.com/2017/10/30/how-to-use-genesis-json-alloc-property/
@karalabe
Copy link
Copy Markdown
Member

Well, alloc adds a balance to any account. If you don't have a private key for it, then you can't access it. That doesn't mean that we can't assign a balance or state to it (e.g. I could add a balance to a contract account which does not exist (i.e. nobody has a key for it)).

@karalabe karalabe closed this Aug 23, 2019
@FlashSheridan
Copy link
Copy Markdown
Contributor Author

Simeon Vanov’s blog posting on this topic noted that “If you miss this step and specify an account in genesis.json directly, everything will run correctly but the account won’t be created.” The task which failed for me based on the ReadMe, but which worked when following Vanov’s blog, was rather like what you suggest, though the details are still confidential and may depend on behavior (correct in my opinion) in either Web3 or our tooling. But the intended audience for this ReadMe—first time administrators—should not have to search for Vanov’s blog for the normal case to work as intended, though your point may deserve an explanation elsewhere.

@karalabe
Copy link
Copy Markdown
Member

If you miss this step and specify an account in genesis.json directly, everything will run correctly but the account won’t be created.

Yes it will, that's how all the network's genesis works.

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.

2 participants