It does not have to be valid. If you broadcast an invalid transaction it will simply be rejected. Otherwise it would be put in the mempool of all the miners in the network just like you said.
All answers are great. While the SPV can only sign transactions with the private key it has (just like a full node), its aim is more redirect towards the usability aspect. It allows us to interact with the blockchain network with a bit of a trust from another full node.
Bitcoin Ecosystem
-
What is the difference between a SPV (simplified payment verification) and a full node?
SPV’s are a smaller node that does not carry a full copy of the blockchain. Mobile wallets especially have a SPV connected, which queries to a full node for the blockchain data, in order to construct a transaction. An SPV puts trust in a full node for the queried data of the blockchain. -
What does it mean when a transaction is broadcasted?
Transactions that are broadcasted, are on the blockchain network for nodes to see. When a wallet constructs a transaction, it will sign the transaction with your private key and then broadcast the transaction to the network, for the nodes to see and then, the nodes will add the unconfirmed transaction to the mempool, for miners to pickup. -
How does a miner pick which transactions that gets added to the next block?
When a miner picks which transaction gets added to the next block, they are going through the mempool, which has a record of all of the unconfirmed transactions. Miners will typically look for transactions, which carry a higher transaction fee, to add to their block. The transaction fee is an incentive for the miners, which in turn means that they would want a higher fee paid to them.
Thanks for adding your note.
No problem.
- SPV doesn’t have the full blockchain downloaded instead it can “check” with some full nodes to ensure the correctness of the transaction that the user would like to do
- The transaction is spread through the nodes
- The miner pick up the transaction with highest fees first
-
An SPV does not have the full public ledger of the blockchain in the same way a full node does. An SPV is just a way to communicate to a full node about transactions you want to send into the network. A full node puts unconfirmed transactions in the mempool for miners to pick up and use. Aswell as spreading unconfirmed transactions across the network.
-
It means a transaction that someone wants to make is put into the network so that it can spread across the network. Until a miner picks it up and adds it to the blockchain.
-
It does so based on the transaction fee. Transactions with higher fees are more likely to be picked for the next block. Miners will also look at how complicated a transaction is, the amount of bites it takes up. Transaction with more inputs and outputs are more complicated than transactions with only one input and output.
-
A SPV (simplified payment verification) is also known as a lightweight node (a mobile wallet is usually a SPV). A SPV doesn’t hold a copy of the full blockchain, it only stores the relevant data/TXs regarding its own addresses. In order to send TXs a SPV must query a full node to access the full blockchain (that a full node stores and updates recurrently).
-
The broadcast of a new TX starts with its wallet, a node will pick it up, verify it and if validated will add the TX to its mempool and broadcast it to its peers. These nodes, on their turn, will do the same and broadcast it further out through the network, until it reaches the whole network.
-
The miners are financially incentivized to pick the TXs with the highest fee 1st, i.e. the TXs that pay most sat/B (best price, in satoshi, per byte in the limited block size), since they get to keep the fees (besides the block reward). The miners bear their own operational costs and want, obviously, to sit with a profit after all expenses paid.
*A SPV allows for using Bitcoin without running a full network node. SPV software allows you to confirm a transaction has been added to the blockchain without having to download the blockchain (the full node) which is much larger and requires more storage. SPV allow access via smartphone; a full node is ran on a desktop.
*A transaction is broadcasted when it sent to the mempool where it seen by all nodes an can be accessed by miners.
*A miner picks a transaction from the mempool that has the highest trasaction fee per byte.
This is true. Because of this, wallets set the fee with a unit of measurement called “satoshi per byte”.
Let me explain:
Let’s say have a smaller transaction with a size of 100bytes. The wallet decides to set the unit of account to 2 satoshi per byte. This means that the total fee we are willing to pay is 100x2 = 200 satoshi.
Now let’s have a bigger transaction with a size of 200bytes. The wallet also decides to set the unit of account to 2 satoshi per byte. This means that the total fee we are willing to pay is 200x2 = 400 satoshi.
While one of the transactions is clearly larger and is paying more, they will both be equally prioritized. The unit of measurement “satohsi per byte” does not care how large the transaction is. Doing it this way we eliminate the need to think too much. As long as someone is providing more satoshis per byte, they will have more priority over others
This is a very nice explanation of how transactions actually get propagated. Great job.
Most of the actual users still use an SPV wallet, even in a desktop computer.
A mempool is not a centralized or a predetermined place. Each node in the network will have their own version of the mempool. This means that as you broadcast your transaction it is being propagated between all nodes in the network. Due to the latency of the network, mempools may be different for each node in the network.
Here is a great explanation by one of our students. I really loved this one.
Thanks for the feedback
No problem. Keep up the great work. If you need any help feel free to private message.
- What is the difference between a SPV (simplified payment verification) and a full node? SPV isn’t the entire block chain like a node but can query a local node for information
- What does it mean when a transaction is broadcasted? The node has recieved a valid block from the miner and the node then propogates the new block to the blockchain network.
- How does a miner pick which transactions that gets added to the next block? The miners usually choose transactions from the mempools with the must lucrative fee offering.
What is the difference between a SPV (simplified payment verification) and a full node? SPV isn’t the entire block chain like a node but can query a local node for information
-
What does it mean when a transaction is broadcasted? The node has recieved a valid block from the miner and the node then propogates the new block to the blockchain network.
-
How does a miner pick which transactions that gets added to the next block? The miners usually choose transactions from the mempools with the must lucrative fee offering.
-
SPV does not contain the database of TXs. It queries full nodes on a repeating schedule to get the TXs and status of the blockchain.
-
The transaction is propagated to nearby nodes which then propagate to other nodes. The transaction is considered unconfirmed and it goes into the mempool.
-
Miners pick the transactions that contain the highest fees.
Correct, but when you broadcast a transaction, this means its still not validated, its just the your intention to make a transaction and update the blockchain. In this case, broadcast means that you are spreading the word of your intention to other nodes, and they will do the same if the transaction is valid.
OK and so only a miner can validate the transaction?