semiotic-ai / timeline-aggregation-protocol

A fast, efficient and trust-minimized unidirectional micro-payments system.
Apache License 2.0
14 stars 3 forks source link

refactor(aggregator): cleanup struct lifetimes #86

Closed aasseman closed 1 year ago

aasseman commented 1 year ago

Let me know if you think there is more stuff I should clean up.

github-actions[bot] commented 1 year ago

Coverage after merging cleanup into main will be

82.31%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
tap_aggregator/src
   aggregator.rs92.45%100%100%90.70%40–43, 53–56
   main.rs3.23%100%6.67%2.13%12, 16–19, 21, 25–28, 30–33, 35–38, 40–41, 44–46, 49–56, 59–64, 67–71, 73
   server.rs92.59%100%100%90.16%51–55, 75
tap_core/src
   eip_712_signed_message.rs83.78%100%80%85.19%56
   lib.rs87.50%100%87.50%87.50%17
   receipt_aggregate_voucher.rs92.11%100%85.71%93.55%21
tap_core/src/adapters/test
   collateral_adapter_mock.rs82.98%100%71.43%85%28–29, 47, 53–55
   collateral_adapter_test.rs100%100%100%100%
   rav_storage_adapter_mock.rs94.74%100%83.33%96.88%10
   rav_storage_adapter_test.rs100%100%100%100%
   receipt_checks_adapter_mock.rs87.18%100%83.33%87.88%52, 56–58
   receipt_checks_adapter_test.rs95.83%100%100%95%56
   receipt_storage_adapter_mock.rs97.37%100%92.31%98.41%10
   receipt_storage_adapter_test.rs100%100%100%100%
tap_core/src/tap_receipt
   mod.rs66.67%100%50%75%
   receipt.rs79.41%100%77.78%80%20, 44
   received_receipt.rs82.42%100%75.86%83.82%100–102, 109–111, 113–115, 160, 171, 185–187, 95–97
github-actions[bot] commented 1 year ago

🤖 Cargo Audit Report 🤖`

Show Report *** Fetching advisory database from `https://github.com/RustSec/advisory-db.git` Loaded 543 security advisories (from /usr/local/cargo/advisory-db) Updating crates.io index Scanning Cargo.lock for vulnerabilities (435 crate dependencies) Crate: atty Version: 0.2.14 Warning: unsound Title: Potential unaligned read Date: 2021-07-04 ID: RUSTSEC-2021-0145 URL: https://rustsec.org/advisories/RUSTSEC-2021-0145 Dependency tree: atty 0.2.14 ├── criterion 0.4.0 │ └── tap_core 0.1.0 │ └── tap_aggregator 0.1.0 └── clap 3.2.25 ├── svm-rs 0.2.22 │ └── ethers-solc 2.0.4 │ ├── ethers-etherscan 2.0.4 │ │ ├── ethers-middleware 2.0.4 │ │ │ └── ethers 2.0.4 │ │ │ └── tap_core 0.1.0 │ │ ├── ethers-contract-abigen 2.0.4 │ │ │ ├── ethers-contract-derive 2.0.4 │ │ │ │ ├── tap_core 0.1.0 │ │ │ │ └── ethers-contract 2.0.4 │ │ │ │ ├── tap_core 0.1.0 │ │ │ │ ├── ethers-middleware 2.0.4 │ │ │ │ └── ethers 2.0.4 │ │ │ └── ethers-contract 2.0.4 │ │ └── ethers 2.0.4 │ └── ethers 2.0.4 └── criterion 0.4.0 warning: 1 allowed warning found ```

Pusher: @aasseman, Action: pull_request, Working Directory: `, Workflow:tests`

github-actions[bot] commented 1 year ago

Coverage after merging cleanup into main will be

82.31%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
tap_aggregator/src
   aggregator.rs92.45%100%100%90.70%40–43, 53–56
   main.rs3.23%100%6.67%2.13%12, 16–19, 21, 25–28, 30–33, 35–38, 40–41, 44–46, 49–56, 59–64, 67–71, 73
   server.rs92.59%100%100%90.16%51–55, 75
tap_core/src
   eip_712_signed_message.rs83.78%100%80%85.19%56
   lib.rs87.50%100%87.50%87.50%17
   receipt_aggregate_voucher.rs92.11%100%85.71%93.55%21
tap_core/src/adapters/test
   collateral_adapter_mock.rs82.98%100%71.43%85%28–29, 47, 53–55
   collateral_adapter_test.rs100%100%100%100%
   rav_storage_adapter_mock.rs94.74%100%83.33%96.88%10
   rav_storage_adapter_test.rs100%100%100%100%
   receipt_checks_adapter_mock.rs87.18%100%83.33%87.88%52, 56–58
   receipt_checks_adapter_test.rs95.83%100%100%95%56
   receipt_storage_adapter_mock.rs97.37%100%92.31%98.41%10
   receipt_storage_adapter_test.rs100%100%100%100%
tap_core/src/tap_receipt
   mod.rs66.67%100%50%75%
   receipt.rs79.41%100%77.78%80%20, 44
   received_receipt.rs82.42%100%75.86%83.82%100–102, 109–111, 113–115, 160, 171, 185–187, 95–97