简体   繁体   English

如何防止将虚假数据发送到区块链

[英]How to prevent fake data from being sent to a Blockchain

I am developing a blockchain for IoT applications, where there are a number of gateways (miners) spread throughout the city and several nodes (sensors) connected to each of them.我正在为物联网应用程序开发一个区块链,其中有许多网关(矿工)遍布整个城市,并且有几个节点(传感器)连接到每个网关。 Each gateway can be added by an end user so this is a untrusted environment.每个网关都可以由最终用户添加,因此这是一个不受信任的环境。 How can I make sure that there isn't fake data being sent to the chain by one of the miners?我如何才能确保其中一位矿工没有向链发送虚假数据?

I have looked up some consensus protocols by find that none fit this specific problem since there is no value being exchanged.我查阅了一些共识协议,发现没有一个适合这个特定问题,因为没有价值被交换。

Every miners sends a ping to a master server and receives from it the list of miners on the network.每个矿工向主服务器发送一个 ping,并从中接收网络上的矿工列表。 Then they connect to each other by p2p.然后他们通过 p2p 相互连接。

Any ideas of how could I solve this?关于如何解决这个问题的任何想法?

Blockchain can be used in both cases permission-less or permissionned, if you want to prevent that anyone can broadcast data, then you have to authenticate the nodes before they can join the network.区块链可以在无许可或许可两种情况下使用,如果你想防止任何人都可以广播数据,那么你必须在节点加入网络之前对它们进行身份验证。 If even after authenticating the nodes there is a chance that an authenticated node send "fake data" then a trust mechanism must be implemented, nodes verify the trustworthiness of the data's source and decide if the node is trusted and accept the data or not.如果即使在对节点进行身份验证之后,经过身份验证的节点仍有可能发送“假数据”,则必须实施信任机制,节点验证数据源的可信度并决定节点是否受信任并接受数据。

In order to prevent spamming or fake data being posted, it has to be added as a consensus rule to the protocol.为了防止发布垃圾邮件或虚假数据,必须将其作为共识规则添加到协议中。 Otherwise, it requires another layer that validates data based on off-chain data (but doesn't prevent data from being stored in blocks).否则,它需要另一个层来验证基于链下数据的数据(但不阻止数据存储在块中)。 Blockchain is for achieving distributed consensus, in a permission-less system.区块链用于在无许可系统中实现分布式共识。 Restricting who can participate is not a permission-less system, and would be a centralized system because someone has to determine who is allowed to participate.限制谁可以参与不是一个无许可的系统,而是一个中心化系统,因为必须有人来决定谁可以参与。

The answer to the query lies in Blockchain Oracles .查询的答案在于Blockchain Oracles

Oracles to-date are centralized services, meaning any smart contract using such services has a single point of failure, which nullifies any benefits gained from the decentralized nature of smart contracts.迄今为止的预言机都是中心化服务,这意味着任何使用此类服务的智能合约都存在单点故障,这抵消了从智能合约的去中心化性质中获得的任何好处。

To fill this gap, Chainlink was developed as the first decentralized oracle that can provide external data to smart contracts.为了填补这一空白,Chainlink 被开发为第一个可以为智能合约提供外部数据的去中心化预言机。 As a result, the security and determinism of smart contracts can be combined with the knowledge and breadth of real-world external events.因此,智能合约的安全性和确定性可以与现实世界外部事件的知识和广度相结合。 Chainlink will provide a smart contract with access to any external API needed. Chainlink 将提供一个智能合约,可以访问任何所需的外部 API。

As according to chainlink here and here根据 chainlink herehere

Blockchains and smart contracts cannot access data from outside of their network.区块链和智能合约无法从其网络外部访问数据。 In order to know what to do, a smart contract often needs access to information from the outside world that is relevant to the contractual agreement, in the form of electronic data, also referred to as oracles.为了知道要做什么,智能合约通常需要以电子数据(也称为预言机)的形式从外部世界获取与合约协议相关的信息。 These oracles are services that send and verify real world occurrences and submit this information to smart contracts, triggering state changes on the blockchain.这些预言机是发送和验证现实世界事件并将此信息提交给智能合约的服务,触发区块链上的状态变化。

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 数字指纹如何防止假公钥通过? - How do digital fingerprints prevent fake public keys from being passed? 一种保护通过网络发送数据的方法? - A way to protect data being sent over a network? 矿工如何隐藏区块链密钥对私钥?它们是如何首先生成的? - How are blockchain keypair private keys hidden from miners, and how are they generated in the first place? 如何使用Node.Js解密从Android(Java)发送的数据 - How to decrypt data sent from Android (Java) using Node.Js 交易如何添加到区块链中? - How do transactions add inside blockchain? 如何识别伪造的 SSL 证书? - How to recognize fake SSL certificates? 如何为应用程序使用区块链创建公共分类帐? - How do i create a public ledger using blockchain for my application? 我如何在比特币区块链中找到我收到的交易? - how can i find my received transaction in Bitcoin Blockchain? 如何解密从 Mifare Desfire EV1 发送的第一条消息 - How to decrypt the first message sent from Mifare Desfire EV1 如何使用 express 和 nuxtjs 加密/解密 API 数据以防止刮擦? - How to encrypt/decrypt API data with express and nuxtjs to prevent scraping?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM