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

merge pre-audit changes into post-audit #397

Merged
merged 49 commits into from
Aug 11, 2023

Conversation

luketchang
Copy link
Contributor

@luketchang luketchang commented Aug 10, 2023

Motivation

Merge pre and post audit changes together.

Solution

Rebase pre-audit-checkpoint onto main. Notable changes are

Proof

https://www.loom.com/share/f491ffd608344989be3c34cac9fea88c

PR Checklist

  • Added Tests
  • Updated Documentation
  • Updated CHANGELOG.md for the appropriate package
  • Tested in dev/testnet
  • Tested site with snap (we haven't automated this yet)
  • Re-built & tested circuits if any of them changed
  • Updated contracts storage layout (if contracts were updated)

@luketchang luketchang marked this pull request as ready for review August 11, 2023 00:28
Sladuca and others added 24 commits August 10, 2023 20:29
* prog(sdk/snap): syncing returns latest synced index (not committed)

* chore: changelogs

* nits

* save syncWithProgress

* bump sdk version

* fix fe-sdk post-rebase & fix iterator logic

* fix e2e tests

* rebase, again

* dont start syncing until enter loop

* merge + fix off by one err

* add initial SDK progress to SyncWithProgressOutput

* conditionally refetch latestMerkleIndexOnChain in generator

* Bump sdk version after changes

* bump testnet version

* typo

* PR feedback

---------

Co-authored-by: Luke Tchang <[email protected]>
Co-authored-by: Sladuca <[email protected]>
* bump

* Update snap.manifest.json
* fix(updater): updater double insertion bug

* yarn install

* publishhhhh

* snap manifest

* bump

* add retries

* remove bull from subtree update

* fix e2e tests

* fix include array for recovery

* await on mutex when submitting

* log

* dont recover past latest-synced index

* fix recovery index again

* remove log in test

* add some log statements for when that unit test fails

* snap manifest

* changelog

* snap manifest

---------

Signed-off-by: Daniel Park <[email protected]>
Co-authored-by: Sladuca <[email protected]>
Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Daniel Park <[email protected]>
* swap 1-liner values

* Update yarn.lock

* bump subtree-updater's sdk version

---------

Signed-off-by: Daniel Park <[email protected]>
* set cap on max parallel provers to avoid OOM

* fix some stuff

* set max parallel provers

* changelog

* fix changelog

* yarn lock

---------

Co-authored-by: Sladuca <[email protected]>
Co-authored-by: Luke Tchang <[email protected]>
* Monkey patches

* screener src
…#378)

* fix(sdk): ensure buffer secs have passed before checking bundler for opdigest in db

* fix e2e tests

* bump packages

* yarn install

* bump sdk again

* bump stuff again
* fix(updater): updater double insertion bug

* fix(sdk): 40% bump gas price

* fix(snap): remove custom gas est and leave to sdk to handle

* chore: changelogs

* fix(fe-sdk): add old 0n gasPrice hardcode
* Snap reuses lastSyncedMerkleIndex if already syncing

* update CHANGELOG
luketchang and others added 21 commits August 10, 2023 20:30
* integrate oz relay into bundler

* get relayer api key separate from team api keys

* realized I was using wrong api key

* integrate oz into screener

* prog: update updater and test actor with oz relay

* remove tx-manager

* fix: screener log nonce pre tx

* bump subgraph to ed6b11a
* prog(sdk/snap): syncing returns latest synced index (not committed)

* chore: changelogs

* nits

* save syncWithProgress

* bump sdk version

* fix fe-sdk post-rebase & fix iterator logic

* fix e2e tests

* rebase, again

* dont start syncing until enter loop

* merge + fix off by one err

* add initial SDK progress to SyncWithProgressOutput

* conditionally refetch latestMerkleIndexOnChain in generator

* Bump sdk version after changes

* bump testnet version

* typo

* PR feedback

* retrieve-deposits

* Update run_local.sh

* bump fe-sdk

* Update yarn.lock

* bump packages

* check if is outstanding deposit

---------

Signed-off-by: Daniel Park <[email protected]>
Co-authored-by: Luke Tchang <[email protected]>
Co-authored-by: Sladuca <[email protected]>
@luketchang luketchang force-pushed the luke/rebase-pre-audit-checkpoint branch from 41d7c00 to ff10dcc Compare August 11, 2023 00:39
Copy link
Contributor

@Sladuca Sladuca left a comment

Choose a reason for hiding this comment

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

a few things seemed like they might have been out of place - only thing that needs fix is infinite recursion in e2e tests

@@ -0,0 +1,43 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

I see sepolia2 here but not in config if that means anything

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i deleted, its same config contents file anyways

// ensure it removes all records when it polls op digest from bundler
// ensure it removes all records when it polls op digest from bundler (mock date to bypass
// update op digest buffer)
Date.now = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

fix infinite loop:

const dateNow = Date.now;
Date.now = () => {
  return dateNow() + 60 * 1000;
};
await sdk.updateOptimisticNullifiers();
Date.now = dateNow;

@@ -1,6 +1,6 @@
{
"name": "@nocturne-xyz/frontend-sdk",
"version": "1.0.49-alpha",
"version": "1.0.41-testnet",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this version transition intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep

@@ -1,6 +1,6 @@
{
"name": "@nocturne-xyz/sdk",
"version": "1.0.201-alpha",
"version": "1.0.179-testnet",
Copy link
Contributor

Choose a reason for hiding this comment

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

is this intended version transition?

? maxArray(
events.map(
(event) =>
event.args.startIndex.toNumber() + event.args.numZeros.toNumber()
Copy link
Contributor

Choose a reason for hiding this comment

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

there might be an off-by-one error here, not sure. But if tests pass that's ok for now...

if [ -n "$pid" ]; then
echo "Lurking zombie process on 8545, killing process"
kill $pid
echo "Killed process $pid ✅. Headshot! 🧟‍♂️"
Copy link
Contributor

Choose a reason for hiding this comment

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

lmao

@luketchang luketchang requested a review from Sladuca August 11, 2023 12:59
@luketchang luketchang merged commit 1a1ea87 into main Aug 11, 2023
@luketchang luketchang deleted the luke/rebase-pre-audit-checkpoint branch August 11, 2023 14:54
@luketchang luketchang restored the luke/rebase-pre-audit-checkpoint branch September 12, 2023 20:06
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.

3 participants