chore: Lazy loading artifacts everywhere#12285
Merged
Conversation
Thunkar
commented
Feb 26, 2025
sklppy88
approved these changes
Feb 26, 2025
Contributor
sklppy88
left a comment
There was a problem hiding this comment.
Lovely, just got some small nits !
| * @param signingPrivateKey - ECDSA key used for signing transactions. | ||
| * @returns A wallet for this account that can be used to interact with a contract instance. | ||
| */ | ||
| export function getEcdsaRSSHWallet(pxe: PXE, address: AztecAddress, signingPublicKey: Buffer): Promise<AccountWallet> { |
Contributor
There was a problem hiding this comment.
Suggested change
| export function getEcdsaRSSHWallet(pxe: PXE, address: AztecAddress, signingPublicKey: Buffer): Promise<AccountWallet> { | |
| export function getEcdsaRSSHWallet(pxe: PXE, address: AztecAddress, signingPrivateKey: Buffer): Promise<AccountWallet> { |
Seems like this is more correct
Contributor
Author
There was a problem hiding this comment.
Funnily enough, in this case it is a public key. It's what identifies the private key that lives inside the secure enclave of the mac and is used for actual signing, but we don't have access to it! That's why we keep the public one around to request a signature (essentially "please touchid, sign this with a private key that I can verify with this public key)
yarn-project/protocol-contracts/src/provider/protocol_contracts_provider.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: esau <152162806+sklppy88@users.noreply.github.com>
… gj/lazy_loading_artifacts_everywhere
TomAFrench
added a commit
that referenced
this pull request
Feb 26, 2025
* master: (31 commits) feat: Slack message to ci channel tagging owners on flakes. (#12284) fix: slack notify was broken by quoted commit titles revert: "chore: Fix and reenable fees-settings test (#12302)" fix: run arm64 on master (#12307) yolo fix chore: Fix and reenable fees-settings test (#12302) feat!: rename compute_nullifier_without_context (#12308) chore: Lazy loading artifacts everywhere (#12285) chore: Reenable dapp subscription test (#12304) chore: Run prover test with fake proofs when requested (#12305) chore: Do not set CI_FULL outside CI (#12300) chore: new mnemonic deployments on sepolia (#12076) chore!: enable multiple L1 nodes to be used (#11945) chore: remove no longer supported extension from vscode/extension.json (#12303) fix(e2e): p2p_reqresp (#12297) feat: Sync from noir (#12298) chore: enabling `e2e_contract_updates` in CI + nuking irrelevant test (#12293) feat: prepend based merge (#12093) feat: fetch addresses from registry (#12000) feat: live logs (#12271) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the option to lazily load JSON artifacts in all the packages that were missing that functionality, further improving bundle sizes for the browser and allowing us to finally put limits on our example apps bundle sizes:
noir-protocol-circuits-types/vks: now allow vk lazy imports via theLazyArtifactProviderin the/clientexport, while maintaining the bundled version for the server under/server/vksaccounts: Now all exports provide a lazy version, e.g:@aztec/accounts/schnorr/lazy. This has proven to be complicated due to the testing import leaking into the browser (where type assertions are not widely supported). Now there's also/testing/lazy. This testing package is needed in the browser for the prefunded accounts.protocol-contracts: Now with a lazy version and exportingProtocolContractProvidersso that PXE can be configured with bundled and lazy versions.Besides the type assertion issue, we absolutely want to keep bundled and lazy versions because some environments don't play well with
await import(namely service workers in firefox)