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

Replace self.caller with self.signer in fee_public #2397

Merged
merged 7 commits into from
Mar 22, 2024

Conversation

raychu86
Copy link
Contributor

@raychu86 raychu86 commented Mar 19, 2024

Motivation

This PR updates the use of self.caller in credits.aleo/fee_public with self.signer. The intention is to enforce that fees must be paid by the signer for safety and clarity.

Programs that import credits.aleo are already unable to call fee_public in an internal function because of this enforcement - https://github.com/AleoHQ/snarkVM/blob/eefd27d8637c78925f25bdb5878e67a9e2addeeb/synthesizer/process/src/trace/mod.rs#L159

This means that self.caller and self.signer must already be equivalent in fee executions, however the change is to make the intention for credits.aleo/fee_public logic extra clear.

Test Plan

A test has been added to check that calls to fee_public and fee_private from external programs are invalid.

Notes

A new genesis block must be generated because keys for fee_public have been updated.

@howardwu howardwu merged commit b028362 into mainnet-staging Mar 22, 2024
61 of 79 checks passed
@howardwu howardwu deleted the update/fee-signer branch March 22, 2024 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants