-
Notifications
You must be signed in to change notification settings - Fork 310
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!: automatic NoteInterface and NoteGetterOptions auto select #4508
Conversation
Benchmark resultsMetrics with a significant change:
Detailed resultsAll benchmarks are run on txs on the This benchmark source data is available in JSON format on S3 here. Values are compared against data from master at commit L2 block published to L1Each column represents the number of txs on an L2 block published to L1.
L2 chain processingEach column represents the number of blocks on the L2 chain where each block has 16 txs.
Circuits statsStats on running time and I/O sizes collected for every circuit run across all benchmarks.
Tree insertion statsThe duration to insert a fixed batch of leaves into each tree type.
MiscellaneousTransaction sizes based on how many contract classes are registered in the tx.
Transaction processing duration by data writes.
|
noir/noir-repo/compiler/noirc_frontend/src/hir/def_collector/dc_mod.rs
Outdated
Show resolved
Hide resolved
72cfa76
to
4049d99
Compare
…ztec-packages into gj/notegetteroptions_auto_select
… gj/aztec-macros-refactor
… gj/aztec-macros-refactor
…ztec-packages into gj/notegetteroptions_auto_select
… gj/notegetteroptions_auto_select
… gj/notegetteroptions_auto_select
… gj/notegetteroptions_auto_select
… gj/notegetteroptions_auto_select
… gj/notegetteroptions_auto_select
…otocol/aztec-packages into gj/notegetteroptions_auto_select
Partially addresses: #4519 (moved autogeneration to the macro, even if not incremental)
Closes: #3011
Added the
#[aztec(note)]
attribute, which automatically implements most of theNoteInterface
trait in a struct marked as such, plus several utilities. Even if this adds a fair share of "magic" to the note implementation logic, it is structured in a way that it's hopefully easy to follow, including meaningful errors attached to the correct span during the process.Hey you! Implement the trait!
But only the meat and potatoes though.
As long as the user doesn't want to do any custom stuff,
get_header
,set_header
,compute_note_content_hash
,get_note_type_id
,serialize_content
anddeserialize_content
get automatically implemented. Any combination of them can be overridden by the developer though.A metadata struct is also added, which takes the following form:
This is used to implement a
properties()
function, which in turn can be used in conjunction with theNoteGetterOptions.select
and.sort