-
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: Capture broadcasted private fns in node #5318
Conversation
c5edfc8
to
9cf17ca
Compare
Benchmark resultsNo metrics with a significant change found. 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.
|
9cf17ca
to
98bbd5e
Compare
98bbd5e
to
516576f
Compare
f6e6772
to
6717d5a
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @spalladino and the rest of your teammates on Graphite |
Looks really good. Awaiting the changes that come from making the tests pass. |
Tests were passing until I rebased. Oh well... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some nits
this.#contractClasses = db.openMap('archiver_contract_classes'); | ||
} | ||
|
||
addContractClass(contractClass: ContractClassPublic): Promise<boolean> { | ||
return this.#contractClasses.set(contractClass.id.toString(), serializeContractClassPublic(contractClass)); | ||
async addContractClass(contractClass: ContractClassPublic): Promise<void> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it not still worth returning the result?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just changed it to return the result, even though it gets discarded by the callers. Still, I dug a bit deeper to figure out where that boolean is coming from: it's from lmdb's put
method that may return false if the insertion doesn't happen due to a versioning setting, which we're not using. So I think we should just update all those booleans to just voids in the Map
interface. @alexghr thoughts, given you had worked on it extensively?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me!
privateFunctions: ExecutablePrivateFunctionWithMembershipProof[], | ||
): Promise<boolean> { | ||
await this.#contractClassStore.addPrivateFunctions(contractClassId, privateFunctions); | ||
return Promise.resolve(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this return value mean something? Maybe the function we forward to should return something. Otherwise we can presumably just return void.
...newPrivateFunctions.filter(newFn => !privateFunctions.find(f => f.selector.equals(newFn.selector))), | ||
]; | ||
this.privateFunctions.set(contractClassId.toString(), updatedPrivateFunctions); | ||
return Promise.resolve(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As before, should this mean something?
Looks good! |
c130827
to
c24f9f2
Compare
No dependency changes detected. Learn more about Socket for GitHub ↗︎ 👍 No dependency changes detected in pull request |
34eb446
to
445abea
Compare
Captures individual private and unconstrained functions broadcasted from the class registerer contract in the aztec node archiver and store them for future use.
445abea
to
5e1c241
Compare
Closing in favor of merging everything in one go in #5353 |
LMDB operations return a false boolean if an insert or delete operation fails due to a failed version check, which we are not using. So we just turn every return value to void. Context [here](#5318 (comment)).
Captures individual private functions broadcasted from the class registerer contract in the aztec node archiver and store them for future use.