Skip to content

chore: fee cleanup#12941

Merged
Thunkar merged 19 commits intomasterfrom
gj/fee_cleanup
Mar 21, 2025
Merged

chore: fee cleanup#12941
Thunkar merged 19 commits intomasterfrom
gj/fee_cleanup

Conversation

@Thunkar
Copy link
Copy Markdown
Contributor

@Thunkar Thunkar commented Mar 21, 2025

  • SponsoredFeePaymentMethod gets into aztec.js , but that's it (meaning the method can be used from aztec.js, but there's no concept of where's deployed/how to get the address/bytecode, etc). It's under @aztec/aztec.js/fee/testing to make abundantly clear that this is not a "production acceptable" approach.
  • Similarly to setupCanonicalL2FeeJuice there's a utility method that can be used from the CLI/during sandbox setup to deploy a SponsoredFeePaymentContract. It spits out the address where the contract is located, just like the test accounts.
  • You CAN programatically obtain the address of the "canonical" SponsoredFeePaymentContract via @aztec/sandbox, but you CANNOT via @aztec/aztec.js. This is because getting the address implies loading the contract bytecode and it's not a protocol contract, making imports messy and tripping the user into making poor decisions in their app design. If you want to use it in your app, obtain it from the sandbox output or from an announcement (just like a faucet address, for example)
  • This address is only canonical in the sense it's salt is hardcoded to 0 (this lives in @aztec/constants under SPONSORED_FPC_SALT. For testnet it should be prefunded! @PhilWindle @alexghr

This PR also builds upon the work done in aztec.js, allowing us to finally get rid of the special handling of account contract deployments deploy_account_method.ts by creating a new FeePaymentMethod (that's not exposed externally!) that allows an account to pay for its own deployment 😁

@Thunkar Thunkar self-assigned this Mar 21, 2025
@Thunkar Thunkar changed the title Gj/fee cleanup chore: fee cleanup Mar 21, 2025
@Thunkar Thunkar requested a review from benesjan March 21, 2025 17:06
@iAmMichaelConnor
Copy link
Copy Markdown
Contributor

cc @LeilaWang :)

@Thunkar Thunkar merged commit fdf1da4 into master Mar 21, 2025
7 checks passed
@Thunkar Thunkar deleted the gj/fee_cleanup branch March 21, 2025 20:37
PhilWindle pushed a commit that referenced this pull request Mar 24, 2025
🤖 I have created a new Aztec Packages release
---


##
[0.82.1](v0.82.0...v0.82.1)
(2025-03-24)


### Features

