Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Conversation

kroist
Copy link
Collaborator

@kroist kroist commented Jul 3, 2025

todo: add tests with real-world aws attestations

@kroist kroist requested a review from Marcin-Radecki July 3, 2025 22:27
Copy link

github-actions bot commented Jul 3, 2025

📊 Coverage Report

📈 Total Coverage Summary

Type Covered Total Coverage
📝 Lines 1590 2218 🟠 71.68%
📄 Statements 1590 2218 🟠 71.68%
⚡ Functions 112 119 🟡 94.11%
🔀 Branches 274 287 🟡 95.47%

Coverage Legend

  • ✅ 100% Coverage
  • 🟡 80-99% Coverage
  • 🟠 50-79% Coverage
  • ❌ 0-49% Coverage

📁 File Coverage

📋 Detailed Coverage Report
File Lines Statements Functions Branches
🟡 zkOS-monorepo/ts/shielder-sdk/src/actions/deposit.ts 88.88% 88.88% 100% 85%
🟡 zkOS-monorepo/ts/shielder-sdk/src/actions/newAccount.ts 84.49% 84.49% 100% 78.94%
zkOS-monorepo/ts/shielder-sdk/src/actions/types.ts 100% 100% 100% 100%
🟡 zkOS-monorepo/ts/shielder-sdk/src/actions/utils.ts 97.33% 97.33% 100% 90.9%
🟠 zkOS-monorepo/ts/shielder-sdk/src/actions/withdraw.ts 77.04% 77.04% 87.5% 100%
zkOS-monorepo/ts/shielder-sdk/src/chain/contract.ts 1.89% 1.89% 0% 0%
zkOS-monorepo/ts/shielder-sdk/src/chain/relayer.ts 31.7% 31.7% 33.33% 50%
zkOS-monorepo/ts/shielder-sdk/src/client/actions.ts 100% 100% 100% 100%
zkOS-monorepo/ts/shielder-sdk/src/client/client.ts 100% 100% 100% 100%
zkOS-monorepo/ts/shielder-sdk/src/client/factories.ts 100% 100% 100% 100%
zkOS-monorepo/ts/shielder-sdk/src/client/types.ts 100% 100% 100% 100%
zkOS-monorepo/ts/shielder-sdk/src/constants.ts 100% 100% 100% 100%
zkOS-monorepo/ts/shielder-sdk/src/errors.ts 100% 100% 100% 100%
zkOS-monorepo/ts/shielder-sdk/src/index.ts 0% 0% 100% 100%
zkOS-monorepo/ts/shielder-sdk/src/state/accountFactory.ts 100% 100% 100% 100%
🟡 zkOS-monorepo/ts/shielder-sdk/src/state/accountOnchain.ts 94.44% 94.44% 100% 77.77%
zkOS-monorepo/ts/shielder-sdk/src/state/accountRegistry.ts 100% 100% 100% 100%
zkOS-monorepo/ts/shielder-sdk/src/state/accountStateSerde.ts 100% 100% 100% 100%
zkOS-monorepo/ts/shielder-sdk/src/state/idManager.ts 100% 100% 100% 100%
zkOS-monorepo/ts/shielder-sdk/src/state/localStateTransition.ts 100% 100% 100% 100%
zkOS-monorepo/ts/shielder-sdk/src/state/sync/chainStateTransition.ts 100% 100% 100% 100%
zkOS-monorepo/ts/shielder-sdk/src/state/sync/historyFetcher.ts 100% 100% 100% 100%
zkOS-monorepo/ts/shielder-sdk/src/state/sync/synchronizer.ts 100% 100% 100% 100%
zkOS-monorepo/ts/shielder-sdk/src/state/sync/tokenAccountFinder.ts 100% 100% 100% 100%
zkOS-monorepo/ts/shielder-sdk/src/state/types.ts 100% 100% 100% 100%
zkOS-monorepo/ts/shielder-sdk/src/storage/storageManager.ts 100% 100% 100% 100%
zkOS-monorepo/ts/shielder-sdk/src/storage/storageSchema.ts 100% 100% 100% 100%
zkOS-monorepo/ts/shielder-sdk/src/types.ts 100% 100% 100% 100%
zkOS-monorepo/ts/shielder-sdk/src/utils.ts 100% 100% 100% 100%
🟡 zkOS-monorepo/ts/shielder-sdk/src/utils/errorHandler.ts 93.33% 93.33% 100% 75%

Copy link

github-actions bot commented Jul 3, 2025

Transaction NameMainCurrentDifference (%)
Deposit (size)20255202550.00000%
DepositERC20 (gas)175945017594500.00000%
DepositNative (gas)17412291741337+0.00620%
NewAccount (size)22867228670.00000%
NewAccountERC20 (gas)17932381793250+0.00067%
NewAccountNative (gas)19972881997252-0.00180%
Withdraw (size)21573215730.00000%
WithdrawERC20 (gas)18609031860927+0.00129%
WithdrawNative (gas)18606881860628-0.00322%

@kroist kroist requested a review from obrok July 4, 2025 09:47
Copy link
Contributor

@Marcin-Radecki Marcin-Radecki left a comment

Choose a reason for hiding this comment

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

Looks legit! Very nice. I cross-checked this with https://github.com/aws/aws-nitro-enclaves-nsm-api/blob/main/docs/attestation_process.md

Just one general comment: we can add appropriate target to https://github.com/Cardinal-Cryptography/zkOS-monorepo/blob/main/ts/package.json#L10 so shielder-sdk-crypto-wasm-light is build in CI on PRs

Base automatically changed from ts-wasm-light to main July 4, 2025 11:05
@kroist kroist merged commit 8513524 into main Jul 9, 2025
13 checks passed
@kroist kroist deleted the aws-nitro-attestation-verification branch July 9, 2025 12:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants