Conversation
| return this.db.loadCapsule(this.contractAddress, slot); | ||
| return ( | ||
| this.capsules.find(c => c.contractAddress.equals(contractAddress) && c.storageSlot.equals(slot))?.data ?? | ||
| (await this.db.loadCapsule(this.contractAddress, slot)) |
There was a problem hiding this comment.
This seems fine to me but I would do 3 chagnes:
- Rename the capsules passed via constructor here as
ephemeralCapsulesto make it clear that it's different data from the ones stored in the DB. - Here check that there is no pertinent capsule under the storage slot of the ephemeral one - if it turns out that there is throw an error. I don't like the idea of ephemeral capsules overshadowing the pertinent ones.
- Please update the docs of the
loadoracle ofcapsules.nr.
I will also tag Nico here since I feel like he might disagree with me 😆
@nventuro Leila is passing here an ephemeral capsule to the context that live only during tx simulation and the data is being served via the same loadCapsule oracle. Do you think it's fine? (please ignore this until you come back from vacation)
There was a problem hiding this comment.
I'm thinking all capsules are ephemeral. The pertinent data is only available when it's stored by the contract itself. So the previous names, dbStore, dbLoad, etc, make more sense in this case!
There was a problem hiding this comment.
I'm thinking all capsules are ephemeral.
We've decided to update the meaning of what are capsules to not be ephemeral by default. So capsules 2.0 are basically a totally different thing from capsules 1.0. Here is the relevant issue.
There was a problem hiding this comment.
Can we still separate the apis so that it's clear to the contract users how the data is being retrieved : it could be the data that's previously stored by the contract itself so the users don't have to do anything, or ephemeral data that needs to be provided by the users for the simulation.
And I assume it's the wallet's responsibility to sync the stored capsules across devices?
There was a problem hiding this comment.
Do you mean by creating a separate oracle handler for the ephemeral capsules and leave the capsules 2.0 intact?
There was a problem hiding this comment.
Yes! For the ephemeral capsules there will just be one load api. And when users see this in the contract, it's clear to them that they need to prepare the data themselves for building the tx request.
And for capsules 2.0, nothing needs to be done on users' side, as long as the pxe has all the data previously stored by the contract.
There was a problem hiding this comment.
That indeed seems cleaner.
Then in the contract we could have capsules::load(...) or ephemeral_capsules::load(...) with the function args being the same.
Co-authored-by: Alex Gherghisan <alexghr@users.noreply.github.com>
* master: (207 commits) chore(docs): acir formal verification final report (#12040) feat(avm): packed field in bytecode decomposition (#12015) feat: Contract updates (#11514) feat!: enforce fees (#11480) chore: redo typo PR by maximevtush (#12033) git subrepo push --branch=master noir-projects/aztec-nr git_subrepo.sh: Fix parent in .gitrepo file. [skip ci] chore: replace relative paths to noir-protocol-circuits git subrepo push --branch=master barretenberg fix: unexposing test fr from vkey struct ts (#12028) chore: structured polys in Translator (#12003) fix(ci3): fix ./bootstrap.sh fast in noir-projects (#12026) feat: new op queue logic (#11999) git subrepo push --branch=master noir-projects/aztec-nr git_subrepo.sh: Fix parent in .gitrepo file. [skip ci] chore: replace relative paths to noir-protocol-circuits git subrepo push --branch=master barretenberg chore: skip flakey p2p (#12021) chore(ci3): label handling (#12020) feat: Sync from noir (#12002) ...
Adds a missing guard to flush txs that caused the bot to fail setup in public networks, accidentally introduced in #11480.
Circuits
Aztec.js/cli
FeeJuicePaymentMethod, the fee payer is the wallet owner.NoFeePaymentMethodis no longer available.End-to-end/Sandbox
@aztec/accounts/testing.someAccountManager.deploy({ deployWallet: fundedWallet })BananaCoinandBananaFPCare deployed in sandbox by default. Users can use the funded accounts to mint banana coin for a new account.PrivateFeePaymentMethod.end-to-end/src/composed/e2e_sandbox_example.test.ts