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

feat!: require Backend to implement Default trait #223

Merged
merged 2 commits into from
Apr 21, 2023
Merged

Conversation

TomAFrench
Copy link
Member

Related issue(s)

(If it does not already exist, first create a GitHub issue that describes the problem this Pull Request (PR) solves before creating the PR and link it here.)

Resolves (link to issue)

Description

In our new merged acvm-backend-barretenberg crate, we're implementing the Backend trait directly on the Barretenberg struct rather than having a separate Plonk unit struct which then constructs Barretenberg when needed.

https://github.com/noir-lang/aztec_backend/blob/9fed6e52778d993d7742c46bbeec66087958c075/acvm_backend_barretenberg/src/lib.rs#L21-L26

This means that when we're actually using the backend in Nargo we need to construct the struct, i.e we need to call let backend = Barretenberg::default() rather than just being able to do let backend = Plonk.

Example: noir-lang/noir@ad822e6

We then want to enforce that this method exists on all backends so it must be included in the trait definition.

Summary of changes

(Describe the changes in this PR. Point out breaking changes if any.)

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

@TomAFrench TomAFrench requested a review from phated April 21, 2023 15:35
@TomAFrench TomAFrench added this pull request to the merge queue Apr 21, 2023
Merged via the queue into master with commit 00282dc Apr 21, 2023
@github-actions github-actions bot mentioned this pull request Apr 21, 2023
@TomAFrench TomAFrench deleted the default-backend branch April 21, 2023 16:09
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.

2 participants