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

refactor(AztecNr): Proper way to fetch portal addresses #902

Closed
Tracked by #2783
rahul-kothari opened this issue Jun 23, 2023 · 5 comments
Closed
Tracked by #2783

refactor(AztecNr): Proper way to fetch portal addresses #902

rahul-kothari opened this issue Jun 23, 2023 · 5 comments
Labels
S-needs-discussion Status: Still needs more discussion before work can start.

Comments

@rahul-kothari
Copy link
Contributor

perhaps context.l1PortalAddress for my own and an oracle call to determine someone else' portal address (given an L2 contract address).

Doesn't require any updates to noir compiler but just noir-aztec3 library and acir-simulator.

@github-project-automation github-project-automation bot moved this to Todo in A3 Jun 23, 2023
@iAmMichaelConnor iAmMichaelConnor added A-ux/devex Area: relates to external ux / devex. (Users typically are devs) (See also A-internal-devex) C-aztec.nr Component: Aztec smart contract framework labels Aug 25, 2023
@iAmMichaelConnor
Copy link
Contributor

We have context.this_portal_address() now.

I don't think it's possible to query the portal contract address of another contract, without making a call to that contract.

But I'll leave this issue open a little longer. If the portal address forms part of the L2 contract's address (I forget if this is true or not?), maybe an oracle call could grab the L2 contract address, and a function could assert the correctness, by hashing to compute the contract's address.

@Maddiaa0
Copy link
Member

Maddiaa0 commented Oct 24, 2023

#[oracle(getPortalContractAddress)]

For who ever picks up, there is a bare oracle call to get the address, but no check that it makes up the real address

related issue: #1464

@LHerskind LHerskind self-assigned this Nov 6, 2023
@LHerskind
Copy link
Contributor

Can use some of the logic from contract_inclusion.nr. However, as for other historical inclusion proofs, when the new header is available in context, this code can almost be used directly.

For this reason, temporarily blocked by #3937

@LHerskind LHerskind added the S-blocked Status: Blocked label Jan 18, 2024
@LHerskind LHerskind removed their assignment Jan 28, 2024
@LHerskind LHerskind removed the S-blocked Status: Blocked label Feb 9, 2024
@LHerskind
Copy link
Contributor

I'm not sure how much we really need in here. So, the thing is, it might not be useful the value at all, or can be different from what it is doing. Is seems better that we are asking the app what it is doing. E.g., apps that want to expose that need to do so with functions and their own storage instead of a custom oracle here.

Would also mean that we don't need to constrain the oracle extra etc, we just delete it.

@LHerskind LHerskind changed the title A nicer way to access other (and my own) contract's portal addresses refactor(AztecNr): A nicer way to access other (and my own) contract's portal addresses Mar 8, 2024
@LHerskind LHerskind added S-needs-discussion Status: Still needs more discussion before work can start. and removed A-ux/devex Area: relates to external ux / devex. (Users typically are devs) (See also A-internal-devex) C-aztec.nr Component: Aztec smart contract framework labels Mar 8, 2024
@LHerskind LHerskind changed the title refactor(AztecNr): A nicer way to access other (and my own) contract's portal addresses refactor(AztecNr): Proper way to fetch portal addresses Mar 8, 2024
@LHerskind
Copy link
Contributor

The oracles have been purged, and the portal_address removed so it is now to be queried similar to any other storage.

@github-project-automation github-project-automation bot moved this from Todo to Done in A3 May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-needs-discussion Status: Still needs more discussion before work can start.
Projects
Archived in project
Development

No branches or pull requests

4 participants