<p>Signed Bitcoin transactions are immutable. Their content cannot be changed without invalidating the signature. The only way to &quot;change&quot; a transaction is by replacing it with a new transaction that conflicts with it.</p>
<p>Once transaction data is included in the blockchain it can only be replaced by mining a conflicting transaction into an alternative chaintip that replaces all blocks since it was confirmed. This is practically infeasible even for just a few blocks unless you control a majority of the hashrate for an extended period of time.</p>
<p>Given your recent series of questions, it sounds to me like you jumped into a project very deeply without getting an overview of how Bitcoin works on a fundamental level. You may want to take a look at e.g. Mastering Bitcoin 3rd Edition which you can <a href="https://github.com/bitcoinbook/bitcoinbook" rel="nofollow noreferrer">read online</a> for free.</p>

CC BY-SA 4.0
2024-10-21T15:23:02.327Z
2024-10-21T15:23:02.327Z
Murch
<p>I want to lock funds in Bitcoin using a transaction and include some additional structured data (let's say a struct with several fields). The locked amount should remain unchangeable, but I want to later update certain fields within the struct without modifying the locked amount.</p>
<p>Is it possible to construct a Bitcoin transaction that allows locking funds while also posting some additional data? And more importantly, can the fields of this data structure be modified in later transactions without affecting the locked funds? What would be the best approach to achieve this?</p>

CC BY-SA 4.0
2024-10-10T13:22:43.623Z
@hyunhum-cho can you please have a look at it ?
Nerses Asaturyan
CC BY-SA 4.0
2024-10-10T15:45:12.227Z
I don't see how this is compatible with the notion that confirmed transactions are immutable - do you expect other nodes to somehow replace part of transaction data in old buried blocks in their local storage? -  can you explain?
RedGrittyBrick
CC BY-SA 4.0
2024-10-10T16:57:34.590Z
Yeah I also think it isn't compatible with Bitcoin architecture. Is there any workaround to achieve same result ?
Nerses Asaturyan
CC BY-SA 4.0
2024-10-11T09:44:01.877Z
@RedGrittyBrick I can explain my architecture so you will have more context
Nerses Asaturyan
<transactions><smartcontracts><funds>
How to lock funds in Bitcoin and modify additional data without affecting the locked amount?
Nerses Asaturyan
# How to lock funds in Bitcoin and modify additional data without affecting the locked amount?

(Asked by: username_0 on 2024-10-10)

I want to lock funds in Bitcoin using a transaction and include some additional structured data (let's say a struct with several fields). The locked amount should remain unchangeable, but I want to later update certain fields within the struct without modifying the locked amount.

Is it possible to construct a Bitcoin transaction that allows locking funds while also posting some additional data? And more importantly, can the fields of this data structure be modified in later transactions without affecting the locked funds? What would be the best approach to achieve this?

**Tags:** transactions, smartcontracts, funds

> **Comments:**
> **username_0**: @hyunhum-cho can you please have a look at it ?  
> **username_1**: I don't see how this is compatible with the notion that confirmed transactions are immutable - do you expect other nodes to somehow replace part of transaction data in old buried blocks in their local storage? -  can you explain?  
> **username_0**: Yeah I also think it isn't compatible with Bitcoin architecture. Is there any workaround to achieve same result ?  
> **username_0**: @username_1 I can explain my architecture so you will have more context  

---

## 1 answers

### Answer by username_2 on 2024-10-21. Score: 1

Signed Bitcoin transactions are immutable. Their content cannot be changed without invalidating the signature. The only way to "change" a transaction is by replacing it with a new transaction that conflicts with it.

Once transaction data is included in the blockchain it can only be replaced by mining a conflicting transaction into an alternative chaintip that replaces all blocks since it was confirmed. This is practically infeasible even for just a few blocks unless you control a majority of the hashrate for an extended period of time.

Given your recent series of questions, it sounds to me like you jumped into a project very deeply without getting an overview of how Bitcoin works on a fundamental level. You may want to take a look at e.g. Mastering Bitcoin 3rd Edition which you can [read online](https://github.com/bitcoinbook/bitcoinbook) for free.


---

