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

Divinity can cheat and change answer #6

Open
spalladino opened this issue Oct 4, 2023 · 0 comments
Open

Divinity can cheat and change answer #6

spalladino opened this issue Oct 4, 2023 · 0 comments

Comments

@spalladino
Copy link

The divinity can choose to not reveal its previous answer from its oracle, allowing them to change the answer. I believe this may be fixed once you migrate to an ImmutableSingleton (as described in a TODO), since what you want to do is emit a nullifier (that depends only on the question) when you answer it.

// Check if this question was previously answered
let answerFilter = NoteGetterOptions::new()
.select(0, question)
.set_limit(1);
let answerNote = storage.answers.get_notes(answerFilter)[0].unwrap_unchecked();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant