-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
onlydust-waveContribute to awesome OSS repos during OnlyDust's open source weekContribute to awesome OSS repos during OnlyDust's open source week
Description
🎯 Objective
Verify the integrity of the smart-meter-data-ledger system, focusing on data logging, data verification, and usage querying flows to ensure transparent and tamper-proof energy usage tracking.
🧪 Test Structure
smart-meter-data-ledger/src/tests/
├── logging.rs // Tests for meter data logging
├── verification.rs // Tests for data verification
├── querying.rs // Tests for usage history and analytics
└── utils.rs // Test helpers and setup🗂 Requirements
-
Data Logging
- Test logging of valid smart meter data with timestamps.
- Verify meter authorization and data integrity.
-
Data Verification
- Ensure accurate verification of submitted meter data by utilities.
- Validate handling of invalid or incomplete data.
-
Usage Querying
- Test retrieval of usage history and aggregated analytics.
- Verify accuracy of queried data.
-
Build and Test
- Tests must pass with
cargo test.
- Tests must pass with
🔍 Key Scenarios
- Data logging for a non-existent meter.
- Unauthorized attempt to log or verify data.
- Querying with missing or tampered data.
- Duplicate data logging attempt.
- Verification of invalid meter data.
🔗 References
- Soroban Documentation - Testing Contracts
- Stellar Developers - Data Management
- Rust Testing Guide
- IEC Smart Meter Standards
📝 Notes
- Cover edge cases like invalid usage values or missing timestamps.
- Ensure auditable test outcomes for data integrity.
- Simulate high-frequency data logging to test scalability.
- Validate integration with
energy-consumption-verifierfor verified data. - Modularize tests to keep files concise and maintainable.
Metadata
Metadata
Assignees
Labels
onlydust-waveContribute to awesome OSS repos during OnlyDust's open source weekContribute to awesome OSS repos during OnlyDust's open source week