Bitcoin Forum
May 01, 2024, 09:47:34 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: A question on transaction speed.  (Read 253 times)
UchihaSarada
Full Member
***
Offline Offline

Activity: 434
Merit: 141



View Profile
March 01, 2023, 09:16:49 AM
 #21

They (same fee-rated transactions) won't be confirmed based on "first comes, first serves" in mempools.
Are you sure of that?
I am not sure, but I don't think all miners/mining pools use the same criteria for how to prioritize transactions having the same fee rate. I think every miner/mining pool should have their own criteria.
I am not sure.

Mining pools and miners can include their own transactions with low fee rate in the block they successfully mine. For transactions that are not theirs, they will have different criteria for priority that is combination of fee rate and UTXO age.

Mining and consensus in Mastering Bitcoin.
Quote
Transaction Age, Fees, and Priority

To construct the candidate block, Jing’s bitcoin node selects transactions from the memory pool by applying a priority metric to each transaction and adding the highest priority transactions first. Transactions are prioritized based on the “age” of the UTXO that is being spent in their inputs, allowing for old and high-value inputs to be prioritized over newer and smaller inputs. Prioritized transactions can be sent without any fees, if there is enough space in the block.

The priority of a transaction is calculated as the sum of the value and age of the inputs divided by the total size of the transaction:

Code:
Priority = Sum (Value of input * Input Age) / Transaction Size
In this equation, the value of an input is measured in the base unit, satoshis (1/100m of a bitcoin). The age of a UTXO is the number of blocks that have elapsed since the UTXO was recorded on the blockchain, measuring how many blocks “deep” into the blockchain it is. The size of the transaction is measured in bytes.

Another answer: How do miners choose transactions
Quote
Let me walk you through the lifecycle of a transaction, and I think it'll become clearer.

A sender submits their transaction to the network. Every node checks whether the transaction is spending existing funds and whether it is otherwise valid. If so, they relay the transaction to their peers. This way, transactions disseminate to all participants in the network.

Some of the network participants, miners, continuously attempt to author new blocks. They assemble a block from the valid unconfirmed transactions they receive from their peers. They can choose any subset of the transactions they know about, but generally choose the transactions with the highest feerates to maximize their block reward. They could for example also prefer to include their own transactions, not include any transactions, or instead pick transaction by any other pattern (e.g. oldest first?)—this happens in traces, but usually reduces the revenue of miners, so works against their interests.

Using their draft for the next block, their block template, they repeatedly slightly change a field that takes a random input, the nonce, to see whether they can find a valid block using their template. When a miner exhausts the nonce space, they mix up the template in a different manner.

Once a miner discovers a block template for which the hash is below the difficulty target, they broadcast the new block to the network, extending the blockchain. All the transactions in the block are considered to have gotten their first confirmation and are now part of the blockchain. The successful author of the block pays the block reward out to themselves in the so-called coinbase transaction, the first transaction in the block. The reward can be spent when it has 100 confirmations.

J A C K B I T   |   FreeSpins & FreeBets      Welcome Bonus     Rakeback VIP Club
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▄▄▄ ▄▄▄   C R Y P T O   C A S I N O   &   S P O R T S B O O K   ▄▄▄ ▄▄▄
TalkImg was created especially for hosting images on bitcointalk.org: try it next time you want to post an image
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714556854
Hero Member
*
Offline Offline

Posts: 1714556854

View Profile Personal Message (Offline)

Ignore
1714556854
Reply with quote  #2

1714556854
Report to moderator
1714556854
Hero Member
*
Offline Offline

Posts: 1714556854

View Profile Personal Message (Offline)

Ignore
1714556854
Reply with quote  #2

1714556854
Report to moderator
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
March 01, 2023, 10:07:15 AM
Merited by pooya87 (2), hosseinimr93 (2)
 #22

Transaction priority based on size and age of inputs was only relevant when the majority of transactions did not pay fees. This is no longer the case, and so age of inputs is no longer relevant.

