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

Use XFri from twenty-first instead #23

Closed
Sword-Smith opened this issue Aug 8, 2022 · 5 comments
Closed

Use XFri from twenty-first instead #23

Sword-Smith opened this issue Aug 8, 2022 · 5 comments
Assignees
Labels
🤖 code Changes the implementation ✨ enhancement Improvement or new feature 🟢 prio: low Not at all urgent

Comments

@Sword-Smith
Copy link
Collaborator

Why doesn't it just share the xfri that lives in twenty-first?

@jan-ferdinand jan-ferdinand added 🟢 prio: low Not at all urgent 🤔 question More information is needed 🤖 code Changes the implementation labels Aug 8, 2022
@sshine
Copy link
Collaborator

sshine commented Aug 19, 2022

TritonVM at one point had a Fri<BWord> and a Fri<XWord>, but now it only has a Fri<XWord>, i.e. an XFri.

So there is no good reason why it shouldn't just share xfri from twenty-first again.

One refactor was to pull out FriDomain into its own file.

  • Delete triton_xfri and import twenty_first::xfri instead.
  • Delete fri_domain and import twenty_first::xfri_domain.

@sshine sshine added ✨ enhancement Improvement or new feature and removed 🤔 question More information is needed labels Aug 19, 2022
@sshine sshine changed the title Does Triton VM need its own FRI? Use XFri from twenty-first instead Aug 19, 2022
@sshine
Copy link
Collaborator

sshine commented Sep 27, 2022

There is a reason: Since FRI shares proof-stream with STARK, the ProofItem type is shared between them. For that reason, a Fri<PF> currently cannot be shared between STARKs. Replacing the proof-stream type (Neptune-Crypto/twenty-first#24) in the process of verifying a partial authentication paths (part of #7) makes it much easier to use a shared Fri again.

@aszepieniec
Copy link
Collaborator

I think FRI is an integral component to the STARK engine and therefore belongs in the Triton-VM repository. It is quite likely that we want to tweak and optimize particular features of FRI, and applying those tweaks and optimizations to twenty-first seems like a cumbersome workflow.

Other STARKs that also use twenty-first for algebra routines or crypto need to come with their own FRIs. I think that is an acceptable level of code duplication.

@Sword-Smith
Copy link
Collaborator Author

Sword-Smith commented Sep 27, 2022

Other STARKs that also use twenty-first for algebra routines or crypto need to come with their own FRIs. I think that is an acceptable level of code duplication.

We are not going to write new FRIs for existing (previous) STARK implementations. We have two STARK implementations working (Rescue Prime and Brainfuck) and we shouldn't waste time hacking on those. They are fine as they are.

@aszepieniec
Copy link
Collaborator

  • Triton-VM can have its own implementation of FRI
  • Let's not waste time hacking previous STARK iterations

@sshine sshine closed this as completed Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 code Changes the implementation ✨ enhancement Improvement or new feature 🟢 prio: low Not at all urgent
Projects
None yet
Development

No branches or pull requests

4 participants