* **avm:** Port field gt to vm2
([#12883](#12883))
([0ae6891](0ae6891))
* use msgpack for ClientIvc::Proof in API
([#12911](#12911))
([1a01602](1a01602))


### Bug Fixes

* disable proving on vite box
([#12971](#12971))
([69a0fb6](69a0fb6))
* no hardcoded versions in bbup
([#12944](#12944))
([397144f](397144f))
* pull CRS data ahead of time
([#12945](#12945))
([43155d6](43155d6))
* Remove workaround
([#12952](#12952))
([c3337af](c3337af))
* set the correct env var
([#12959](#12959))
([bd0f4b2](bd0f4b2))
* yolo add bunch of test flakes
([13c19da](13c19da))
* yolo e2e_p2p tests now fully skipped due to huge speed regression
([9141410](9141410))
* yolo txe binds just to localhost by default.
([3933b35](3933b35))


### Miscellaneous

* Change `/bin/bash` shebang to be env based
([#12834](#12834))
([7843a67](7843a67))
* clean up avm codeowners
([#12860](#12860))
([35a8f46](35a8f46))
* deflake the kind smoke test
([#12955](#12955))
([1a37d6d](1a37d6d)),
closes
[#11177](#11177)
* fee cleanup
([#12941](#12941))
([fdf1da4](fdf1da4))
* Increase bot count
([#12963](#12963))
([16edd06](16edd06))
* L2 chain config for alpha testnet
([#12962](#12962))
([e13edb8](e13edb8))
* Reduce bots
([#12953](#12953))
([4bbc5da](4bbc5da))
* remove selector from public call request
([#12828](#12828))
([18bcc1b](18bcc1b))
* replace relative paths to noir-protocol-circuits
([61cf4b6](61cf4b6))
* replace relative paths to noir-protocol-circuits
([4356c17](4356c17))
* replace relative paths to noir-protocol-circuits
([f73f47d](f73f47d))
* Set default proving config to true
([#12964](#12964))
([75c1549](75c1549))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
DanielKotov pushed a commit that referenced this pull request Mar 27, 2025
- `SponsoredFeePaymentMethod` gets into `aztec.js` , but that's it
(meaning the method can be used from aztec.js, but there's no concept of
where's deployed/how to get the address/bytecode, etc). It's under
`@aztec/aztec.js/fee/testing` to make abundantly clear that this is not
a "production acceptable" approach.
- Similarly to `setupCanonicalL2FeeJuice` there's a utility method that
can be used from the CLI/during sandbox setup to deploy a
`SponsoredFeePaymentContract`. It spits out the address where the
contract is located, just like the test accounts.
- You CAN programatically obtain the address of the "canonical"
`SponsoredFeePaymentContract` via `@aztec/sandbox`, but you CANNOT via
`@aztec/aztec.js`. This is because getting the address implies loading
the contract bytecode and it's not a protocol contract, making imports
messy and tripping the user into making poor decisions in their app
design. If you want to use it in your app, obtain it from the sandbox
output or from an announcement (just like a faucet address, for example)
- This address is only canonical in the sense it's salt is hardcoded to
0 (this lives in `@aztec/constants` under `SPONSORED_FPC_SALT`. For
testnet it should be prefunded! @PhilWindle @alexghr

This PR also builds upon the work done in `aztec.js`, allowing us to
finally get rid of the special handling of account contract deployments
`deploy_account_method.ts` by creating a new `FeePaymentMethod` (that's
not exposed externally!) that allows an account to pay for its own
deployment 😁

---------

Co-authored-by: Jan Beneš <janbenes1234@gmail.com>
DanielKotov pushed a commit that referenced this pull request Mar 27, 2025
🤖 I have created a new Aztec Packages release
---


##
[0.82.1](v0.82.0...v0.82.1)
(2025-03-24)


### Features

* **avm:** Port field gt to vm2
([#12883](#12883))
([0ae6891](0ae6891))
* use msgpack for ClientIvc::Proof in API
([#12911](#12911))
([1a01602](1a01602))


### Bug Fixes

* disable proving on vite box
([#12971](#12971))
([69a0fb6](69a0fb6))
* no hardcoded versions in bbup
([#12944](#12944))
([397144f](397144f))
* pull CRS data ahead of time
([#12945](#12945))
([43155d6](43155d6))
* Remove workaround
([#12952](#12952))
([c3337af](c3337af))
* set the correct env var
([#12959](#12959))
([bd0f4b2](bd0f4b2))
* yolo add bunch of test flakes
([13c19da](13c19da))
* yolo e2e_p2p tests now fully skipped due to huge speed regression
([9141410](9141410))
* yolo txe binds just to localhost by default.
([3933b35](3933b35))


### Miscellaneous

* Change `/bin/bash` shebang to be env based
([#12834](#12834))
([7843a67](7843a67))
* clean up avm codeowners
([#12860](#12860))
([35a8f46](35a8f46))
* deflake the kind smoke test
([#12955](#12955))
([1a37d6d](1a37d6d)),
closes
[#11177](#11177)
* fee cleanup
([#12941](#12941))
([fdf1da4](fdf1da4))
* Increase bot count
([#12963](#12963))
([16edd06](16edd06))
* L2 chain config for alpha testnet
([#12962](#12962))
([e13edb8](e13edb8))
* Reduce bots
([#12953](#12953))
([4bbc5da](4bbc5da))
* remove selector from public call request
([#12828](#12828))
([18bcc1b](18bcc1b))
* replace relative paths to noir-protocol-circuits
([61cf4b6](61cf4b6))
* replace relative paths to noir-protocol-circuits
([4356c17](4356c17))
* replace relative paths to noir-protocol-circuits
([f73f47d](f73f47d))
* Set default proving config to true
([#12964](#12964))
([75c1549](75c1549))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
DanielKotov pushed a commit that referenced this pull request Mar 27, 2025
- `SponsoredFeePaymentMethod` gets into `aztec.js` , but that's it
(meaning the method can be used from aztec.js, but there's no concept of
where's deployed/how to get the address/bytecode, etc). It's under
`@aztec/aztec.js/fee/testing` to make abundantly clear that this is not
a "production acceptable" approach.
- Similarly to `setupCanonicalL2FeeJuice` there's a utility method that
can be used from the CLI/during sandbox setup to deploy a
`SponsoredFeePaymentContract`. It spits out the address where the
contract is located, just like the test accounts.
- You CAN programatically obtain the address of the "canonical"
`SponsoredFeePaymentContract` via `@aztec/sandbox`, but you CANNOT via
`@aztec/aztec.js`. This is because getting the address implies loading
the contract bytecode and it's not a protocol contract, making imports
messy and tripping the user into making poor decisions in their app
design. If you want to use it in your app, obtain it from the sandbox
output or from an announcement (just like a faucet address, for example)
- This address is only canonical in the sense it's salt is hardcoded to
0 (this lives in `@aztec/constants` under `SPONSORED_FPC_SALT`. For
testnet it should be prefunded! @PhilWindle @alexghr

This PR also builds upon the work done in `aztec.js`, allowing us to
finally get rid of the special handling of account contract deployments
`deploy_account_method.ts` by creating a new `FeePaymentMethod` (that's
not exposed externally!) that allows an account to pay for its own
deployment 😁

---------

Co-authored-by: Jan Beneš <janbenes1234@gmail.com>
DanielKotov pushed a commit that referenced this pull request Mar 27, 2025
🤖 I have created a new Aztec Packages release
---


##
[0.82.1](v0.82.0...v0.82.1)
(2025-03-24)


### Features

* **avm:** Port field gt to vm2
([#12883](#12883))
([0ae6891](0ae6891))
* use msgpack for ClientIvc::Proof in API
([#12911](#12911))
([1a01602](1a01602))


### Bug Fixes

* disable proving on vite box
([#12971](#12971))
([69a0fb6](69a0fb6))
* no hardcoded versions in bbup
([#12944](#12944))
([397144f](397144f))
* pull CRS data ahead of time
([#12945](#12945))
([43155d6](43155d6))
* Remove workaround
([#12952](#12952))
([c3337af](c3337af))
* set the correct env var
([#12959](#12959))
([bd0f4b2](bd0f4b2))
* yolo add bunch of test flakes
([13c19da](13c19da))
* yolo e2e_p2p tests now fully skipped due to huge speed regression
([9141410](9141410))
* yolo txe binds just to localhost by default.
([3933b35](3933b35))


### Miscellaneous

* Change `/bin/bash` shebang to be env based
([#12834](#12834))
([7843a67](7843a67))
* clean up avm codeowners
([#12860](#12860))
([35a8f46](35a8f46))
* deflake the kind smoke test
([#12955](#12955))
([1a37d6d](1a37d6d)),
closes
[#11177](#11177)
* fee cleanup
([#12941](#12941))
([fdf1da4](fdf1da4))
* Increase bot count
([#12963](#12963))
([16edd06](16edd06))
* L2 chain config for alpha testnet
([#12962](#12962))
([e13edb8](e13edb8))
* Reduce bots
([#12953](#12953))
([4bbc5da](4bbc5da))
* remove selector from public call request
([#12828](#12828))
([18bcc1b](18bcc1b))
* replace relative paths to noir-protocol-circuits
([61cf4b6](61cf4b6))
* replace relative paths to noir-protocol-circuits
([4356c17](4356c17))
* replace relative paths to noir-protocol-circuits
([f73f47d](f73f47d))
* Set default proving config to true
([#12964](#12964))
([75c1549](75c1549))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

3 participants