<p>This is a hard question to answer, because &quot;implementing PSBT&quot; isn't very well defined.</p>
<p>PSBT is an interchange format for transaction and related data between pieces of software that want to do something with those transactions. But what software may do with these can vary wildly. Software may author transactions, sign transactions, alter transactions in various ways, combine signatures from multiple signers, construct a broadcastable serialized transaction, ...</p>
<p>The PSBT aspect of these operations is all identical, as it's just a matter of encoding/decoding fields containing information. But the rest of the process may differ. For example, transaction authoring software may need to deal with fee estimation on mainnet, which does not meaningfully exist on testnet.</p>

CC BY-SA 4.0
2024-08-19T16:32:41.053Z
Thanks. What I'm getting is that structurally, they are the same but the processes done to them can be difference across the two networks? All I'm implementing in my project is a way to identify a PSBT (boolean return value to see if a string is correctly PSBT formatted or not) so the network of origin of the PSBTs I use in my tests shouldn't matter.
Myles Sherman
CC BY-SA 4.0
2024-08-19T17:08:17.730Z
There is absolutely nothing testnet-specific/dependent in the PSBT *format*. But realistically, just reading/writing the PSBT format isn't ever what you're going to do with it in production - you'll use it as part of a wallet or other software, and what those things do may very much depend on the network.
Pieter Wuille
CC BY-SA 4.0
2024-08-19T17:42:23.803Z
I believe I have a unique situation in that case because I am simply passing information from one wallet to another and want to make sure the integrity of the data passed is solid and never tampered with. The interface of the destination requires me to give the PSBT and the network parameters and that's it. Really, I don't NEED to check the PSBT but it saves me space complexity in the long run.
Myles Sherman
CC BY-SA 4.0
2024-08-19T12:59:17.243Z
2024-08-19T12:59:17.243Z
Pieter Wuille
<p>PSBTs between test net and main net differ primarily in their network parameters. Test net PSBTs use a separate chain, which means different transaction IDs, address formats, and UTXOs. Unit testing on the test net can validate edge cases, but main net testing is essential to confirm that no test net-specific quirks impact real transactions, especially regarding fees, address formats, and broadcast behavior. Always conduct minimal-value tests on the main net for thorough validation.</p>

CC BY-SA 4.0
2024-08-19T11:47:25.890Z
Address formats are unrelated to PSBT.
Pieter Wuille
CC BY-SA 4.0
2024-08-19T11:35:15.230Z
2024-08-19T11:35:15.230Z
CoinChampion24
<p>Is there a difference between test net and main net PSBTs? Or, if I cover all edge cases for test vectors I created on main net in my unit testing, is that sufficient?</p>

<testnet><java><bip174-psbt><unit-test>
Testnet vs Mainnet PSBTs
Myles Sherman
# Testnet vs Mainnet PSBTs

(Asked by: username_0 on 2024-08-16)

Is there a difference between test net and main net PSBTs? Or, if I cover all edge cases for test vectors I created on main net in my unit testing, is that sufficient?

**Tags:** testnet, java, bip174-psbt, unit-test


---

## 2 answers

### Answer by username_1 on 2024-08-19. Score: 1

This is a hard question to answer, because "implementing PSBT" isn't very well defined.

PSBT is an interchange format for transaction and related data between pieces of software that want to do something with those transactions. But what software may do with these can vary wildly. Software may author transactions, sign transactions, alter transactions in various ways, combine signatures from multiple signers, construct a broadcastable serialized transaction, ...

The PSBT aspect of these operations is all identical, as it's just a matter of encoding/decoding fields containing information. But the rest of the process may differ. For example, transaction authoring software may need to deal with fee estimation on mainnet, which does not meaningfully exist on testnet.

> **Comments:**
> **username_0**: Thanks. What I'm getting is that structurally, they are the same but the processes done to them can be difference across the two networks? All I'm implementing in my project is a way to identify a PSBT (boolean return value to see if a string is correctly PSBT formatted or not) so the network of origin of the PSBTs I use in my tests shouldn't matter.  
> **username_1**: There is absolutely nothing testnet-specific/dependent in the PSBT *format*. But realistically, just reading/writing the PSBT format isn't ever what you're going to do with it in production - you'll use it as part of a wallet or other software, and what those things do may very much depend on the network.  
> **username_0**: I believe I have a unique situation in that case because I am simply passing information from one wallet to another and want to make sure the integrity of the data passed is solid and never tampered with. The interface of the destination requires me to give the PSBT and the network parameters and that's it. Really, I don't NEED to check the PSBT but it saves me space complexity in the long run.  

---

### Answer by username_2 on 2024-08-19. Score: -2

PSBTs between test net and main net differ primarily in their network parameters. Test net PSBTs use a separate chain, which means different transaction IDs, address formats, and UTXOs. Unit testing on the test net can validate edge cases, but main net testing is essential to confirm that no test net-specific quirks impact real transactions, especially regarding fees, address formats, and broadcast behavior. Always conduct minimal-value tests on the main net for thorough validation.

> **Comments:**
> **username_1**: Address formats are unrelated to PSBT.  

---

