I'm taking up a project to build a software in python to mine cryptocurrency (preferably bitcoin). I have an overview of the computation that needs to be done.
I would like to know how nodes fetch unconfirmed transactions.
Bitcoin Stack Exchange is a question and answer site for Bitcoin users, developers, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
In brief you would use your Bitcoin libraries functions to perform peer discovery and then periodically communicate with a few peers to collect data.
Your question isn't an exact duplicate of any question I can find but existing answers to the following questions will help:
Other useful resources
invmessages and issues corresponding messages such as