namada
namada copied to clipboard
Add more randomness to address generator
In apps/src/bin/anoma-node/vm/host_env/write_log.rs
, when we generate a new address, we should give it some unpredictable value as an additional source of randomness
Originally posted by tzemanovic in https://github.com/heliaxdev/anoma-prototype/pull/175#discussion_r628053854
┆Issue is synchronized with this Asana task by Unito
Does this need to be secure randomness? Can it be local randomness? What is the usage of these addresses?
Does this need to be secure randomness? Can it be local randomness? What is the usage of these addresses?
I think it can be e.g. from a block hash - it's for addresses created in transactions with init_account
host function (established addresses).
Now in core/src/ledger/storage/write_log.rs
@tzemanovic @juped What is the purpose of the address? Is there no private key that should define the address deterministically?
@tzemanovic @juped What is the purpose of the address? Is there no private key that should define the address deterministically?
Established addresses are not derived from keys. They must be created with a tx and deterministically derived from on-chain nonce, but they should not be predictable. Unlike implicit addr, you can choose a VP for it, so e.g. tokens are established addresses.
Is the issue related to (or subsumed by) #6?
Is the issue related to (or subsumed by) #6?
it's related but each is for a different purpose
Interesting