If you have two transactions of different sizes which pay the same fee rate, then the miner is going to pick the one which maximizes their rewards. For example, if there is 1000 vbytes of space left in the block, and there are two transactions of size 900 vbytes and 1000 vbytes respectively both paying 10 sats/vbyte, then the miner will pick the larger of the two transactions, since they can't do anything with the 100 vbytes of space which would be left over by picking the smaller. If, however, there were three transactions of sizes 400 vbytes, 600 vbytes, and 800 bytes (again all paying the same fee rate), then the miner will pick the two smaller ones to most efficiently fill the available space.
bitmover
Legendary
*
Offline Offline

Activity: 2282
Merit: 5914


bitcoindata.science


View Profile WWW
March 01, 2023, 12:58:06 PM
 #23

They (same fee-rated transactions) won't be confirmed based on "first comes, first serves" in mempools.
Are you sure of that?
I am not sure, but I don't think all miners/mining pools use the same criteria for how to prioritize transactions having the same fee rate. I think every miner/mining pool should have their own criteria.

The point is that there is no such thing as "the mempool".

Each node has its own mempool, based on the information they received from other nodes.

A transaction may have come first to one node and later on to other mempool.



Two transactions with same fee rate but with different transaction sizes will have different priority from miners.
You are completely wrong.
Miners prioritize transactions based on their fee rate (the fee paid for 1 virtual byte of data) and it's possible that a transaction paying lower absolute fee has higher priority than a transaction paying higher absolute fee.

hosseinimr93  is correct. What really matter is the fee rate. How much you are paying for each byte of your transaction, no matter how big/small it is.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
cydrix
Full Member
***
Offline Offline

Activity: 602
Merit: 129


View Profile
March 01, 2023, 05:31:51 PM
 #24

Am I missing something, is the movement of bitcoin from one exchange to another faster that moving bitcoins from one wallet like electrum to another?
The speed by which bitcoins are transferred can vary depending on factors such as transaction fees, network congestion, and the processing time of the exchange or wallet service. Moving bitcoins from one exchange to another is generally faster, but transferring between wallets can also be relatively quick if the transaction fee is high enough and the network is not congested.
pooya87
Legendary
*
Offline Offline

Activity: 3430
Merit: 10519



View Profile
March 02, 2023, 12:05:46 PM
Merited by UchihaSarada (1)
 #25

Mining pools and miners can include their own transactions with low fee rate in the block they successfully mine.
Actually they pay 0 fee for such transactions because anything else is like putting their money from one pocket to another. This is why even today we see transactions with 0 fee appear on the blockchain regularly (6 today, 4 yesterday and so on):
https://blockchair.com/bitcoin/transactions?s=time(desc)&q=fee_usd(0),is_coinbase(false)#f=hash,block_id,time,fee,fee_usd,is_coinbase

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
hosseinimr93
Legendary
*
Online Online

Activity: 2380
Merit: 5235



View Profile
March 02, 2023, 02:16:54 PM
 #26

Moving bitcoins from one exchange to another is generally faster, but transferring between wallets can also be relatively quick if the transaction fee is high enough and the network is not congested.
As exchanges usually set the fee rate high enough, transactions made from exchanges are usually confirmed fast. But generally speaking, there is no difference between a transaction made from an exchange and a transaction made from a wallet. Also note that it doesn't matter where you send the fund to at all.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
UchihaSarada
Full Member
***
Offline Offline

Activity: 434
Merit: 141



View Profile
March 03, 2023, 02:18:47 AM
 #27

Actually they pay 0 fee for such transactions because anything else is like putting their money from one pocket to another. This is why even today we see transactions with 0 fee appear on the blockchain regularly (6 today, 4 yesterday and so on):
https://blockchair.com/bitcoin/transactions?s=time(desc)&q=fee_usd(0),is_coinbase(false)#f=hash,block_id,time,fee,fee_usd,is_coinbase
Do they have to prepare those transaction information before they find a block and how they can broadcast it instantly to a block they find?

