Are unconfirmed transactions of a blockchain s memory pool spread over nodes

0 votes
I am trying to implement a blockchain in python, I already have the chain code with the ability to create transactions and blocks (and all cryptographical stuff). I have a local memory pool for unconfirmed transactions, are these transactions supposed to be shared with other nodes?

I have searched for information about this topic but I haven't found any concrete information. In my mind, it makes sense that transactions get spread in a kind of "unconfirmed transactions' ' memory pool and that the nodes check for unconfirmed transactions that they don't have in other nodes, deleting those that already exist in the chain. Is this correct? If yes I would be pleased to receive some help or link to information.

Another question: Let's say I own 0.5 of that coin, I want to transfer them to mister X. I perform my transaction and the node checks that in the current chain, I do have 0.5 coins so I sign my transaction and send it to that supposed unconfirmed transaction pool (mention that those are not on the real chain). Then let's say I make another transaction of 0.5 before that transaction gets confirmed. It's the process of building a block to check that I got 0.5 for the first transaction but I do not for the second? Or is it's work of the process of transaction creation? If it's the second, that unconfirmed transactions should take part in the count of actual money. Any help I can get will be well appreciated!!
Mar 29, 2022 in Blockchain by Soham
• 9,710 points
789 views

1 answer to this question.

0 votes
Yes, as soon as a transaction is received by a node (assuming that node is configured normally) it will broadcast that transaction to its peers immediately following validation. Of course, if the transaction has already been mined (included in a block) it will fail validation. This is necessary because unless that one node has a lot of hash power, it will be very difficult to mine since it would be the only one to know about the transaction. There would also be a lot of conflicts if the mempool wasn't shared.
On your second question:
When you submit a transaction, the wallet software should deduct that from your available balance (assuming it was not rejected). In Bitcoin (and other related currencies), if the transaction is not confirmed (included in a block) within a certain timeframe (Bitcoin is 2 weeks), then it will be removed from the mempool, and the coins are free to spend again. Otherwise, you can do a replace by fee to override that transaction and send coins back to yourself for a small fee.
answered Mar 31, 2022 by Rahul
• 9,680 points

Related Questions In Blockchain

+1 vote
7 answers
+1 vote
1 answer

How is ordering of transactions done in a block in hyperledger?

Consensus is the key concept for validating ...READ MORE

answered May 3, 2018 in Blockchain by Christine
• 15,790 points
1,305 views
0 votes
1 answer

Where are the transaction details of a smart contract is written in Ethereum?

First ques:where in the blockchain is a ...READ MORE

answered Jul 11, 2018 in Blockchain by Shashank
• 10,400 points
802 views
+1 vote
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,460 points
1,399 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,907 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,436 views
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP