-
Notifications
You must be signed in to change notification settings - Fork 268
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
refactor: nuking pay_refund_with_shielded_rebate flow #9639
refactor: nuking pay_refund_with_shielded_rebate flow #9639
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
a716dbc
to
28e562a
Compare
Changes to public function bytecode sizes
🧾 Summary (100% most significant diffs)
Full diff report 👇
|
28e562a
to
ff23639
Compare
cf9e8d3
to
7c5718b
Compare
@@ -29,7 +29,6 @@ members = [ | |||
"contracts/parent_contract", | |||
"contracts/pending_note_hashes_contract", | |||
"contracts/price_feed_contract", | |||
"contracts/private_fpc_contract", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merged private fpc with FPC as it made sense
} | ||
|
||
#[private] | ||
fn fee_entrypoint_private( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this flow now uses the partial notes refund flow
@@ -675,6 +675,7 @@ contract Token { | |||
fee_payer: AztecAddress, // Address of the entity which will receive the fee note. | |||
user: AztecAddress, // A user for which we are setting up the fee refund. | |||
funded_amount: Field, // The amount the user funded the fee payer with (represents fee limit). | |||
nonce: Field, // A nonce to make authwitness unique. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this as I was getting authwit nullifier collisions (the args were the same across multiple tests).
*/ | ||
private rebateSecret = Fr.random(), | ||
private feeRecipient: AztecAddress, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is code is from PrivateRefundPaymentMethod which was in refunds test before.
const OutrageousPublicAmountAliceDoesNotHave = BigInt(1e8); | ||
const PrivateMintedAlicePrivateBananas = BigInt(1e15); | ||
const outrageousPublicAmountAliceDoesNotHave = BigInt(1e8); | ||
const privateMintedAlicePrivateBananas = BigInt(1e15); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not a fan of not following camel case so I changed this.
@@ -138,6 +127,7 @@ export class FeesTest { | |||
} | |||
|
|||
/** Adds a pending shield transparent node for the banana coin token contract to the pxe. */ | |||
// TODO(benesjan): nuke this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will tackle this in a followup PR
@@ -244,45 +238,6 @@ export class FeesTest { | |||
); | |||
} | |||
|
|||
async applyTokenAndFPC() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now there is just the banana ting and not a separate unnamed token
@@ -36,39 +35,37 @@ describe('e2e_fees private_payment', () => { | |||
await t.teardown(); | |||
}); | |||
|
|||
let InitialSequencerL1Gas: bigint; | |||
let initialSequencerL1Gas: bigint; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once again fixed camelcase issue.
), | ||
}, | ||
}) | ||
.wait(), | ||
).rejects.toThrow('Tx dropped by P2P node.'); | ||
}); | ||
|
||
// TODO(#7694): Remove this test once the lacking feature in TXE is implemented. | ||
it('insufficient funded amount is correctly handled', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was moved over from private_refunds.test.ts as that test file was nuked.
@@ -1,177 +0,0 @@ | |||
import { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nuked this as private_payments.test.ts captures it all sufficiently now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beautiful !
The pay_refund_with_shielded_rebate flow is going away as it relies on the old token shielding flow which is to be removed soon. With that it makes sense to merge the old private fpc with FPC.