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(blobs): Remove ts blob oracle #10323

Open
Tracked by #8955
MirandaWood opened this issue Nov 30, 2024 · 0 comments
Open
Tracked by #8955

feat(blobs): Remove ts blob oracle #10323

MirandaWood opened this issue Nov 30, 2024 · 0 comments
Assignees

Comments

@MirandaWood
Copy link
Contributor

Similar to #9982

Simulation time for block root in #9302 (now #10188) is around a minute since adding blob calculations in BigNum. This is acceptable for most tests, but network tests cannot handle it without significatly changing slot and claim times.
Until simulation of this unconstrained code can be done at similar times to other rollup circuits (~300ms), I added an oracle to calculate the blob public inputs: b75a6f7
This is used in simulation only, and the full circuit properly proves we have constructed a blob with the block's tx effects.

MirandaWood added a commit that referenced this issue Jan 20, 2025
## Public Logs

---

Unencrypted logs -> public logs #9589

Like `private_logs`, public logs are introduced in this PR and replace
unencrypted logs. They:

- Are no longer treated as bytes in ts/sol
- Are no longer treated as log hashes in kernels/rollups
- Are treated as arrays of fields (with contract address) everywhere

AVM team: I've made some limited changes with help from Ilyas (tyvm)
just so we have tests passing and logs being emitted, this is not
complete! I've added #11124 to help track where changes need to be made
in areas of the code I have no familiarity with. I didn't want to touch
too many areas so I haven't fully renamed unencrypted -> public. Ofc I'm
happy to help anywhere that's needed.

Aztec-nr/Noir-contracts: This PR also addresses #9835. I don't know much
about how partial notes work or should work, so I tried to touch the
least I could to convert these logs to fields. One big change is that
the first field now contains the length of private fields and ciphertext
bytes along with the public fields. This is because now we don't emit
logs as an array of bytes with a set length to ts, there isn't a way to
tell when a log 'ends'. We also can't just discard zero values, because
in many cases zeros are emitted as real log values.

---

~TODO:~ Completed

- ~Some more renaming (e.g. `UnencryptedLogsResponse`, prefixes, public
context, noir contracts)~
- ~`MAX_UNENCRYPTED_LOGS_PER_CALL` -> `MAX_PUBLIC_LOGS_PER_CALL` (not
done yet, because `PublicCircuitPublicInputs` is linked to
`AvmCircuitInputs` which goes into bb)~
- ~Test and cleanup anything touching partial notes~

---

TODO in follow-up PRS:
- Tightly pack individual logs when adding to blob: This is relatively
complex because of the hacks we have in place (#10323) and the
requirement to overhaul blob field decoding, to avoid bloating this PR
I'll make a new one.
- Rename `emit_unencrypted`: This will touch a lot of files and just
make it difficult to review, so I'll add a follow up PR with just this
renaming.
- Convert contract class logs to fields: Note that some classes like
`UnencryptedL2Log` still exist. This is solely for contract class logs
which have thousands of fields and so are still hashed to a single value
in the kernels/rollups/ts. In a follow up PR I'll separately convert
these to fields to benchmark the effects.
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

No branches or pull requests

2 participants