<p>A transaction cannot be removed from a blockchain without recomputing the block that contains that transaction and all blocks that came after it. The best you could do is to have a transaction that nullifies the transaction that inserted the data.</p>

CC BY-SA 3.0
2018-02-22T04:51:44.200Z
Thanks, do you have any suggestions in how the format or flow may look like? Since I will be adding a host (by IPv4) and possibly keep adding it, if it is reported as an attacker. Let's say this host got infected but now is fine, hence we need to remove it from "blacklist" or nullify it as you suggested. In the blockchain that hosts exists many times, can you point me to out to an example? Maybe using credits and associate that money(credits) with this data may be an option?
gogasca
CC BY-SA 3.0
2018-02-22T05:03:11.697Z
Bitcoin has something called the UTXO set, and it might be better for you to use something like that. In Bitcoin, each transaction consumes Unspent Transaction Outputs (thus removing them from the UTXO set) and then creates different Unspent Transaction Outputs (thus adding them to the UTXO set). You could do something where you do something like creating outputs where IP addresses are added to the blacklist. Removing IP addresses would be analogous to spending a UTXO. The full blacklist would be like the UTXO set.
Ava Chow
CC BY-SA 3.0
2018-02-22T00:49:41.190Z
2018-02-22T00:49:41.190Z
Ava Chow
<p>Currently, I have the following architecture:</p>

<p>Multiple honeypots for VoIP which detects voice attackers.
These honeypots collect IP and SIP information.
Using a Publisher/Subscribe model (Observer pattern), Publisher notifies clients or subscribers, about attackers in order to update their infrastructure firewalls or by adding VoIP rules blocking attackers dialed number. Example:</p>

<p><em>I detect an IP from France is scanning my network trying to place calls to a number in Dubai. I notify agent which in turn will update firewall access list and my VoIP software to create a block rule to that destination.</em></p>

<p>As I want to partner with other companies, my goal is to have a <strong>shared database</strong> where we can access the information we are collecting, the risk is that as it grows, attacker can insert valid IP addresses or valid numbers, (Example block IPs from our major ITSP, or block the number to our most important customer)
While a whitelist can easily solve this issue.</p>

<p>What I would like to know is if Blockchain will be a valid use case where information containing only suspicious IPs and dialed Telephone numbers/SIP URIs are validated by all parties and shared. I started a prototype based on this <a href="https://medium.com/crypto-currently/lets-make-the-tiniest-blockchain-bigger-ac360a328f4d" rel="nofollow noreferrer">Blockchain</a>.</p>

<p>The idea is that each Honeypot submits a transaction with IP/SIP attacker data. The transaction is mined and added to blockchain. But how can I remove an IP which is no longer valid? Any suggestions?</p>

<p>Flow:</p>

<p>1) Honeypot detects attacker</p>

<p>2) Honeypot submit new transaction to Blockchain:</p>

<pre><code>curl "localhost:5002/transactions/new" -H "Content-Type: application/json" -d '{"sender": "honeypot-2", "recipient":"twilio", "amount": 111, "hosts": ["192.99.38.121"]}'
</code></pre>

<p>3) Transaction is mined.</p>

<pre><code>curl "localhost:5002/mine"
</code></pre>

<p>4) It is detected that <code>192.99.38.121</code> is no longer a threat, how to remove it from blockchain securely?</p>

<blockchain>
Blockchain removing invalid transactions
gogasca
# Blockchain removing invalid transactions

(Asked by: username_0 on 2018-02-19)

Currently, I have the following architecture:

Multiple honeypots for VoIP which detects voice attackers.
These honeypots collect IP and SIP information.
Using a Publisher/Subscribe model (Observer pattern), Publisher notifies clients or subscribers, about attackers in order to update their infrastructure firewalls or by adding VoIP rules blocking attackers dialed number. Example:

*I detect an IP from France is scanning my network trying to place calls to a number in Dubai. I notify agent which in turn will update firewall access list and my VoIP software to create a block rule to that destination.*

As I want to partner with other companies, my goal is to have a **shared database** where we can access the information we are collecting, the risk is that as it grows, attacker can insert valid IP addresses or valid numbers, (Example block IPs from our major ITSP, or block the number to our most important customer)
While a whitelist can easily solve this issue.

What I would like to know is if Blockchain will be a valid use case where information containing only suspicious IPs and dialed Telephone numbers/SIP URIs are validated by all parties and shared. I started a prototype based on this [Blockchain](https://medium.com/crypto-currently/lets-make-the-tiniest-blockchain-bigger-ac360a328f4d).

The idea is that each Honeypot submits a transaction with IP/SIP attacker data. The transaction is mined and added to blockchain. But how can I remove an IP which is no longer valid? Any suggestions?

Flow:

1) Honeypot detects attacker

2) Honeypot submit new transaction to Blockchain:

```
curl "localhost:5002/transactions/new" -H "Content-Type: application/json" -d '{"sender": "honeypot-2", "recipient":"twilio", "amount": 111, "hosts": ["192.99.38.121"]}'

```

3) Transaction is mined.

```
curl "localhost:5002/mine"

```

4) It is detected that `192.99.38.121` is no longer a threat, how to remove it from blockchain securely?

**Tags:** blockchain


---

## 1 answers

### Answer by username_1 on 2018-02-22. Score: 1 | Accepted answer

A transaction cannot be removed from a blockchain without recomputing the block that contains that transaction and all blocks that came after it. The best you could do is to have a transaction that nullifies the transaction that inserted the data.

> **Comments:**
> **username_0**: Thanks, do you have any suggestions in how the format or flow may look like? Since I will be adding a host (by IPv4) and possibly keep adding it, if it is reported as an attacker. Let's say this host got infected but now is fine, hence we need to remove it from "blacklist" or nullify it as you suggested. In the blockchain that hosts exists many times, can you point me to out to an example? Maybe using credits and associate that money(credits) with this data may be an option?  
> **username_1**: Bitcoin has something called the UTXO set, and it might be better for you to use something like that. In Bitcoin, each transaction consumes Unspent Transaction Outputs (thus removing them from the UTXO set) and then creates different Unspent Transaction Outputs (thus adding them to the UTXO set). You could do something where you do something like creating outputs where IP addresses are added to the blacklist. Removing IP addresses would be analogous to spending a UTXO. The full blacklist would be like the UTXO set.  

---

