You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to support sending messages to any address from an aztec contract.
Background
Currently, an aztec contract specify a portal_address at time of deployment.
The use of this address is rather simple:
for incoming messages it can be used to constrain L1 sender (app-circuit can chose to do this)
for outgoing messages it must be used as the recipient (kernel always enforces this)
The reasoning behind this is the same issue as discussed in #4130 - having a value that anyone can use to constrain against (without having race-conditions) is quite painful in the private domain.
By having the immutable value portal_address we have an easily accessible value in private that you can still constraint against.
However, hence we are currently forcing it in the kernel, we have this issue where applications that would want to send messages to different address, in private or public, simple cannot do that currently.
This means that applications such as upgradable bridges need to have a somewhat awkward design since it might be desirable to change the portal address sending messages to.
Solution
Since we have alternatives (even if not perfect) to stable values in private and public could always just used shared storage, we can allow sending messages to any address intended by adding another argument to the message_portal() function while still keeping the portal_address immutable.
By keeping the portal_address we can always use the "easy" solution for the communication, but allow more flexibility to developers that need it.
The content you are editing has changed. Please copy your edits and refresh the page.
Problem
We want to support sending messages to any address from an aztec contract.
Background
Currently, an aztec contract specify a
portal_address
at time of deployment.The use of this address is rather simple:
The reasoning behind this is the same issue as discussed in #4130 - having a value that anyone can use to constrain against (without having race-conditions) is quite painful in the private domain.
By having the immutable value
portal_address
we have an easily accessible value in private that you can still constraint against.However, hence we are currently forcing it in the kernel, we have this issue where applications that would want to send messages to different address, in private or public, simple cannot do that currently.
This means that applications such as upgradable bridges need to have a somewhat awkward design since it might be desirable to change the portal address sending messages to.
Solution
Since we have alternatives (even if not perfect) to stable values in private and public could always just used shared storage, we can allow sending messages to any address intended by adding another argument to the
message_portal()
function while still keeping theportal_address
immutable.By keeping the
portal_address
we can always use the "easy" solution for the communication, but allow more flexibility to developers that need it.Tasks
The text was updated successfully, but these errors were encountered: