namada icon indicating copy to clipboard operation
namada copied to clipboard

Add more randomness to address generator

Open tzemanovic opened this issue 3 years ago • 8 comments

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

tzemanovic avatar May 07 '21 09:05 tzemanovic

Does this need to be secure randomness? Can it be local randomness? What is the usage of these addresses?

cwgoes avatar Jan 12 '23 12:01 cwgoes

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).

tzemanovic avatar Jan 12 '23 12:01 tzemanovic

Now in core/src/ledger/storage/write_log.rs

karbyshev avatar Jun 09 '23 12:06 karbyshev

@tzemanovic @juped What is the purpose of the address? Is there no private key that should define the address deterministically?

karbyshev avatar Jun 09 '23 12:06 karbyshev

@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.

tzemanovic avatar Jun 12 '23 04:06 tzemanovic

Is the issue related to (or subsumed by) #6?

karbyshev avatar Jun 12 '23 15:06 karbyshev

Is the issue related to (or subsumed by) #6?

it's related but each is for a different purpose

tzemanovic avatar Jun 13 '23 13:06 tzemanovic

Interesting

winstontsui avatar Jan 03 '24 04:01 winstontsui