Tier 1
This page delineates a procedure to affirm the integrity and origin of machine-generated data within a blockchain network, emphasizing “Machine-Origin Authentication” as Tier 1 verification in a Decentralized Physical Infrastructure Network (DePIN).
System Overview
The process involves the following steps:
- Registration: The machine gets registered on the blockchain using a unique identifier.
- Data Generation & Signing: The machine generates data, signs it, and sends the hash to the blockchain.
- Data Storage: The hash gets stored on the blockchain.
- Data Retrieval & Verification: Any party retrieves and verifies the data’s validity from the blockchain.
Prerequisites
- Node.js environment setup.
- Installed
@polkadot/api
,@polkadot/util
,@polkadot/util-crypto
, and@peaq-network/sdk
packages for blockchain interaction. - A seeds.json file containing the seeds for the owner’s and the machine’s accounts.
1. Registration (Machine-Origin Authentication)
The machine is registered on the blockchain by the owner, creating a digital identity that serves as the foundation for Tier 1 verification.
2. Data Generation & Signing (Direct Device Data)
The machine directly generates data, signs it using its secure private key, ensuring that the data is authentic and has not been altered. This constitutes a Tier 1 level of trust.
NOTE
Data signing is an internal process of the machine. Here is a hypothetical code snippet to illustrate this step.
3. Data Storage (Immutable Ledger Entry)
Signed data is stored on the blockchain, providing an immutable record that can be publicly verified, which is consistent with the principles of Tier 1 verification
4. Data Retrieval & Verification (Trust Verification)
Any network participant can retrieve the data and verify its authenticity using the public key associated with the machine’s digital identity. This verification step confirms the Tier 1 status of the data.
Conclusion
The system described here provides a secure method for registering machines and verifying the origin and integrity of their data using cryptographic signatures. This approach aligns with Tier 1 verification in DePIN projects, ensuring the highest level of trust in the data’s direct origin and secure transmission.
Additional Considerations
- Ensure that all key pairs and sensitive information are handled securely.
- Conduct thorough testing in a controlled environment before deploying to production.
- Always keep up to date with the SDK and API documentation from the blockchain network you’re working with.
Developers should refer to the official documentation of the Polkadot.js API and the specific blockchain network for detailed instructions and best practices.
Building upon the established structure of “Machine Data Verification on Blockchain,” we will now introduce the concept of Tier 2 verification, termed “Pattern Matching Validation.” This tier involves validating data that may not originate directly from the device but is relevant to existing devices within the network. The verification in this tier is accomplished by comparing incoming data patterns against known patterns from devices already registered in the system.