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

feat: Modify bb.js to be compatible with next.js #544

Merged
merged 92 commits into from
Jul 24, 2023
Merged

Conversation

jonybur
Copy link
Contributor

@jonybur jonybur commented Jun 18, 2023

Description

To begin, create a Next.js application and establish a local dependency by linking bb.js to your project.

Should you encounter any difficulties and come across an error indicating the presence of an outdated bb.js installation, remove the .next folder within your Next.js application.

Closes #607.

Checklist:

  • I have reviewed my diff in github, line by line.
  • Every change is related to the PR description.
  • The branch has been merged with/rebased against the head of its merge target.
  • There are no unexpected formatting changes, superfluous debug logs, or commented-out code.
  • There are no circuit changes, OR a cryptographer has been assigned for review.
  • New functions, classes, etc. have been documented according to the doxygen comment format. Classes and structs must have @brief describing the intended functionality.
  • If existing code has been modified, such documentation has been added or updated.
  • No superfluous include directives have been added.
  • I have linked to any issue(s) it resolves.
  • I'm happy for the PR to be merged at the reviewer's next convenience.

@kevaundray
Copy link
Contributor

Is it possible to have a PR per issue you linked? Asking just based on the line diff, but perhaps both need to be fixed simultaneously.

@kevaundray
Copy link
Contributor

Also can you change the title to a conventional commit, so people know if this will be a breaking change to bb.js and roughly what it is doing.

@jonybur jonybur changed the title Jb/bbjs cra feat: bbjs compatibility for nextjs Jun 19, 2023
ts/package.json Outdated
"test": "yarn test:jest && yarn test:bin",
"test:jest": "NODE_OPTIONS='--loader ts-node/esm' NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests",
"test": "yarn build && yarn test:jest && yarn test:bin",
"test:jest": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests",
"test:bin": "cd ./bin-test && ./bin-test.sh",
"test-debug": "NODE_OPTIONS='--loader ts-node/esm' NODE_NO_WARNINGS=1 node --inspect-brk=0.0.0.0 --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests --runInBand",
"simple_test": "NODE_OPTIONS='--loader ts-node/esm' NODE_NO_WARNINGS=1 node ./src/examples/simple.rawtest.ts",
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's just remove this so we can drop ts-node

@ludamad
Copy link
Collaborator

ludamad commented Jul 21, 2023

Looks good to me overall (looks like just a linter warning now), but would be good to get a look from the initial reviewers

Copy link
Contributor

@kobyhallx kobyhallx left a comment

Choose a reason for hiding this comment

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

LGTM 💯

@kobyhallx kobyhallx merged commit d384089 into master Jul 24, 2023
@kobyhallx kobyhallx deleted the jb/bbjs-cra branch July 24, 2023 14:36
ludamad added a commit to AztecProtocol/aztec-packages that referenced this pull request Jul 24, 2023
ludamad added a commit to AztecProtocol/aztec-packages that referenced this pull request Jul 24, 2023
zac-williamson added a commit that referenced this pull request Jul 30, 2023
Co-authored-by: ludamad <adam.domurad@gmail.com>
each subrelation can now choose to not scale relation term by random polynomial

permutation relation arithmetic defined exclusively in relationclasses

comments, naming cleanup

init

ecc_vm_relation_test, algebra test passes sumcheck relation test does not

wip

eccvm, shiftable polynomials now have 0 at first coefficient

added clearer comments to eccvm relations

removed redundant test files

eccvm composer test passes

eccvm flavor (+ upstream circuit builder) are parametrised by curve type / commitment scheme

wip

wip

wip

wip

reduced eccvm relation lengths

added more descriptive comments to ecc_set_relation

cleaned up sumcheck relation fowarding macros

added missing explicit template declarations

slight cleanup of method name bloat

added missing method

removed unused using declaration

added explicit `lookup_library.hpp` file to compute logderivative inverses

typo fix

formatting reversions

added ECCVM concepts to flavor

removed unused logderivative method

each subrelation can now choose to not scale relation term by random polynomial

permutation relation arithmetic defined exclusively in relationclasses

comments, naming cleanup

removed TypeMuncher from relation_types

remove foundation

