user6851: I'm following this guide on metadata transactions with the cardano wallet server. My goal is to prove the existence of a given IPFS hash at a certain point in time. I don't need to send or receive ADA from anyone so as the guide mentions I'm sending 1,000,000 lovelace to myself. I have these two transactions (one & two) on testnet that have been in a pending state for >1 hour.
The first transaction shows ~900 ADA coming from one of my addrs and then 1 ADA going to my address that I specified and then the remainder going to another addr in my wallet. The second transaction is similar but has 3 inputs and 2 outputs.
I'm trying to understand how the eUTXO model works in this situation, I understand that I'm getting all of the ADA back but while these transactions are pending I apparently can't spend anything because I tried a third transaction but it failed saying I don't the 1 ADA required. After some more research I see that I should've specified a TTL so that it doesn't take forever but I have a few questions about how I should I approach this.

Why is the lockup inconsistent? I only need 1 ADA + fee, so why did the first transaction lock up 900 ADA and then the second locked up the remaining ~90? If it is ok with 90 is it possible to specify a smaller number?

What's with the hour long pending state? I have over 150 confirmations, is this due to congestion on testnet? Any suggestions on a TTL for this type of transaction?

The wallet provides several addresses for privacy but in this application design I don't want privacy, the intention is to make the metadata public so it really shouldn't matter what address I use as long as its consistent right? Is there a typical method for selecting an address for public transparancy or just pick the first one?


EDIT
Just a moment ago I realized my local node was showing it was 99.8% synced and I just sent another transaction that updated to in_ledger status really quickly so I'm guessing the sync was why I was seeing the pending status for so long on my local node but I'm still interested in questions 1 & 3 above.

user1656: Seeing as you've solved the mystery around the pending state transactions I will try my best to answer questions 1 and 3.
Question 1: Inconsistent Lockup of UTXOs
Wallets use CIP 2 - Coin Selection Algorithms for Cardano to decide which UTxOs to consume.

There are two main algorithms used by Cardano Wallet:

Largest-First
Random-Improve

In general, Cardano Wallet gives priority to the Random-Improve algorithm, as experimental evidence shows that it
performs better at minimising dust and maintaining a UTxO set with
useful outputs. (See Self Organisation in Coin Selection for more
details.)
However, in rare cases, the Random-Improve algorithm may fail to produce a result. In such cases, Cardano Wallet will fall back to the Largest-First algorithm.

Looking into the transaction history here I can see that the wallet had a limited set of UTxOs to work with, one output with 900 ADA, one with 90 ADA and single ADA outputs here and there. In this case it looks like the random-improve algorithm selected the 900 ADA UTxO first.
Given this knowledge, it does make sense to have multiple evenly distributed UTxOs available for your wallet if you need multiple concurrent transactions between blocks. Wallets like Eternl do this with their "Advanced UTxO Management" feature.
Question 3: Addresses to Use if Privacy isn't needed
Yes it doesn't matter which address you use, as the wallet will always have full control to spend UTxOs across its previously derived addresses. For example wallets like Nami always use the first derived address. It is also worthwhile mentioning that there is no privacy between transactions if all your derived addresses use the same staking key, which is the case for most wallets today. An thread from reddit highlights this.

