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

Simple on-chain Random Number #771

Open
jolestar opened this issue Sep 8, 2023 · 4 comments · May be fixed by #1052
Open

Simple on-chain Random Number #771

jolestar opened this issue Sep 8, 2023 · 4 comments · May be fixed by #1052
Assignees
Labels
skill::move Need the Move language skill to complete the issue skill::rust Need the rust language skill to complete the issue status::design The issue need to do more detail design
Milestone

Comments

@jolestar
Copy link
Contributor

jolestar commented Sep 8, 2023

seed = hash(tx_accumulator_root + now_milliseconds + sender::address + sender_account::sequence_number)

When users send transactions, they are not sure of the accumulator order of their transactions, so there is a certain level of randomness.

Refs

@jolestar jolestar added status::design The issue need to do more detail design skill::move Need the Move language skill to complete the issue skill::rust Need the rust language skill to complete the issue labels Sep 8, 2023
@jolestar jolestar added this to the Rooch v0.3 milestone Sep 8, 2023
@feliciss
Copy link
Collaborator

I'll take a look and resolve for this issue.

@feliciss
Copy link
Collaborator

How do we calculate tx_accumulator_root? Do we get it in TransactionSequenceInfo from rooch db and hash it using move lang? Should we write it one in .move file? Cuz I didn't see there's a struct for tx_accumulator_root in move.

@jolestar
Copy link
Contributor Author

We need to put it into the TxContext and do some refactoring.

For simpler, we can maintain a random number sequence number in Move.

feliciss pushed a commit to feliciss/rooch that referenced this issue Oct 27, 2023
@feliciss feliciss linked a pull request Oct 27, 2023 that will close this issue
feliciss pushed a commit to feliciss/rooch that referenced this issue Oct 27, 2023
@feliciss
Copy link
Collaborator

We need to put it into the TxContext and do some refactoring.

For simpler, we can maintain a random number sequence number in Move.

Progress: #1052

feliciss pushed a commit to feliciss/rooch that referenced this issue Oct 28, 2023
feliciss pushed a commit to feliciss/rooch that referenced this issue Oct 28, 2023
feliciss pushed a commit to feliciss/rooch that referenced this issue Oct 31, 2023
feliciss pushed a commit to feliciss/rooch that referenced this issue Oct 31, 2023
feliciss pushed a commit to feliciss/rooch that referenced this issue Oct 31, 2023
@jolestar jolestar modified the milestones: Rooch v0.3, Rooch v0.4 Dec 8, 2023
@jolestar jolestar modified the milestones: Rooch v0.5, Rooch v0.6 May 14, 2024
@jolestar jolestar modified the milestones: Rooch v0.6, Rooch v0.7 Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skill::move Need the Move language skill to complete the issue skill::rust Need the rust language skill to complete the issue status::design The issue need to do more detail design
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants