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

Add more randomness to address generator #7

Closed
Tracked by #2530
tzemanovic opened this issue May 7, 2021 · 8 comments · Fixed by #2781
Closed
Tracked by #2530

Add more randomness to address generator #7

tzemanovic opened this issue May 7, 2021 · 8 comments · Fixed by #2781
Assignees
Labels
has-a-pr The issue has been solved by a PR that has yet to be merged ledger pre-mainnet Must happen before mainnet.

Comments

@tzemanovic
Copy link
Member

tzemanovic commented May 7, 2021

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 anoma/anoma-archive#175 (comment)

┆Issue is synchronized with this Asana task by Unito

@cwgoes
Copy link
Contributor

cwgoes commented Jan 12, 2023

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

@tzemanovic
Copy link
Member Author

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

@karbyshev
Copy link
Contributor

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

@karbyshev
Copy link
Contributor

karbyshev commented Jun 9, 2023

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

@tzemanovic
Copy link
Member Author

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

@karbyshev
Copy link
Contributor

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

@tzemanovic
Copy link
Member Author

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

it's related but each is for a different purpose

@winstontsui
Copy link

Interesting

@cwgoes cwgoes added the pre-mainnet Must happen before mainnet. label Feb 5, 2024
@sug0 sug0 assigned sug0 and unassigned karbyshev Feb 29, 2024
@sug0 sug0 added the has-a-pr The issue has been solved by a PR that has yet to be merged label Mar 1, 2024
@brentstone brentstone added this to the Phase 1: mainnet genesis milestone Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-a-pr The issue has been solved by a PR that has yet to be merged ledger pre-mainnet Must happen before mainnet.
Projects
No open projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

7 participants