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

Update the Private Kernel Tail to output Effect Sets #4084

Closed
Tracked by #4284
PhilWindle opened this issue Jan 17, 2024 · 0 comments · Fixed by #4341
Closed
Tracked by #4284

Update the Private Kernel Tail to output Effect Sets #4084

PhilWindle opened this issue Jan 17, 2024 · 0 comments · Fixed by #4341
Assignees
Milestone

Comments

@PhilWindle
Copy link
Collaborator

PhilWindle commented Jan 17, 2024

The private kernel tail should output

struct KernelCircuitPublicInputsFinal {
    aggregation_object: AggregationObject, // pull this up from FinalAccumulatedData
    end_meta: FinalAccumulatedData, // add this
    end: FinalAccumulatedData, // this will be renamed to `end_app_logic`
    constants: CombinedConstantData,
    is_private: bool,
}

end_meta will contain irrevertible side effects such as the transaction nullifier, and information related to fee preparation and fee distribution.

To do this, we will set a high watermark for side effects in the "meta" phase in PrivateCircuitPublicInputs:

struct PrivateCircuitPublicInputs {
   
    call_context: CallContext,
    
    args_hash: Field,
    return_values: [Field; RETURN_VALUES_LENGTH],

    meta_hwm: u32, // add this

    read_requests: [SideEffect; MAX_READ_REQUESTS_PER_CALL],

    // ... remaining fields unchanged

}

This work is just concerned with setting up the plumbing. Therefore, the high watermark will be set to 0, and all side effects will be part of end_app_logic.

See this doc for more info

@PhilWindle PhilWindle added this to the Fees Phase 1 milestone Jan 17, 2024
@github-project-automation github-project-automation bot moved this to Todo in A3 Jan 17, 2024
@just-mitch just-mitch changed the title Add fee related items to private kernel circuit public inputs Update the Private Kernel Tail to output Effect Sets Jan 31, 2024
@alexghr alexghr moved this from Todo to In Progress in A3 Jan 31, 2024
just-mitch added a commit that referenced this issue Feb 5, 2024
This PR adds `meta_hwm` to the context and exposes it through the
private circuits so that in the last circuit the side effects created
during private execution can be partitioned into reversible and
irreversible effect sets

Fix #4084

---------


Co-authored-by: Mitchell Tracy <mitchell@aztecprotocol.com>
@github-project-automation github-project-automation bot moved this from In Progress to Done in A3 Feb 5, 2024
TomAFrench pushed a commit that referenced this issue Feb 7, 2024
This PR adds `meta_hwm` to the context and exposes it through the
private circuits so that in the last circuit the side effects created
during private execution can be partitioned into reversible and
irreversible effect sets

Fix #4084

---------


Co-authored-by: Mitchell Tracy <mitchell@aztecprotocol.com>
michaelelliot pushed a commit to Swoir/noir_rs that referenced this issue Feb 28, 2024
This PR adds `meta_hwm` to the context and exposes it through the
private circuits so that in the last circuit the side effects created
during private execution can be partitioned into reversible and
irreversible effect sets

Fix AztecProtocol#4084

---------


Co-authored-by: Mitchell Tracy <mitchell@aztecprotocol.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants