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

Allow fee_payer to be set in private functions #5920

Closed
Tracked by #5917
just-mitch opened this issue Apr 22, 2024 · 0 comments
Closed
Tracked by #5917

Allow fee_payer to be set in private functions #5920

just-mitch opened this issue Apr 22, 2024 · 0 comments

Comments

@just-mitch
Copy link
Collaborator

No description provided.

@github-project-automation github-project-automation bot moved this to Todo in A3 Apr 22, 2024
just-mitch added a commit that referenced this issue May 13, 2024
## Implemented

[See
spec](https://docs.aztec.network/protocol-specs/gas-and-fees/specifying-gas-fee-info).

A boolean flag `is_fee_payer` in the PrivateCircuitPublicInputs. The
private kernel circuits will check this flag for every call stack item.

When a call stack item is found with `is_fee_payer` set, the kernel
circuit will set `fee_payer` in its PrivateKernelCircuitPublicInputs to
be the callStackItem.contractAddress.

This is subsequently passed through the PublicKernelCircuitPublicInputs
to the KernelCircuitPublicInputs.

If a transaction attempts to set fee_payer multiple times, the
transaction will be considered invalid.

## Deviations

Whereas in the spec we said we would use `contract_address`, we have
updated that to use `storage_contract_address` because it correctly
handles delegate calls: if `is_fee_payer` gets set during delegate call,
the "delegator" should be the `fee_payer`, not the "delegatee".

## Remaining

Actually setting `fee_payer` in a contract, and making assertions.
(#5920)

If the fee_payer is not set, the transaction will be considered invalid.
(#6343)

## Elsewhere

Unit tests on SerDe
(#6339)
AztecBot pushed a commit to AztecProtocol/aztec-nr that referenced this issue May 14, 2024
## Implemented

[See
spec](https://docs.aztec.network/protocol-specs/gas-and-fees/specifying-gas-fee-info).

A boolean flag `is_fee_payer` in the PrivateCircuitPublicInputs. The
private kernel circuits will check this flag for every call stack item.

When a call stack item is found with `is_fee_payer` set, the kernel
circuit will set `fee_payer` in its PrivateKernelCircuitPublicInputs to
be the callStackItem.contractAddress.

This is subsequently passed through the PublicKernelCircuitPublicInputs
to the KernelCircuitPublicInputs.

If a transaction attempts to set fee_payer multiple times, the
transaction will be considered invalid.

## Deviations

Whereas in the spec we said we would use `contract_address`, we have
updated that to use `storage_contract_address` because it correctly
handles delegate calls: if `is_fee_payer` gets set during delegate call,
the "delegator" should be the `fee_payer`, not the "delegatee".

## Remaining

Actually setting `fee_payer` in a contract, and making assertions.
(AztecProtocol/aztec-packages#5920)

If the fee_payer is not set, the transaction will be considered invalid.
(AztecProtocol/aztec-packages#6343)

## Elsewhere

Unit tests on SerDe
(AztecProtocol/aztec-packages#6339)
iakovenkos pushed a commit that referenced this issue May 15, 2024
## Implemented

[See
spec](https://docs.aztec.network/protocol-specs/gas-and-fees/specifying-gas-fee-info).

A boolean flag `is_fee_payer` in the PrivateCircuitPublicInputs. The
private kernel circuits will check this flag for every call stack item.

When a call stack item is found with `is_fee_payer` set, the kernel
circuit will set `fee_payer` in its PrivateKernelCircuitPublicInputs to
be the callStackItem.contractAddress.

This is subsequently passed through the PublicKernelCircuitPublicInputs
to the KernelCircuitPublicInputs.

If a transaction attempts to set fee_payer multiple times, the
transaction will be considered invalid.

## Deviations

Whereas in the spec we said we would use `contract_address`, we have
updated that to use `storage_contract_address` because it correctly
handles delegate calls: if `is_fee_payer` gets set during delegate call,
the "delegator" should be the `fee_payer`, not the "delegatee".

## Remaining

Actually setting `fee_payer` in a contract, and making assertions.
(#5920)

If the fee_payer is not set, the transaction will be considered invalid.
(#6343)

## Elsewhere

Unit tests on SerDe
(#6339)
@github-project-automation github-project-automation bot moved this from Todo to Done in A3 May 16, 2024
superstar0402 added a commit to superstar0402/aztec-nr that referenced this issue Aug 16, 2024
## Implemented

[See
spec](https://docs.aztec.network/protocol-specs/gas-and-fees/specifying-gas-fee-info).

A boolean flag `is_fee_payer` in the PrivateCircuitPublicInputs. The
private kernel circuits will check this flag for every call stack item.

When a call stack item is found with `is_fee_payer` set, the kernel
circuit will set `fee_payer` in its PrivateKernelCircuitPublicInputs to
be the callStackItem.contractAddress.

This is subsequently passed through the PublicKernelCircuitPublicInputs
to the KernelCircuitPublicInputs.

If a transaction attempts to set fee_payer multiple times, the
transaction will be considered invalid.

## Deviations

Whereas in the spec we said we would use `contract_address`, we have
updated that to use `storage_contract_address` because it correctly
handles delegate calls: if `is_fee_payer` gets set during delegate call,
the "delegator" should be the `fee_payer`, not the "delegatee".

## Remaining

Actually setting `fee_payer` in a contract, and making assertions.
(AztecProtocol/aztec-packages#5920)

If the fee_payer is not set, the transaction will be considered invalid.
(AztecProtocol/aztec-packages#6343)

## Elsewhere

Unit tests on SerDe
(AztecProtocol/aztec-packages#6339)
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

No branches or pull requests

1 participant