6851: <p>I'm following this <a href="https://developers.cardano.org/docs/transaction-metadata/how-to-create-a-metadata-transaction-wallet" rel="nofollow noreferrer">guide on metadata</a> transactions with the cardano wallet server. My goal is to prove the existence of a given IPFS hash at a certain point in time. I don't need to send or receive ADA from anyone so as the guide mentions I'm sending 1,000,000 lovelace to myself. I have these two transactions (<a href="https://explorer.cardano-testnet.iohkdev.io/en/transaction?id=3a683fbef89c87734a54af7b87bb73bdac229a3d6c126e5a34c673c3bd89a15d" rel="nofollow noreferrer">one</a> &amp; <a href="https://explorer.cardano-testnet.iohkdev.io/en/transaction?id=505d50ed9eb2af03aed723373c707def24f6613dd7528606e56b5b39fe67981a" rel="nofollow noreferrer">two</a>) on <strong>testnet</strong> that have been in a pending state for &gt;1 hour.</p>
<p>The first transaction shows ~900 ADA coming from one of my addrs and then 1 ADA going to my address that I specified and then the remainder going to another addr in my wallet. The second transaction is similar but has 3 inputs and 2 outputs.</p>
<p>I'm trying to understand how the eUTXO model works in this situation, I understand that I'm getting all of the ADA back but while these transactions are pending I apparently can't spend anything because I tried a third transaction but it failed saying I don't the 1 ADA required. After some more research I see that I should've specified a TTL so that it doesn't take forever but I have a few questions about how I should I approach this.</p>
<ol>
<li><p>Why is the lockup inconsistent? I only need 1 ADA + fee, so why did the first transaction lock up 900 ADA and then the second locked up the remaining ~90? If it is ok with 90 is it possible to specify a smaller number?</p>
</li>
<li><p>What's with the hour long pending state? I have over 150 confirmations, is this due to congestion on testnet? Any suggestions on a TTL for this type of transaction?</p>
</li>
<li><p>The wallet provides several addresses for privacy but in this application design I don't want privacy, the intention is to make the metadata public so it really shouldn't matter what address I use as long as its consistent right? Is there a typical method for selecting an address for public transparancy or just pick the first one?</p>
</li>
</ol>
<p><strong>EDIT</strong>
Just a moment ago I realized my local node was showing it was 99.8% synced and I just sent another <a href="https://explorer.cardano-testnet.iohkdev.io/en/transaction?id=c40dbc63df9966a4704880cd0da79dfff68cc60fcce9bd04a35c81909ff7721a" rel="nofollow noreferrer">transaction</a> that updated to <em>in_ledger</em> status really quickly so I'm guessing the sync was why I was seeing the pending status for so long on my local node but I'm still interested in questions 1 &amp; 3 above.</p>
 1656: <p>Seeing as you've solved the mystery around the pending state transactions I will try my best to answer questions 1 and 3.</p>
<p><strong>Question 1: Inconsistent Lockup of UTXOs</strong></p>
<p>Wallets use <a href="https://cips.cardano.org/cips/cip2/" rel="nofollow noreferrer">CIP 2 - Coin Selection Algorithms for Cardano</a> to decide which UTxOs to consume.</p>
<blockquote>
<p>There are two main algorithms used by Cardano Wallet:</p>
<ul>
<li>Largest-First</li>
<li>Random-Improve</li>
</ul>
<p>In general, Cardano Wallet gives priority to the Random-Improve algorithm, as experimental evidence shows that it
performs better at minimising dust and maintaining a UTxO set with
useful outputs. (See Self Organisation in Coin Selection for more
details.)</p>
<p>However, in rare cases, the Random-Improve algorithm may fail to produce a result. In such cases, Cardano Wallet will fall back to the Largest-First algorithm.</p>
</blockquote>
<p>Looking into the <a href="https://explorer.cardano-testnet.iohkdev.io/en/address?address=addr_test1qzp4lqggu2qfr2qs5plsjh8q7l9y3afcxzwwyfv3em2aqe0k69w3xsq4ruy5tenk59cshs2m26ftpdvacmqcn7yfljps7zazwv&amp;page=3&amp;perPage=2" rel="nofollow noreferrer">transaction history here</a> I can see that the wallet had a limited set of UTxOs to work with, one output with 900 ADA, one with 90 ADA and single ADA outputs here and there. In this case it looks like the random-improve algorithm selected the 900 ADA UTxO first.</p>
<p>Given this knowledge, it does make sense to have multiple evenly distributed UTxOs available for your wallet if you need multiple concurrent transactions between blocks. Wallets like Eternl do this with their &quot;Advanced UTxO Management&quot; feature.</p>
<p><strong>Question 3: Addresses to Use if Privacy isn't needed</strong></p>
<p>Yes it doesn't matter which address you use, as the wallet will always have full control to spend UTxOs across its previously derived addresses. For example wallets like Nami always use the first derived address. It is also worthwhile mentioning that there is no privacy between transactions if all your derived addresses use the same staking key, which is the case for most wallets today. <a href="https://www.reddit.com/r/cardano/comments/ilssj3/privacy_of_spending_addresses/" rel="nofollow noreferrer">An thread from reddit</a> highlights this.</p>