blah compiler errors

chore: Switch to using `test_data_ssa_refactor` for `acir_tests` (#626)

Co-authored-by: guipublic <47281315+guipublic@users.noreply.github.com>
compile error fix

chore(barretenberg): Release 0.3.4 (#618)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
compiler fix

compiler fix

wasm compiler fix

docs: barretenberg README update (#1211)

* docs: barretenberg README update

* Update README.md

docs: update barretenberg integration notes (#1215)

This is also just continuing to test the barretenberg mirror.

wasm compiler fix

feat: internal keyword + lending contract and tests (#978)

* feat: noir contracts and test file

* feat: include is_internal in kernels

* feat: assume isInternal unless told otherwise + update snaps

* test: cleanup tests

* chore: update noir

* chore: recompile noir

* fix: rebase issues and clean test

* chore: prettier + update name

* chore: fix snapshots

* fix: add to ci

* chore: minor fixes

* fix: update noir FunctionData (cannot satisfy 💀)

* fix: serialization

* fix: bump lending contract

* chore: address nits

* chore: recompile noir

* chore: recompile noir

---------

Co-authored-by: Maddiaa0 <47148561+Maddiaa0@users.noreply.github.com>

Merge pull request #1235 from AztecProtocol/acvm-0.21.0-compat

feat!: update bberg ACIR parser to target ACVM 0.21.0

feat: Goblin Honk Composer/Prover/Verifier (#1220)

The Composer, Prover and Verifier for Goblin Ultra Honk. These are
implemented as instantiations of the existing "Ultra" template classes,
e.g. `GoblinUltraComposer = UltraComposer_<flavor::GoblinUltra>`, etc.

This work makes it possible to create and verify a Goblin Ultra Honk
proof. "Verification" here means confirmation that the ECC op gates have
been correctly incorporated into the circuit (checked via a new
relation) plus genuine verification of the conventional UltraHonk proof.
The _correctness_ of the the ECC op gates is of course not verified, as
that is the role of the other components of the Goblin stack.

The new "op gate consistency" relation simply checks that the op wire
values have been correctly copied into the conventional wires (needed
for copy constraints) and that the op wire polynomials vanish everywhere
outside the range of ECC op gates.

- [ ] I have reviewed my diff in github, line by line.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to the issue(s) that it resolves.
- [ ] There are no unexpected formatting changes, superfluous debug
logs, or commented-out code.
- [ ] The branch has been merged or rebased against the head of its
merge target.
- [ ] I'm happy for the PR to be merged at the reviewer's next
convenience.

---------

Co-authored-by: ludamad <adam.domurad@gmail.com>

feat: Goblin translator prototype (#1249)

Added a prototype of  goblin translator with accumulation gate.

Automatic formatting when committing caused changes to several files,
too

- [ ] I have reviewed my diff in github, line by line.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to the issue(s) that it resolves.
- [ ] There are no unexpected formatting changes, superfluous debug
logs, or commented-out code.
- [ ] The branch has been merged or rebased against the head of its
merge target.
- [ ] I'm happy for the PR to be merged at the reviewer's next
convenience.

fix: Fixing external benchmarks (#1250)

Some updates broke internal benchmarks. This fixes them

chore: update directory from which to pull noir test cases (#1257)

noir-lang/noir#2074 performs a cleanup of the
location of the Noir test data directory and so bberg needs to update to
match

- [x] I have reviewed my diff in github, line by line.
- [x] Every change is related to the PR description.
- [x] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to the issue(s) that it resolves.
- [x] There are no unexpected formatting changes, superfluous debug
logs, or commented-out code.
- [x] The branch has been merged or rebased against the head of its
merge target.
- [x] I'm happy for the PR to be merged at the reviewer's next
convenience.

fix: bootstrap.sh git hook for monorepo (#1256)

This had the wrong path inside the monorepo.

compiler fix

compiler fix

fixed error in eccvm lookup relation

Merge branch 'master' into zw/eccvm-v2
charlielye added a commit to AztecProtocol/aztec-packages that referenced this pull request Aug 26, 2023
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

Successfully merging this pull request may close these issues.

Upgrade bb.js with Next.js compatibility
6 participants