Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

feat(acvm)!: expose backend identifier on ProofSystemCompiler trait #284

Closed
wants to merge 3 commits into from

Conversation

TomAFrench
Copy link
Member

Related issue(s)

Resolves #196

Description

Summary of changes

This PR exposes the backend_identifer method on ProofSystemCompiler which returns a string identifier for the backend.

I'm doing an initial pass through the repos to just include the name of the backend. We can add extra info later on before merging.

Dependency additions / changes

(If applicable.)

Test additions / changes

(If applicable.)

Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.

Additional context

(If applicable.)

acvm/src/lib.rs Outdated
@@ -207,6 +207,9 @@ pub trait ProofSystemCompiler {
/// The Error type returned by failed function calls in the ProofSystemCompiler trait.
type Error: std::error::Error; // fully-qualified named because thiserror is `use`d at the top of the crate

/// Returns the identifier for the backend.
fn backend_identifier(&self) -> String;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also needed by code that calls the CommonReferenceString trait, so do we want it to be on the Backend trait itself or a separate trait that others can depend upon?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I don't really want to put this on Backend as that would hamper our ability to pass &impl SubTraits around effectively.

I placed it on ProofSystemCompiler as this is the trait which is most tightly bound to the underlying proving library. PWG/SmartContract shouldn't ever need to expose this information so we could have a separate trait which is just ProofSystemCompiler and CommonReferenceString depend on.

@TomAFrench
Copy link
Member Author

This trait is being removed

@TomAFrench TomAFrench closed this Aug 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose backend identifier information
2 participants