... For example, suppose you want to pay me and you do so by constructing one of these special transactions. Now later, you receive money to the same addresses, and once the balances are high enough, I broadcast the special transaction again and send your money to myself.
Union transaction must contains the block number that must be used to determine all address transactions.
- if later I receive money, this new transaction will have a larger block number, and must not be used in the union transaction.
- if I spend money later (related to union transaction), there will be a "double spend" transaction. This situation is common for transactions. Only one transaction will be selected, so this is not a problem.
First of all, on the technical level, addresses don't exist. What exist are transaction outputs, and transaction outputs themselves don't have addresses, they have output scripts. ...
I mean a special transaction, a separate type. As message transaction, for example.
Balance calculation means "finding all transaction of the addresses". So for your idea to work, you would need to calculate the balance for a given address.
All transactions contain address. So it's need only + one index for array search.
Conventional transactions contain a list of input transaction numbers. They also have to be searched. For each transaction there will be a separate search. There are always more transactions than addresses. Search by address should be faster.
In current situation, the network has lost a lot of coins in small transactions (~< 0,002 BTC), since the commission for their transfer (0.00913 BTC/KB) is larger than the number of coins in this transactions. This is a big problem. The network needs a unite transaction.