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

Remove direct calls to public functions #852

Merged
merged 10 commits into from
Jun 15, 2023

Conversation

spalladino
Copy link
Collaborator

@spalladino spalladino commented Jun 14, 2023

Summary of changes:

  • Removed the PrivateTx and PublicTx subtypes for Tx.
  • Removed the txRequest from a Tx, which was used to indicate a topmost public function call.
  • Removed SignedTx and SignedTxRequest types.
  • Removed public kernel with no previous kernel circuit and input struct.

Fixes #663

Comment on lines +54 to +55
// TODO(#662): Reenable once we can create more than one account.
it.skip('5.4: Should be able to create a commitment in a public function and spend in a private function', async () => {
Copy link
Collaborator Author

@spalladino spalladino Jun 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @PhilWindle to remove skip when 662 is ready. Will require tweaking this bit as well:

if (i == 0) {
// TODO(#662): Let the aztec rpc server generate the keypair rather than hardcoding the private key and generate all accounts as smart accounts
const [txHash, newAddress] = await aztecRpcServer.createSmartAccount(privateKey);
const isMined = await new SentTx(aztecRpcServer, Promise.resolve(txHash)).isMined();
expect(isMined).toBeTruthy();
address = newAddress;
} else {
address = await aztecRpcServer.addExternallyOwnedAccount();
}

@spalladino spalladino requested a review from PhilWindle June 14, 2023 22:09
@spalladino spalladino marked this pull request as ready for review June 14, 2023 22:11
@spalladino spalladino force-pushed the palla/remove-direct-public-fn-calls branch from d79ac82 to 0488196 Compare June 15, 2023 11:41
Copy link
Collaborator

@PhilWindle PhilWindle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of changes but the general gist is fantastic. So much extraneous complexity ripped out. It must have been cathartic.

circuits/cpp/src/aztec3/circuits/kernel/public/.test.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The simplifications in this file alone make me much happier!

@spalladino spalladino force-pushed the palla/remove-direct-public-fn-calls branch from fa73770 to ab08eaf Compare June 15, 2023 14:49
@spalladino spalladino enabled auto-merge (squash) June 15, 2023 14:53
@spalladino spalladino merged commit 8ce528c into master Jun 15, 2023
@spalladino spalladino deleted the palla/remove-direct-public-fn-calls branch June 15, 2023 15:10
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.

Remove direct calls to public functions
3 participants