In a block, transactions include Coinbase transactions and non Coinbase transactions but how mining pool/ miner can include their transaction in a block they find, could you explain the process, please?

J A C K B I T   |   FreeSpins & FreeBets      Welcome Bonus     Rakeback VIP Club
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▄▄▄ ▄▄▄   C R Y P T O   C A S I N O   &   S P O R T S B O O K   ▄▄▄ ▄▄▄
hosseinimr93
Legendary
*
Online Online

Activity: 2380
Merit: 5235



View Profile
March 03, 2023, 06:15:05 AM
 #28

Do they have to prepare those transaction information before they find a block and how they can broadcast it instantly to a block they find?
They simply make a transaction with zero fee and keep it until they find a block and include the transaction.

In a block, transactions include Coinbase transactions and non Coinbase transactions but how mining pool/ miner can include their transaction in a block they find, could you explain the process, please?
Miners are free to include any transaction they want and there is nothing prevent them from including their own transactions.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
March 04, 2023, 09:19:25 AM
Merited by Little Mouse (1)
 #29

Do they have to prepare those transaction information before they find a block
Yes.

and how they can broadcast it instantly to a block they find?
You sound confused about how blocks are constructed.

When you broadcast a transaction to a node, the node verifies it, adds it to its mempool of unconfirmed transactions, and broadcasts it to other nodes. The other nodes repeat this process, until your transaction has spread throughout the network and most/all nodes have it in their individual mempools. A miner who is trying to mine the next block will pull a selection of transactions from the mempool of their node(s). They will organize these transactions in to a block, which is called a candidate block. Then they will attempt to mine this candidate block by constantly incrementing the nonce and extraNonce fields and checking whether the resulting hash meets the target or not.

So, before mining a block, a miner has already constructed the block they are trying to mine, which includes all the transaction inside it. If they are successful in finding a solution, they cannot change any of the transactions inside the block, or else that will invalidate their solution and they will be back at square one. It's not a case of mining a block and then "instantly broadcasting" transactions to that block, as you suggest, but rather constructing the block in advance, and then attempting to mine it.

And so it is easy to see how they can include their own transaction in a block. When pulling a selection of transactions from the mempool to build their candidate block, they can easily just add in one or more of their own transactions. Once they've built the candidate block, they'll attempt to mine it, and if successful, it will include their own transactions.
Jon_Hodl
Member
**
Offline Offline

Activity: 218
Merit: 93

Humble Bitcoin Stacktivist


View Profile WWW
March 04, 2023, 02:16:14 PM
 #30

First of all, I'm sorry to hear that your friend is dealing with the frustration of a pending transaction. I think we have all been there and have had to deal with the learning curve of transaction fees. Luckily for both you and your friend, there are more wallets and tools than ever before so it's easier than ever to bump the fee.

When bitcoiners say that transactions are incredibly fast is because when a transaction receives a confirmation and is aded to the blockchain, it is considered sent much faster than waiting days for fiat payments to clear. When you use a credit/debit card to pay for something in the fiat world, it actually takes days to fully settle between banks. Bitcoin transactions take 10 minutes on average. 

That being said, the way that transaction fees work is that you pay a miner fee to incentivize a miner to add the transaction to the blockchain. The higher the fee, the sooner the transaction will be added to the blockchain.

If your friend sent a transaction and it is stuck "pending", it means that it is in the mempool and is waiting for a miner to add it to the blockchain. Currently, the mempool is bloated with transactions waiting so higher fee txs are being added before your friend's txn.

Depending on what wallet he is using, you can use one of the fee bumping methods (https://www.whatisbitcoin.com/learn/what-is-fee-bumping )available to increase the fee.

In the future, your friend (and you) can check the mempool (https://mempool.space) and make sure that he pays a high enough feerate before he broadcasts the transaction. 

I hope all of that makes sense. Let me know if you have any other questions.

I'm here to chew bubblegum and stack sats....and I'm all out of bubblegum. - Learn More About Bitcoin: What Is Bitcoin?
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!