cosmos / cosmos-sdk

:chains: A Framework for Building High Value Public Blockchains :sparkles:
https://cosmos.network/
Apache License 2.0
6.16k stars 3.56k forks source link

feat(accounts): Decide on address creation scheme #17516

Open testinginprod opened 1 year ago

testinginprod commented 1 year ago

We need to decide an address creation scheme for accounts created using x/accounts.

Currently the address package (not core.address) cannot be imported by x/accounts or it would leak the sdk dependency.

robert-zaremba commented 12 months ago

It should use the address package. If there is a dependency graph problem , then we can copy a function or move address to some other module.

testinginprod commented 6 months ago

yes, I think we'll want the address scheme to be: address.Module("accounts", append(creator_address, BigEndian(accNum)), this should avoid the risk of someone, besides the creator, front-running the account creation, since the adversary will not be able to produce the same address.

tac0turtle commented 2 months ago

@testinginprod is this closable?